summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-09-20 17:01:35 -0400
committerKali Kaneko <kali@leap.se>2016-09-20 17:01:35 -0400
commit70736a67088db938ca7eb9c275323767f4749ffb (patch)
tree722462cff6a3418ca8447791cf73cb118bc75751 /setup.py
parente30e06d9062578e1932b5a6a4c4124a1663e18c2 (diff)
parent8e74ba115f32bdd56a212a4015b836c4ddd7a57a (diff)
Merge tag '0.5.2'
0.5.2
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/setup.py b/setup.py
index 0d4c281..4269718 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,6 @@ dependency_links = [requirement for requirement
in requirements if requirement.startswith('http')]
requirements = [requirement for requirement
in requirements if requirement not in dependency_links]
-requirements.append('dirspec')
tests_requirements = [
'mock',
@@ -78,14 +77,20 @@ class freeze_debianver(Command):
# unpacked source archive. Distribution tarballs contain a pre-generated copy
# of this file.
-version_version = '{version}'
-full_revisionid = '{full_revisionid}'
-"""
- templatefun = r"""
+import json
+import sys
+
+version_json = '''
+{
+ "dirty": false,
+ "error": null,
+ "full-revisionid": "FULL_REVISIONID",
+ "version": "VERSION_STRING"
+}
+''' # END VERSION_JSON
-def get_versions(default={}, verbose=False):
- return {'version': version_version,
- 'full-revisionid': full_revisionid}
+def get_versions():
+ return json.loads(version_json)
"""
def initialize_options(self):
@@ -100,14 +105,13 @@ def get_versions(default={}, verbose=False):
if proceed != "y":
print("He. You scared. Aborting.")
return
- subst_template = self.template.format(
- version=VERSION_SHORT,
- full_revisionid=VERSION_REVISION) + self.templatefun
+ subst_template = self.template.replace(
+ 'VERSION_STRING', VERSION_SHORT).replace(
+ 'FULL_REVISIONID', VERSION_REVISION)
versioneer_cfg = versioneer.get_config_from_root('.')
with open(versioneer_cfg.versionfile_source, 'w') as f:
f.write(subst_template)
-
try:
long_description = open('README.rst').read() + '\n\n\n' + \
open('CHANGELOG').read()