pytest: drop .py suffix for "cmd:"s. (#8824)

This commit is contained in:
OscarL
2023-06-09 03:56:50 -03:00
committed by GitHub
parent c0d1936d4c
commit e066a79237

View File

@@ -3,7 +3,7 @@ DESCRIPTION="The pytest framework makes it easy to write small tests, yet scales
HOMEPAGE="https://pytest.org"
COPYRIGHT="2004 Holger Krekel and others."
LICENSE="MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://pypi.io/packages/source/p/pytest/pytest-$portVersion.tar.gz"
CHECKSUM_SHA256="434afafd78b1d78ed0addf160ad2b77a30d35d4bdf8af234fe621919d9ed15e3"
@@ -29,8 +29,8 @@ for i in "${!PYTHON_PACKAGES[@]}"; do
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
cmd:py.test_$pythonVersion.py = $portVersion
cmd:pytest_$pythonVersion.py = $portVersion
cmd:py.test_$pythonVersion = $portVersion
cmd:pytest_$pythonVersion = $portVersion
\""
# Provide non-suffixed cmd only for the default Python version
if [ $pythonVersion = $defaultVersion ]; then
@@ -73,13 +73,13 @@ INSTALL()
# Version suffix all the scripts
for f in $binDir/*; do
mv $f ${f%.py}-${pythonVersion}.py
mv $f $f-$pythonVersion
done
# And provide suffix-less symlinks for the default version
if [ $pythonVersion = $defaultVersion ]; then
for f in $binDir/*; do
ln -sr $f ${f%-$pythonVersion.py}
ln -sr $f ${f%-$pythonVersion}
done
fi