Skip to content

Commit 03a7834

Browse files
committed
Attempt to fix issue with pymunk dll includes.
1 parent bd4e97e commit 03a7834

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

setup.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from setuptools import setup, find_packages
2+
import os
23
from os import path
34
import sys
45

@@ -18,9 +19,23 @@
1819
#
1920
from cx_Freeze import setup, Executable
2021

22+
import cx_Freeze.hooks
23+
if not hasattr(cx_Freeze.hooks, 'load_pymunk'):
24+
def load_pymunk(finder, module):
25+
"""The chipmunk.dll or .dylib or .so is included in the package.
26+
But it is not found by cx_Freeze, so we include it.
27+
"""
28+
import pymunk
29+
finder.IncludeFiles(pymunk.chipmunk_path,
30+
os.path.join(os.path.basename(pymunk.chipmunk_path)),
31+
copyDependentFiles = False)
32+
cx_Freeze.hooks.load_pymunk = load_pymunk
33+
2134
# Dependencies are automatically detected, but it might need fine tuning.
2235
build_exe_options = {
23-
"packages": ["os", "pygame", "sys", "random"],
36+
"packages": [
37+
"os", "pygame", "sys", "random", "pyscroll", "pytmx", "thorpy", "pymunk"
38+
],
2439
"excludes": ["tkinter"],
2540
}
2641
# GUI applications require a different base on Windows (the default is for a
@@ -70,7 +85,7 @@
7085
# package_data={'stuntcat': []},
7186
url='https://github.com/pygame/stuntcat',
7287
install_requires=['pygame'],
73-
version='0.0.10',
88+
version='0.0.11',
7489
entry_points={
7590
'console_scripts': [
7691
'stuntcat=stuntcat.cli:main',

0 commit comments

Comments
 (0)