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}
4743c87
Version:        1.2.7
4cd9088
Release:        1%{?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
4cd9088
BuildRequires:  make
274d813
BuildRequires:  %{py3_dist sphinx}
274d813
BuildRequires:  %{py3_dist sphinx-rtd-theme}
4cd9088
%if 0%{?fedora} <= 33
4cd9088
BuildRequires:  fonts-srpm-macros
4cd9088
%endif
f08934c
BuildArch:      noarch
f08934c
f08934c
%description
274d813
%{_description}
f08934c
f08934c
274d813
%package -n python3-%{srcname}
22811cb
Summary:        %{summary}
4cd9088
%py_provides python3-%{srcname}
f08934c
274d813
%description -n python3-%{srcname}
274d813
%{_description}
f08934c
f08934c
697eea2
%package doc
697eea2
Summary:        Documentation for %{name}
4cd9088
%if 0%{?fedora} <= 33
4cd9088
Requires:       fontawesome-fonts
4cd9088
Requires:       google-roboto-slab-fonts
4cd9088
Requires:       lato-font
4cd9088
%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
4cd9088
rm docs/build/html/objects.inv
4cd9088
4cd9088
# Drop bundled web fonts in HTML documentation
4cd9088
%if 0%{?fedora} <= 33
4cd9088
pushd docs/build/html/_static/fonts/
4cd9088
4cd9088
for f in fontawesome-webfont.*; do
4cd9088
    rm "$f"
4cd9088
    [[ "${f##*.}" = "ttf" ]] && ln -s "%{_fontbasedir}/fontawesome/$f" .
4cd9088
done
4cd9088
4cd9088
pushd Lato/
4cd9088
rm *
4cd9088
for i in Bold BoldItalic Italic Regular; do
4cd9088
    ln -s "%{_fontbasedir}/lato/Lato-$i.ttf" "lato-${i,,}.ttf"
4cd9088
done
4cd9088
popd
4cd9088
4cd9088
pushd RobotoSlab/
4cd9088
rm *
4cd9088
for i in Bold Regular; do
4cd9088
    ln -s "%{_fontbasedir}/google-roboto-slab-fonts/RobotoSlab-$i.ttf" "roboto-slab-v7-${i,,}.ttf"
4cd9088
done
4cd9088
popd
4cd9088
popd
4cd9088
%endif
4cd9088
f08934c
f08934c
%check
4cd9088
%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
4743c87
* Thu Apr 22 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.7-1
4743c87
- Update to 1.2.7
4743c87
4cd9088
* Sat Feb 13 2021 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.2.6-1
4cd9088
- Update to 1.2.6
4cd9088
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