setuptools(_scm), bump version (#8758)

This commit is contained in:
Schrijvers Luc
2023-06-01 22:37:31 +02:00
committed by GitHub
parent 14c211fd8a
commit ef2abdb5fb
5 changed files with 79 additions and 243 deletions

View File

@@ -1,16 +1,16 @@
From 94c8a5e7a92cc6dc438293e09ce36360decffa7b Mon Sep 17 00:00:00 2001
From cfe9a1ed59a7ae85a0befbb1e40e88df855c310f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 14 Dec 2021 17:34:48 +0100
Subject: Distutils patch for Haiku
diff --git a/setuptools/_distutils/command/install.py b/setuptools/_distutils/command/install.py
index 13feeb8..caec8f1 100644
index a7ac4e6..8e49005 100644
--- a/setuptools/_distutils/command/install.py
+++ b/setuptools/_distutils/command/install.py
@@ -43,6 +43,27 @@ INSTALL_SCHEMES = {
'data' : '$base',
},
@@ -50,6 +50,27 @@ INSTALL_SCHEMES = {
'data': '{base}',
},
'nt': WINDOWS_SCHEME,
+ 'haiku': {
+ 'purelib': '$base/non-packaged/lib/python$py_version_short/site-packages',
@@ -34,12 +34,13 @@ index 13feeb8..caec8f1 100644
+ 'data' : '$base',
+ },
'pypy': {
'purelib': '$base/site-packages',
'platlib': '$base/site-packages',
@@ -78,6 +99,14 @@ if HAS_USER_SITE:
'data' : '$userbase',
}
'purelib': '{base}/site-packages',
'platlib': '{base}/site-packages',
@@ -86,7 +107,13 @@ if HAS_USER_SITE:
'data': '{userbase}',
}
-
+ INSTALL_SCHEMES['haiku_user'] = {
+ 'purelib': '$usersite',
+ 'platlib': '$usersite',
@@ -47,59 +48,58 @@ index 13feeb8..caec8f1 100644
+ 'scripts': '$userbase/bin',
+ 'data' : '$userbase',
+ }
+
# The keys to an installation scheme; if any new types of files are to be
# installed, be sure to add an entry to every installation scheme above,
# and to SCHEME_KEYS here.
@@ -423,10 +452,16 @@ class install(Command):
raise DistutilsPlatformError(
"User base directory is not specified")
INSTALL_SCHEMES.update(fw.schemes)
@@ -554,10 +581,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("unix_user")
- self.select_scheme("posix_user")
+ if sys.platform.startswith('haiku'):
+ self.select_scheme("haiku_user")
+ else:
+ self.select_scheme("unix_user")
+ self.select_scheme("posix_user")
elif self.home is not None:
self.install_base = self.install_platbase = self.home
- self.select_scheme("unix_home")
- self.select_scheme("posix_home")
+ if sys.platform.startswith('haiku'):
+ self.select_scheme("haiku_home")
+ else:
+ self.select_scheme("unix_home")
+ self.select_scheme("posix_home")
else:
if self.prefix is None:
if self.exec_prefix is not None:
@@ -442,7 +477,13 @@ class install(Command):
@@ -577,7 +610,13 @@ class install(Command):
self.install_base = self.prefix
self.install_platbase = self.exec_prefix
- self.select_scheme("unix_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("unix_prefix")
+ self.select_scheme("posix_prefix")
def finalize_other(self):
"""Finalizes options for non-posix platforms"""
diff --git a/setuptools/_distutils/sysconfig.py b/setuptools/_distutils/sysconfig.py
index 879b698..e9dec4a 100644
index a40a723..9bfa334 100644
--- a/setuptools/_distutils/sysconfig.py
+++ b/setuptools/_distutils/sysconfig.py
@@ -114,7 +114,8 @@ def get_python_inc(plat_specific=0, prefix=None):
incdir = os.path.join(get_config_var('srcdir'), 'Include')
return os.path.normpath(incdir)
python_dir = 'python' + 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)
elif os.name == "nt":
if python_build:
# Include both the include and PC dir to ensure we can find
@@ -156,7 +157,14 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
@@ -190,7 +190,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):
@@ -244,7 +245,14 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
else:
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -116,5 +116,5 @@ index 879b698..e9dec4a 100644
# Platform-specific modules (any module from a non-pure-Python
# module distribution) or standard Python library modules.
--
2.30.2
2.37.3

View File

@@ -1,86 +0,0 @@
SUMMARY="Download, build, install, upgrade, and uninstall Python packages"
DESCRIPTION="EasyInstall (easy_install) gives you a quick and painless way \
to install packages remotely by connecting to the cheeseshop or even other \
websites via HTTP. It is somewhat analogous to the CPAN and PEAR tools for \
Perl and PHP, respectively."
HOMEPAGE="https://pypi.python.org/pypi/setuptools"
COPYRIGHT="2006-2019 Python Packaging Authority"
LICENSE="Python"
REVISION="2"
SOURCE_URI="https://github.com/pypa/setuptools/archive/v$portVersion.tar.gz"
SOURCE_FILENAME="setuptools-$portVersion.tar.gz"
CHECKSUM_SHA256="8e45c6cb18f81842421560f788521842572a91a0e64419e338a6a15828ccf076"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:sed
"
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
cmd:easy_install_$pythonVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
\""
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
BUILD()
{
rm -rf build*
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
$python bootstrap.py
$python setup.py build
mv build build$pythonVersion
done
}
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
mv build$pythonVersion build
$python setup.py install \
--root=/ --prefix=$prefix --skip-build
sed -i -e "s|^#\!.*/usr/bin/env python|#!/bin/env python$pythonVersion|" $binDir/easy_install*
rm $binDir/easy_install
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
mv build build$pythonVersion
done
}

