pep8, new recipe (#7079)

This commit is contained in:
Schrijvers Luc
2022-07-28 14:47:00 +02:00
committed by GitHub
parent 447e3e662e
commit c118900574

View File

@@ -0,0 +1,62 @@
SUMMARY="Python style guide checker"
DESCRIPTION="pep8 is a tool to check your Python code against some of the style conventions in \
PEP 8_."
HOMEPAGE="https://pypi.org/project/pep8/"
COPYRIGHT="2017 Ian Lee"
LICENSE="MIT"
REVISION="1"
pypiVersion="64ba19519db49e4094d82599412a9660dee8c26a7addbbb1bf17927ceefe"
SOURCE_URI="https://files.pythonhosted.org/packages/01/a0/$pypiVersion/pep8-$portVersion.tar.gz"
CHECKSUM_SHA256="fe249b52e20498e59e0b5c5256aa52ee99fc295b26ec9eaa85776ffdb9fe6374"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3 python38 python39 python310)
PYTHON_VERSIONS=(3.7 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:pep8\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$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
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python* \
$prefix/bin
done
}