74 lines
1.8 KiB
RPMSpec
74 lines
1.8 KiB
RPMSpec
%global _description \
|
|
attrs is an MIT-licensed Python package with class decorators that \
|
|
ease the chores of implementing the most common attribute-related \
|
|
object protocols. \
|
|
|
|
%bcond_without tests
|
|
Name: python-attrs
|
|
Summary: Python attributes without boilerplate
|
|
Version: 17.4.0
|
|
Release: 9
|
|
License: MIT
|
|
URL: http://www.attrs.org/
|
|
Source0: https://github.com/hynek/attrs/archive/%{version}/attrs-%{version}.tar.gz
|
|
|
|
BuildRequires: python2-devel python%{python3_pkgversion}-setuptools
|
|
BuildRequires: python2-setuptools python%{python3_pkgversion}-devel
|
|
|
|
%if %{with tests}
|
|
BuildRequires: python2-pytest python2-hypothesis python2-six python2-zope-interface
|
|
BuildRequires: python%{python3_pkgversion}-six python%{python3_pkgversion}-zope-interface
|
|
BuildRequires: python%{python3_pkgversion}-hypothesis python%{python3_pkgversion}-pytest
|
|
%endif
|
|
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
%{_description}
|
|
|
|
%package -n python2-attrs
|
|
Summary: %{summary}
|
|
%{?python_provide:%python_provide python2-%{modname}}
|
|
|
|
%description -n python2-attrs
|
|
|
|
%package -n python%{python3_pkgversion}-attrs
|
|
Summary: %{summary}
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}}
|
|
%description -n python%{python3_pkgversion}-attrs
|
|
%{_description}
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -p1 -n attrs-%{version}
|
|
|
|
%build
|
|
%py2_build
|
|
%py3_build
|
|
|
|
%install
|
|
%py2_install
|
|
%py3_install
|
|
|
|
%if %{with tests}
|
|
%check
|
|
PYTHONPATH=$RPM_BUILD_ROOT/%{python2_sitelib} py.test-2.7 -v
|
|
PYTHONPATH=$RPM_BUILD_ROOT/%{python3_sitelib} py.test-3 -v
|
|
%endif
|
|
|
|
%files -n python2-attrs
|
|
%license LICENSE
|
|
%{python2_sitelib}/*
|
|
|
|
%files -n python%{python3_pkgversion}-attrs
|
|
%license LICENSE
|
|
%{python3_sitelib}/*
|
|
|
|
%files help
|
|
%doc AUTHORS.rst README.rst
|
|
|
|
%changelog
|
|
* Thu Dec 5 2019 caomeng<caomeng5@huawei.com> - 17.4.0-9
|
|
- Package init
|