| |
@@ -1,157 +1,173 @@
|
| |
- %if 0%{?fedora} || 0%{?epel} || 0%{?rhel} > 7
|
| |
- %global with_python3 1
|
| |
- %endif
|
| |
- %if 0%{?fedora} <= 29 && 0%{?rhel} <= 7
|
| |
- %global with_python2 1
|
| |
- %endif
|
| |
- %global with_tests 0
|
| |
+ %bcond_without tests
|
| |
+ # The xvfb tests sometimes hang in koji.
|
| |
+ %bcond_with xvfb_tests
|
| |
|
| |
Name: python-keyring
|
| |
- Version: 21.8.0
|
| |
- Release: 1%{?dist}
|
| |
+ Version: 23.11.0
|
| |
+ Release: 4%{?dist}
|
| |
Summary: Store and access your passwords safely
|
| |
- License: MIT and Python
|
| |
+
|
| |
+ # Upstream was asked to clarify the applicability of the Python-2.0.1 license.
|
| |
+ # In summary, the license was meant to be OR rather than AND, and the Python
|
| |
+ # license was applied with the intent of possibly contributing the package to
|
| |
+ # the Python standard library, which is no longer planned. In later releases,
|
| |
+ # the license will be simply MIT. See:
|
| |
+ # https://github.com/jaraco/keyring/issues/607#issuecomment-1341618763
|
| |
+ License: MIT OR Python-2.0.1
|
| |
URL: https://github.com/jaraco/keyring
|
| |
- Source0: https://files.pythonhosted.org/packages/source/k/keyring/keyring-%{version}.tar.gz
|
| |
- # patch is for f32 and earlier; presumably not needed for f33, but haven't tested thoroughly
|
| |
- Patch0: fix-setuptools.patch
|
| |
+ Source0: %{pypi_source keyring}
|
| |
+
|
| |
+ # Downstream-only (EPEL9): Work with the available setuptools version
|
| |
+ Patch: 0001-Downstream-only-EPEL9-Work-with-the-available-setupt.patch
|
| |
+
|
| |
BuildArch: noarch
|
| |
|
| |
- %global desc The Python keyring lib provides a easy way to access the system keyring\
|
| |
- service from python. It can be used in any application that needs safe\
|
| |
- password storage.\
|
| |
- \
|
| |
- The keyring services supported by the Python keyring lib:\
|
| |
- \
|
| |
- * **OSXKeychain**: supports the Keychain service in Mac OS X.\
|
| |
- * **KDEKWallet**: supports the KDE's Kwallet service.\
|
| |
- * **GnomeKeyring**: for GNOME environment.\
|
| |
- * **SecretServiceKeyring**: for newer GNOME and KDE environments.\
|
| |
- * **WinVaultKeyring**: supports the Windows Credential Vault\
|
| |
- \
|
| |
- Besides these native password storing services provided by operating systems.\
|
| |
- Python keyring lib also provides following build-in keyrings.\
|
| |
- \
|
| |
- * **Win32CryptoKeyring**: for Windows 2k+.\
|
| |
- * **CryptedFileKeyring**: a command line interface keyring base on PyCrypto.\
|
| |
- * **UncryptedFileKeyring**: a keyring which leaves passwords directly in file.
|
| |
-
|
| |
- %description
|
| |
- %desc
|
| |
-
|
| |
- %if 0%{?with_python2}
|
| |
- %package -n python2-keyring
|
| |
- Summary: Python 2 library to access the system keyring service
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2-setuptools
|
| |
- BuildRequires: python2-setuptools_scm
|
| |
- BuildRequires: python2-keyczar
|
| |
- BuildRequires: python2-mock
|
| |
-
|
| |
- %if 0%{?with_tests}
|
| |
- BuildRequires: python2-importlib-metadata
|
| |
- BuildRequires: python2-pytest
|
| |
- BuildRequires: python2-pytest-cov
|
| |
- BuildRequires: python2-pytest-flakes
|
| |
+ BuildRequires: python3-devel
|
| |
+
|
| |
+ %if %{with tests}
|
| |
+ # The “testing” extra mostly brings in linters and similar, which we would have
|
| |
+ # to patch out. Instead, we BR pytest manually. See:
|
| |
+ # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
| |
+ BuildRequires: python3dist(pytest)
|
| |
+ %if %{with xvfb_tests}
|
| |
+ # Run graphical tests in non-graphical build environment.
|
| |
+ BuildRequires: xorg-x11-server-Xvfb
|
| |
+ # Enable libsecret backend
|
| |
+ BuildRequires: python3-gobject
|
| |
+ BuildRequires: libsecret
|
| |
+ BuildRequires: gnome-keyring
|
| |
+ BuildRequires: /usr/bin/dbus-launch
|
| |
+ %endif
|
| |
%endif
|
| |
|
| |
- Requires: python2-SecretStorage
|
| |
- Requires: python2-importlib-metadata
|
| |
+ %global desc %{expand:
|
| |
+ The Python keyring library provides an easy way to access the system keyring
|
| |
+ service from python. It can be used in any application that needs safe password
|
| |
+ storage.
|
| |
|
| |
- %{?python_provide:%python_provide python2-keyring}
|
| |
+ These recommended keyring backends are supported:
|
| |
|
| |
- # These were obsoleted in 0.5.1-1
|
| |
- Obsoletes: %{name}-kwallet < 0.6
|
| |
- Obsoletes: %{name}-gnome < 0.6
|
| |
+ • macOS Keychain
|
| |
+ • Freedesktop Secret Service supports many DE including GNOME (requires
|
| |
+ secretstorage)
|
| |
+ • KDE4 & KDE5 KWallet (requires dbus)
|
| |
+ • Windows Credential Locker
|
| |
|
| |
- %description -n python2-keyring
|
| |
- %desc
|
| |
- %endif
|
| |
+ Other keyring implementations are available through third-party backends.}
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- %package -n python%{python3_pkgversion}-keyring
|
| |
- Summary: Python 3 library to access the system keyring service
|
| |
- BuildRequires: python%{python3_pkgversion}-devel
|
| |
- BuildRequires: python%{python3_pkgversion}-setuptools
|
| |
- BuildRequires: python%{python3_pkgversion}-setuptools_scm
|
| |
- %if 0%{?with_tests}
|
| |
- %if (0%{?fedora} && 0%{?fedora} < 32) || (0%{?rhel} && 0%{?rhel} < 9)
|
| |
- BuildRequires: python%{python3_pkgversion}-importlib-metadata
|
| |
- %endif
|
| |
- BuildRequires: python%{python3_pkgversion}-pytest
|
| |
- BuildRequires: python%{python3_pkgversion}-pytest-cov
|
| |
- BuildRequires: python%{python3_pkgversion}-pytest-flakes
|
| |
- %endif
|
| |
|
| |
- Requires: python%{python3_pkgversion}-SecretStorage
|
| |
- %if (0%{?fedora} && 0%{?fedora} < 32) || (0%{?rhel} && 0%{?rhel} < 9)
|
| |
- Requires: python%{python3_pkgversion}-importlib-metadata
|
| |
- %endif
|
| |
+ %description %desc
|
| |
|
| |
- %{?python_provide:%python_provide python%{python3_pkgversion}-keyring}
|
| |
|
| |
- %description -n python%{python3_pkgversion}-keyring
|
| |
- %desc
|
| |
- %endif
|
| |
+ %package -n python3-keyring
|
| |
+ Summary: Python 3 library to access the system keyring service
|
| |
+
|
| |
+ %description -n python3-keyring %desc
|
| |
+
|
| |
|
| |
%prep
|
| |
- %autosetup -p1 -n keyring-%{version}
|
| |
- rm -frv keyring.egg-info
|
| |
- # Drop redundant shebangs.
|
| |
- sed -i '1{\@^#!/usr/bin/env python@d}' keyring/cli.py
|
| |
- # Drop slags from upstream of using his own versioning system.
|
| |
- sed -i -e "\@use_vcs_version@s/^.*$/\tversion = \"%{version}\",/g" \
|
| |
- -e {/\'hgtools\'/d} setup.py
|
| |
+ %autosetup -n keyring-%{version} -p1
|
| |
+
|
| |
+
|
| |
+ %generate_buildrequires
|
| |
+ %pyproject_buildrequires
|
| |
+
|
| |
|
| |
%build
|
| |
- %if 0%{?with_python2}
|
| |
- %py2_build
|
| |
- %endif
|
| |
- %if 0%{?with_python3}
|
| |
- %py3_build
|
| |
- %endif
|
| |
+ %pyproject_wheel
|
| |
+
|
| |
|
| |
%install
|
| |
- %if 0%{?with_python2}
|
| |
- %py2_install
|
| |
- mv %{buildroot}%{_bindir}/keyring %{buildroot}%{_bindir}/keyring-python2
|
| |
- %endif
|
| |
- %if 0%{?with_python3}
|
| |
- %py3_install
|
| |
- cp -a %{buildroot}%{_bindir}/keyring %{buildroot}%{_bindir}/keyring-python%{python3_pkgversion}
|
| |
- %endif
|
| |
+ %pyproject_install
|
| |
+ %pyproject_save_files keyring
|
| |
+ # For compatibility with historical versions of this package, when there were
|
| |
+ # both python2 and python3 packages:
|
| |
+ ln -s keyring %{buildroot}%{_bindir}/keyring-python3
|
| |
+
|
| |
|
| |
- # Failed on Koji due to X environment not available.
|
| |
%check
|
| |
- %if 0%{?with_tests}
|
| |
- %if 0%{?with_python3}
|
| |
- %{__python3} setup.py test
|
| |
- nosetests-%{python3_version}
|
| |
- %endif
|
| |
- %if 0%{?with_python2}
|
| |
- %{__python2} setup.py test
|
| |
- nosetests-%{python2_version}
|
| |
+ %if %{with tests}
|
| |
+ %if %{with xvfb_tests}
|
| |
+ %global __pytest /usr/bin/xvfb-run -a /usr/bin/pytest
|
| |
%endif
|
| |
+ # EPEL9: pluggy is too old for this doctest
|
| |
+ k="${k-}${k+ and }not keyring.devpi_client.devpiclient_get_password"
|
| |
+ %pytest -k "${k-}"
|
| |
%endif
|
| |
|
| |
- %if 0%{?with_python2}
|
| |
- %files -n python2-keyring
|
| |
- %doc CHANGES.rst README.rst
|
| |
- %{_bindir}/keyring-python2
|
| |
- %{python2_sitelib}/keyring
|
| |
- %{python2_sitelib}/keyring-%{version}-py%{python2_version}.egg-info
|
| |
- %endif
|
| |
|
| |
- %if 0%{?with_python3}
|
| |
- %files -n python%{python3_pkgversion}-keyring
|
| |
+ %files -n python3-keyring -f %{pyproject_files}
|
| |
+ # pyproject_files handles LICENSE; verify with “rpm -qL -p …”
|
| |
%doc CHANGES.rst README.rst
|
| |
- %{_bindir}/keyring-python%{python3_pkgversion}
|
| |
+
|
| |
+ %{_bindir}/keyring-python3
|
| |
%{_bindir}/keyring
|
| |
- %{python3_sitelib}/keyring-%{version}-py%{python3_version}.egg-info
|
| |
- %{python3_sitelib}/keyring
|
| |
- %endif
|
| |
+
|
| |
|
| |
%changelog
|
| |
+ * Fri Jul 28 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 23.11.0-4
|
| |
+ - Merge Rawhide back to EPEL9 and adjust for setuptools/pluggy versions
|
| |
+
|
| |
+ * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 23.11.0-3
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
| |
+
|
| |
+ * Thu Dec 08 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.11.0-2
|
| |
+ - Correct dual license expression from AND to OR
|
| |
+
|
| |
+ * Mon Nov 21 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.11.0-1
|
| |
+ - Update to 23.11.0 (close RHBZ#2140241)
|
| |
+
|
| |
+ * Fri Nov 18 2022 Christopher Tubbs <ctubbsii@fedoraproject.org> - 23.9.3-2
|
| |
+ - Convert license to SPDX
|
| |
+
|
| |
+ * Sat Sep 24 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.9.3-1
|
| |
+ - Update to 23.9.3 (close RHBZ#2127652)
|
| |
+
|
| |
+ * Mon Sep 05 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.9.1-1
|
| |
+ - Update to 23.9.1 (close RHBZ#2123348)
|
| |
+
|
| |
+ * Fri Aug 12 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.8.2-1
|
| |
+ - Update to 23.8.2 (close RHBZ#2107061)
|
| |
+
|
| |
+ * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 23.6.0-3
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
| |
+
|
| |
+ * Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 23.6.0-2
|
| |
+ - Rebuilt for Python 3.11
|
| |
+
|
| |
+ * Tue May 24 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.5.1-1
|
| |
+ - Update to 23.5.1 (close RHBZ#2089081)
|
| |
+
|
| |
+ * Wed Apr 06 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.5.0-3
|
| |
+ - Switch to pyproject-rpm-macros
|
| |
+
|
| |
+ * Wed Apr 06 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.5.0-2
|
| |
+ - Fix rather than skipping test_entry_point
|
| |
+
|
| |
+ * Thu Mar 24 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 23.5.0-1
|
| |
+ - Update to 23.5.0 (close RHBZ#1920125)
|
| |
+ - Drop EPEL8 compatibility in the Fedora spec file: this upstream release
|
| |
+ requires setuptools features not available in EPEL8
|
| |
+ - Allow using xvfb to run the tests for the libsecret backend; disable by
|
| |
+ default because tests occasionally hang in koji when doing so
|
| |
+
|
| |
+ * Tue Mar 22 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 21.8.0-6
|
| |
+ - Drop workarounds for EPEL7 and for EOL Fedoras
|
| |
+ - Update description text from upstream
|
| |
+ - Stop using deprecated nose package for tests
|
| |
+
|
| |
+ * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 21.8.0-5
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
| |
+
|
| |
+ * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 21.8.0-4
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
+
|
| |
+ * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 21.8.0-3
|
| |
+ - Rebuilt for Python 3.10
|
| |
+
|
| |
+ * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 21.8.0-2
|
| |
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
+
|
| |
* Wed Jan 13 2021 Joel Capitao <jcapitao@redhat.com> - 21.8.0-1
|
| |
- Update to 21.8.0 (rhbz#1910110)
|
| |
|
| |
This just merges
rawhideback toepel9, plus a commit that patches the minimumsetuptoolsversion from 56 to 53 (without apparent ill effect) and works around a single doctest failure due topluggynot being quite new enough.Updating this package in EPEL9 removes an obstacle to packaging Hatch for EPEL9.
A quick investigation does not show any dependent packages upper-bounding the version in EPEL9, and a COPR impact chack does not show any regressions.