Skip to content

Commit 31a6c50

Browse files
committed
Fix add_site_dir on Fedora 20 x86_64.
1 parent 1f6d5c3 commit 31a6c50

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

common.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from logging import debug, info, error
66
from os import path
77
import contextlib
8-
import distutils.spawn
8+
from distutils import spawn, sysconfig
99
import os
1010
import shutil
1111
import site
@@ -101,7 +101,7 @@ def topdir(name):
101101

102102
@fill_in_args
103103
def find_executable(name):
104-
return (distutils.spawn.find_executable(name) or
104+
return (spawn.find_executable(name) or
105105
panic('Executable "%s" not found!', name))
106106

107107

@@ -292,8 +292,9 @@ def unarc(name):
292292

293293
@fill_in_args
294294
def add_site_dir(dirname):
295-
dirname = path.join(dirname, 'lib', 'python%d.%d' % sys.version_info[:2],
296-
'site-packages')
295+
prefix = sysconfig.EXEC_PREFIX
296+
destlib = sysconfig.get_config_var('DESTLIB')
297+
dirname = path.join(dirname, destlib[len(prefix) + 1:], 'site-packages')
297298
info('adding "%s" to python site dirs', topdir(dirname))
298299
site.addsitedir(dirname)
299300

toolchain-m68k

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,10 @@ def build():
281281
unpack('{automake}')
282282

283283
py_ver = 'python%d.%d' % (sys.version_info.major, sys.version_info.minor)
284-
with env(CC=CC, CXX=CXX):
285-
require_header([path.join(py_ver, 'Python.h')],
286-
lang='c', errmsg='python-dev package missing')
287-
288-
unpack('python-lha', work_dir='{build}')
289-
python_setup('python-lha')
284+
require_header([path.join(py_ver, 'Python.h')],
285+
lang='c', errmsg='python-dev package missing')
286+
unpack('python-lha', work_dir='{build}')
287+
python_setup('python-lha')
290288

291289
unpack('{m4}')
292290
configure('{m4}', '--prefix={host}')

0 commit comments

Comments
 (0)