View File

@@ -4,12 +4,12 @@ to install packages remotely by connecting to the cheeseshop or even other \
websites via HTTP. It is somewhat analogous to the CPAN and PEAR tools for \
Perl and PHP, respectively."
HOMEPAGE="https://pypi.python.org/pypi/setuptools"
COPYRIGHT="2006-2019 Python Packaging Authority"
LICENSE="Python"
REVISION="2"
SOURCE_URI="https://github.com/pypa/setuptools/archive/v$portVersion.tar.gz"
COPYRIGHT="2006-2013 Python Packaging Authority"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-$portVersion.tar.gz"
SOURCE_FILENAME="setuptools-$portVersion.tar.gz"
CHECKSUM_SHA256="88fc85b6c0cf561e33c7359b887f2e1a29e877e420d74a257e8f2fe45f0ff856"
CHECKSUM_SHA256="62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"
PATCHES="setuptools-$portVersion.patchset"
ARCHITECTURES="any"
@@ -30,36 +30,20 @@ BUILD_PREREQUIRES="
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
\""
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
"
done
BUILD()
{
rm -rf build*
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export SETUPTOOLS_USE_DISTUTILS=local
$python setup.py egg_info
$python setup.py build
mv build build$pythonVersion
done
}
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
@@ -70,14 +54,12 @@ INSTALL()
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
mv build$pythonVersion build
rm -rf build
export SETUPTOOLS_USE_DISTUTILS=local
$python setup.py install \
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
mv build build$pythonVersion
done
}

View File

@@ -1,63 +0,0 @@
SUMMARY="Download, build, install, upgrade, and uninstall Python packages"
DESCRIPTION="EasyInstall (easy_install) gives you a quick and painless way \
to install packages remotely by connecting to the cheeseshop or even other \
websites via HTTP. It is somewhat analogous to the CPAN and PEAR tools for \
Perl and PHP, respectively."
HOMEPAGE="https://pypi.python.org/pypi/setuptools"
COPYRIGHT="2006-2019 Python Packaging Authority"
LICENSE="Python"
REVISION="5"
SOURCE_URI="https://github.com/pypa/setuptools/archive/v$portVersion.tar.gz"
SOURCE_FILENAME="setuptools-$portVersion.tar.gz"
CHECKSUM_SHA256="c60bd4cbb2a963c73993951ff4ec7ef0044015c3ffd42e573f6c4e615d1c7cf8"
SOURCE_DIR="setuptools-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
cmd:easy_install
cmd:easy_install_2.7
"
REQUIRES="
haiku
cmd:python2.7
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:python2.7
cmd:sed
"
BUILD()
{
rm -rf build
pythonPackage=python
pythonVersion=2.7
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
pythonVersion=$($python --version 2>&1) | sed -e 's/Python \(.*\)\..*/\1/'
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
$python bootstrap.py
$python setup.py build
}
INSTALL()
{
pythonPackage=python
pythonVersion=2.7
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py install \
--root=/ --prefix=$prefix --skip-build
sed -i -e "s|^#\!.*/usr/bin/env python|#!/bin/env python$pythonVersion|" $binDir/easy_install*
}

View File

@@ -3,11 +3,11 @@ DESCRIPTION="setuptools_scm handles managing your Python package versions \
in SCM metadata instead of declaring them as the version argument \
or in a SCM managed file."
HOMEPAGE="https://github.com/pypa/setuptools_scm"
COPYRIGHT="2015-2020 Ronny Pfannschmidt"
COPYRIGHT="2015-2022 Ronny Pfannschmidt"
LICENSE="MIT"
REVISION="4"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/s/setuptools_scm/setuptools_scm-$portVersion.tar.gz"
CHECKSUM_SHA256="83a0cedd3449e3946307811a4c7b9d89c4b5fd464a2fb5eeccd0a5bb158ae5c8"
CHECKSUM_SHA256="6c508345a771aad7d56ebff0e70628bf2b0ec7573762be9960214730de278f27"
ARCHITECTURES="any"
@@ -25,27 +25,30 @@ BUILD_REQUIRES="
PYTHON_PACKAGES=(python38 python39 python310)
PYTHON_VERSIONS=(3.8 3.9 3.10)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\n\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
setuptools_$pythonPackage\n\
toml_$pythonPackage\n\
cmd:git\n\
cmd:python$pythonVersion\n\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
setuptools_$pythonPackage
toml_$pythonPackage
cmd:git
cmd:python$pythonVersion
\""
BUILD_REQUIRES="$BUILD_REQUIRES
packaging_$pythonPackage
setuptools_$pythonPackage
"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
"
done
INSTALL()
{
export SETUPTOOLS_SCM_PRETEND_VERSION="$portVersion"
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}