Skip to content

Commit 52d46e8

Browse files
committed
Add CMakeLists for altgraph, modulegraph, and py2app
1 parent cf0da2e commit 52d46e8

File tree

4 files changed

+286
-2
lines changed

4 files changed

+286
-2
lines changed

CMakeLists.txt

+11-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ include(CMakeParseArguments)
44
include(darling_bundle)
55

66
function(build_pybundle name)
7-
cmake_parse_arguments(BUNDLE "FAT" "PYTHON_VERSION;DESTINATION;OUTPUT_NAME" "SOURCES;DEPENDS" ${ARGN})
7+
cmake_parse_arguments(BUNDLE "FAT;NO_SUFFIX" "PYTHON_VERSION;DESTINATION;OUTPUT_NAME" "SOURCES;DEPENDS" ${ARGN})
88

99
if(NOT BUNDLE_OUTPUT_NAME)
1010
set(BUNDLE_OUTPUT_NAME "${name}")
1111
endif()
1212

13+
if (BUNDLE_NO_SUFFIX)
14+
set(BUNDLE_SUFFIX "")
15+
else()
16+
set(BUNDLE_SUFFIX ".so")
17+
endif()
18+
1319
# Apple has removed Python 2.6 support, so disable this codepath
1420
#
1521
# For Darling, although we do want to keep compatability with older software,
@@ -50,7 +56,7 @@ function(build_pybundle name)
5056
install(
5157
PROGRAMS "$<TARGET_FILE:${full_name}>"
5258
DESTINATION "${BUNDLE_DESTINATION}"
53-
RENAME "${BUNDLE_OUTPUT_NAME}.so"
59+
RENAME "${BUNDLE_OUTPUT_NAME}${BUNDLE_SUFFIX}"
5460
)
5561
endfunction(build_pybundle)
5662

@@ -70,6 +76,9 @@ add_subdirectory(Modules/six-1.12.0/six-1.12.0)
7076
add_subdirectory(Modules/macholib-1.5.1/macholib-1.5.1)
7177
add_subdirectory(Modules/xattr-0.6.4/xattr-0.6.4)
7278
add_subdirectory(Modules/setuptools-41.0.1/setuptools-41.0.1)
79+
add_subdirectory(Modules/py2app-0.7.3/py2app-0.7.3-noprebuilt)
80+
add_subdirectory(Modules/altgraph-0.10.2/altgraph-0.10.2)
81+
add_subdirectory(Modules/modulegraph-0.10.4/modulegraph-0.10.4)
7382

