Author: Matti Picus <[email protected]>
Branch:
Changeset: r97950:976f9b5deb96
Date: 2019-11-04 07:09 -0500
http://bitbucket.org/pypy/pypy/changeset/976f9b5deb96/
Log: tweak packaging to avoid automatic platform detection, add more
debug info
diff --git a/pypy/tool/release/make_portable.py
b/pypy/tool/release/make_portable.py
--- a/pypy/tool/release/make_portable.py
+++ b/pypy/tool/release/make_portable.py
@@ -73,7 +73,7 @@
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'))
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -239,7 +239,11 @@
# 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 @@
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 @@
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
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit