allow installation via direct execution of setup.py from outside the package directory
This commit is contained in:
parent
07e9ec0257
commit
73ec7da13e
1 changed files with 2 additions and 1 deletions
3
setup.py
3
setup.py
|
|
@ -16,6 +16,7 @@
|
||||||
##
|
##
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
|
|
@ -31,7 +32,7 @@ Authors:
|
||||||
- Tobias Oberstein (maintainer)
|
- Tobias Oberstein (maintainer)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSIONFILE = "scour/__init__.py"
|
VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "__init__.py")
|
||||||
verstrline = open(VERSIONFILE, "rt").read()
|
verstrline = open(VERSIONFILE, "rt").read()
|
||||||
VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]"
|
VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]"
|
||||||
mo = re.search(VSRE, verstrline, re.M)
|
mo = re.search(VSRE, verstrline, re.M)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue