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
d8a75bf2
Commit
d8a75bf2
authored
Jul 08, 2018
by
Michael Davidsaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.1a6
parent
2d2ca606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
setup.py
setup.py
+1
-1
src/setuptools_dso/dsocmd.py
src/setuptools_dso/dsocmd.py
+12
-12
No files found.
setup.py
View file @
d8a75bf2
...
...
@@ -4,7 +4,7 @@ from setuptools import setup, Extension
setup
(
name
=
'setuptools_dso'
,
version
=
"0.1a
5
"
,
version
=
"0.1a
6
"
,
description
=
"setuptools extension to build non-python shared libraries"
,
long_description
=
"""setuptools extension for building non-python shared libraries
and packaging them for distribution. eg. for use by python extensions.
...
...
src/setuptools_dso/dsocmd.py
View file @
d8a75bf2
...
...
@@ -19,16 +19,17 @@ from distutils import log
Distribution
.
x_dsos
=
None
def
massage_dir_list
(
bdir
,
dirs
):
def
massage_dir_list
(
bdir
s
,
dirs
):
"""Process a list of directories for use with -I or -L
For relative paths, also include paths relative to a build directory
"""
dirs
=
dirs
or
[]
dirs
.
extend
([
os
.
path
.
join
(
bdir
,
D
)
for
D
in
dirs
if
not
os
.
path
.
isabs
(
D
)])
if
os
.
name
==
'nt'
:
bdir
=
os
.
path
.
dirname
(
bdir
)
# strip /Release or /Debug
for
bdir
in
bdirs
:
dirs
.
extend
([
os
.
path
.
join
(
bdir
,
D
)
for
D
in
dirs
if
not
os
.
path
.
isabs
(
D
)])
return
dirs
if
os
.
name
==
'nt'
:
bdir
=
os
.
path
.
dirname
(
bdir
)
# strip /Release or /Debug
dirs
.
extend
([
os
.
path
.
join
(
bdir
,
D
)
for
D
in
dirs
if
not
os
.
path
.
isabs
(
D
)])
return
list
(
filter
(
os
.
path
.
isdir
,
dirs
))
def
expand_sources
(
cmd
,
sources
):
for
i
,
src
in
enumerate
(
sources
):
...
...
@@ -252,8 +253,7 @@ class build_dso(dso2libmixin, Command):
extra_args
=
dso
.
extra_compile_args
or
[]
include_dirs
=
massage_dir_list
(
self
.
build_temp
,
dso
.
include_dirs
or
[])
include_dirs
+=
massage_dir_list
(
self
.
build_lib
,
dso
.
include_dirs
or
[])
include_dirs
=
massage_dir_list
([
self
.
build_temp
,
self
.
build_lib
],
dso
.
include_dirs
or
[])
SRC
=
defaultdict
(
list
)
...
...
@@ -272,7 +272,7 @@ class build_dso(dso2libmixin, Command):
extra_postargs
=
extra_args
+
(
dso
.
lang_compile_args
.
get
(
lang
)
or
[]),
depends
=
dso
.
depends
))
library_dirs
=
massage_dir_list
(
self
.
build_lib
,
dso
.
library_dirs
or
[])
library_dirs
=
massage_dir_list
(
[
self
.
build_lib
]
,
dso
.
library_dirs
or
[])
# the Darwin linker errors if given non-existant -L directories :(
[
self
.
mkpath
(
D
)
for
D
in
library_dirs
]
...
...
@@ -322,8 +322,8 @@ class build_ext(dso2libmixin, _build_ext):
def
finalize_options
(
self
):
_build_ext
.
finalize_options
(
self
)
self
.
include_dirs
=
massage_dir_list
(
self
.
build_temp
,
self
.
include_dirs
or
[])
self
.
library_dirs
=
massage_dir_list
(
self
.
build_lib
,
self
.
library_dirs
or
[])
self
.
include_dirs
=
massage_dir_list
(
[
self
.
build_temp
]
,
self
.
include_dirs
or
[])
self
.
library_dirs
=
massage_dir_list
(
[
self
.
build_lib
]
,
self
.
library_dirs
or
[])
def
run
(
self
):
# the Darwin linker errors if given non-existant directories :(
...
...
@@ -334,8 +334,8 @@ class build_ext(dso2libmixin, _build_ext):
expand_sources
(
self
,
ext
.
sources
)
expand_sources
(
self
,
ext
.
depends
)
ext
.
include_dirs
=
massage_dir_list
(
self
.
build_temp
,
ext
.
include_dirs
or
[])
ext
.
library_dirs
=
massage_dir_list
(
self
.
build_lib
,
ext
.
library_dirs
or
[])
ext
.
include_dirs
=
massage_dir_list
(
[
self
.
build_temp
]
,
ext
.
include_dirs
or
[])
ext
.
library_dirs
=
massage_dir_list
(
[
self
.
build_lib
]
,
ext
.
library_dirs
or
[])
ext
.
extra_link_args
=
ext
.
extra_link_args
or
[]
...
...
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