mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
68 lines
1.6 KiB
Bash
68 lines
1.6 KiB
Bash
SUMMARY="Ultra-lightweight pure Python package to check if a file is binary or text"
|
|
DESCRIPTION="Ultra-lightweight pure Python package to guess whether a file is binary or text, \
|
|
using a heuristic similar to Perl's pp_fttext and its analysis by @eliben."
|
|
HOMEPAGE="https://github.com/audreyr/binaryornot/"
|
|
COPYRIGHT="2013 Audrey Roy"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/audreyr/binaryornot/archive/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="8cca04876a5e9d01f0dda79390e99089da87f3c1948ab2720661ba379d1b23f2"
|
|
PATCHES="cff1a0a4478c17d4f970d133c06abbf6945b6a5e.patch"
|
|
|
|
ARCHITECTURES="any"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku_devel
|
|
"
|
|
|
|
PYTHON_PACKAGES=(python39 python310)
|
|
PYTHON_VERSIONS=(3.9 3.10)
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku
|
|
chardet_$pythonPackage
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
setuptools_$pythonPackage
|
|
wheel_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
|
|
INSTALL()
|
|
{
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$portVersion
|
|
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
python=python$pythonVersion
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation
|
|
$python -m installer -p $prefix dist/*.whl
|
|
|
|
packageEntries ${PYTHON_PACKAGES[i]} \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|