From c1113681e410559a45fa4dc761c8a7f67c27b072 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 6 Mar 2023 23:03:05 +0100 Subject: [PATCH] python3.9: add sysconfig haiku schemes --- .../python/patches/python39-3.9.14.patchset | 59 +++++++++++++++++++ dev-lang/python/python3.9-3.9.14.recipe | 2 +- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/dev-lang/python/patches/python39-3.9.14.patchset b/dev-lang/python/patches/python39-3.9.14.patchset index b244ccf3e..801d10d93 100644 --- a/dev-lang/python/patches/python39-3.9.14.patchset +++ b/dev-lang/python/patches/python39-3.9.14.patchset @@ -824,3 +824,62 @@ index 90c19a2..ad979e6 100644 -- 2.36.1 + + +From 5818eceb6c228b6f718cbe140656a3570e6b3594 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 6 Mar 2023 22:51:40 +0100 +Subject: sysconfig: add haiku schemes + + +diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py +index e3f79bf..574220b 100644 +--- a/Lib/sysconfig.py ++++ b/Lib/sysconfig.py +@@ -84,6 +84,33 @@ _INSTALL_SCHEMES = { + 'scripts': '{userbase}/bin', + 'data': '{userbase}', + }, ++ 'haiku': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', ++ 'purelib': '{base}/non-packaged/lib/python{py_version_short}/site-packages', ++ 'platlib': '{platbase}/non-packaged/{platlibdir}/python{py_version_short}/site-packages', ++ 'include': '{base}/non-packaged/develop/headers/python{py_version_short}', ++ 'scripts': '{base}/non-packaged/bin', ++ 'data' : '{base}/non-packaged', ++ }, ++ 'haiku_vendor': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', ++ 'purelib': '{base}/lib/python{py_version_short}/vendor-packages', ++ 'platlib': '{platbase}/lib/python{py_version_short}/vendor-packages', ++ 'include': '{base}/develop/headers/python{py_version_short}', ++ 'scripts': '{base}/bin', ++ 'data' : '{base}', ++ }, ++ 'haiku_home': { ++ 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', ++ 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', ++ 'purelib': '{userbase}/lib/python', ++ 'platlib': '{userbase}/lib/python', ++ 'include': '{userbase}/develop/headers/python/$dist_name', ++ 'scripts': '{userbase}/bin', ++ 'data' : '{userbase}', ++ }, + } + + _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', +@@ -182,6 +209,10 @@ def _expand_vars(scheme, vars): + + + def _get_default_scheme(): ++ if sys.platform.startswith('haiku'): ++ if os.environ.get('HAIKU_USE_VENDOR_DIRECTORIES') == '1': ++ return 'haiku_vendor' ++ return 'haiku' + if os.name == 'posix': + # the default scheme for posix is posix_prefix + return 'posix_prefix' +-- +2.37.3 diff --git a/dev-lang/python/python3.9-3.9.14.recipe b/dev-lang/python/python3.9-3.9.14.recipe index 155c53db8..39ab761c7 100644 --- a/dev-lang/python/python3.9-3.9.14.recipe +++ b/dev-lang/python/python3.9-3.9.14.recipe @@ -9,7 +9,7 @@ OSI-approved open source license." HOMEPAGE="https://www.python.org" LICENSE="Python" COPYRIGHT="1990-2022 Python Software Foundation" -REVISION="1" +REVISION="2" SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz" CHECKSUM_SHA256="651304d216c8203fe0adf1a80af472d8e92c3b0e0a7892222ae4d9f3ae4debcf" SOURCE_DIR="Python-$portVersion"