Skip to content

Commit 13674eb

Browse files
author
Michal Ostrowski
committed
Use os.path.normpath for source paths.
setuptools is sensitive to "src" vs "./src" and prefers the former. This doesn't matter much, but without using the former generated packages cannot be correctly specified as dependencies of othe packages via a git transport. Make python package zip-safe (i.e. allow execute from zipfile).
1 parent 361bd97 commit 13674eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@
3737
# Optional PySocks support
3838
extras_require = dict(Socks=['PySocks >= 1.5.0'])
3939

40-
base_dir = os.path.relpath(os.path.split(__file__)[0], os.getcwd())
41-
src_dir = os.path.join(base_dir, 'src')
40+
base_dir = os.path.relpath(os.path.normpath(os.path.split(__file__)[0]),
41+
os.getcwd())
42+
src_dir = os.path.normpath(os.path.join(base_dir, 'src'))
4243

4344
setup(
4445
name = 'cm_api',
4546
version = '14.0.0', # Compatible with API v14 (CM 5.9)
4647
packages = find_packages(src_dir, exclude=['cm_api_tests']),
4748
package_dir = {'': src_dir },
48-
49+
zip_safe = True,
4950

5051
# Project uses simplejson, so ensure that it gets installed or upgraded
5152
# on the target machine

0 commit comments

Comments
 (0)