mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-19 18:20:07 +02:00
setuptools: bump version
This commit is contained in:
129
dev-python/setuptools/patches/setuptools-80.9.0.patchset
Normal file
129
dev-python/setuptools/patches/setuptools-80.9.0.patchset
Normal file
@@ -0,0 +1,129 @@
|
||||
From 2bfcd918a8fd0f8bc4ddb3ec7e17e26196233b78 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Wed, 11 Oct 2023 13:07:51 -0300
|
||||
Subject: Distutils patch for Haiku
|
||||
|
||||
This is just the previous patch from Jerome Duval, but made to match
|
||||
the rest of the code's string substitution style on `command/install.py`.
|
||||
|
||||
diff --git a/setuptools/_distutils/command/install.py b/setuptools/_distutils/command/install.py
|
||||
index dc17e56..9cc802a 100644
|
||||
--- a/setuptools/_distutils/command/install.py
|
||||
+++ b/setuptools/_distutils/command/install.py
|
||||
@@ -50,6 +50,33 @@ INSTALL_SCHEMES = {
|
||||
'data': '{base}',
|
||||
},
|
||||
'nt': WINDOWS_SCHEME,
|
||||
+ 'haiku': {
|
||||
+ 'purelib': '{base}/non-packaged/lib/{implementation_lower}'
|
||||
+ '{py_version_short}/site-packages',
|
||||
+ 'platlib': '{platbase}/non-packaged/lib/{implementation_lower}'
|
||||
+ '{py_version_short}/site-packages',
|
||||
+ 'headers': '{base}/non-packaged/develop/headers/{implementation_lower}'
|
||||
+ '{py_version_short}/{dist_name}',
|
||||
+ 'scripts': '{base}/non-packaged/bin',
|
||||
+ 'data' : '{base}/non-packaged',
|
||||
+ },
|
||||
+ 'haiku_vendor': {
|
||||
+ 'purelib': '{base}/lib/{implementation_lower}'
|
||||
+ '{py_version_short}/vendor-packages',
|
||||
+ 'platlib': '{platbase}/lib/{implementation_lower}'
|
||||
+ '{py_version_short}/vendor-packages',
|
||||
+ 'headers': '{base}/develop/headers/{implementation_lower}'
|
||||
+ '{py_version_short}/{dist_name}',
|
||||
+ 'scripts': '{base}/bin',
|
||||
+ 'data' : '{base}',
|
||||
+ },
|
||||
+ 'haiku_home': {
|
||||
+ 'purelib': '{base}/lib/python',
|
||||
+ 'platlib': '{base}/lib/python',
|
||||
+ 'headers': '{base}/develop/headers/python/{dist_name}',
|
||||
+ 'scripts': '{base}/bin',
|
||||
+ 'data' : '{base}',
|
||||
+ },
|
||||
'pypy': {
|
||||
'purelib': '{base}/site-packages',
|
||||
'platlib': '{base}/site-packages',
|
||||
@@ -86,7 +113,14 @@ if HAS_USER_SITE:
|
||||
'data': '{userbase}',
|
||||
}
|
||||
|
||||
-
|
||||
+ INSTALL_SCHEMES['haiku_user'] = {
|
||||
+ 'purelib': '{usersite}',
|
||||
+ 'platlib': '{usersite}',
|
||||
+ 'headers': '{usersite}/develop/headers/{implementation}'
|
||||
+ '{py_version_short}/{dist_name}',
|
||||
+ 'scripts': '{usersite}/bin',
|
||||
+ 'data' : '{usersite}',
|
||||
+ }
|
||||
INSTALL_SCHEMES.update(fw.schemes)
|
||||
|
||||
|
||||
@@ -548,10 +582,16 @@ class install(Command):
|
||||
if self.install_userbase is None:
|
||||
raise DistutilsPlatformError("User base directory is not specified")
|
||||
self.install_base = self.install_platbase = self.install_userbase
|
||||
- self.select_scheme("posix_user")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ self.select_scheme("haiku_user")
|
||||
+ else:
|
||||
+ self.select_scheme("posix_user")
|
||||
elif self.home is not None:
|
||||
self.install_base = self.install_platbase = self.home
|
||||
- self.select_scheme("posix_home")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ self.select_scheme("haiku_home")
|
||||
+ else:
|
||||
+ self.select_scheme("posix_home")
|
||||
else:
|
||||
if self.prefix is None:
|
||||
if self.exec_prefix is not None:
|
||||
@@ -571,7 +611,13 @@ class install(Command):
|
||||
|
||||
self.install_base = self.prefix
|
||||
self.install_platbase = self.exec_prefix
|
||||
- self.select_scheme("posix_prefix")
|
||||
+ if sys.platform.startswith('haiku'):
|
||||
+ if os.environ.get('HAIKU_USE_VENDOR_DIRECTORIES') == '1':
|
||||
+ self.select_scheme("haiku_vendor")
|
||||
+ else:
|
||||
+ self.select_scheme("haiku")
|
||||
+ else:
|
||||
+ self.select_scheme("posix_prefix")
|
||||
|
||||
def finalize_other(self) -> None:
|
||||
"""Finalizes options for non-posix platforms"""
|
||||
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
|
||||
index 7ddc869..a47f227 100644
|
||||
--- a/setuptools/_distutils/sysconfig.py
|
||||
+++ b/setuptools/_distutils/sysconfig.py
|
||||
@@ -205,7 +205,8 @@ def _get_python_inc_from_config(plat_specific, spec_prefix):
|
||||
def _get_python_inc_posix_prefix(prefix):
|
||||
implementation = 'pypy' if IS_PYPY else 'python'
|
||||
python_dir = implementation + get_python_version() + build_flags
|
||||
- return os.path.join(prefix, "include", python_dir)
|
||||
+ inc_dir = "include" if sys.platform != "haiku1" else "develop/headers"
|
||||
+ return os.path.join(prefix, inc_dir, python_dir)
|
||||
|
||||
|
||||
def _get_python_inc_nt(prefix, spec_prefix, plat_specific):
|
||||
@@ -252,7 +253,14 @@ def get_python_lib(
|
||||
else:
|
||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||
|
||||
- if os.name == "posix" or is_mingw():
|
||||
+ if os.name == "posix" and sys.platform.startswith('haiku'):
|
||||
+ if standard_lib:
|
||||
+ return os.path.join(prefix,
|
||||
+ "lib", "python" + get_python_version())
|
||||
+ return os.path.join(prefix, "non-packaged",
|
||||
+ "lib", "python" + get_python_version(),
|
||||
+ "site-packages")
|
||||
+ elif os.name == "posix" or is_mingw():
|
||||
if plat_specific or standard_lib:
|
||||
# Platform-specific modules (any module from a non-pure-Python
|
||||
# module distribution) or standard Python library modules.
|
||||
--
|
||||
2.48.1
|
||||
|
||||
Reference in New Issue
Block a user