diff --git a/.gitignore b/.gitignore index 4bc06d8..3ca4deb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /msal-1.11.0.tar.gz /msal-1.12.0.tar.gz /msal-1.13.0.tar.gz +/microsoft-authentication-library-for-python-1.15.0.tar.gz diff --git a/python-msal-1.10.0-doc.patch b/python-msal-1.10.0-doc.patch deleted file mode 100644 index a9312e6..0000000 --- a/python-msal-1.10.0-doc.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up ./docs/conf.py.orig ./docs/conf.py ---- ./docs/conf.py.orig 2021-03-08 21:39:15.000000000 +0100 -+++ ./docs/conf.py 2021-03-21 10:49:37.793654190 +0100 -@@ -78,7 +78,7 @@ pygments_style = None - # a list of builtin themes. - # - # html_theme = 'alabaster' --html_theme = 'furo' -+html_theme = 'sphinx_rtd_theme' - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the -@@ -182,4 +182,4 @@ epub_title = project - epub_exclude_files = ['search.html'] - - --# -- Extension configuration ------------------------------------------------- -\ Pas de fin de ligne à la fin du fichier -+# -- Extension configuration ------------------------------------------------- diff --git a/python-msal-1.15.0-doc.patch b/python-msal-1.15.0-doc.patch new file mode 100644 index 0000000..a9312e6 --- /dev/null +++ b/python-msal-1.15.0-doc.patch @@ -0,0 +1,19 @@ +diff -up ./docs/conf.py.orig ./docs/conf.py +--- ./docs/conf.py.orig 2021-03-08 21:39:15.000000000 +0100 ++++ ./docs/conf.py 2021-03-21 10:49:37.793654190 +0100 +@@ -78,7 +78,7 @@ pygments_style = None + # a list of builtin themes. + # + # html_theme = 'alabaster' +-html_theme = 'furo' ++html_theme = 'sphinx_rtd_theme' + + # Theme options are theme-specific and customize the look and feel of a theme + # further. For a list of options available for each theme, see the +@@ -182,4 +182,4 @@ epub_title = project + epub_exclude_files = ['search.html'] + + +-# -- Extension configuration ------------------------------------------------- +\ Pas de fin de ligne à la fin du fichier ++# -- Extension configuration ------------------------------------------------- diff --git a/python-msal.spec b/python-msal.spec index 03a03e7..36ab948 100644 --- a/python-msal.spec +++ b/python-msal.spec @@ -1,172 +1,93 @@ -%global srcname msal -%global _description %{expand:The Microsoft Authentication Library for Python enables applications to -integrate with the Microsoft identity platform. It allows you to sign in users -or apps with Microsoft identities (Azure AD, Microsoft Accounts and Azure AD B2C -accounts) and obtain tokens to call Microsoft APIs such as Microsoft Graph or -your own APIs registered with the Microsoft identity platform. It is built using -industry standard OAuth2 and OpenID Connect protocols.} - -# Too many tests require an Internet connection -%global _with_tests 0 +# Most of the tests require network access, so they are disabled by default. +%bcond_with tests +%global srcname msal +%global forgeurl https://github.com/AzureAD/microsoft-authentication-library-for-python/ +Version: 1.15.0 +%global tag %{version} +%forgemeta Name: python-%{srcname} -Version: 1.13.0 -Release: 2%{?dist} +Release: %autorelease Summary: Microsoft Authentication Library (MSAL) for Python License: MIT -URL: https://github.com/AzureAD/microsoft-authentication-library-for-python/ -Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz +URL: %forgeurl +Source0: %forgesource # Use sphinx-rtd-theme to build documentation instead of furo (not available in # Fedora, see also https://bugzilla.redhat.com/show_bug.cgi?id=1910798) -Patch1: %{name}-1.10.0-doc.patch - -BuildRequires: python3-devel -BuildRequires: %{py3_dist setuptools} -BuildRequires: %{py3_dist pyjwt} -%if %{?_with_tests} -BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist requests} -%endif -# Required for documentation -BuildRequires: make -BuildRequires: %{py3_dist sphinx} -BuildRequires: %{py3_dist sphinx-rtd-theme} -%if 0%{?fedora} && 0%{?fedora} <= 33 -BuildRequires: fonts-srpm-macros -%endif +Patch1: %{name}-%{version}-doc.patch + BuildArch: noarch -%description -%{_description} +BuildRequires: pyproject-rpm-macros + +%if %{with tests} +BuildRequires: python3dist(pytest) +%endif + +%global _description %{expand: +The Microsoft Authentication Library for Python +enables applications to integrate with the Microsoft identity platform. It +allows you to sign in users or apps with Microsoft identities (Azure AD, +Microsoft Accounts and Azure AD B2Caccounts) and obtain tokens to call Microsoft +APIs such as Microsoft Graph or your own APIs registered with the Microsoft +identity platform. It is built using industry standard OAuth2 and OpenID Connect +protocols.} + +%description %{_description} %package -n python3-%{srcname} Summary: %{summary} - -%description -n python3-%{srcname} -%{_description} +%description -n python3-%{srcname} %{_description} -%package doc -Summary: Documentation for %{name} -%if 0%{?fedora} && 0%{?fedora} <= 33 -Requires: fontawesome-fonts -Requires: google-roboto-slab-fonts -Requires: lato-fonts -%endif +%package -n python3-%{srcname}-doc +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinx-rtd-theme) +Summary: Documentation for python-%{srcname} -%description doc -This package provides documentation for %{name}. +%description -n python3-%{srcname}-doc +Documentation for python-%{srcname} %prep -%autosetup -n microsoft-authentication-library-for-python-%{version} -p1 +%forgeautosetup -p1 -# Remove bundled egg-info -rm -rf *.egg-info + +%generate_buildrequires +%pyproject_buildrequires -r %build -%py3_build +%pyproject_wheel -%make_build -C docs/ html -rm docs/_build/html/{.buildinfo,.nojekyll} +# Generate documentation. +PYTHONPATH="${PWD}:${PWD}/docs/" sphinx-build docs html %{?_smp_mflags} +rm -rf html/.{doctrees,buildinfo,nojekyll} %install -%py3_install - -# Drop bundled web fonts in HTML documentation -%if 0%{?fedora} && 0%{?fedora} <= 33 -pushd docs/_build/html/_static/fonts/ - -for f in fontawesome-webfont.*; do - rm "$f" - [[ "${f##*.}" = "ttf" ]] && ln -s "%{_fontbasedir}/fontawesome/$f" . -done - -pushd Lato/ -rm * -for i in Bold BoldItalic Italic Regular; do - ln -s "%{_fontbasedir}/lato/Lato-$i.ttf" "lato-${i,,}.ttf" -done -popd - -pushd RobotoSlab/ -rm * -for i in Bold Regular; do - ln -s "%{_fontbasedir}/google-roboto-slab-fonts/RobotoSlab-$i.ttf" "roboto-slab-v7-${i,,}.ttf" -done -popd -popd -%endif +%pyproject_install +%pyproject_save_files msal +%if %{with tests} %check -# Tests requiring an Internet connection are disabled -%if %{?_with_tests} -%pytest +%pytest --disable-warnings tests %endif -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %doc contributing.md README.md %license LICENSE -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-*.egg-info/ -%files doc -%doc docs/_build/html/ +%files -n python3-%{srcname}-doc +%doc html %license LICENSE %changelog -* Fri Jul 23 2021 Fedora Release Engineering - 1.13.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jul 21 2021 Major Hayden - 1.13.0-1 -- Update to 1.13.0 - -* Tue Jul 06 2021 Major Hayden - 1.12.0-4 -- Fix lato font requirement. - -* Thu Jun 10 2021 Stephen Gallagher - 1.12.0-3 -- Fix conditional to work when %%fedora is not defined - -* Fri Jun 04 2021 Python Maint - 1.12.0-2 -- Rebuilt for Python 3.10 - -* Fri Jun 04 2021 Mohamed El Morabity - 1.12.0-1 -- Update to 1.12.0 - -* Sun Mar 21 2021 Mohamed El Morabity - 1.10.0-1 -- Update to 1.10.0 - -* Sat Feb 13 2021 Mohamed El Morabity - 1.8.0-1 -- Update to 1.8.0 - -* Wed Jan 27 2021 Fedora Release Engineering - 1.4.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.4.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Sat Jul 25 2020 Mohamed El Morabity - 1.4.3-1 -- Update to 1.4.3 - -* Fri Jul 24 2020 Mohamed El Morabity - 1.4.2-1 -- Update to 1.4.2 - -* Sat Jun 27 2020 Mohamed El Morabity - 1.4.1-1 -- Update to 1.4.1 -- Enable tests -- Add documentation subpackage - -* Sun May 31 2020 Mohamed El Morabity - 1.3.0-2 -- Rebuild for Python 3.9 - -* Fri May 29 2020 Mohamed El Morabity - 1.3.0-1 -- Initial RPM release +%autochangelog diff --git a/sources b/sources index d73f2e2..459472c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (msal-1.13.0.tar.gz) = ea165322a25e1a7d51f52ee940b9901104570fa485733048fd58b40b0d0359a6f4531804b60e65175b1c3075a1f6719ce251cc29ac2d290e3ecb028c77a4daaa +SHA512 (microsoft-authentication-library-for-python-1.15.0.tar.gz) = 33d5b01bb0590cd4412068947532201493509c001b8aa521e4985d227b1a06cdb314f7a65f75d893314858ada8a1fe724adfc50040e89b0bb89d7079f5651a9e