Hopefully definite fix for building from outside package directory (follow-up for 73ec7da13e)
`find_packages` does not seem to work correctly when the working directory does not equal the package directory (resulted in the actual module not being installed). Fix this by changing the working directory during setup.
This commit is contained in:
parent
939dd160bc
commit
d9c273a72c
1 changed files with 7 additions and 1 deletions
8
setup.py
8
setup.py
|
|
@ -32,7 +32,11 @@ Authors:
|
||||||
- Tobias Oberstein (maintainer)
|
- Tobias Oberstein (maintainer)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "__init__.py")
|
old_path = os.getcwd()
|
||||||
|
src_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
os.chdir(src_path)
|
||||||
|
|
||||||
|
VERSIONFILE = "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)
|
||||||
|
|
@ -74,3 +78,5 @@ setup (
|
||||||
"Topic :: Utilities"],
|
"Topic :: Utilities"],
|
||||||
keywords = 'svg optimizer'
|
keywords = 'svg optimizer'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
os.chdir(old_path)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue