|
|
e0887a |
%if 0%{?fedora}
|
|
|
e0887a |
%global _with_python3 1
|
|
|
e0887a |
%global _with_tests 1
|
|
|
e0887a |
%endif
|
|
|
e0887a |
|
|
|
e0887a |
%if 0%{?rhel}
|
|
|
e0887a |
%global py2_prefix python
|
|
|
e0887a |
%else
|
|
|
e0887a |
%global py2_prefix python2
|
|
|
e0887a |
%endif
|
|
|
e0887a |
|
|
|
fe34ac |
%global bundled_lib_dir bundled
|
|
|
fe34ac |
# python-typing
|
|
|
fe34ac |
%global typing_version 3.5.2.2
|
|
|
fe34ac |
%global typing_dir %{bundled_lib_dir}/typing
|
|
|
fe34ac |
|
|
|
e0887a |
%global srcname msrest
|
|
|
e0887a |
|
|
|
e0887a |
%global common_summary AutoRest swagger generator Python client runtime
|
|
|
e0887a |
%global common_description %{common_summary}.
|
|
|
e0887a |
|
|
|
e0887a |
Name: python-%{srcname}
|
|
|
fe34ac |
Version: 0.5.4
|
|
|
bdce7d |
Release: 0%{?dist}.1
|
|
|
e0887a |
Summary: %{common_summary}
|
|
|
e0887a |
|
|
|
e0887a |
Group: System Environment/Libraries
|
|
|
e0887a |
License: MIT
|
|
|
e0887a |
URL: https://github.com/Azure/msrest-for-python/
|
|
|
e0887a |
Source0: %{srcname}-%{version}.tar.gz
|
|
|
fe34ac |
Source1: typing-%{typing_version}.tar.gz
|
|
|
e0887a |
# - Disable versioned dependencies not yet available in Fedora/EPEL
|
|
|
e0887a |
# - Fix setup.py for older versions of setuptools (EPEL)
|
|
|
fe34ac |
Patch0: %{name}-0.5.4-build.patch
|
|
|
fe34ac |
Patch1: bundled-libs.patch
|
|
|
e0887a |
|
|
|
e0887a |
BuildRequires: %{py2_prefix}-setuptools
|
|
|
e0887a |
BuildRequires: python-devel
|
|
|
e0887a |
|
|
|
e0887a |
Requires: python-enum34
|
|
|
e0887a |
Requires: python-isodate
|
|
|
e0887a |
Requires: %{py2_prefix}-requests
|
|
|
e0887a |
Requires: %{py2_prefix}-requests-oauthlib
|
|
|
e0887a |
|
|
|
fe34ac |
Provides: bundled(python-typing) = %{typing_version}
|
|
|
fe34ac |
|
|
|
e0887a |
%if 0%{?_with_python3}
|
|
|
e0887a |
BuildRequires: python3-devel
|
|
|
e0887a |
%endif
|
|
|
e0887a |
# Needed for tests
|
|
|
e0887a |
%if 0%{?_with_tests}
|
|
|
e0887a |
BuildRequires: %{py2_prefix}-certifi
|
|
|
e0887a |
BuildRequires: python-enum34
|
|
|
e0887a |
BuildRequires: python-httpretty
|
|
|
e0887a |
BuildRequires: python-isodate
|
|
|
e0887a |
BuildRequires: %{py2_prefix}-requests
|
|
|
e0887a |
BuildRequires: %{py2_prefix}-requests-oauthlib
|
|
|
e0887a |
%if 0%{?_with_python3}
|
|
|
e0887a |
BuildRequires: python3-certifi
|
|
|
e0887a |
BuildRequires: python3-httpretty
|
|
|
e0887a |
BuildRequires: python3-isodate
|
|
|
e0887a |
BuildRequires: python3-requests
|
|
|
e0887a |
BuildRequires: python3-requests-oauthlib
|
|
|
e0887a |
%endif
|
|
|
e0887a |
%endif
|
|
|
e0887a |
BuildArch: noarch
|
|
|
e0887a |
|
|
|
e0887a |
%description
|
|
|
e0887a |
%{common_description}
|
|
|
e0887a |
|
|
|
e0887a |
|
|
|
e0887a |
%if 0%{?_with_python3}
|
|
|
e0887a |
%package -n python3-%{srcname}
|
|
|
e0887a |
Summary: %{common_summary}
|
|
|
e0887a |
Requires: python3-isodate
|
|
|
e0887a |
Requires: python3-requests
|
|
|
e0887a |
Requires: python3-requests-oauthlib
|
|
|
e0887a |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
e0887a |
|
|
|
e0887a |
%description -n python3-%{srcname}
|
|
|
e0887a |
%{common_description}
|
|
|
e0887a |
%endif
|
|
|
e0887a |
|
|
|
e0887a |
|
|
|
e0887a |
%prep
|
|
|
fe34ac |
%setup -q -n %{srcname}-for-python-%{version}
|
|
|
fe34ac |
%patch0 -p1
|
|
|
fe34ac |
|
|
|
fe34ac |
# add bundled libraries path
|
|
|
fe34ac |
%patch1 -p1
|
|
|
e0887a |
|
|
|
e0887a |
# Remove failing test
|
|
|
e0887a |
# TODO: report bug upstream
|
|
|
e0887a |
rm tests/test_serialization.py
|
|
|
e0887a |
|
|
|
fe34ac |
# bundled libraries
|
|
|
fe34ac |
mkdir %{bundled_lib_dir}
|
|
|
fe34ac |
|
|
|
fe34ac |
# python-typing bundle
|
|
|
fe34ac |
tar -xzf %SOURCE1 -C %{bundled_lib_dir}
|
|
|
fe34ac |
mv %{bundled_lib_dir}/typing-%{typing_version} %{typing_dir}
|
|
|
fe34ac |
cp %{typing_dir}/LICENSE typing_LICENSE
|
|
|
fe34ac |
cp %{typing_dir}/README.rst typing_README.rst
|
|
|
e0887a |
|
|
|
e0887a |
%build
|
|
|
e0887a |
%py2_build
|
|
|
e0887a |
%{?_with_python3:%py3_build}
|
|
|
e0887a |
|
|
|
fe34ac |
# python-typing bundle
|
|
|
fe34ac |
pushd %{typing_dir}
|
|
|
fe34ac |
%{__python2} setup.py build
|
|
|
fe34ac |
popd
|
|
|
fe34ac |
|
|
|
e0887a |
|
|
|
e0887a |
%install
|
|
|
e0887a |
%py2_install
|
|
|
e0887a |
%{?_with_python3:%py3_install}
|
|
|
e0887a |
|
|
|
fe34ac |
# python-typing bundle
|
|
|
fe34ac |
pushd %{typing_dir}
|
|
|
fe34ac |
%{__python2} setup.py install -O1 --skip-build --root %{buildroot} --install-lib /usr/lib/%{name}/%{bundled_lib_dir}
|
|
|
fe34ac |
popd
|
|
|
fe34ac |
|
|
|
e0887a |
|
|
|
e0887a |
%check
|
|
|
e0887a |
%if 0%{?_with_tests}
|
|
|
e0887a |
%{__python2} setup.py test
|
|
|
e0887a |
%{?_with_python3:%{__python3} setup.py test}
|
|
|
e0887a |
%endif
|
|
|
e0887a |
|
|
|
e0887a |
|
|
|
e0887a |
%files -n python-%{srcname}
|
|
|
fe34ac |
%doc README.rst typing_README.rst
|
|
|
fe34ac |
%license LICENSE.md typing_LICENSE
|
|
|
e0887a |
%{python2_sitelib}/*
|
|
|
e0887a |
|
|
|
fe34ac |
# bundled libraries
|
|
|
fe34ac |
%dir /usr/lib/%{name}
|
|
|
fe34ac |
/usr/lib/%{name}/%{bundled_lib_dir}
|
|
|
fe34ac |
|
|
|
e0887a |
|
|
|
e0887a |
%if 0%{?_with_python3}
|
|
|
e0887a |
%files -n python3-%{srcname}
|
|
|
fe34ac |
%doc README.rst typing_README.rst
|
|
|
fe34ac |
%license LICENSE.md typing_LICENSE
|
|
|
e0887a |
%{python3_sitelib}/*
|
|
|
e0887a |
%endif
|
|
|
e0887a |
|
|
|
e0887a |
|
|
|
e0887a |
%changelog
|
|
|
bdce7d |
* Thu May 16 2019 Oyvind Albrigtsen <oalbrigt@redhat.com> - 0.5.4-0.1
|
|
|
fe34ac |
- Update to 0.5.4
|
|
|
bdce7d |
Resolves: rhbz#1709118
|
|
|
fe34ac |
|
|
|
e0887a |
* Fri Nov 10 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.18-1
|
|
|
e0887a |
- Update to 0.4.18
|
|
|
e0887a |
|
|
|
e0887a |
* Tue Oct 17 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.17-1
|
|
|
e0887a |
- Update to 0.4.17
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Oct 06 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.16-1
|
|
|
e0887a |
- Update to 0.4.16
|
|
|
e0887a |
|
|
|
e0887a |
* Wed Aug 30 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.14-1
|
|
|
e0887a |
- Update to 0.4.14
|
|
|
e0887a |
- Use python2- prefix for Fedora dependencies if possible
|
|
|
e0887a |
|
|
|
e0887a |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-2
|
|
|
e0887a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Jun 30 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.11-1
|
|
|
e0887a |
- Update to 0.4.11
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Jun 09 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.9-1
|
|
|
e0887a |
- Update to 0.4.9
|
|
|
e0887a |
|
|
|
e0887a |
* Tue May 30 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.8-2
|
|
|
e0887a |
- Disable version check on certifi in setup.py
|
|
|
e0887a |
|
|
|
e0887a |
* Tue May 30 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.8-1
|
|
|
e0887a |
- Update to 0.4.8
|
|
|
e0887a |
|
|
|
e0887a |
* Wed Apr 05 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.7-1
|
|
|
e0887a |
- Update to 0.4.7
|
|
|
e0887a |
|
|
|
e0887a |
* Tue Mar 07 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.6-1
|
|
|
e0887a |
- Update to 0.4.6
|
|
|
e0887a |
|
|
|
e0887a |
* Tue Feb 14 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.5-1
|
|
|
e0887a |
- Update to 0.4.5
|
|
|
e0887a |
|
|
|
e0887a |
* Thu Jan 26 2017 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.4-2
|
|
|
e0887a |
- Add license file
|
|
|
e0887a |
|
|
|
e0887a |
* Tue Sep 27 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.4-1
|
|
|
e0887a |
- Update to 0.4.4
|
|
|
e0887a |
|
|
|
e0887a |
* Mon Sep 05 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.3-1
|
|
|
e0887a |
- Update to 0.4.3
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Jun 24 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.0-2
|
|
|
e0887a |
- Fix tests for Fedora >= 24
|
|
|
e0887a |
|
|
|
e0887a |
* Thu May 26 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.4.0-1
|
|
|
e0887a |
- Update to 0.4.0
|
|
|
e0887a |
|
|
|
e0887a |
* Sun May 01 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.3.0-1
|
|
|
e0887a |
- Update to 0.3.0
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Apr 01 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.2.0-1
|
|
|
e0887a |
- Update to 0.2.0
|
|
|
e0887a |
|
|
|
e0887a |
* Fri Mar 25 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.1.3-2
|
|
|
e0887a |
- Add missing depedency to enum34 Python module
|
|
|
e0887a |
|
|
|
e0887a |
* Wed Mar 23 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.1.3-1
|
|
|
e0887a |
- Update to 0.1.3
|
|
|
e0887a |
|
|
|
e0887a |
* Wed Mar 16 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.1.2-1
|
|
|
e0887a |
- Update to 0.1.2
|
|
|
e0887a |
|
|
|
e0887a |
* Sat Mar 05 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.1.1-1
|
|
|
e0887a |
- Update to 0.1.1
|
|
|
e0887a |
|
|
|
e0887a |
* Wed Mar 02 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.0.3-1
|
|
|
e0887a |
- Update to 0.0.3
|
|
|
e0887a |
|
|
|
e0887a |
* Sun Feb 28 2016 Mohamed El Morabity <melmorabity@fedoraproject.org> - 0.0.2-1
|
|
|
e0887a |
- Initial RPM release
|