# # spec file for package python-twine # # Copyright (c) 2023 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/ # %define skip_python2 1 %define skip_python36 1 %define skip_python38 1 %define skip_python39 1 %define skip_python311 1 %define skip_python2 1 %{?sle15_python_module_pythons} Name: python-twine Version: 4.0.2 Release: 1.2 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 license_files.patch gh#pypa/twine!992 mcepl@suse.com # license_file -> license_files Patch1: license_files.patch BuildRequires: %{python_module importlib-metadata} BuildRequires: %{python_module jaraco.envs} BuildRequires: %{python_module keyring >= 15.1} BuildRequires: %{python_module munch} BuildRequires: %{python_module pip} BuildRequires: %{python_module pkginfo >= 1.4.2} BuildRequires: %{python_module portend} BuildRequires: %{python_module pretend} BuildRequires: %{python_module pytest} BuildRequires: %{python_module readme_renderer >= 21.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} BuildRequires: %{python_module setuptools >= 0.7.0} BuildRequires: %{python_module setuptools_scm >= 1.15} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-importlib-metadata Requires: python-keyring >= 15.1 Requires: python-pkginfo >= 1.4.2 Requires: python-readme_renderer >= 21.0 Requires: python-requests >= 2.20 Requires: python-requests-toolbelt >= 0.8.0 Requires: python-rfc3986 >= 1.4.0 Requires: python-rich Requires(post): update-alternatives Requires(postun):update-alternatives 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 %pytest -k 'not test_check_status_code_for_wrong_repo_url' %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}*-info %changelog * Fri May 5 2023 Matej Cepl - Update to 4.0.2: - Remove deprecated function to fix twine check with pkginfo 1.9.0. - Improve logging when keyring fails. - Reconfgure root logger to show all log messages. - Drop support for Python 3.6. - Use Rich instead of tqdm for upload progress bar. - Remove Twine’s dependencies from the User-Agent header when uploading. - Improve detection of disabled BLAKE2 hashing due to FIPS mode. - Restore warning for missing long_description. - Add --verbose logging for querying keyring credentials. - Log all upload responses with --verbose. - Show more helpful error message for invalid metadata. - Require a recent version of urllib3. - Add support for core metadata version 2.2, defined in PEP 643. - Add support for Python 3.10. - Show more helpful messages for invalid passwords. - Allow the --skip-existing option to work with GCP Artifact Registry. - Add a helpful error message when an upload fails due to missing a trailing slash in the URL. - Generalize --verbose suggestion when an upload fails. - Improve error messages - Do not include md5_digest or blake2_256_digest if FIPS mode is enabled on the host. This removes those fields from the metadata before sending the metadata to the repository. - Add license_files.patch to make pip happy. * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Sun Jul 11 2021 Michael Ströder - added 0001-remove-disable-socket-pytest-opt.patch - update to 3.4.1 * 3.4.1 (2021-03-16) Bugfixes - Fix a regression that was causing some namespace packages with dots in them fail to upload to PyPI. (#745) * 3.4.0 (2021-03-15) Features - Prefer importlib.metadata for entry point handling. (#728) - Rely on importlib_metadata 3.6 for nicer entry point processing. (#732) - Eliminate dependency on setuptools/pkg_resources and replace with packaging and importlib_metadata. (#736) * 3.3.0 (2020-12-23) Features - Print files to be uploaded using ``upload --verbose`` (#670) - Print configuration file location when using ``upload --verbose`` (#675) - Print source and values of credentials when using ``upload --verbose`` (#685) - Add support for Python 3.9 (#708) - Turn warnings into errors when using ``check --strict`` (#715) Bugfixes - Make password optional when using ``upload --client-cert`` (#678) - Support more Nexus versions with ``upload --skip-existing`` (#693) - Support Gitlab Enterprise with ``upload --skip-existing`` (#698) - Show a better error message for malformed files (#714) Improved Documentation - Adopt PSF code of conduct (#680) - Adopt towncrier for the changleog (#718) * Thu Jul 23 2020 Marketa Calabkova - update to 3.2.0 * :feature:`666` Improve display of HTTP errors during upload * :feature:`649` Use red text when printing errors on the command line * :feature:`652` Print packages and signatures to be uploaded when using ``--verbose`` option * :bug:`655 major` Update URL to ``.pypirc`` specfication * :feature:`602` Require repository URL scheme to be ``http`` or ``https`` * :bug:`612 major` Don't raise an exception when Python version can't be parsed from filename * Sun Apr 5 2020 Tomáš Chvátal - Update deps to really match up reality * Thu Mar 26 2020 pgajdos@suse.com - version update to 3.1.1 bug`548` Restore --non-interactive as a flag not expecting an argument. :feature:`547` Add support for specifying --non-interactive as an environment variable. :feature:`336` When a client certificate is indicated, all password processing is disabled. :feature:`489` Add --non-interactive flag to abort upload rather than interactively prompt if credentials are missing. :feature:`524` Twine now unconditionally requires the keyring library and no longer supports uninstalling keyring as a means to disable that functionality. Instead, use keyring --disable keyring functionality if necessary. :feature:`518` Add Python 3.8 to classifiers. bug`332 major` More robust handling of server response in --skip-existing :feature:`437` Twine now requires Python 3.6 or later. Use pip 9 or pin to "twine<2" to install twine on older Python versions. bug`491 major` Require requests 2.20 or later to avoid reported security vulnerabilities in earlier releases. - python3 only package * Thu Mar 12 2020 Tomáš Chvátal - Fix build without python2 * Tue Feb 25 2020 Ondřej Súkup - update to 1.15.0 - last with python2 - Improved output on check command * Tue Sep 10 2019 Tomáš Chvátal - Update to 1.14.0: * Better error handling and gpg2 fallback if gpg not available. * Fixes for python 3.8 * Sat Mar 2 2019 Arun Persaud - specfile: * be more specific in %%files section * remove patch fix-keyring-support.patch, included upstream - update to version 1.13.0: * bug`452` Restore prompts while retaining support for suppressing prompts. * bug`447` Avoid requests-toolbelt to 0.9.0 to prevent attempting to use openssl when it isn't available. * :feature:`427` Add disable_progress_bar option to disable tqdm. * :feature:`426` Allow defining an empty username and password in .pypirc. * bug`441` Only install pyblake2 if needed. * bug`444` Use io.StringIO instead of StringIO. * bug`436` Use modern Python language features. * :support:`439` Refactor tox env and travis config. * bug`435` Specify python_requires in setup.py * bug`432` Use https URLs everywhere. * bug`428` Fix --skip-existing for Nexus Repos. * :feature:`419` Support keyring.get_credential. * :feature:`418` Support keyring.get_username_and_password. * bug`421` Remove unnecessary usage of readme_render.markdown. * :feature:" Add Python 3.7 to classifiers. * bug`412` Don't crash if there's no package description. * bug`408` Fix keyring support. * Sat Feb 9 2019 Matej Cepl - Add fix-keyring-support.patch fixing gh#pypa/twine#408 * Sat Feb 9 2019 Matej Cepl - Deduplicate installed files * Fri Jan 4 2019 Hans-Peter Jansen - update to version 1.12.1 - bug`404` Fix regression with upload exit code - update to version 1.12.0 - feature`395 major` Add twine check command to check long description - feature`392 major` Drop support for Python 3.3 - feature`363` Empower --skip-existing for Artifactory repositories - bug`367` Avoid MD5 when Python is compiled in FIPS mode - Fix source URL - add python-readme_renderer dependency - BuildRequire python2-pyblake2 for successful testing * Mon May 21 2018 tchvatal@suse.com - Recommend the pyblake2 on python2 as it is included in py3.6+ but was never in py2 * Mon May 21 2018 tchvatal@suse.com - Switch to github archive to have test fixtures - Enable tests * Sat May 19 2018 hpj@urpla.net - adjust requirements * Fri May 18 2018 hpj@urpla.net - update to version 1.11.0 - see https://github.com/pypa/twine/blob/master/docs/changelog.rst * Thu May 17 2018 tchvatal@suse.com - Format with spec-cleaner and reduce the license conditions * Thu Jul 6 2017 sebix+novell.com@sebix.at - fix source url * Wed Jul 5 2017 sebix+novell.com@sebix.at - update to version 1.9.1 - update specfile to singlespec * Wed Jan 18 2017 michael@stroeder.com - Update to version 1.8.1 - requires python-requests-toolbelt>=0.4.0 * Fri Sep 25 2015 p.drouand@gmail.com - Update to version 1.6.1 * bug:`130` Fix signing support for uploads - Implement update-alternatives * Wed Jul 16 2014 toddrme2178@gmail.com - BuildRequires: python-setuptools - Add executable * Tue Feb 4 2014 speilicke@suse.com - Initial version