mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
hatch_vcs: drop outdated and unused recipe. (#11957)
Not referenced by anything on-tree since 8b8ada3aae.
Patch was for tests only, came from upstream.
Users should try to `pip install` this if they need it.
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
SUMMARY="Hatch plugin for versioning with your preferred VCS"
|
||||
DESCRIPTION="This provides a plugin for Hatch that uses your preferred version control system \
|
||||
(like Git) to determine project versions."
|
||||
HOMEPAGE="https://github.com/ofek/hatch-vcs"
|
||||
COPYRIGHT="2022-present Ofek Lev"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/h/hatch-vcs/hatch_vcs-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="cec5107cfce482c67f8bc96f18bbc320c9aa0d068180e14ad317bbee5a153fee"
|
||||
PATCHES="26.patch" # from upstream
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python39 python310)
|
||||
PYTHON_VERSIONS=(3.9 3.10)
|
||||
defaultTestVersion="python39"
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
eval "PROVIDES_$pythonPackage=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
hatchling_$pythonPackage
|
||||
setuptools_scm_$pythonPackage
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
hatchling_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES+="
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
done
|
||||
|
||||
TEST_REQUIRES="
|
||||
hatch_vcs_$defaultTestVersion
|
||||
cmd:git
|
||||
cmd:pytest
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
pytest -v
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
From 2bf0d32f92f6609258f85131b94d0952fc0ec149 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Mon, 19 Dec 2022 20:20:11 -0500
|
||||
Subject: [PATCH] Work with setuptools_scm 7.1 (fix #25)
|
||||
|
||||
Make test_write less brittle (see also #8, #9) so that it works with
|
||||
_version.py files generated by at least setuptools_scm 7.1, 7.0, and
|
||||
6.x.
|
||||
---
|
||||
tests/test_build.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_build.py b/tests/test_build.py
|
||||
index 2fde601..7c76343 100644
|
||||
--- a/tests/test_build.py
|
||||
+++ b/tests/test_build.py
|
||||
@@ -75,8 +75,10 @@ def test_write(new_project_write):
|
||||
assert os.path.isfile(version_file)
|
||||
|
||||
lines = read_file(version_file).splitlines()
|
||||
- assert lines[3].startswith(('version =', '__version__ ='))
|
||||
- assert lines[3].endswith("version = '1.2.3'")
|
||||
+ version_starts = ('version = ', '__version__ = ')
|
||||
+ assert any(line.startswith(version_starts) for line in lines)
|
||||
+ version_line = next(line for line in lines if line.startswith(version_starts))
|
||||
+ assert version_line.endswith(" = '1.2.3'")
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
|
||||
Reference in New Issue
Block a user