Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python/incremental: update to 24.7.1; obsolete package for Python 3.7 #18283

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/python/incremental/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/incremental-24.7.1/
30 changes: 20 additions & 10 deletions components/python/incremental/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,33 @@ BUILD_STYLE = pyproject
include ../../../make-rules/shared-macros.mk

COMPONENT_NAME = incremental
COMPONENT_VERSION = 22.10.0
COMPONENT_SUMMARY = incremental - \\\\\\\"A small library that versions your Python projects.\\\\\\\"
HUMAN_VERSION = 24.7.1
COMPONENT_SUMMARY = A small library that versions your Python projects.
COMPONENT_PROJECT_URL = https://github.com/twisted/incremental
COMPONENT_ARCHIVE_URL = \
https://files.pythonhosted.org/packages/86/42/9e87f04fa2cd40e3016f27a4b4572290e95899c6dce317e2cdb580f3ff09/incremental-22.10.0.tar.gz
COMPONENT_ARCHIVE_HASH = \
sha256:912feeb5e0f7e0188e6f42241d2f450002e11bbc0937c65865045854c24c0bd0
sha256:a3717c20534499835555ba727b32ee087945ba9daaf23851471dfe3d1e3d1698
COMPONENT_LICENSE = MIT
COMPONENT_LICENSE_FILE = LICENSE

# Testing is currently not possible
# https://github.com/twisted/incremental/issues/80
TEST_STYLE = none

include $(WS_MAKE_RULES)/common.mk

# Remove directories created by previous test run to make test results reproducible
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_noop/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_noop/example_noop.egg-info ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuppy/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuppy/src/example_setuppy.egg-info ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuptools/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuptools/src/example_setuptools.egg-info ;

# Random temporary directory name
COMPONENT_TEST_TRANSFORMS += "-e 's|\(/\.tmp-\).\{8\}/|\1XXXXXXXX/|'"

# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/setuptools
PYTHON_REQUIRED_PACKAGES += library/python/wheel
PYTHON_REQUIRED_PACKAGES += library/python/tomli
PYTHON_REQUIRED_PACKAGES += runtime/python
TEST_REQUIRED_PACKAGES.python += library/python/build
TEST_REQUIRED_PACKAGES.python += library/python/click
TEST_REQUIRED_PACKAGES.python += library/python/coverage
TEST_REQUIRED_PACKAGES.python += library/python/twisted
TEST_REQUIRED_PACKAGES.python += library/python/virtualenv
5 changes: 3 additions & 2 deletions components/python/incremental/history
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
library/python/incremental-27@17.5.0,5.11-2020.0.1.1 noincorporate
library/python/incremental-35@17.5.0,5.11-2020.0.1.1 noincorporate
library/python/incremental-27@17.5.0,5.11-2020.0.1.2
library/python/incremental-35@17.5.0,5.11-2020.0.1.2
library/python/incremental-37@22.10.0,5.11-2022.0.0.1
14 changes: 9 additions & 5 deletions components/python/incremental/incremental-PYVER.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/entry_points.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/top_level.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/entry_points.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/top_level.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/_hatch.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/_version.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_pyproject.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_update.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_version.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/update.py
Expand All @@ -41,3 +43,5 @@ depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
pkg.debug.depend.path=usr/bin

# Automatically generated dependencies based on distribution metadata
depend type=require fmri=pkg:/library/python/setuptools-$(PYV)
depend type=require fmri=pkg:/library/python/tomli-$(PYV)
16 changes: 10 additions & 6 deletions components/python/incremental/manifests/sample-manifest.p5m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

#
# Copyright 2022 <contributor>
# Copyright 2024 <contributor>
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
Expand All @@ -23,15 +23,17 @@ set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/entry_points.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(COMPONENT_VERSION).dist-info/top_level.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/LICENSE
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/entry_points.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental-$(HUMAN_VERSION).dist-info/top_level.txt
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/_hatch.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/_version.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_pyproject.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_update.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/tests/test_version.py
file path=usr/lib/python$(PYVER)/vendor-packages/incremental/update.py
Expand All @@ -41,3 +43,5 @@ depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
pkg.debug.depend.path=usr/bin

# Automatically generated dependencies based on distribution metadata
depend type=require fmri=pkg:/library/python/setuptools-$(PYV)
depend type=require fmri=pkg:/library/python/tomli-$(PYV)
14 changes: 14 additions & 0 deletions components/python/incremental/patches/01-tox-requires.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tox-wheel is not needed to run tests.
tox version pin is too strict.

--- incremental-24.7.1/tox.ini.orig
+++ incremental-24.7.1/tox.ini
@@ -2,8 +2,6 @@
minversion = 3.23.0
requires =
virtualenv >= 20.4.3
- tox < 4.0.0
- tox-wheel >= 0.6.0
isolated_build = true
envlist =
flake8,
55 changes: 55 additions & 0 deletions components/python/incremental/patches/02-tox-enable-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
--- incremental-24.7.1/tox.ini.orig
+++ incremental-24.7.1/tox.ini
@@ -15,22 +15,22 @@
skip_install =
pindeps: true
deps =
- tests: -rrequirements_tests.txt
+ -rrequirements_tests.txt
mypy: -rrequirements_mypy.txt
apidocs: pydoctor
lint: pre-commit
pindeps: pip-tools
extras =
mypy: scripts
- tests: scripts
+ scripts

setenv =
; Suppress pointless chatter in the output.
PIP_DISABLE_PIP_VERSION_CHECK=yes

- tests: TOX_INI_DIR={toxinidir}
- tests: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
- tests: PIP_FIND_LINKS={env:PIP_FIND_LINKS:{distdir}}
+ TOX_INI_DIR={toxinidir}
+ COVERAGE_PROCESS_START={toxinidir}/.coveragerc
+ PIP_FIND_LINKS={env:PIP_FIND_LINKS:{distdir}}

commands =
python -V
@@ -39,15 +39,15 @@

apidocs: pydoctor -q --project-name incremental src/incremental

- tests: coverage --version
- tests: {envbindir}/trial --version
- tests: coverage erase
- tests: coverage run {envbindir}/trial incremental
- tests: coverage run {envbindir}/trial tests/test_examples.py
- tests: coverage combine
- tests: coverage report
- tests: coverage html
- tests: coverage xml
+ coverage --version
+ {envbindir}/trial --version
+ coverage erase
+ coverage run {envbindir}/trial incremental
+ coverage run {envbindir}/trial tests/test_examples.py
+ coverage combine
+ coverage report
+ coverage html
+ coverage xml

mypy: mypy src

11 changes: 11 additions & 0 deletions components/python/incremental/patches/03-test-requirements.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- incremental-24.7.1/tox.ini.orig
+++ incremental-24.7.1/tox.ini
@@ -15,7 +15,7 @@
skip_install =
pindeps: true
deps =
- -rrequirements_tests.txt
+ -rrequirements_tests.in
mypy: -rrequirements_mypy.txt
apidocs: pydoctor
lint: pre-commit
52 changes: 52 additions & 0 deletions components/python/incremental/patches/04-test-no-hatch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
We have no hatch packaged yet.

--- incremental-24.7.1/requirements_tests.in.orig
+++ incremental-24.7.1/requirements_tests.in
@@ -2,4 +2,3 @@
coverage
coverage-p
twisted
-hatch
--- incremental-24.7.1/tests/test_examples.py.orig
+++ incremental-24.7.1/tests/test_examples.py
@@ -64,40 +64,6 @@
)
self.assertEqual(metadata.version("example_hatchling"), "24.7.0")

- def test_hatch_version(self):
- """
- The ``hatch version`` command reports the version of a package
- packaged with hatchling.
- """
- proc = run(
- ["hatch", "version"],
- cwd=TEST_DIR.child("example_hatchling").path,
- check=True,
- capture_output=True,
- )
-
- self.assertEqual(proc.stdout, b"24.7.0\n")
-
- def test_hatch_version_set(self):
- """
- The ``hatch version`` command can't set the version so its output
- tells the user to use ``incremental.update`` instead.
- """
- proc = run(
- ["hatch", "--no-color", "version", "24.8.0"],
- cwd=TEST_DIR.child("example_hatchling").path,
- check=False,
- capture_output=True,
- )
- suggestion = b"Run `python -m incremental.version --newversion 24.8.0` to set the version."
-
- self.assertGreater(proc.returncode, 0)
- self.assertRegex(
- proc.stdout,
- # Hatch may wrap the output, so we are flexible about the specifics of whitespace.
- suggestion.replace(b".", rb"\.").replace(b" ", b"\\s+"),
- )
-
def test_noop(self):
"""
The Incremental setuptools hook is a silent no-op when there is no Incremental
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Do not try to reinstall system packages.

--- incremental-24.7.1/tests/test_examples.py.orig
+++ incremental-24.7.1/tests/test_examples.py
@@ -24,7 +24,7 @@
pkgfile = builder.build("wheel", output_directory=os.environ["PIP_FIND_LINKS"])

# Force reinstall in case tox reused the venv.
- run(["pip", "install", "--force-reinstall", pkgfile], check=True)
+ run(["pip", "install", pkgfile], check=True)


class ExampleTests(TestCase):
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage-p is not needed to run tests.

--- incremental-24.7.1/requirements_tests.in.orig
+++ incremental-24.7.1/requirements_tests.in
@@ -1,4 +1,3 @@
build
coverage
-coverage-p
twisted
17 changes: 5 additions & 12 deletions components/python/incremental/pkg5
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"dependencies": [
"SUNWcs",
"library/python/setuptools-37",
"library/python/setuptools-39",
"library/python/wheel-37",
"library/python/wheel-39",
"runtime/python-37",
"runtime/python-39",
"shell/ksh93",
"system/library"
"library/python/tomli-39",
"runtime/python-39"
],
"fmris": [
"library/python/incremental-37",
"library/python/incremental-39",
"library/python/incremental"
"library/python/incremental",
"library/python/incremental-39"
],
"name": "incremental"
}
}
22 changes: 18 additions & 4 deletions components/python/incremental/python-integrate-project.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@
# Copyright 2022 Marcel Telka
#

%include-2%
# Testing is currently not possible
# https://github.com/twisted/incremental/issues/80
TEST_STYLE = none
%patch% 01-tox-requires.patch
%patch% 02-tox-enable-tests.patch
%patch% 03-test-requirements.patch
%patch% 04-test-no-hatch.patch
%patch% 05-test-pip-no-reinstall.patch
%patch% 06-test-no-coverage-p.patch

%include-3%
# Remove directories created by previous test run to make test results reproducible
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_noop/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_noop/example_noop.egg-info ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuppy/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuppy/src/example_setuppy.egg-info ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuptools/build ;
COMPONENT_PRE_TEST_ACTION += $(RM) -r $(@D)/tests/example_setuptools/src/example_setuptools.egg-info ;

# Random temporary directory name
COMPONENT_TEST_TRANSFORMS += "-e 's|\(/\.tmp-\).\{8\}/|\1XXXXXXXX/|'"
Loading