summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2016-01-13 17:30:38 +1100
committerBrian May <brian@linuxpenguins.xyz>2016-01-13 19:00:08 +1100
commit1e82571b3d7f34c0760c63ba8553024db86c29bc (patch)
treefc6b4070fe0635b72022a7e312b01e1ca861c835 /setup.py
parentaab973f12e24a50b57b026cf31ff86fb19b1abd5 (diff)
Experimental: Use setuptools-scm
Closes: #58
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index fecf822..f67dee8 100755
--- a/setup.py
+++ b/setup.py
@@ -19,12 +19,20 @@
from setuptools import setup, find_packages
-with open('VERSION.txt', 'r') as f:
- version = f.readline().strip()
+
+def version_scheme(version):
+ from setuptools_scm.version import guess_next_dev_version
+ version = guess_next_dev_version(version)
+ return version.lstrip("v")
setup(
name="sshuttle",
- version=version,
+ use_scm_version={
+ 'write_to': "sshuttle/version.py",
+ 'version_scheme': version_scheme,
+ },
+ setup_requires=['setuptools_scm'],
+ # version=version,
url='https://github.com/sshuttle/sshuttle',
author='Brian May',
author_email='brian@linuxpenguins.xyz',