Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
78cb86ae
Commit
78cb86ae
authored
May 09, 2008
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --user option to build_ext
parent
8a2d33ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
command/build_ext.py
command/build_ext.py
+15
-1
No files found.
command/build_ext.py
View file @
78cb86ae
...
...
@@ -10,6 +10,7 @@ __revision__ = "$Id$"
import
sys
,
os
,
string
,
re
from
types
import
*
from
site
import
USER_BASE
,
USER_SITE
from
distutils.core
import
Command
from
distutils.errors
import
*
from
distutils.sysconfig
import
customize_compiler
,
get_python_version
...
...
@@ -93,9 +94,11 @@ class build_ext (Command):
"list of SWIG command line options"
),
(
'swig='
,
None
,
"path to the SWIG executable"
),
(
'user'
,
None
,
"add user include, library and rpath"
),
]
boolean_options
=
[
'inplace'
,
'debug'
,
'force'
,
'swig-cpp'
]
boolean_options
=
[
'inplace'
,
'debug'
,
'force'
,
'swig-cpp'
,
'user'
]
help_options
=
[
(
'help-compiler'
,
None
,
...
...
@@ -123,6 +126,7 @@ class build_ext (Command):
self
.
swig
=
None
self
.
swig_cpp
=
None
self
.
swig_opts
=
None
self
.
user
=
None
def
finalize_options
(
self
):
from
distutils
import
sysconfig
...
...
@@ -257,6 +261,16 @@ class build_ext (Command):
else
:
self
.
swig_opts
=
self
.
swig_opts
.
split
(
' '
)
# Finally add the user include and library directories if requested
if
self
.
user
:
user_include
=
os
.
path
.
join
(
USER_BASE
,
"include"
)
user_lib
=
os
.
path
.
join
(
USER_BASE
,
"lib"
)
if
os
.
path
.
isdir
(
user_include
):
self
.
include_dirs
.
append
(
user_include
)
if
os
.
path
.
isdir
(
user_lib
):
self
.
library_dirs
.
append
(
user_lib
)
self
.
rpath
.
append
(
user_lib
)
# finalize_options ()
...
...
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