@@ -588,7 +588,7 @@ clinic: check-clean-src $(srcdir)/Module
# Build the interpreter
- $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
+ $(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS)
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
-+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS)
platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
@@ -723,7 +723,7 @@ Makefile Modules/config.c: Makefile.pre
- Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) $(EXPORTSYMS)
+ Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS)
- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
-+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBDIR) $(LIBS) $(MODLIBS) $(SYSLIBS)
############################################################################
# Importlib
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
-@@ -1166,7 +1169,8 @@
+@@ -1147,7 +1147,8 @@ if test $enable_shared = "yes"; then
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
LDLIBRARY='libpython$(LDVERSION).so'
- BLDLIBRARY='-L. -lpython$(LDVERSION)'
-+ BLDLIBDIR='-L.'
++ BLDLIBDIR='-Wl,-R,$(LIBDIR) -L.'
+ BLDLIBRARY='-lpython$(VERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
INSTSONAME="$LDLIBRARY".$SOVERSION
else:
if self.exec_prefix is None:
diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py
---- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:41:13.927933162 +0100
-+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:41:15.634652993 +0100
-@@ -19,6 +19,10 @@ from .errors import DistutilsPlatformErr
- # These are needed in a couple of spots, so just compute them once.
- PREFIX = os.path.normpath(sys.prefix)
- EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+if PREFIX == "/usr":
-+ PREFIX = "/usr/local"
-+if EXEC_PREFIX == "/usr":
-+ EXEC_PREFIX = "/usr/local"
- BASE_PREFIX = os.path.normpath(sys.base_prefix)
- BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
-
+--- Python-3.10.0/Lib/distutils/sysconfig.py~ 2021-10-20 22:42:16.000000000 +0200
++++ Python-3.10.0/Lib/distutils/sysconfig.py 2021-10-20 22:53:54.943156539 +0200
+@@ -320,6 +320,10 @@ def get_python_lib(plat_specific=0, stan
+ If 'prefix' is supplied, use it instead of sys.base_prefix or
+ sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
+ """
++ if PREFIX == "/usr":
++ PREFIX = "/usr/local"
++ if EXEC_PREFIX == "/usr":
++ EXEC_PREFIX = "/usr/local"
+ if prefix is None:
+ if standard_lib:
+ prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
--- Python-3.9.2.org/Lib/site.py 2021-02-25 18:41:13.924599724 +0100
+++ Python-3.9.2/Lib/site.py 2021-02-25 18:41:15.634652993 +0100
-diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py
---- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-19 13:31:44.000000000 +0100
-+++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:40:00.705652346 +0100
-@@ -29,14 +29,14 @@ WINDOWS_SCHEME = {
-
- INSTALL_SCHEMES = {
- 'unix_prefix': {
-- 'purelib': '$base/lib/python$py_version_short/site-packages',
-+ 'purelib': '$base/$platlibdir/python$py_version_short/site-packages',
- 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
- },
- 'unix_home': {
-- 'purelib': '$base/lib/python',
-+ 'purelib': '$base/$platlibdir/python',
- 'platlib': '$base/$platlibdir/python',
- 'headers': '$base/include/python/$dist_name',
- 'scripts': '$base/bin',
diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py
--- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100
+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100
diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py
--- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100
+++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100
-@@ -27,7 +27,7 @@ _INSTALL_SCHEMES = {
- 'posix_prefix': {
- 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}',
- 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}',
-- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
-+ 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages',
- 'include':
- '{installed_base}/include/python{py_version_short}{abiflags}',
@@ -37,10 +37,10 @@ _INSTALL_SCHEMES = {
'data': '{base}',
},
'include': '{installed_base}/include/python',
'platinclude': '{installed_base}/include/python',
'scripts': '{base}/bin',
-@@ -69,7 +69,7 @@ _INSTALL_SCHEMES = {
- 'posix_user': {
- 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
- 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
-- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
-+ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
- 'include': '{userbase}/include/python{py_version_short}',
- 'scripts': '{userbase}/bin',
+@@ -100,8 +100,8 @@ if _HAS_USER_BASE:
+ 'posix_user': {
+ 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
+ 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
++ 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+ 'data': '{userbase}',
@@ -490,7 +490,11 @@ def get_config_h_filename():
else:
inc_dir = _sys_home or _PROJECT_BASE
+ inc_dir = os.path.join(get_path('stdlib'), config_dir_name)
return os.path.join(inc_dir, 'pyconfig.h')
-
-diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in
---- Python-3.9.2.org/Makefile.pre.in 2021-02-19 13:31:44.000000000 +0100
-+++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:40:00.705652346 +0100
-@@ -1634,9 +1634,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf
- @if test -d $(LIBRARY); then :; else \
- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
- if test "$(SHLIB_SUFFIX)" = .dll; then \
-- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
-+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
+
+--- Python-3.10.0/Makefile.pre.in~ 2021-10-04 19:40:46.000000000 +0200
++++ Python-3.10.0/Makefile.pre.in 2021-10-20 22:21:30.573156183 +0200
+@@ -1707,9 +1707,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf
+ if test -d $(LIBRARY); then :; else \
+ if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+ if test "$(SHLIB_SUFFIX)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
++ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
+ else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
++ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
+ fi; \
else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+ echo Skip install of $(LIBRARY) - use make frameworkinstall; \
diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py
--- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100
+++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100