changeset 102:a819cc03b04c

The need for patching sysconfig.py and package.py is gone. So all files that are created by the scripts in the CWD are automatically created in a writeable area.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 09 Oct 2022 19:12:42 +0200
parents 962a1436b2c0
children 5cf6b126dd94
files Makefile files/patch-pypy_tool_release_package.py files/py37/patch-lib-python_3_sysconfig.py files/py38/patch-lib-python_3_sysconfig.py files/py39/patch-lib-python_3_sysconfig.py
diffstat 5 files changed, 0 insertions(+), 97 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Oct 09 16:48:12 2022 +0200
+++ b/Makefile	Sun Oct 09 19:12:42 2022 +0200
@@ -64,10 +64,6 @@
 FORPYIMPL39_VARS=	SHEBANG_FILES+="lib-python/3/test/ziptestdata/header.sh lib-python/3/test/ziptestdata/exe_with_z64 lib-python/3/test/ziptestdata/exe_with_zip lib-python/3/turtledemo/sorting_animate.py lib-python/3/turtledemo/__main__.py" \
 			PLIST=${.CURDIR}/pkg-plist.py39
 
-FORPYIMPL37_EXTRA_PATCHES=	${PATCHDIR}/py37
-FORPYIMPL38_EXTRA_PATCHES=      ${PATCHDIR}/py38
-FORPYIMPL39_EXTRA_PATCHES=      ${PATCHDIR}/py39
-
 PACKAGE_ARGS=	--without-sqlite3 --without-_tkinter
 
 pre-install:
--- a/files/patch-pypy_tool_release_package.py	Sun Oct 09 16:48:12 2022 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
---- pypy/tool/release/package.py.orig	2022-03-28 09:53:47 UTC
-+++ pypy/tool/release/package.py
-@@ -156,7 +156,11 @@ def generate_sysconfigdata(pypy_c, stdlib):
-                            '--generate-posix-vars',
-                            # Use PyPy-specific extension to get HOST_GNU_TYPE
-                            'HOST_GNU_TYPE', host_gnu_type])
--    with open('pybuilddir.txt') as fid:
-+    pybuilddir_txt = 'pybuilddir.txt'
-+    pypy_wrkdir = os.environ.get("PYPY_WRKDIR")  # this is set by FreeBSD port
-+    if pypy_wrkdir is not None:
-+        pybuilddir_txt = os.path.join(pypy_wrkdir, pybuilddir_txt)
-+    with open(pybuilddir_txt) as fid:
-         dirname = fid.read().strip()
-     assert os.path.exists(dirname)
-     sysconfigdata_names = os.listdir(dirname)
--- a/files/py37/patch-lib-python_3_sysconfig.py	Sun Oct 09 16:48:12 2022 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
---- lib-python/3/sysconfig.py.orig	2022-03-28 09:51:49 UTC
-+++ lib-python/3/sysconfig.py
-@@ -442,7 +442,11 @@ def _generate_posix_vars(args):
-         module.build_time_vars = vars
-         sys.modules[name] = module
- 
-+    pypy_wrkdir = os.environ.get("PYPY_WRKDIR")  # this is set by FreeBSD port
-+
-     pybuilddir = 'build/lib.%s-%s' % (get_platform(), _PY_VERSION_SHORT)
-+    if pypy_wrkdir is not None:
-+        pybuilddir = os.path.join(pypy_wrkdir, pybuilddir)
-     if hasattr(sys, "gettotalrefcount"):
-         pybuilddir += '-pydebug'
-     os.makedirs(pybuilddir, exist_ok=True)
-@@ -455,7 +459,10 @@ def _generate_posix_vars(args):
-         pprint.pprint(vars, stream=f)
- 
-     # Create file used for sys.path fixup -- see Modules/getpath.c
--    with open('pybuilddir.txt', 'w', encoding='ascii') as f:
-+    pybuilddir_txt = 'pybuilddir.txt'
-+    if pypy_wrkdir is not None:
-+        pybuilddir_txt = os.path.join(pypy_wrkdir, pybuilddir_txt)
-+    with open(pybuilddir_txt, 'w', encoding='utf8') as f:
-         f.write(pybuilddir)
- 
- def _init_posix(vars):
--- a/files/py38/patch-lib-python_3_sysconfig.py	Sun Oct 09 16:48:12 2022 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
---- lib-python/3/sysconfig.py.orig	2022-03-28 09:53:47 UTC
-+++ lib-python/3/sysconfig.py
-@@ -423,7 +423,11 @@ def _generate_posix_vars(args):
-         module.build_time_vars = vars
-         sys.modules[name] = module
- 
-+    pypy_wrkdir = os.environ.get("PYPY_WRKDIR")  # this is set by FreeBSD port
-+
-     pybuilddir = 'build/lib.%s-%s' % (get_platform(), _PY_VERSION_SHORT)
-+    if pypy_wrkdir is not None:
-+        pybuilddir = os.path.join(pypy_wrkdir, pybuilddir)
-     if hasattr(sys, "gettotalrefcount"):
-         pybuilddir += '-pydebug'
-     os.makedirs(pybuilddir, exist_ok=True)
-@@ -436,7 +440,10 @@ def _generate_posix_vars(args):
-         pprint.pprint(vars, stream=f)
- 
-     # Create file used for sys.path fixup -- see Modules/getpath.c
--    with open('pybuilddir.txt', 'w', encoding='utf8') as f:
-+    pybuilddir_txt = 'pybuilddir.txt'
-+    if pypy_wrkdir is not None:
-+        pybuilddir_txt = os.path.join(pypy_wrkdir, pybuilddir_txt)
-+    with open(pybuilddir_txt, 'w', encoding='utf8') as f:
-         f.write(pybuilddir)
- 
- def _init_posix(vars):
--- a/files/py39/patch-lib-python_3_sysconfig.py	Sun Oct 09 16:48:12 2022 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
---- lib-python/3/sysconfig.py.orig	2022-03-29 05:15:20 UTC
-+++ lib-python/3/sysconfig.py
-@@ -421,7 +421,11 @@ def _generate_posix_vars(args):
-         module.build_time_vars = vars
-         sys.modules[name] = module
- 
-+    pypy_wrkdir = os.environ.get("PYPY_WRKDIR")  # this is set by FreeBSD port
-+
-     pybuilddir = 'build/lib.%s-%s' % (get_platform(), _PY_VERSION_SHORT)
-+    if pypy_wrkdir is not None:
-+        pybuilddir = os.path.join(pypy_wrkdir, pybuilddir)
-     if hasattr(sys, "gettotalrefcount"):
-         pybuilddir += '-pydebug'
-     os.makedirs(pybuilddir, exist_ok=True)
-@@ -434,7 +438,10 @@ def _generate_posix_vars(args):
-         pprint.pprint(vars, stream=f)
- 
-     # Create file used for sys.path fixup -- see Modules/getpath.c
--    with open('pybuilddir.txt', 'w', encoding='utf8') as f:
-+    pybuilddir_txt = 'pybuilddir.txt'
-+    if pypy_wrkdir is not None:
-+        pybuilddir_txt = os.path.join(pypy_wrkdir, pybuilddir_txt)
-+    with open(pybuilddir_txt, 'w', encoding='utf8') as f:
-         f.write(pybuilddir)
- 
- def _init_posix(vars):