Skip to content

Commit f544683

Browse files
committed
Adjust setup for Python 2.7 and manylinux environment
1 parent 8942689 commit f544683

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

dss_setup_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if sys.platform == 'win32':
1111
DLL_SUFFIX = '.dll'
1212
DLL_PREFIX = ''
13-
elif sys.platform == 'linux':
13+
elif sys.platform in ('linux', 'linux2'):
1414
DLL_SUFFIX = '.so'
1515
DLL_PREFIX = 'lib'
1616
elif sys.platform == 'darwin':

setup.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from setuptools import setup
2-
import re, sys, shutil, os
2+
import re, sys, shutil, os, io
33
import subprocess
44
from dss_setup_common import PLATFORM_FOLDER, DSS_VERSIONS, DLL_SUFFIX, DLL_PREFIX
55

66
# Copy README.md contents
7-
with open('README.md', encoding='utf8') as readme_md:
7+
with io.open('README.md', encoding='utf8') as readme_md:
88
long_description = readme_md.read()
99

1010
# Extract version from the source files
@@ -40,10 +40,15 @@
4040
os.path.join(base_dll_path_out, DLL_PREFIX + fn + DLL_SUFFIX)
4141
)
4242

43+
if os.environ.get('DSS_PYTHON_MANYLINUX', '0') == '1':
44+
# Do not pack .so files when building manylinux wheels
45+
# (auditwheel will copy them anyway)
46+
extra_args = dict()
47+
else:
48+
extra_args = dict(package_data={
49+
'dss': ['*{}'.format(DLL_SUFFIX)]
50+
})
4351

44-
extra_args = dict(package_data={
45-
'dss': ['*{}'.format(DLL_SUFFIX)]
46-
})
4752

4853
setup(
4954
name="dss_python",

0 commit comments

Comments
 (0)