dulwich: update to 0.20.32 and switch to python3 (#6579)

This commit is contained in:
augiedoggie
2022-02-04 01:06:58 -07:00
committed by GitHub
parent 7b4f38cb58
commit 0280320521
2 changed files with 115 additions and 45 deletions

View File

@@ -1,45 +0,0 @@
SUMMARY="Simple Python implementation of the Git file formats and protocols"
DESCRIPTION="Dulwich is a simple Python implementation of the Git file \
formats and protocols. All functionality is available in pure Python.\
Optional C extensions can be built for improved performance."
HOMEPAGE="https://www.samba.org/~jelmer/dulwich/"
COPYRIGHT="2008-2013 Jelmer Vernooij"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://pypi.python.org/packages/source/d/dulwich/dulwich-$portVersion.tar.gz"
CHECKSUM_SHA256="aa628449c5f594a9a282f4d9e5993fef65481ef5e3b9b6c52ff31200f8f5dc95"
ARCHITECTURES="all"
PROVIDES="
dulwich = $portVersion
cmd:dul_daemon = $portVersion
cmd:dul_receive_pack = $portVersion
cmd:dul_upload_pack = $portVersion
cmd:dul_web = $portVersion
cmd:dulwich = $portVersion
"
REQUIRES="
haiku
cmd:python2
lib:libpython2.7
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:gcc
cmd:python2
"
BUILD()
{
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
}
INSTALL()
{
$portPackageLinksDir/cmd~python2/bin/python2 setup.py install \
--prefix=$prefix
}

View File

@@ -0,0 +1,115 @@
SUMMARY="Pure python git implementation"
DESCRIPTION="Dulwich is a simple Python implementation of the Git file \
formats and protocols. All functionality is available in pure Python.\
Optional C extensions can be built for improved performance."
HOMEPAGE="https://www.dulwich.io/"
COPYRIGHT="2008-2022 Jelmer Vernooij"
LICENSE="
Apache v2
GNU GPL v2
"
REVISION="1"
SOURCE_URI="https://pypi.python.org/packages/source/${portName:0:1}/dulwich/dulwich-$portVersion.tar.gz"
CHECKSUM_SHA256="dc5498b072bdc12c1effef4b6202cd2a4542bb1c6dbb4ddcfc8c6d53e08b488c"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
PYTHON_PACKAGES=(python3 python38 python39)
PYTHON_VERSIONS=(3.7 3.8 3.9)
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
urllib3_python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion
cmd:gcc$secondaryArchSuffix"
done
PROVIDES_python3="$PROVIDES_python3
cmd:dul_receive_pack3 = $portVersion
cmd:dul_upload_pack3 = $portVersion
cmd:dulwich3 = $portVersion
"
PROVIDES_python38="$PROVIDES_python38
cmd:dul_receive_pack38 = $portVersion
cmd:dul_upload_pack38 = $portVersion
cmd:dulwich38 = $portVersion
"
PROVIDES_python39="$PROVIDES_python39
cmd:dul_receive_pack39 = $portVersion
cmd:dul_upload_pack39 = $portVersion
cmd:dulwich39 = $portVersion
"
# TODO add the gpg python module when it's available
#TEST_REQUIRES=""
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
#python=$portPackageLinksDir/cmd~python$pythonVersion/bin/python$pythonVersion
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
if [ $pythonPackage == python3 ]; then
for f in $prefix/bin/*; do
mv $f ${f}3
done
fi
if [ $pythonPackage == python38 ]; then
for f in $prefix/bin/*; do
mv $f ${f}38
done
fi
if [ $pythonPackage == python39 ]; then
for f in $prefix/bin/*; do
mv $f ${f}39
done
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$prefix/bin
done
}
TEST()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
$python -m unittest dulwich.tests.test_suite
done
}