Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
0a15980d
Commit
0a15980d
authored
Apr 22, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config cleanup in BuildExecutable.py, make it executable
parent
8ea879e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
Cython/Build/BuildExecutable.py
Cython/Build/BuildExecutable.py
+19
-11
No files found.
Cython/Build/BuildExecutable.py
View file @
0a15980d
...
@@ -13,17 +13,22 @@ import sys
...
@@ -13,17 +13,22 @@ import sys
import
os
import
os
from
distutils
import
sysconfig
from
distutils
import
sysconfig
INCDIR
=
sysconfig
.
get_python_inc
()
def
get_config_var
(
name
):
LIBDIR1
=
sysconfig
.
get_config_var
(
'LIBDIR'
)
return
sysconfig
.
get_config_var
(
name
)
or
''
LIBDIR2
=
sysconfig
.
get_config_var
(
'LIBPL'
)
PYLIB
=
sysconfig
.
get_config_var
(
'LIBRARY'
)[
3
:
-
2
]
CC
=
sysconfig
.
get_config_var
(
'CC'
)
INCDIR
=
sysconfig
.
get_python_inc
()
CFLAGS
=
sysconfig
.
get_config_var
(
'CFLAGS'
)
+
' '
+
os
.
environ
.
get
(
'CFLAGS'
,
''
)
LIBDIR1
=
get_config_var
(
'LIBDIR'
)
LINKCC
=
sysconfig
.
get_config_var
(
'LINKCC'
)
LIBDIR2
=
get_config_var
(
'LIBPL'
)
LINKFORSHARED
=
sysconfig
.
get_config_var
(
'LINKFORSHARED'
)
PYLIB
=
get_config_var
(
'LIBRARY'
)
LIBS
=
sysconfig
.
get_config_var
(
'LIBS'
)
if
PYLIB
:
SYSLIBS
=
sysconfig
.
get_config_var
(
'SYSLIBS'
)
PYLIB
=
'-l%s'
%
PYLIB
[
3
:
-
2
]
CC
=
get_config_var
(
'CC'
)
CFLAGS
=
get_config_var
(
'CFLAGS'
)
+
' '
+
os
.
environ
.
get
(
'CFLAGS'
,
''
)
LINKCC
=
get_config_var
(
'LINKCC'
)
LINKFORSHARED
=
get_config_var
(
'LINKFORSHARED'
)
LIBS
=
get_config_var
(
'LIBS'
)
SYSLIBS
=
get_config_var
(
'SYSLIBS'
)
def
_debug
(
msg
,
*
args
):
def
_debug
(
msg
,
*
args
):
if
DEBUG
:
if
DEBUG
:
...
@@ -61,7 +66,7 @@ def runcmd(cmd, shell=True):
...
@@ -61,7 +66,7 @@ def runcmd(cmd, shell=True):
sys
.
exit
(
returncode
)
sys
.
exit
(
returncode
)
def
clink
(
basename
):
def
clink
(
basename
):
runcmd
([
LINKCC
,
'-o'
,
basename
,
basename
+
'.o'
,
'-L'
+
LIBDIR1
,
'-L'
+
LIBDIR2
,
'-l'
+
PYLIB
]
runcmd
([
LINKCC
,
'-o'
,
basename
,
basename
+
'.o'
,
'-L'
+
LIBDIR1
,
'-L'
+
LIBDIR2
,
PYLIB
]
+
LIBS
.
split
()
+
SYSLIBS
.
split
()
+
LINKFORSHARED
.
split
())
+
LIBS
.
split
()
+
SYSLIBS
.
split
()
+
LINKFORSHARED
.
split
())
def
ccompile
(
basename
):
def
ccompile
(
basename
):
...
@@ -114,3 +119,6 @@ def build_and_run(args):
...
@@ -114,3 +119,6 @@ def build_and_run(args):
program_name
=
build
(
input_file
,
cy_args
)
program_name
=
build
(
input_file
,
cy_args
)
exec_file
(
program_name
,
args
)
exec_file
(
program_name
,
args
)
if
__name__
==
'__main__'
:
build_and_run
(
sys
.
argv
[
1
:])
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