Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools_dso
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
setuptools_dso
Commits
455c8e6a
Commit
455c8e6a
authored
Jul 08, 2018
by
Michael Davidsaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
adb9721b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
src/setuptools_dso/__init__.py
src/setuptools_dso/__init__.py
+9
-1
src/setuptools_dso/dsocmd.py
src/setuptools_dso/dsocmd.py
+2
-11
No files found.
src/setuptools_dso/__init__.py
View file @
455c8e6a
...
...
@@ -2,10 +2,18 @@
from
setuptools
import
setup
as
_setup
from
.dsocmd
import
DSO
,
Extension
,
build_dso
,
build_ext
__all__
=
(
'DSO'
,
'Extension'
,
'build_dso'
,
'build_ext'
,
'setup'
,
)
def
setup
(
**
kws
):
cmdclass
=
kws
.
get
(
'cmdclass'
,
{})
cmdclass
[
'build_dso'
]
=
build_dso
cmdclass
[
'build_ext'
]
=
build_ext
kws
[
'cmdclass'
]
=
cmdclass
kws
[
'zip_safe'
]
=
kws
.
get
(
'zip_safe'
,
False
)
and
len
(
kws
.
get
(
'x_dsos'
,
[]))
==
0
kws
[
'zip_safe'
]
=
kws
.
get
(
'zip_safe'
,
False
)
and
len
(
kws
.
get
(
'
ext_modules'
,
[]))
==
0
and
len
(
kws
.
get
(
'
x_dsos'
,
[]))
==
0
_setup
(
**
kws
)
src/setuptools_dso/dsocmd.py
View file @
455c8e6a
...
...
@@ -276,13 +276,9 @@ class build_ext(_build_ext):
osx_changes
.
append
((
'@loader_path/'
+
fullname
,
'@loader_path/%s/%s'
%
(
os
.
path
.
relpath
(
dsopath
,
mypath
),
fullname
)))
# -dylib_file A:B asks the linker to do the equivlaent of:
#
In theory
-dylib_file A:B asks the linker to do the equivlaent of:
# install_name_tool -change A B
ext
.
extra_link_args
.
extend
([
'-v'
,
'-dylib_file'
,
'@loader_path/%s:@loader_path/%s/%s'
%
(
fullname
,
os
.
path
.
relpath
(
dsopath
,
mypath
),
fullname
),
])
# But this seems not to work. So we call install_name_tool below
found
=
True
break
...
...
@@ -295,11 +291,6 @@ class build_ext(_build_ext):
if
platform
.
system
()
==
'Linux'
:
ext
.
extra_link_args
.
extend
([
'-Wl,-rpath,$ORIGIN/%s'
%
os
.
path
.
relpath
(
dsopath
,
mypath
)])
elif
sys
.
platform
==
'darwin'
:
pass
# TODO: avoid otool games with: -dylib_file <install_name>:@loader_path/<my_rel_path>
else
:
pass
# PE has nothing like rpath or install_name, so will have to set PATH when loading
# the Darwin linker errors if given non-existant directories :(
[
self
.
mkpath
(
D
)
for
D
in
ext
.
library_dirs
]
...
...
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