Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
7b7addc6
Commit
7b7addc6
authored
9 years ago
by
Pospelov, Gennady
Browse files
Options
Downloads
Patches
Plain Diff
Fixed script bornagain_pyton_install to address recent changes in OS X package structure
parent
aa5e613c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/scripts/fix_apple_bundle.py
+1
-1
1 addition, 1 deletion
cmake/scripts/fix_apple_bundle.py
dev-tools/python-setup/bornagain_python_install.py
+20
-8
20 additions, 8 deletions
dev-tools/python-setup/bornagain_python_install.py
with
21 additions
and
9 deletions
cmake/scripts/fix_apple_bundle.py
+
1
−
1
View file @
7b7addc6
...
@@ -51,7 +51,7 @@ def qtplugins_path():
...
@@ -51,7 +51,7 @@ def qtplugins_path():
def
bornagain_binaries
():
def
bornagain_binaries
():
result
=
glob
.
glob
(
os
.
path
.
join
(
bundle_dir
(),
"
Contents
"
,
"
lib
"
,
"
BornAgain-*
"
,
"
*
"
))
result
=
glob
.
glob
(
os
.
path
.
join
(
bundle_dir
(),
"
Contents
"
,
"
lib
"
,
"
BornAgain-*
"
,
"
*
"
))
result
.
append
(
bundle_main_executable
())
result
.
append
(
bundle_main_executable
())
return
result
return
result
...
...
This diff is collapsed.
Click to expand it.
dev-tools/python-setup/bornagain_python_install.py
+
20
−
8
View file @
7b7addc6
...
@@ -122,7 +122,7 @@ from setuptools import setup
...
@@ -122,7 +122,7 @@ from setuptools import setup
datadir = os.path.join(
'
bornagain
'
,
'
lib
'
,
'
BornAgain-{0}
'
)
datadir = os.path.join(
'
bornagain
'
,
'
lib
'
,
'
BornAgain-{0}
'
)
datafiles = [(datadir, [f for f in glob.glob(os.path.join(datadir,
'
*
'
))])]
datafiles = [(datadir, [f for f in glob.glob(os.path.join(datadir,
'
*
'
))])]
datadir = os.path.join(
'
bornagain
'
,
'
lib
'
,
'
ThirdParty
'
)
datadir = os.path.join(
'
bornagain
'
,
'
lib
'
,
'
Frameworks
'
)
datafiles += [(datadir, [f for f in glob.glob(os.path.join(datadir,
'
*
'
))])]
datafiles += [(datadir, [f for f in glob.glob(os.path.join(datadir,
'
*
'
))])]
setup(name=
'
bornagain
'
,
setup(name=
'
bornagain
'
,
...
@@ -179,12 +179,11 @@ def copy_libraries(app_dir, destination_dir):
...
@@ -179,12 +179,11 @@ def copy_libraries(app_dir, destination_dir):
Copy libraries from BornAgain.app into corresponding BornAgain Python package directory
Copy libraries from BornAgain.app into corresponding BornAgain Python package directory
"""
"""
print
"
--> Copying libraries from
'
{0}
'"
.
format
(
app_dir
)
print
"
--> Copying libraries from
'
{0}
'"
.
format
(
app_dir
)
source
_dir
=
os
.
path
.
join
(
app_dir
,
"
Contents
"
,
"
lib
"
)
app_bornagainlib
_dir
=
os
.
path
.
join
(
app_dir
,
"
Contents
"
,
"
lib
"
,
"
BornAgain-
"
+
BORNAGAIN_VERSION
)
app_
bornagainlib
_dir
=
os
.
path
.
join
(
source
_dir
,
"
BornAgain-
"
+
BORNAGAIN_VERSION
)
app_
frameworks
_dir
=
os
.
path
.
join
(
app
_dir
,
"
Contents
"
,
"
Frameworks
"
)
app_thirdpartylib_dir
=
os
.
path
.
join
(
source_dir
,
"
ThirdParty
"
)
# copying BornAgain libraries
shutil
.
copytree
(
app_bornagainlib_dir
,
os
.
path
.
join
(
destination_dir
,
"
BornAgain-
"
+
BORNAGAIN_VERSION
))
shutil
.
copytree
(
app_bornagainlib_dir
,
os
.
path
.
join
(
destination_dir
,
"
BornAgain-
"
+
BORNAGAIN_VERSION
))
shutil
.
copytree
(
app_thirdpartylib_dir
,
os
.
path
.
join
(
destination_dir
,
"
ThirdParty
"
))
# cleaning unnecessary files
# cleaning unnecessary files
libfiles
=
glob
.
glob
(
os
.
path
.
join
(
destination_dir
,
'
*/libBornAgainGUI*
'
))
libfiles
=
glob
.
glob
(
os
.
path
.
join
(
destination_dir
,
'
*/libBornAgainGUI*
'
))
...
@@ -192,17 +191,30 @@ def copy_libraries(app_dir, destination_dir):
...
@@ -192,17 +191,30 @@ def copy_libraries(app_dir, destination_dir):
os
.
remove
(
f
)
os
.
remove
(
f
)
pass
pass
# copying libraries from Frameworks
frameworks_libs
=
glob
.
glob
(
os
.
path
.
join
(
app_frameworks_dir
,
'
lib*
'
))
frameworks_dest
=
os
.
path
.
join
(
destination_dir
,
"
Frameworks
"
)
if
not
os
.
path
.
exists
(
frameworks_dest
):
os
.
makedirs
(
frameworks_dest
)
for
lib
in
frameworks_libs
:
shutil
.
copyfile
(
lib
,
os
.
path
.
join
(
frameworks_dest
,
os
.
path
.
basename
(
lib
)))
def
patch_libraries
(
dir_name
):
def
patch_libraries
(
dir_name
):
"""
"""
Patches libraries depending on Python to point on the same shared libpython2.7.dylib which current interpreter is using
Patches libraries depending on Python to point on the same shared libpython2.7.dylib which current interpreter is using
"""
"""
print
"
--> Patching libraries to rely on
'
{0}
'"
.
format
(
get_python_shared_library
())
print
"
--> Patching libraries to rely on
'
{0}
'"
.
format
(
get_python_shared_library
())
#libfiles = [(dir_name, [f for f in glob.glob(os.path.join(dir_name, '*/libBornAgainCore*'))])]
libfiles
=
glob
.
glob
(
os
.
path
.
join
(
dir_name
,
'
*/libBornAgain*
'
))
libfiles
=
glob
.
glob
(
os
.
path
.
join
(
dir_name
,
'
*/libBornAgain*
'
))
for
f
in
libfiles
:
cmd
=
"
install_name_tool -delete_rpath @loader_path/../../Frameworks
"
+
f
cmd
=
"
install_name_tool -add_rpath @loader_path/../Frameworks
"
+
f
run_command
(
cmd
)
libfiles
+=
glob
.
glob
(
os
.
path
.
join
(
dir_name
,
'
*/libboost_python*
'
))
libfiles
+=
glob
.
glob
(
os
.
path
.
join
(
dir_name
,
'
*/libboost_python*
'
))
for
f
in
libfiles
:
for
f
in
libfiles
:
cmd
=
"
install_name_tool -change @rpath/libpython2.7.dylib
"
+
get_python_shared_library
()
+
"
"
+
f
# cmd = "install_name_tool -change @rpath/libpython2.7.dylib " + get_python_shared_library() + " " + f
cmd
=
"
install_name_tool -change @rpath/Python.framework/Versions/2.7/Python
"
+
get_python_shared_library
()
+
"
"
+
f
run_command
(
cmd
)
run_command
(
cmd
)
pass
pass
...
...
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