Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3d2fc15f
Commit
3d2fc15f
authored
Sep 21, 2012
by
doko@ubuntu.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Issue #11715: Fix multiarch detection without having Debian development
tools (dpkg-dev) installed.
parent
fb2f409b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Misc/NEWS
Misc/NEWS
+3
-0
setup.py
setup.py
+21
-0
No files found.
Misc/NEWS
View file @
3d2fc15f
...
@@ -400,6 +400,9 @@ Tests
...
@@ -400,6 +400,9 @@ Tests
Build
Build
-----
-----
-
Issue
#
11715
:
Fix
multiarch
detection
without
having
Debian
development
tools
(
dpkg
-
dev
)
installed
.
-
Issue
#
15819
:
Make
sure
we
can
build
Python
out
-
of
-
tree
from
a
readonly
-
Issue
#
15819
:
Make
sure
we
can
build
Python
out
-
of
-
tree
from
a
readonly
source
directory
.
(
Somewhat
related
to
Issue
#
9860.
)
source
directory
.
(
Somewhat
related
to
Issue
#
9860.
)
...
...
setup.py
View file @
3d2fc15f
...
@@ -351,6 +351,27 @@ class PyBuildExt(build_ext):
...
@@ -351,6 +351,27 @@ class PyBuildExt(build_ext):
def
add_multiarch_paths
(
self
):
def
add_multiarch_paths
(
self
):
# Debian/Ubuntu multiarch support.
# Debian/Ubuntu multiarch support.
# https://wiki.ubuntu.com/MultiarchSpec
# https://wiki.ubuntu.com/MultiarchSpec
cc
=
sysconfig
.
get_config_var
(
'CC'
)
tmpfile
=
os
.
path
.
join
(
self
.
build_temp
,
'multiarch'
)
if
not
os
.
path
.
exists
(
self
.
build_temp
):
os
.
makedirs
(
self
.
build_temp
)
ret
=
os
.
system
(
'%s -print-multiarch > %s 2> /dev/null'
%
(
cc
,
tmpfile
))
multiarch_path_component
=
''
try
:
if
ret
>>
8
==
0
:
with
open
(
tmpfile
)
as
fp
:
multiarch_path_component
=
fp
.
readline
().
strip
()
finally
:
os
.
unlink
(
tmpfile
)
if
multiarch_path_component
!=
''
:
add_dir_to_list
(
self
.
compiler
.
library_dirs
,
'/usr/lib/'
+
multiarch_path_component
)
add_dir_to_list
(
self
.
compiler
.
include_dirs
,
'/usr/include/'
+
multiarch_path_component
)
return
if
not
find_executable
(
'dpkg-architecture'
):
if
not
find_executable
(
'dpkg-architecture'
):
return
return
tmpfile
=
os
.
path
.
join
(
self
.
build_temp
,
'multiarch'
)
tmpfile
=
os
.
path
.
join
(
self
.
build_temp
,
'multiarch'
)
...
...
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