Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ec51f67a
Commit
ec51f67a
authored
Mar 21, 2003
by
Just van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #681927 from Robin Dunn: add option to add shared libraries or
frameworks to the bundle.
parent
4a26f150
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
Lib/plat-mac/bundlebuilder.py
Lib/plat-mac/bundlebuilder.py
+15
-1
No files found.
Lib/plat-mac/bundlebuilder.py
View file @
ec51f67a
...
...
@@ -94,6 +94,10 @@ class BundleBuilder(Defaults):
# (eg. "Contents/Resources/MyStuff/SomeFile.ext).
files
=
[]
# List of shared libraries (dylibs, Frameworks) to bundle with the app
# will be placed in Contents/Frameworks
libs
=
[]
# Directory where the bundle will be assembled.
builddir
=
"build"
...
...
@@ -168,6 +172,9 @@ class BundleBuilder(Defaults):
for
path
in
self
.
resources
:
files
.
append
((
path
,
pathjoin
(
"Contents"
,
"Resources"
,
os
.
path
.
basename
(
path
))))
for
path
in
self
.
libs
:
files
.
append
((
path
,
pathjoin
(
"Contents"
,
"Frameworks"
,
os
.
path
.
basename
(
path
))))
if
self
.
symlink
:
self
.
message
(
"Making symbolic links"
,
1
)
msg
=
"Making symlink from"
...
...
@@ -268,12 +275,14 @@ import sys, os
execdir = os.path.dirname(sys.argv[0])
executable = os.path.join(execdir, "%(executable)s")
resdir = os.path.join(os.path.dirname(execdir), "Resources")
libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
mainprogram = os.path.join(resdir, "%(mainprogram)s")
sys.argv.insert(1, mainprogram)
os.environ["PYTHONPATH"] = resdir
os.environ["PYTHONHOME"] = resdir
os.environ["PYTHONEXECUTABLE"] = executable
os.environ["DYLD_LIBRARY_PATH"] = libdir
os.execve(executable, sys.argv, os.environ)
"""
...
...
@@ -697,6 +706,8 @@ Options:
--link-exec symlink the executable instead of copying it
--standalone build a standalone application, which is fully
independent of a Python installation
--lib=FILE shared library or framework to be copied into
the bundle
-x, --exclude=MODULE exclude module (with --standalone)
-i, --include=MODULE include module (with --standalone)
--package=PACKAGE include a whole package (with --standalone)
...
...
@@ -720,7 +731,8 @@ def main(builder=None):
longopts
=
(
"builddir="
,
"name="
,
"resource="
,
"file="
,
"executable="
,
"mainprogram="
,
"creator="
,
"nib="
,
"plist="
,
"link"
,
"link-exec"
,
"help"
,
"verbose"
,
"quiet"
,
"argv"
,
"standalone"
,
"exclude="
,
"include="
,
"package="
,
"strip"
,
"iconfile="
)
"exclude="
,
"include="
,
"package="
,
"strip"
,
"iconfile="
,
"lib="
)
try
:
options
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
shortopts
,
longopts
)
...
...
@@ -750,6 +762,8 @@ def main(builder=None):
builder
.
creator
=
arg
elif
opt
==
'--iconfile'
:
builder
.
iconfile
=
arg
elif
opt
==
"--lib"
:
builder
.
libs
.
append
(
arg
)
elif
opt
==
"--nib"
:
builder
.
nibname
=
arg
elif
opt
in
(
'-p'
,
'--plist'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment