ae27357
%global srcname adal
274d813
%global _description %{expand:The ADAL for Python library makes it easy for python applications to
274d813
authenticate to AAD in order to access AAD protected web resources.}
22811cb
ae27357
Name:           python-%{srcname}
70e9fcd
Version:        1.2.7
f6f940b
Release:        3%{?dist}
22811cb
Summary:        ADAL for Python
f08934c
f08934c
License:        MIT
22811cb
URL:            https://github.com/AzureAD/azure-activedirectory-library-for-python
22811cb
Source0:        %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
22811cb
# Fix tests with httpretty >= 0.9.0
22811cb
Patch0:         %{name}-1.2.0-tests.patch
f08934c
274d813
BuildRequires:  python3-devel
274d813
BuildRequires:  %{py3_dist setuptools}
274d813
# Required for tests
274d813
BuildRequires:  %{py3_dist cryptography}
274d813
BuildRequires:  %{py3_dist httpretty}
274d813
BuildRequires:  %{py3_dist pyjwt}
274d813
BuildRequires:  %{py3_dist pytest}
274d813
BuildRequires:  %{py3_dist python-dateutil}
274d813
BuildRequires:  %{py3_dist requests}
274d813
# Required for documentation
e90697b
BuildRequires:  make
274d813
BuildRequires:  %{py3_dist sphinx}
274d813
BuildRequires:  %{py3_dist sphinx-rtd-theme}
f6f940b
%if 0%{?fedora} && 0%{?fedora} <= 33
e90697b
BuildRequires:  fonts-srpm-macros
e90697b
%endif
f08934c
BuildArch:      noarch
f08934c
f08934c
%description
274d813
%{_description}
f08934c
f08934c
274d813
%package -n python3-%{srcname}
22811cb
Summary:        %{summary}
e90697b
%py_provides python3-%{srcname}
f08934c
274d813
%description -n python3-%{srcname}
274d813
%{_description}
f08934c
f08934c
697eea2
%package doc
697eea2
Summary:        Documentation for %{name}
f6f940b
%if 0%{?fedora} && 0%{?fedora} <= 33
e90697b
Requires:       fontawesome-fonts
e90697b
Requires:       google-roboto-slab-fonts
e90697b
Requires:       lato-font
e90697b
%endif
697eea2
697eea2
%description doc
697eea2
This package provides documentation for %{name}.
697eea2
697eea2
f08934c
%prep
22811cb
%autosetup -p0 -n azure-activedirectory-library-for-python-%{version}
c2f329d
274d813
# Remove bundled egg-info
274d813
rm -rf *.egg-info
274d813
f08934c
f08934c
%build
22811cb
%py3_build
f08934c
274d813
PYTHONPATH=$PWD/build/lib/ %make_build -C docs/ html
697eea2
rm docs/build/html/{.buildinfo,.nojekyll}
697eea2
f08934c
f08934c
%install
22811cb
%py3_install
f08934c
e90697b
rm docs/build/html/objects.inv
e90697b
e90697b
# Drop bundled web fonts in HTML documentation
f6f940b
%if 0%{?fedora} && 0%{?fedora} <= 33
e90697b
pushd docs/build/html/_static/fonts/
e90697b
e90697b
for f in fontawesome-webfont.*; do
e90697b
    rm "$f"
e90697b
    [[ "${f##*.}" = "ttf" ]] && ln -s "%{_fontbasedir}/fontawesome/$f" .
e90697b
done
e90697b
e90697b
pushd Lato/
e90697b
rm *
e90697b
for i in Bold BoldItalic Italic Regular; do
e90697b
    ln -s "%{_fontbasedir}/lato/Lato-$i.ttf" "lato-${i,,}.ttf"
e90697b
done
e90697b
popd
e90697b
e90697b
pushd RobotoSlab/
e90697b
rm *
e90697b
for i in Bold Regular; do
e90697b
    ln -s "%{_fontbasedir}/google-roboto-slab-fonts/RobotoSlab-$i.ttf" "roboto-slab-v7-${i,,}.ttf"
e90697b
done
e90697b
popd
e90697b
popd
e90697b
%endif
e90697b
f08934c
f08934c
%check
e90697b
%pytest
f08934c
f08934c
274d813
%files -n python3-%{srcname}
f08934c
%doc README.md
f08934c
%license LICENSE
697eea2
%{python3_sitelib}/%{srcname}/
697eea2
%{python3_sitelib}/%{srcname}-*.egg-info/
697eea2
697eea2
697eea2
%files doc
697eea2
%doc docs/build/html/
697eea2
%license LICENSE
f08934c
f08934c
f08934c
%changelog
f6f940b
* Thu Jun 10 2021 Stephen Gallagher <sgallagh@redhat.com> - 1.2.7-3
f6f940b
- Fix conditional to work when %%fedora is not defined
f6f940b
ce77712
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.2.7-2
ce77712
- Rebuilt for Python 3.10
ce77712
70e9fcd
* Thu Apr 22 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.7-1
70e9fcd
- Update to 1.2.7
70e9fcd
e90697b
* Sat Feb 13 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.6-1
e90697b
- Update to 1.2.6
e90697b
b3ee247
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-3
b3ee247
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
b3ee247
1902569
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.4-2
1902569
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
1902569
274d813
* Fri Jun 26 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.4-1
274d813
- Update to 1.2.4
274d813
- Spec cleanup
274d813
7cef1eb
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.2-5
7cef1eb
- Rebuilt for Python 3.9
7cef1eb
f1f54cf
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-4
f1f54cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f1f54cf
fd6879a
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.2-3
fd6879a
- Rebuilt for Python 3.8.0rc1 (#1748018)
fd6879a
9b6e555
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.2-2
9b6e555
- Rebuilt for Python 3.8
9b6e555
a3a3542
* Fri Aug 09 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.2-1
a3a3542
- Update to 1.2.2
2874426
- Add sphinx_rtd_theme build dependency for docs generation (fix by Charalampos
2874426
  Stratakis)
a3a3542
393b80f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
393b80f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
393b80f
a3e1ac7
* Mon Feb 04 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.1-1
a3e1ac7
- Update to 1.2.1
a3e1ac7
15e27a1
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
15e27a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
15e27a1
697eea2
* Sat Nov 10 2018 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.0-2
697eea2
- Build documentation
697eea2
22811cb
* Sat Nov 10 2018 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.0-1
22811cb
- Update to 1.2.0
22811cb
- Enable Python 3 support for EL