summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2016-04-21 04:44:15 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2016-04-21 04:44:15 +0300
commit72769abb97751051fedc47b8c5f13cde3f44bec1 (patch)
tree09a80b9132bfd83d859cc9a2c8be2c839abb61ce
parent80807a90a24defa909ee55a39ee1b4b0ad6510ba (diff)
downloadapscheduler-72769abb97751051fedc47b8c5f13cde3f44bec1.tar.gz
Reverted the setuptools dependency bump
CentOS 7 apparently still has a stone age setuptools version so the dependency can't be upgraded without breaking the ability of the package maintainers to create a native package. So an alternative method for providing the version information in the top level package's __init__ module was implemented. Closes #130
-rw-r--r--apscheduler/__init__.py8
-rw-r--r--setup.py2
2 files changed, 4 insertions, 6 deletions
diff --git a/apscheduler/__init__.py b/apscheduler/__init__.py
index 74000e8..cda59d4 100644
--- a/apscheduler/__init__.py
+++ b/apscheduler/__init__.py
@@ -1,6 +1,4 @@
# These will be removed in APScheduler 4.0.
-parsed_version = __import__('pkg_resources').get_distribution('APScheduler').parsed_version
-version_info = tuple(int(x) if x.isdigit() else x for x in parsed_version.public.split('.'))
-version = parsed_version.base_version
-release = __version__ = parsed_version.public
-del parsed_version
+release = __import__('pkg_resources').get_distribution('APScheduler').version.split('-')[0]
+version_info = tuple(int(x) if x.isdigit() else x for x in release.split('.'))
+version = __version__ = '.'.join(str(x) for x in version_info[:3])
diff --git a/setup.py b/setup.py
index ad213a2..bc2755d 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,7 @@ setup(
'setuptools_scm'
],
install_requires=[
- 'setuptools >= 11',
+ 'setuptools >= 0.7',
'six >= 1.4.0',
'pytz',
'tzlocal >= 1.2',