Browse Source

fix problem where if you don't have things installed, it'll

fail to install because installing requires things to be installed...
Not pretty to parse out the version, but other packages do it.. and
better than repeating it multiple times..
main
John-Mark Gurney 5 years ago
parent
commit
9193ffddf2
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      setup.py

+ 9
- 1
setup.py View File

@@ -1,7 +1,15 @@
#!/usr/bin/env python #!/usr/bin/env python


def getversion(fname):
with open(fname) as fp:
v = [ x for x in fp.readlines() if x.startswith('__version__') ]
if len(v) != 1:
raise ValueError('too many lines start with __version__')
return v[0].split("'")[1]

from setuptools import setup from setuptools import setup
from ntunnel import __version__
import os.path
__version__ = getversion(os.path.join('ntunnel', '__init__.py'))


# Install requirements for git: # Install requirements for git:
# https://stackoverflow.com/questions/18026980/python-setuptools-how-can-i-list-a-private-repository-under-install-requires # https://stackoverflow.com/questions/18026980/python-setuptools-how-can-i-list-a-private-repository-under-install-requires


Loading…
Cancel
Save