Blame SPECS/python-msrest.spec

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