7483
#install(FILES Extras-2.6.pth DESTINATION libexec/darling/Library/Python/2.6/site-packages RENAME Extras.pth)
7584
install(FILES Extras-2.7.pth DESTINATION libexec/darling/Library/Python/2.7/site-packages RENAME Extras.pth)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
project(python-altgraph)
2+
3+
set(altgraph_pysrc
4+
altgraph/__init__.py
5+
altgraph/Dot.py
6+
altgraph/Graph.py
7+
altgraph/GraphAlgo.py
8+
altgraph/GraphStat.py
9+
altgraph/GraphUtil.py
10+
altgraph/ObjectGraph.py
11+
)
12+
13+
pyc(py27_altgraph
14+
SOURCES ${altgraph_pysrc}
15+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework//Versions/2.7/Extras/lib/python/altgraph
16+
)
17+
18+
install(
19+
FILES ${altgraph_pysrc}
20+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework//Versions/2.7/Extras/lib/python/altgraph
21+
)
22+
23+
install(
24+
DIRECTORY altgraph.egg-info/
25+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/altgraph-0.10.2-py2.7.egg-info
26+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
project(python-modulegraph)
2+
3+
set(modulegraph_pysrc
4+
modulegraph/__init__.py
5+
modulegraph/__main__.py
6+
modulegraph/_compat.py
7+
modulegraph/find_modules.py
8+
modulegraph/modulegraph.py
9+
modulegraph/util.py
10+
modulegraph/zipio.py
11+
)
12+
13+
pyc(py27_modulegraph
14+
SOURCES ${modulegraph_pysrc}
15+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework//Versions/2.7/Extras/lib/python/modulegraph
16+
)
17+
18+
install(
19+
FILES ${modulegraph_pysrc}
20+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework//Versions/2.7/Extras/lib/python/modulegraph
21+
)
22+
23+
install(
24+
DIRECTORY modulegraph.egg-info/
25+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph-0.10.4-py2.7.egg-info
26+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
project(python-py2app)
2+
3+
set(p2app_dest libexec/darling/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2app)
4+
5+
add_darling_executable(py2app_apptemplate
6+
py2app/apptemplate/src/main.c
7+
)
8+
9+
add_darling_bundle(py2app_bundletemplate ""
10+
py2app/bundletemplate/src/main.m
11+
)
12+
13+
target_link_libraries(py2app_bundletemplate
14+
system
15+
Foundation
16+
AppKit
17+
)
18+
19+
install(
20+
PROGRAMS "$<TARGET_FILE:py2app_apptemplate>"
21+
DESTINATION "${p2app_dest}/apptemplate/prebuilt"
22+
RENAME "main"
23+
)
24+
25+
install(
26+
PROGRAMS "$<TARGET_FILE:py2app_bundletemplate>"
27+
DESTINATION "${p2app_dest}/bundletemplate/prebuilt"
28+
RENAME "main"
29+
)
30+
31+
set(py2app_pysrc
32+
py2app/__init__.py
33+
py2app/build_app.py
34+
py2app/create_appbundle.py
35+
py2app/create_pluginbundle.py
36+
py2app/decorators.py
37+
py2app/filters.py
38+
py2app/script_py2applet.py
39+
py2app/util.py
40+
)
41+
42+
set(py2app_apptemplate_pysrc
43+
py2app/apptemplate/__init__.py
44+
py2app/apptemplate/plist_template.py
45+
py2app/apptemplate/setup.py
46+
)
47+
48+
set(py2app_apptemplate_lib_pysrc
49+
py2app/apptemplate/lib/site.py
50+
)
51+
52+
set(py2app_bootstrap_pysrc
53+
py2app/bootstrap/__init__.py
54+
py2app/bootstrap/argv_emulation.py
55+
py2app/bootstrap/argv_inject.py
56+
py2app/bootstrap/boot_aliasapp.py
57+
py2app/bootstrap/boot_aliasplugin.py
58+
py2app/bootstrap/boot_app.py
59+
py2app/bootstrap/boot_plugin.py
60+
py2app/bootstrap/chdir_resource.py
61+
py2app/bootstrap/disable_linecache.py
62+
py2app/bootstrap/emulate_shell_environment.py
63+
py2app/bootstrap/import_encodings.py
64+
py2app/bootstrap/path_inject.py
65+
py2app/bootstrap/reset_sys_path.py
66+
py2app/bootstrap/semi_standalone_path.py
67+
py2app/bootstrap/setup_pkgresource.py
68+
py2app/bootstrap/site_packages.py
69+
py2app/bootstrap/system_path_extras.py
70+
py2app/bootstrap/virtualenv_site_packages.py
71+
py2app/bootstrap/virtualenv.py
72+
)
73+
74+
set(py2app_bundletemplate_pysrc
75+
py2app/bundletemplate/__init__.py
76+
py2app/bundletemplate/plist_template.py
77+
py2app/bundletemplate/setup.py
78+
)
79+
80+
set(py2app_bundletemplate_lib_pysrc
81+
py2app/bundletemplate/lib/site.py
82+
)
83+
84+
set(py2app_converters_pysrc
85+
py2app/converters/__init__.py
86+
py2app/converters/coredata.py
87+
py2app/converters/nibfile.py
88+
)
89+
90+
set(py2app_recipes_pysrc
91+
py2app/recipes/__init__.py
92+
py2app/recipes/cjkcodecs.py
93+
py2app/recipes/docutils.py
94+
py2app/recipes/email.py
95+
py2app/recipes/matplotlib_prescript.py
96+
py2app/recipes/matplotlib.py
97+
py2app/recipes/numpy.py
98+
py2app/recipes/pydoc.py
99+
py2app/recipes/pygame.py
100+
py2app/recipes/pyopengl.py
101+
py2app/recipes/pyside.py
102+
py2app/recipes/pyzmq.py
103+
py2app/recipes/scipy.py
104+
py2app/recipes/sip.py
105+
py2app/recipes/virtualenv.py
106+
py2app/recipes/wx.py
107+
)
108+
109+
set(py2app_recipes_PIL_pysrc
110+
py2app/recipes/PIL/__init__.py
111+
py2app/recipes/PIL/prescript.py
112+
)
113+
114+
pyc(py27_py2app
115+
SOURCES ${py2app_pysrc}
116+
DESTINATION ${p2app_dest}
117+
)
118+
install(
119+
FILES ${py2app_pysrc}
120+
DESTINATION ${p2app_dest}
121+
)
122+
123+
pyc(py27_py2app_apptemplate
124+
SOURCES ${py2app_apptemplate_pysrc}
125+
DESTINATION ${p2app_dest}/apptemplate
126+
)
127+
install(
128+
FILES ${py2app_apptemplate_pysrc}
129+
DESTINATION ${p2app_dest}/apptemplate
130+
)
131+
132+
pyc(py27_py2app_apptemplate_lib
133+
SOURCES ${py2app_apptemplate_lib_pysrc}
134+
DESTINATION ${p2app_dest}/apptemplate/lib
135+
)
136+
install(
137+
FILES ${py2app_apptemplate_lib_pysrc}
138+
DESTINATION ${p2app_dest}/apptemplate/lib
139+
)
140+
141+
pyc(py27_py2app_bootstrap
142+
SOURCES ${py2app_bootstrap_pysrc}
143+
DESTINATION ${p2app_dest}/bootstrap
144+
)
145+
install(
146+
FILES ${py2app_bootstrap_pysrc}
147+
DESTINATION ${p2app_dest}/bootstrap
148+
)
149+
150+
pyc(py27_py2app_bundletemplate
151+
SOURCES ${py2app_bundletemplate_pysrc}
152+
DESTINATION ${p2app_dest}/bundletemplate
153+
)
154+
install(
155+
FILES ${py2app_bundletemplate_pysrc}
156+
DESTINATION ${p2app_dest}/bundletemplate
157+
)
158+
159+
pyc(py27_py2app_bundletemplate_lib
160+
SOURCES ${py2app_bundletemplate_lib_pysrc}
161+
DESTINATION ${p2app_dest}/bundletemplate/lib
162+
)
163+
install(
164+
FILES ${py2app_bundletemplate_lib_pysrc}
165+
DESTINATION ${p2app_dest}/bundletemplate/lib
166+
)
167+
168+
pyc(py27_py2app_converters
169+
SOURCES ${py2app_converters_pysrc}
170+
DESTINATION ${p2app_dest}/converters
171+
)
172+
install(
173+
FILES ${py2app_converters_pysrc}
174+
DESTINATION ${p2app_dest}/converters
175+
)
176+
177+
pyc(py27_py2app_recipes
178+
SOURCES ${py2app_recipes_pysrc}
179+
DESTINATION ${p2app_dest}/recipes
180+
)
181+
install(
182+
FILES ${py2app_recipes_pysrc}
183+
DESTINATION ${p2app_dest}/recipes
184+
)
185+
186+
pyc(py27_py2app_recipes_PIL
187+
SOURCES ${py2app_recipes_PIL_pysrc}
188+
DESTINATION ${p2app_dest}/recipes/PIL
189+
)
190+
install(
191+
FILES ${py2app_recipes_PIL_pysrc}
192+
DESTINATION ${p2app_dest}/recipes/PIL
193+
)
194+
195+
install(
196+
FILES py2app/apptemplate/lib/__error__.sh
197+
DESTINATION ${p2app_dest}/apptemplate/lib
198+
)
199+
200+
install(
201+
FILES py2app/apptemplate/src/main.c
202+
DESTINATION ${p2app_dest}/apptemplate/src
203+
)
204+
205+
install(
206+
FILES py2app/bundletemplate/lib/__error__.sh
207+
DESTINATION ${p2app_dest}/bundletemplate/lib
208+
)
209+
210+
install(
211+
FILES py2app/bundletemplate/src/main.m
212+
DESTINATION ${p2app_dest}/bundletemplate/src
213+
)
214+
215+
install(
216+
FILES py2app/recipes/qt.conf
217+
DESTINATION ${p2app_dest}/recipes
218+
)
219+
220+
install(
221+
DIRECTORY py2app.egg-info/
222+
DESTINATION libexec/darling/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/py2app-0.7.3-py2.7.egg-info
223+
)

0 commit comments

Comments
 (0)