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

build: add support for versioningit >=3.0.0 #5721

Merged
merged 1 commit into from Dec 14, 2023

Conversation

bastimeyer
Copy link
Member

Keep backward compatibility for versioningit <3.0.0


https://versioningit.readthedocs.io/en/stable/changelog.html#v3-0-0-2023-12-13

Breaking: The build_dir argument passed to Versioningit.do_onbuild() and onbuild method callables has been changed to an OnbuildFileProvider ABC


✔️ versioningit <3.0.0

$ pip install -U 'versioningit<3.0.0' >/dev/null

$ pytest -q -s build_backend/
.......
7 passed in 0.10s

$ rm -f dist/streamlink-*; python -m build --sdist --wheel >/dev/null 2>&1

$ bsdtar -xzOf dist/streamlink-*.whl streamlink/_version.py
__version__ = "6.4.2+13.gb8b905bc"

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/src/streamlink/_version.py
__version__ = "6.4.2+13.gb8b905bc"

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/pyproject.toml | head -n8
[build-system]
requires = [
  "setuptools >=64",
  "wheel",
  # The versioningit build-requirement gets removed from the source distribution,
  # as the version string is already built into it (see the onbuild versioningit hook):
  # "versioningit >=2.0.0,<4",
]

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/setup.py | tail -n6
    setup(
        cmdclass=get_cmdclasses(),
        entry_points=entry_points,
        data_files=data_files,
        version="6.4.2+13.gb8b905bc",
    )

✔️ versioningit >=3.0.0

$ pip install -U 'versioningit>=3.0.0' >/dev/null

$ pytest -q -s build_backend/
.......
7 passed in 0.09s

$ rm -f dist/streamlink-*; python -m build --sdist --wheel >/dev/null 2>&1

$ bsdtar -xzOf dist/streamlink-*.whl streamlink/_version.py
__version__ = "6.4.2+13.gb8b905bc"

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/src/streamlink/_version.py
__version__ = "6.4.2+13.gb8b905bc"

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/pyproject.toml | head -n8
[build-system]
requires = [
  "setuptools >=64",
  "wheel",
  # The versioningit build-requirement gets removed from the source distribution,
  # as the version string is already built into it (see the onbuild versioningit hook):
  # "versioningit >=2.0.0,<4",
]

$ bsdtar -xzOf dist/streamlink*.tar.gz streamlink-\*/setup.py | tail -n6
    setup(
        cmdclass=get_cmdclasses(),
        entry_points=entry_points,
        data_files=data_files,
        version="6.4.2+13.gb8b905bc",
    )

Keep backward compatibility for `versioningit <3.0.0`
@bastimeyer bastimeyer merged commit 83a6315 into streamlink:master Dec 14, 2023
21 checks passed
@bastimeyer bastimeyer deleted the build/versioningit-3.0.0 branch December 14, 2023 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant