## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname msal-extensions %global forgeurl https://github.com/AzureAD/microsoft-authentication-extensions-for-python/ Version: 1.2.0 %global tag %{version} %forgemeta # We have generally figured out the dependencies for the libsecret tests, but # they still hang in the test environment, so they remain disabled for now. # We retain the work we have done so far in the spec file in case someone # figures out what’s still missing to run these tests. %bcond libsecret_tests 0 Name: python-%{srcname} Release: %autorelease Summary: Microsoft Authentication extensions for MSAL Python License: MIT URL: %forgeurl Source: %forgesource # Downstream-only: restore hard dependency on pygobject # # Upstream omitted this dependency because they were not confident they could # successfully "pip install" it, but we have no such difficulty with system # packages. It is a real dependency for msal_extensions/libsecret.py. Patch: 0001-Downstream-only-restore-hard-dependency-on-pygobject.patch # Fix a typo in README.md (persistance/persistence) # https://github.com/AzureAD/microsoft-authentication-extensions-for-python/pull/133 Patch: %{forgeurl}/pull/133.patch BuildArch: noarch BuildRequires: python3-devel # Test runner; see tox.ini, but running tests via tox offers us no benefit: BuildRequires: %{py3_dist pytest} %if %{with libsecret_tests} # All of the following are needed for tests involving libsecret. We choose not # to add a runtime dependency on libsecret because we expect that if we are # running in a desktop session where it would be usable, it will be installed, # and if it is not installed, it would not have been usable anyway (e.g. # because the OS installation is "headless"). BuildRequires: dbus-x11 BuildRequires: gnome-keyring BuildRequires: libsecret BuildRequires: xorg-x11-server-Xvfb %endif %global _description %{expand: The Microsoft Authentication Extensions for Python offers secure mechanisms for client applications to perform cross-platform token cache serialization and persistence. It gives additional support to the Microsoft Authentication Library for Python (MSAL). MSAL Python supports an in-memory cache by default and provides the SerializableTokenCache to perform cache serialization. You can read more about this in the MSAL Python documentation. Developers are required to implement their own cache persistence across multiple platforms and Microsoft Authentication Extensions makes this simpler.} %description %{_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{_description} %prep %forgeautosetup -p1 # Remove DOS line endings sed "s|\r||g" README.md >README.md.new && \ touch -r README.md README.md.new && \ mv README.md.new README.md %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l msal_extensions %check %if %{with libsecret_tests} %global __pytest /usr/bin/xvfb-run -a pytest %else k="${k-}${k+ and }not test_libsecret_persistence" k="${k-}${k+ and }not test_nonexistent_libsecret_persistence" k="${k-}${k+ and }not test_token_cache_roundtrip_with_persistence_builder" %endif %pytest -k "${k-}" -v %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Wed Jul 17 2024 Benjamin A. Beasley - 1.2.0-1 - Update to 1.2.0 * Wed Jul 17 2024 Benjamin A. Beasley - 1.2.0~b1-8 - Fix a typo in README.md (persistance/persistence) * Wed Jul 17 2024 Benjamin A. Beasley - 1.2.0~b1-7 - Run the tests (except libsecret/gnome-keyring tests) * Wed Jul 17 2024 Benjamin A. Beasley - 1.2.0~b1-6 - Add hard pygobject dependency for msal_extensions/libsecret.py - Upstream wanted this dependency, but could not rely on "pip install" working properly * Wed Jul 17 2024 Benjamin A. Beasley - 1.2.0~b1-4 - Assert that the .dist-info directory contains a license file * Fri Jun 07 2024 Python Maint - 1.2.0~b1-2 - Rebuilt for Python 3.13 * Tue May 07 2024 Jeremy Cline - 1.2.0~b1-1 - Update to version 1.2.0b1 * Fri Jan 26 2024 Fedora Release Engineering - 1.0.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.0.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 1.0.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sat Jul 01 2023 Python Maint - 1.0.0-6 - Rebuilt for Python 3.12 * Wed May 17 2023 Major Hayden - 1.0.0-5 - Migrated to SPDX license * Fri Jan 20 2023 Fedora Release Engineering - 1.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 1.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 1.0.0-2 - Rebuilt for Python 3.11 * Tue Apr 26 2022 Major Hayden - 1.0.0-1 - Update to 1.0.0 * Fri Jan 21 2022 Fedora Release Engineering - 0.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 04 2022 Major Hayden - 0.3.1-2 - Update sources to 0.3.1 * Tue Jan 04 2022 Major Hayden - 0.3.1-1 - Update to 0.3.1 * Fri Jul 23 2021 Fedora Release Engineering - 0.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.3.0-2 - Rebuilt for Python 3.10 * Mon Feb 15 2021 Mohamed El Morabity - 0.3.0-1 - Update to 0.3.0 * Wed Jan 27 2021 Fedora Release Engineering - 0.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 0.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jun 01 2020 Mohamed El Morabity - 0.2.2-1 - First import ## END: Generated by rpmautospec