Skip to content

Commit cc03141

Browse files
committed
packaging: ensure dlls are not included in mac and linux packages
1 parent 66c62e3 commit cc03141

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def run(self):
229229
cx_Freeze.build_exe.run(self)
230230
# build_exe just includes everything inside the directory
231231
# so remove some stuff we don't need
232-
for root, dirs, files in os.walk('build/exe.macosx-10.13-x86_64-2.7/lib'):
232+
for root, dirs, files in os.walk('build/exe.macosx-10.9-x86_64-2.7/lib'):
233233
testing = set(root.split(os.sep)) & set(('test', 'tests', 'testing', 'examples'))
234234
for f in files:
235235
name = os.path.join(root, f)
@@ -245,7 +245,7 @@ def run(self):
245245
'distutils', 'setuptools', 'pydoc_data', 'numpy/core/tests', 'numpy/lib/tests',
246246
'numpy/f2py/tests', 'numpy/distutils', 'numpy/doc',]:
247247
try:
248-
shutil.rmtree('build/exe.macosx-10.13-x86_64-2.7/lib/%s' % module)
248+
shutil.rmtree('build/exe.macosx-10.9-x86_64-2.7/lib/%s' % module)
249249
except EnvironmentError:
250250
pass
251251

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
prune pcbasic/data/__pycache__
3939
"""
4040

41+
_FPM = False
4142

4243
###############################################################################
4344
# get descriptions and version number
@@ -154,8 +155,9 @@ def build_py_ext(obj):
154155
with open(os.path.join(HERE, 'MANIFEST.in'), 'w') as f:
155156
f.write(DUNMANIFESTIN)
156157
f.write(u'prune test\n')
157-
# include binary libraries for Windows & Mac in wheel
158-
f.write(u'include pcbasic/lib/*/*\n')
158+
if not _FPM:
159+
# include binary libraries for Windows & Mac in wheel
160+
f.write(u'include pcbasic/lib/*/*\n')
159161
with open(os.path.join(HERE, 'pcbasic', 'data', 'release.json'), 'w') as f:
160162
json_str = json.dumps(RELEASE_ID)
161163
if isinstance(json_str, bytes):
@@ -233,6 +235,7 @@ def build_py_ext(obj):
233235

234236
sys.argv.remove('--called-by-fpm')
235237

238+
_FPM = True
236239
_TARGET = '/usr/local/'
237240

238241
SETUP_OPTIONS['data_files'] = [
@@ -242,7 +245,6 @@ def build_py_ext(obj):
242245
]
243246

244247

245-
246248
###############################################################################
247249
# run the setup
248250

0 commit comments

Comments
 (0)