Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Steven Gueguen
slapos
Commits
75b44160
Commit
75b44160
authored
Feb 17, 2023
by
Julien Muchembled
Committed by
Łukasz Nowak
Feb 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pypy: add file to rpath for python-magic, patch lib like python2.7
parent
30107615
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
component/pypy/buildout.cfg
component/pypy/buildout.cfg
+9
-1
component/python-2.7/buildout.cfg
component/python-2.7/buildout.cfg
+10
-6
No files found.
component/pypy/buildout.cfg
View file @
75b44160
...
...
@@ -6,6 +6,7 @@ extends =
../libffi/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg
../python-2.7/buildout.cfg
../sqlite3/buildout.cfg
...
...
@@ -19,6 +20,8 @@ url = https://downloads.python.org/pypy/pypy${:version}-v7.3.11-src.tar.bz2
md5sum = 249ad8b0ddffbb16a9d416c3ae85dd2c
pycparser-url = https://github.com/eliben/pycparser/archive/release_v2.21.tar.gz
pycparser-md5sum = cf4b60f0beca2a25bb599e9e858a8223
patch-binary = ${patch:location}/bin/patch
patches = ${python2.7-lib-patches:patches}
init =
import os, sys
options['executable'] = os.path.join(location, 'bin', 'pypy')
...
...
@@ -42,6 +45,9 @@ install =
pypy_src = guessworkdir(self.extract(self.download()))
build_cffi_imports = 'lib_pypy/pypy_tools/build_cffi_imports.py'
version = options['version']
self.applyPatchList(options['patches'].replace('#',' '),
'--no-backup-if-mismatch -p2', options['patch-binary'],
os.path.join(pypy_src, 'lib-python', version))
with open(os.path.join(pypy_src, 'Makefile'), 'w') as f:
f.write(options['makefile'].replace('\n|','\n')[1:] % {
'build_cffi_imports': build_cffi_imports,
...
...
@@ -80,8 +86,10 @@ makefile =
| cd lib-python && cp conftest.py stdlib-version.* $(PREFIX)/lib-python
| cp -r include/pypy_*.h pypy/module/cpyext/include/* pypy/module/cpyext/parse/* $(PREFIX)/include
| cd pypy/goal && cp libpypy-c.so $(PREFIX)/bin && cp pypy-c $(PREFIX)/bin/pypy
# the entry "-Wl,-rpath=${file:location}/lib" below is needed by python-magic,
# which would otherwise load the system libmagic.so with ctypes
environment =
C_INCLUDE_PATH=${bzip2:location}/include:${gdbm:location}/include:${libexpat:location}/include:${ncurses:location}/include:${ncurses:location}/include:${openssl:location}/include:${sqlite3:location}/include:${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -L${gdbm:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib
LDFLAGS=-L${bzip2:location}/lib -L${gdbm:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -L${zlib:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${
file:location}/lib -Wl,-rpath=${
gdbm:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libffi:location}/lib/pkgconfig
component/python-2.7/buildout.cfg
View file @
75b44160
...
...
@@ -26,6 +26,13 @@ scripts =
arguments = sys.argv[1:] + ["bootstrap"]
python = python2.7
[python2.7-lib-patches]
# Patches that apply to both CPython & PyPy.
patches =
${:_profile_base_location_}/asyncore_poll_insteadof_select.patch#ab6991c0ee6e25aeb8951e71f280a2f1
${:_profile_base_location_}/fix_compiler_module_issue_20613.patch#94443a77f903e9de880a029967fa6aa7
${:_profile_base_location_}/py27-subproc-closefds-fast.patch#e495e44491694a8972da11739206f2e6
[python2.7]
recipe = slapos.recipe.cmmi
shared = true
...
...
@@ -37,12 +44,9 @@ version = 2.7
executable = @@LOCATION@@/bin/python${:version}
patch-options = -p1
patches =
${:_profile_base_location_}/fix_compiler_module_issue_20613.patch#94443a77f903e9de880a029967fa6aa7
${:_profile_base_location_}/pytracemalloc_pep445.patch#9f3145817afa2b7fad801fde8447e396
patches = ${python2.7-lib-patches:patches}
${:_profile_base_location_}/disabled_module_list.patch#e038a8016475574c810cbaaf0e42f4ac
${:_profile_base_location_}/asyncore_poll_insteadof_select.patch#ab6991c0ee6e25aeb8951e71f280a2f1
${:_profile_base_location_}/py27-subproc-closefds-fast.patch#e495e44491694a8972da11739206f2e6
${:_profile_base_location_}/pytracemalloc_pep445.patch#9f3145817afa2b7fad801fde8447e396
url =
http://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
configure-options =
...
...
@@ -70,4 +74,4 @@ post-install = cd '%(prefix)s' &&
environment =
PATH=${patch:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include -fPIC
LDFLAGS=-L${
zlib:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file
:location}/lib
LDFLAGS=-L${
bzip2:location}/lib -L${gdbm:location}/lib -L${gettext:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -L${readline:location}/lib -L${zlib:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${file:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${sqlite3:location}/lib -Wl,-rpath=${zlib
:location}/lib
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