python-twine/python-twine.spec

108 lines
3.7 KiB
RPMSpec
Raw Normal View History

- Update to 6.1.0 * Features - Twine now has preliminary built-in support for Trusted Publishing as an authentication mechanism. (#1194) * Deprecations and Removals - Remove support for egg and wininst distribution types. These are not accepted by PyPI and not produced by any modern build-backends. (#1195) - Twine no longer supports .tar.bz2 source distributions. (#1200) * Misc - packaging is used instead of pkginfo for parsing and validating metadata. This aligns metadata validation to the one performed by PyPI. packaging version 24.0 or later is required. Support for metadata version 2.4 requires packaging 24.2 or later. pkginfo is not a dependency anymore. (#1180) - Use "source" instead of None as pyversion for sdist uploads. This is what PyPI (and most likely other package indexes) expects. (#1191) - Changes from 6.0.1 * Bugfixes - Fixed a regression where twine check would fail to expand wildcards, e.g. twine check 'dist/*'. (#1188) * Misc #1184 - Changes from 6.0.0 * Bugfixes - Restore support for pkginfo 1.11 (#1116) * Deprecations and Removals - Username for PyPI and Test PyPI now defaults to __token__ but no longer overrides a username configured in the environment or supplied on the command line. Workflows still supplying anything other than __token__ for the username when uploading to PyPI or Test PyPI will now fail. Either supply __token__ or do not supply a username at all. (#1121) * Misc #1024 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=48
2025-01-25 20:45:13 +00:00
#
# spec file for package python-twine
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-twine
Version: 6.1.0
Release: 0
Summary: Collection of utilities for interacting with PyPI
License: Apache-2.0
URL: https://github.com/pypa/twine
Source: https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar.gz
Patch0: 0001-remove-disable-socket-pytest-opt.patch
# PATCH-FIX-UPSTREAM skip-unsupported-Metadata-Version-test.patch gh#pypa/twine#1071 mcepl@suse.com
# Skip failing test case
Patch1: skip-unsupported-Metadata-Version-test.patch
BuildRequires: %{python_module id}
BuildRequires: %{python_module importlib-metadata >= 3.6}
BuildRequires: %{python_module jaraco.envs}
BuildRequires: %{python_module jaraco.packaging >= 9}
BuildRequires: %{python_module keyring >= 15.1}
BuildRequires: %{python_module munch}
BuildRequires: %{python_module packaging >= 24.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pkginfo >= 1.8.1}
BuildRequires: %{python_module portend}
BuildRequires: %{python_module pretend}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module readme_renderer >= 35.0}
BuildRequires: %{python_module requests >= 2.20}
BuildRequires: %{python_module requests-toolbelt >= 0.8.0}
BuildRequires: %{python_module rfc3986 >= 1.4.0}
BuildRequires: %{python_module rich >= 12.0.0}
BuildRequires: %{python_module setuptools >= 45}
BuildRequires: %{python_module setuptools_scm >= 6.0}
BuildRequires: %{python_module urllib3 >= 1.26.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-id
- Update to 6.1.0 * Features - Twine now has preliminary built-in support for Trusted Publishing as an authentication mechanism. (#1194) * Deprecations and Removals - Remove support for egg and wininst distribution types. These are not accepted by PyPI and not produced by any modern build-backends. (#1195) - Twine no longer supports .tar.bz2 source distributions. (#1200) * Misc - packaging is used instead of pkginfo for parsing and validating metadata. This aligns metadata validation to the one performed by PyPI. packaging version 24.0 or later is required. Support for metadata version 2.4 requires packaging 24.2 or later. pkginfo is not a dependency anymore. (#1180) - Use "source" instead of None as pyversion for sdist uploads. This is what PyPI (and most likely other package indexes) expects. (#1191) - Changes from 6.0.1 * Bugfixes - Fixed a regression where twine check would fail to expand wildcards, e.g. twine check 'dist/*'. (#1188) * Misc #1184 - Changes from 6.0.0 * Bugfixes - Restore support for pkginfo 1.11 (#1116) * Deprecations and Removals - Username for PyPI and Test PyPI now defaults to __token__ but no longer overrides a username configured in the environment or supplied on the command line. Workflows still supplying anything other than __token__ for the username when uploading to PyPI or Test PyPI will now fail. Either supply __token__ or do not supply a username at all. (#1121) * Misc #1024 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=48
2025-01-25 20:45:13 +00:00
Requires: python-keyring >= 15.1
Requires: python-packaging
- Update to 6.1.0 * Features - Twine now has preliminary built-in support for Trusted Publishing as an authentication mechanism. (#1194) * Deprecations and Removals - Remove support for egg and wininst distribution types. These are not accepted by PyPI and not produced by any modern build-backends. (#1195) - Twine no longer supports .tar.bz2 source distributions. (#1200) * Misc - packaging is used instead of pkginfo for parsing and validating metadata. This aligns metadata validation to the one performed by PyPI. packaging version 24.0 or later is required. Support for metadata version 2.4 requires packaging 24.2 or later. pkginfo is not a dependency anymore. (#1180) - Use "source" instead of None as pyversion for sdist uploads. This is what PyPI (and most likely other package indexes) expects. (#1191) - Changes from 6.0.1 * Bugfixes - Fixed a regression where twine check would fail to expand wildcards, e.g. twine check 'dist/*'. (#1188) * Misc #1184 - Changes from 6.0.0 * Bugfixes - Restore support for pkginfo 1.11 (#1116) * Deprecations and Removals - Username for PyPI and Test PyPI now defaults to __token__ but no longer overrides a username configured in the environment or supplied on the command line. Workflows still supplying anything other than __token__ for the username when uploading to PyPI or Test PyPI will now fail. Either supply __token__ or do not supply a username at all. (#1121) * Misc #1024 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=48
2025-01-25 20:45:13 +00:00
Requires: python-readme_renderer >= 35.0
Requires: python-requests >= 2.20
Requires: python-requests-toolbelt >= 0.8.0
Requires: python-rfc3986 >= 1.4.0
Requires: python-rich >= 12.0.0
Requires: python-urllib3 >= 1.26
Requires(post): update-alternatives
Requires(postun): update-alternatives
- Update to 6.1.0 * Features - Twine now has preliminary built-in support for Trusted Publishing as an authentication mechanism. (#1194) * Deprecations and Removals - Remove support for egg and wininst distribution types. These are not accepted by PyPI and not produced by any modern build-backends. (#1195) - Twine no longer supports .tar.bz2 source distributions. (#1200) * Misc - packaging is used instead of pkginfo for parsing and validating metadata. This aligns metadata validation to the one performed by PyPI. packaging version 24.0 or later is required. Support for metadata version 2.4 requires packaging 24.2 or later. pkginfo is not a dependency anymore. (#1180) - Use "source" instead of None as pyversion for sdist uploads. This is what PyPI (and most likely other package indexes) expects. (#1191) - Changes from 6.0.1 * Bugfixes - Fixed a regression where twine check would fail to expand wildcards, e.g. twine check 'dist/*'. (#1188) * Misc #1184 - Changes from 6.0.0 * Bugfixes - Restore support for pkginfo 1.11 (#1116) * Deprecations and Removals - Username for PyPI and Test PyPI now defaults to __token__ but no longer overrides a username configured in the environment or supplied on the command line. Workflows still supplying anything other than __token__ for the username when uploading to PyPI or Test PyPI will now fail. Either supply __token__ or do not supply a username at all. (#1121) * Misc #1024 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=48
2025-01-25 20:45:13 +00:00
BuildArch: noarch
%python_subpackages
%description
Twine is a utility for publishing Python packages on PyPI.
Currently it supports registering projects, uploading distributions, and
checking, if descriptions will render correctly.
%prep
%autosetup -p1 -n twine-%{version}
sed -i '1s/^#!.*//' twine/__main__.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/twine
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# do not run integration tests
rm tests/test_integration.py
# test_check_status_code_for_wrong_repo_url is online test
# test_package_from_egg broken by importlib_metadata 8.5+
%pytest -k 'not (test_check_status_code_for_wrong_repo_url or test_package_from_egg)'
%post
%python_install_alternative twine
%postun
%python_uninstall_alternative twine
%files %{python_files}
%doc AUTHORS README.rst
%license LICENSE
%python_alternative %{_bindir}/twine
%{python_sitelib}/twine
%{python_sitelib}/twine-%{version}.dist-info
%changelog