Read about our upcoming Code of Conduct on this issue

Commit d3d14de5 authored by Matti Picus's avatar Matti Picus
Browse files

tweak packaging to avoid automatic platform detection, add more debug info

parent f67d306a0f3a
......@@ -73,7 +73,7 @@ def rpath_binaries(binaries):
def make_portable():
binaries = glob('bin/libpypy*.so')
if not binaries:
raise ValueError('Could not find bin/libpypy*.so')
raise ValueError('Could not find bin/libpypy*.so in "%s"' % os.getcwd())
binaries.extend(glob('lib_pypy/*_cffi.pypy*.so'))
binaries.extend(glob('lib_pypy/_pypy_openssl*.so'))
binaries.extend(glob('lib_pypy/_tkinter/*_cffi.pypy*.so'))
......
......@@ -239,7 +239,11 @@ def create_package(basedir, options, _fake=False):
# make the package portable by adding rpath=$ORIGIN/..lib,
# bundling dependencies
if options.make_portable:
os.chdir(str(name))
if not os.path.exists('lib'):
os.mkdir('lib')
make_portable()
os.chdir(str(builddir))
if USE_ZIPFILE_MODULE:
import zipfile
archive = str(builddir.join(name + '.zip'))
......@@ -323,11 +327,10 @@ def package(*args, **kwds):
default=(sys.platform == 'darwin'),
help='whether to embed dependencies in CFFI modules '
'(default on OS X)')
parser.add_argument('--make-portable', '--no-make-portable',
parser.add_argument('--make-portable',
dest='make_portable',
action=NegateAction,
default=(platform.linux_distribution() in ('CentOS',)),
help='whether to make the package portable by shipping '
action='store_true',
help='make the package portable by shipping '
'dependent shared objects and mangling RPATH')
options = parser.parse_args(args)
......@@ -340,9 +343,7 @@ def package(*args, **kwds):
elif os.environ.has_key("PYPY_NO_EMBED_DEPENDENCIES"):
options.embed_dependencies = False
if os.environ.has_key("PYPY_MAKE_PORTABLE"):
options.embed_dependencies = True
elif os.environ.has_key("PYPY_NO_MAKE_PORTABLE"):
options.embed_dependencies = False
options.make_portable = True
if not options.builddir:
# The import actually creates the udir directory
from rpython.tool.udir import udir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment