Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-calver for openSUSE:Factory checked in at 2026-02-06 21:29:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-calver (Old) and /work/SRC/openSUSE:Factory/.python-calver.new.1670 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-calver" Fri Feb 6 21:29:57 2026 rev:6 rq:1330909 version:2025.10.20 Changes: -------- --- /work/SRC/openSUSE:Factory/python-calver/python-calver.changes 2025-12-15 11:35:37.662018630 +0100 +++ /work/SRC/openSUSE:Factory/.python-calver.new.1670/python-calver.changes 2026-02-06 21:30:03.705497106 +0100 @@ -1,0 +2,6 @@ +Wed Feb 4 10:32:48 UTC 2026 - Daniel Garcia <[email protected]> + +- Update ghtag, download source from latest release tag +- Add pythons_for_pypi macro + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-calver.spec ++++++ --- /var/tmp/diff_new_pack.FvQqKi/_old 2026-02-06 21:30:04.449528322 +0100 +++ /var/tmp/diff_new_pack.FvQqKi/_new 2026-02-06 21:30:04.449528322 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-calver # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,7 +25,8 @@ %bcond_with test %endif %define skip_python2 1 -%define ghtag 2022.06.26 +%define ghtag 2025.10.20 +%{?pythons_for_pypi} %{?sle15_python_module_pythons} Name: python-calver%{psuffix} Version: 2025.10.20 ++++++ calver-2025.10.20-gh.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/.github/workflows/build.yml new/calver-2025.10.20/.github/workflows/build.yml --- old/calver-2022.06.26/.github/workflows/build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/calver-2025.10.20/.github/workflows/build.yml 2025-10-20 22:34:36.000000000 +0200 @@ -0,0 +1,29 @@ +name: Build +on: [push, pull_request, workflow_dispatch] + +env: + FORCE_COLOR: 1 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Unpack sdist + run: | + mkdir -p dist/calver + tar -xvvf dist/*.tar.gz -C dist/calver/ --strip-components=1 + - name: Install tox + run: python -m pip install tox + - name: Test + run: python -m tox -e py --root dist/calver diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/.github/workflows/lint.yml new/calver-2025.10.20/.github/workflows/lint.yml --- old/calver-2022.06.26/.github/workflows/lint.yml 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/.github/workflows/lint.yml 2025-10-20 22:34:36.000000000 +0200 @@ -1,12 +1,18 @@ name: Lint -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] + +env: + FORCE_COLOR: 1 + jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 + with: + python-version: "3.x" - name: Install tox run: python -m pip install tox - name: Lint diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/.github/workflows/pypi-publish.yml new/calver-2025.10.20/.github/workflows/pypi-publish.yml --- old/calver-2022.06.26/.github/workflows/pypi-publish.yml 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/.github/workflows/pypi-publish.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,39 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/.github/workflows/release.yml new/calver-2025.10.20/.github/workflows/release.yml --- old/calver-2022.06.26/.github/workflows/release.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/calver-2025.10.20/.github/workflows/release.yml 2025-10-20 22:34:36.000000000 +0200 @@ -0,0 +1,39 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + permissions: + # Used to authenticate to PyPI via OIDC. + id-token: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/.github/workflows/test.yml new/calver-2025.10.20/.github/workflows/test.yml --- old/calver-2022.06.26/.github/workflows/test.yml 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/.github/workflows/test.yml 2025-10-20 22:34:36.000000000 +0200 @@ -1,16 +1,21 @@ name: Tests -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] + +env: + FORCE_COLOR: 1 + jobs: test: strategy: + fail-fast: false matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"] runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Use Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: Install tox diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/MANIFEST.in new/calver-2025.10.20/MANIFEST.in --- old/calver-2022.06.26/MANIFEST.in 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/MANIFEST.in 2025-10-20 22:34:36.000000000 +0200 @@ -1,3 +1,5 @@ +recursive-include tests *.py include pyproject.toml +include tox.ini include *.md include LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/README.md new/calver-2025.10.20/README.md --- old/calver-2022.06.26/README.md 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/README.md 2025-10-20 22:34:36.000000000 +0200 @@ -31,7 +31,7 @@ You can test that it is working with: -``` +```console $ python setup.py --version 2020.6.16 ``` @@ -41,9 +41,9 @@ By default, when setting `use_calver=True`, it uses the following to generate the version string: -``` +```pycon >>> import datetime ->>> datetime.datetime.now().strftime("%Y.%m.%d") +>>> datetime.datetime.now(tz=datetime.timezone.utc).strftime("%Y.%m.%d") 2020.6.16 ``` @@ -61,6 +61,14 @@ ) ``` +You can override the current date/time by passing the environment variable +`SOURCE_DATE_EPOCH`, which should be a Unix timestamp in seconds. +This is useful for reproducible builds (see https://reproducible-builds.org/docs/source-date-epoch/): + +```console +env SOURCE_DATE_EPOCH=1743428011000 python setup.py --version +``` + You can override this entirely by passing a callable instead, which will be called with no arguments at build time: @@ -70,7 +78,7 @@ from setuptools import setup def long_now_version(): - now = datetime.datetime.now() + now = datetime.datetime.now(tz=datetime.timezone.utc) return now.strftime("%Y").zfill(5) + "." + now.strftime("%m.%d") setup( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/pyproject.toml new/calver-2025.10.20/pyproject.toml --- old/calver-2022.06.26/pyproject.toml 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/pyproject.toml 2025-10-20 22:34:36.000000000 +0200 @@ -1,3 +1,31 @@ [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" \ No newline at end of file +requires = ["setuptools>=77.0.1"] # https://github.com/di/calver/pull/19 +build-backend = "setuptools.build_meta" + +[project] +name = "calver" +dynamic = ["version"] +description = "Setuptools extension for CalVer package versions" +readme = "README.md" +requires-python = ">=3.9" +license = "Apache-2.0" +authors = [ + { name = "Dustin Ingram", email = "[email protected]" } +] +keywords = ["calver"] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "Programming Language :: Python :: 3", +] + +[project.urls] +Homepage = "https://github.com/di/calver" +Repository = "https://github.com/di/calver" + +[project.entry-points."distutils.setup_keywords"] +use_calver = "calver.integration:version" + +[tool.setuptools] +[tool.setuptools.packages.find] +where = ["src"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/setup.py new/calver-2025.10.20/setup.py --- old/calver-2022.06.26/setup.py 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/setup.py 2025-10-20 22:34:36.000000000 +0200 @@ -1,15 +1,11 @@ import os import sys -from setuptools import find_packages, setup - -here = os.path.abspath(os.path.dirname(__file__)) - -with open(os.path.join(here, "README.md"), encoding="utf-8") as f: - long_description = f.read() +from setuptools import setup def calver_version(value): + here = os.path.abspath(os.path.dirname(__file__)) src = os.path.join(here, "src") sys.path.insert(0, src) @@ -20,27 +16,5 @@ setup( - name="calver", - description="Setuptools extension for CalVer package versions", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/di/calver", - author="Dustin Ingram", - author_email="[email protected]", - classifiers=[ - "Intended Audience :: Developers", - "Topic :: Software Development :: Build Tools", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3", - ], - keywords="calver", - package_dir={"": "src"}, - packages=find_packages(where="src"), - python_requires=">=3.5", - entry_points={ - "distutils.setup_keywords": [ - "use_calver = calver.integration:version", - ], - }, version=calver_version(True), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/src/calver/integration.py new/calver-2025.10.20/src/calver/integration.py --- old/calver-2022.06.26/src/calver/integration.py 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/src/calver/integration.py 2025-10-20 22:34:36.000000000 +0200 @@ -1,5 +1,6 @@ import datetime import os +import time DEFAULT_FORMAT = "%Y.%m.%d" @@ -26,16 +27,25 @@ def _get_version(value): if not value: return - elif value is True: - generate_version = lambda: datetime.datetime.now().strftime(DEFAULT_FORMAT) + + version_from_package_info = pkginfo_version() + if version_from_package_info: + return version_from_package_info + + build_date = datetime.datetime.fromtimestamp( + int(os.environ.get("SOURCE_DATE_EPOCH", time.time())), + tz=datetime.timezone.utc, + ) + + if value is True: + generate_version = lambda: build_date.strftime(DEFAULT_FORMAT) elif isinstance(value, str): - generate_version = lambda: datetime.datetime.now().strftime(value) + generate_version = lambda: build_date.strftime(value) elif getattr(value, "__call__", None): generate_version = value else: return - - return pkginfo_version() or generate_version() + return generate_version() def version(dist, keyword, value): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/tests/conftest.py new/calver-2025.10.20/tests/conftest.py --- old/calver-2022.06.26/tests/conftest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/calver-2025.10.20/tests/conftest.py 2025-10-20 22:34:36.000000000 +0200 @@ -0,0 +1,46 @@ +import os + +import pretend +import pytest + +import calver.integration + + +# Clean environment variable SOURCE_DATE_EPOCH if it's already present, e.g. +# set up by packaging tool, since it may mess up logic of our testsuite. +def pytest_configure(config): + if "SOURCE_DATE_EPOCH" in os.environ: + del os.environ["SOURCE_DATE_EPOCH"] + + [email protected] +def original_version(): + return pretend.stub() + + [email protected] +def dist(original_version): + return pretend.stub(metadata=pretend.stub(version=original_version)) + + [email protected] +def keyword(): + return pretend.stub() + + [email protected] +def ignore_pkginfo(monkeypatch): + # Ensure that the test doesn't unintently prefer to read from a PKG_INFO + # that might exist in the source directory, e.g. when testing a sdist + # https://github.com/di/calver/issues/20 + monkeypatch.setattr( + calver.integration, "get_pkginfo_contents", pretend.raiser(FileNotFoundError) + ) + + [email protected] +def source_date_epoch(monkeypatch): + _source_date_epoch = 1234567890 + monkeypatch.setenv("SOURCE_DATE_EPOCH", str(_source_date_epoch)) + yield _source_date_epoch + monkeypatch.delenv("SOURCE_DATE_EPOCH") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/tests/test_integration.py new/calver-2025.10.20/tests/test_integration.py --- old/calver-2022.06.26/tests/test_integration.py 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/tests/test_integration.py 2025-10-20 22:34:36.000000000 +0200 @@ -1,4 +1,5 @@ import datetime +import os import pretend import pytest @@ -6,21 +7,6 @@ import calver.integration [email protected] -def original_version(): - return pretend.stub() - - [email protected] -def dist(original_version): - return pretend.stub(metadata=pretend.stub(version=original_version)) - - [email protected] -def keyword(): - return pretend.stub() - - @pytest.mark.parametrize("value", [None, False, ""]) def test_version_missing(dist, keyword, original_version, value): calver.integration.version(dist, keyword, value) @@ -28,7 +14,7 @@ assert dist.metadata.version == original_version -def test_version_true(dist, keyword): +def test_version_true(dist, keyword, ignore_pkginfo): value = True calver.integration.version(dist, keyword, value) @@ -38,19 +24,20 @@ ) -def test_version_str(dist, keyword): +def test_version_str(dist, keyword, ignore_pkginfo): value = "%c" calver.integration.version(dist, keyword, value) - assert dist.metadata.version == datetime.datetime.now().strftime(value) + assert dist.metadata.version == datetime.datetime.now( + datetime.timezone.utc + ).strftime(value) -def test_version_callable(dist, keyword): +def test_version_callable(dist, keyword, ignore_pkginfo): v = pretend.stub() - value = lambda: v - calver.integration.version(dist, keyword, value) + calver.integration.version(dist, keyword, lambda: v) assert dist.metadata.version == v @@ -64,3 +51,11 @@ calver.integration.version(dist, keyword, True) assert dist.metadata.version == "42" + + +def test_reproducible_build(dist, keyword, source_date_epoch, ignore_pkginfo): + calver.integration.version(dist, keyword, True) + + assert dist.metadata.version == datetime.datetime.fromtimestamp( + source_date_epoch, tz=datetime.timezone.utc + ).strftime(calver.integration.DEFAULT_FORMAT) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/calver-2022.06.26/tox.ini new/calver-2025.10.20/tox.ini --- old/calver-2022.06.26/tox.ini 2022-06-27 01:22:45.000000000 +0200 +++ new/calver-2025.10.20/tox.ini 2025-10-20 22:34:36.000000000 +0200 @@ -1,5 +1,5 @@ [tox] -envlist = py{35,36,37,38,39},lint +envlist = py{39,310,311,312,313,314},lint minversion = 3.3.0 isolated_build = true
