Skip to content

Commit 2ba9cb3

Browse files
committed
Revert move to SCM driven version number derived from VCS and back to hard coded version
Change VERSION constant from string version (e.g. 2.2.1) back to semver list (e.g. [2, 2, 1]) Replace STR_VERSION constant This reverts b189a1e Also move to version 2.2.2
1 parent 86ef503 commit 2ba9cb3

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.2.2] - 2019-10-07
10+
### Fixed
11+
* Reverted the move to using setuptools-scm as it's [not actually meant to be
12+
used in the package code, only in setup.py](https://github.com/pypa/setuptools_scm/issues/354#issuecomment-519407730).
13+
setuptools-scm was causing an `LookupError: setuptools-scm was unable to detect version` error
14+
915
## [2.2.1] - 2019-10-07
1016
### Added
1117
* Mozilla code of conduct
@@ -89,7 +95,8 @@ contributed!)
8995
* Has a version number. (Yippie!)
9096
* First more-or-less stable version
9197

92-
[Unreleased]: https://github.com/mozilla/agithub/compare/v2.2.1...HEAD
98+
[Unreleased]: https://github.com/mozilla/agithub/compare/v2.2.2...HEAD
99+
[2.2.2]: https://github.com/mozilla/agithub/compare/v2.2.1...v2.2.2
93100
[2.2.1]: https://github.com/mozilla/agithub/compare/v2.2.0...v2.2.1
94101
[2.2.0]: https://github.com/mozilla/agithub/compare/v2.1...v2.2.0
95102
[2.1]: https://github.com/mozilla/agithub/compare/v2.0...v2.1

agithub/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2012-2016 Jonathan Paugh and contributors
22
# See COPYING for license details
3-
from agithub.base import VERSION
3+
from agithub.base import VERSION, STR_VERSION
44

5-
__all__ = ["VERSION"]
5+
__all__ = ["VERSION", "STR_VERSION"]

agithub/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# See COPYING for license details
33
import json
44
from functools import partial, update_wrapper
5-
from setuptools_scm import get_version
65

76
import sys
87
if sys.version_info[0:2] > (3, 0):
@@ -15,13 +14,14 @@
1514
class ConnectionError(OSError):
1615
pass
1716

18-
VERSION = get_version(root='..', relative_to=__file__)
17+
VERSION = [2, 2, 2]
18+
STR_VERSION = 'v' + '.'.join(str(v) for v in VERSION)
1919

2020
# These headers are implicitly included in each request; however, each
2121
# can be explicitly overridden by the client code. (Used in Client
2222
# objects.)
2323
_default_headers = {
24-
'user-agent': 'agithub/' + VERSION,
24+
'user-agent': 'agithub/' + STR_VERSION,
2525
'content-type': 'application/json'
2626
}
2727

setup.cfg

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[egg_info]
2+
tag_build =
3+
tag_date = 0
4+
tag_svn_revision = 0
5+

setup.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
with open(path.join(here, 'README.md')) as f:
66
long_description = f.read()
77

8-
test_requirements = ['pytest']
9-
10-
extras = {
11-
"test": test_requirements,
12-
}
8+
version = '2.2.2'
139

1410
setup(name='agithub',
11+
version=version,
1512
description="A lightweight, transparent syntax for REST clients",
1613
long_description=long_description,
1714
long_description_content_type='text/markdown',
@@ -32,9 +29,4 @@
3229
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
3330
include_package_data=True,
3431
zip_safe=False,
35-
tests_require=test_requirements,
36-
extras_require=extras,
37-
setup_requires=['setuptools-scm'],
38-
use_scm_version=True,
39-
install_requires=['setuptools-scm'],
4032
)

0 commit comments

Comments
 (0)