Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
29fa6a6e
Commit
29fa6a6e
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
improve deps.py to handle non-standard locations of PyQt and SIP
parent
587fe31d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deployment/macos/deps.py
+13
-4
13 additions, 4 deletions
deployment/macos/deps.py
with
13 additions
and
4 deletions
deployment/macos/deps.py
+
13
−
4
View file @
29fa6a6e
...
...
@@ -50,9 +50,10 @@ def collect_deps(stage_dir, components, binaries, site_packages,
if
bin_name
not
in
pool
:
_deps_for_lib
(
bin_name
,
pool
)
for
site_package
in
site_packages
:
full_path
=
os
.
path
.
join
(
site_packages_dir
,
site_package
)
full_path
=
get_python_module_path
(
site_package
)
print
full_path
if
not
os
.
path
.
exists
(
full_path
):
print
'
WARNING
'
,
site_package
,
'
does not exists
'
print
'
WARNING
:
'
,
site_package
,
'
does not exists
'
continue
if
os
.
path
.
isdir
(
full_path
):
for
so_file
in
glob
.
glob
(
os
.
path
.
join
(
full_path
,
'
*.so
'
)):
...
...
@@ -202,6 +203,14 @@ def get_site_package_dir():
return
p
[:
index
+
len
(
pattern
)]
raise
RuntimeError
(
"
Couldn
'
t determine site-packages location
"
)
def
get_python_module_path
(
module
):
for
path
in
sys
.
path
:
full_path
=
os
.
path
.
join
(
path
,
module
)
if
os
.
path
.
exists
(
full_path
):
return
full_path
return
None
def
get_python_home
():
"""
Derive Python home by looking at the location of the os module
...
...
@@ -300,7 +309,7 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False,
open
(
ost_script
,
'
w
'
).
write
(
script
)
os
.
chmod
(
ost_script
,
0555
)
elif
use_rpath
==
False
:
print
'
BIG FAT WARNING: Creati
o
n bundle with @executable_path and default
'
print
'
BIG FAT WARNING: Creatin
g
bundle with @executable_path and default
'
print
'
Python might not work. Test carefully before deploying.
'
if
no_includes
:
...
...
@@ -308,7 +317,7 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False,
os
.
system
(
REMOVE_CURRENT
%
outdir
)
print
'
copying site-packages
'
for
sp
in
SITE_PACKAGES
:
src
=
os
.
path
.
join
(
site_packages
,
sp
)
src
=
get_python_module_path
(
sp
)
if
os
.
path
.
isdir
(
src
):
shutil
.
copytree
(
src
,
os
.
path
.
join
(
outdir
,
'
lib/openstructure
'
,
sp
))
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment