summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2014-03-17 12:42:14 +0100
committerAnthon van der Neut <anthon@mnt.org>2014-03-17 12:42:14 +0100
commitb54bc003810027481e8125be28af7af0781dadcc (patch)
treeb5c2e1b106eb272401eacd341f3d9277557b7dc3 /setup.py
parent677f099cdbbf5d4e313640bf47358fe77ffcf880 (diff)
downloadruamel.std.argparse-b54bc003810027481e8125be28af7af0781dadcc.tar.gz
include version stuff so it can be upgraded
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/setup.py b/setup.py
index 8f83608..e36bc9f 100644
--- a/setup.py
+++ b/setup.py
@@ -15,15 +15,22 @@ exclude_files = [
'setup.py',
]
+if __name__ == '__main__':
+ # put here so setup.py can be imported more easily
+ from setuptools import setup, find_packages, Extension
+ from setuptools.command import install_lib
+
+# < from ruamel.util.new.setupinc import get_version, _check_convert_version
def get_version():
v_i = 'version_info = '
for line in open('__init__.py'):
if not line.startswith(v_i):
continue
s_e = line[len(v_i):].strip()[1:-1].split(', ')
- els = [x.strip()[1:-1] if x[0] in '\'"' else int(x) for x in s_e]
- return els
+ elems = [x.strip()[1:-1] if x[0] in '\'"' else int(x) for x in s_e]
+ break
+ return elems
def _check_convert_version(tup):
@@ -56,15 +63,11 @@ def _check_convert_version(tup):
raise ValueError('First letter of "' + x + '" not recognised')
return ret_val
+
+# < from ruamel.util.new.setupinc import version_info, version_str
version_info = get_version()
version_str = _check_convert_version(version_info)
-
-if __name__ == '__main__':
- # put here so setup.py can be imported more easily
- from setuptools import setup, find_packages, Extension
- from setuptools.command import install_lib
-
-
+# < from ruamel.util.new.setupinc import MyInstallLib
class MyInstallLib(install_lib.install_lib):
"create __init__.py on the fly"
def run(self):
@@ -106,6 +109,9 @@ class MyInstallLib(install_lib.install_lib):
return alt_files
+# <
+
+
def main():
install_requires = [
]