Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Mohamed El Morabity
567b9d6b0b - Enable Python generators
- Enable tests
- Spec cleanup
2019-04-19 10:50:00 +02:00

View file

@ -1,74 +1,35 @@
%{?python_enable_dependency_generator}
%global srcname azure-devtools %global srcname azure-devtools
%global common_description This package contains tools to aid in developing Python-based Azure code. %global common_description This package contains tools to aid in developing Python-based Azure code.
%global _with_python2 0%{?rhel} || 0%{?fedora} <= 29
%global py2_prefix %{?rhel:python}%{?fedora:python2}
# Some Python 3 libraries required by azure-devtools are not available in EL
%global _with_python3 0%{?fedora}
Name: python-%{srcname} Name: python-%{srcname}
Version: 1.0.0 Version: 1.0.0
Release: 4%{?dist} Release: 5%{?dist}
Summary: Devtools for Azure SDK and CLI for Python Summary: Devtools for Azure SDK and CLI for Python
License: MIT License: MIT
URL: https://github.com/Azure/azure-python-devtools URL: https://github.com/Azure/azure-python-devtools
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
%if 0%{?_with_python2} BuildRequires: python3-devel
BuildRequires: %{py2_prefix}-devel BuildRequires: python3-setuptools
BuildRequires: %{py2_prefix}-setuptools
# Needed for tests # Needed for tests
BuildRequires: %{py2_prefix}-configargparse BuildRequires: python3-configargparse
BuildRequires: %{py2_prefix}-six BuildRequires: python3-six
%if 0%{?fedora} <= 27 BuildRequires: python3-vcrpy
BuildRequires: python-vcrpy
%else
BuildRequires: %{py2_prefix}-vcrpy
%endif
%endif
%if 0%{?_with_python3}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
# Needed for tests
BuildRequires: python%{python3_pkgversion}-configargparse
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-vcrpy
%endif
BuildArch: noarch BuildArch: noarch
%description %description
%{common_description} %{common_description}
%if 0%{?_with_python2} %package -n python3-%{srcname}
%package -n python2-%{srcname}
Summary: %{summary} Summary: %{summary}
Requires: %{py2_prefix}-configargparse %{?python_provide:%python_provide python3-%{srcname}}
Requires: %{py2_prefix}-six
%if 0%{?fedora} <= 27
Requires: python-vcrpy
%else
Requires: %{py2_prefix}-vcrpy
%endif
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname} %description -n python3-%{srcname}
%{common_description} %{common_description}
%endif
%if 0%{?_with_python3}
%package -n python%{python3_pkgversion}-%{srcname}
Summary: %{summary}
Requires: python%{python3_pkgversion}-configargparse
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-vcrpy
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname}
%{common_description}
%endif
%prep %prep
@ -76,51 +37,30 @@ Requires: python%{python3_pkgversion}-vcrpy
%build %build
%if 0%{?_with_python2}
%py2_build
%endif
%if 0%{?_with_python3}
%py3_build %py3_build
%endif
%install %install
%if 0%{?_with_python2}
%py2_install
%endif
%if 0%{?_with_python3}
%py3_install %py3_install
%endif
%check %check
%if 0%{?_with_python2}
%{__python2} -m unittest discover -s src/
%endif
%if 0%{?_with_python3}
%{__python3} -m unittest discover -s src/ %{__python3} -m unittest discover -s src/
%endif
%if 0%{?_with_python2} %files -n python3-%{srcname}
%files -n python2-%{srcname}
%doc README.rst doc/
%license LICENSE
%{python2_sitelib}/azure_devtools/
%{python2_sitelib}/azure_devtools-*.egg-info/
%endif
%if 0%{?_with_python3}
%files -n python%{python3_pkgversion}-%{srcname}
%doc README.rst doc/ %doc README.rst doc/
%license LICENSE %license LICENSE
%{python3_sitelib}/azure_devtools/ %{python3_sitelib}/azure_devtools/
%{python3_sitelib}/azure_devtools-*.egg-info/ %{python3_sitelib}/azure_devtools-*.egg-info/
%endif
%changelog %changelog
* Fri Apr 19 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 1.0.0-5
- Enable Python generators
- Enable tests
- Spec cleanup
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-4 * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild