!3 Remove subpackage python2-cached_property
From: @lei_ju Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
b5b2591878
@ -1,9 +1,6 @@
|
||||
%bcond_with python2
|
||||
%global py2dir %{_builddir}/python2-%{name}-%{version}-%{release}
|
||||
|
||||
Name: python-cached_property
|
||||
Version: 1.5.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A cached-property for decorating methods in Python classes
|
||||
License: BSD
|
||||
URL: https://github.com/pydanny/cached-property
|
||||
@ -12,36 +9,17 @@ Source0: https://github.com/pydanny/cached-property/archive/%{version}/ca
|
||||
BuildArch: noarch
|
||||
BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-dateutil
|
||||
BuildRequires: python%{python3_pkgversion}-freezegun python%{python3_pkgversion}-pytest
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel python2-dateutil python2-freezegun python2-pytest
|
||||
%endif
|
||||
|
||||
%description
|
||||
cached_property allows properties in Python classes to be cached until the cache
|
||||
is invalidated or expired.
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-cached_property
|
||||
Summary: A cached-property for decorating methods in Python classes.
|
||||
|
||||
%{?python_provide:%python_provide python2-cached_property}
|
||||
Provides: python2-cached-property = %{version}-%{release}
|
||||
Obsoletes: python2-cached-property < 1.3.0-2
|
||||
|
||||
%description -n python2-cached_property
|
||||
cached_property allows properties in Python classes to be cached until the cache
|
||||
is invalidated or expired.
|
||||
%endif
|
||||
|
||||
%package -n python%{python3_pkgversion}-cached_property
|
||||
Summary: A cached-property for decorating methods in Python classes.
|
||||
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-cached_property}
|
||||
Provides: python%{python3_pkgversion}-cached-property = %{version}-%{release}
|
||||
Obsoletes: python%{python3_pkgversion}-cached-property < 1.3.0-2
|
||||
%if ! %{with python2}
|
||||
Obsoletes: python2-cached_property < %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description -n python%{python3_pkgversion}-cached_property
|
||||
cached_property allows properties in Python classes to be cached until the cache
|
||||
@ -52,44 +30,15 @@ is invalidated or expired.
|
||||
%prep
|
||||
%autosetup -n cached-property-%{version} -p1
|
||||
|
||||
%if %{with python2}
|
||||
rm -rf %{py2dir}
|
||||
cp -a . %{py2dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
|
||||
%if %{with python2}
|
||||
pushd %{py2dir}
|
||||
%{__python2} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
|
||||
%if %{with python2}
|
||||
pushd %{py2dir}
|
||||
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%check
|
||||
PYTHONPATH=./ py.test-3
|
||||
|
||||
%if %{with python2}
|
||||
PYTHONPATH=./ py.test-2
|
||||
%endif
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-cached_property
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS.rst
|
||||
%license LICENSE
|
||||
%{python2_sitelib}/cached_property*
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-cached_property
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS.rst
|
||||
@ -102,5 +51,8 @@ PYTHONPATH=./ py.test-2
|
||||
%doc HISTORY.rst CONTRIBUTING.rst README.rst
|
||||
|
||||
%changelog
|
||||
* Wed Oct 21 2020 chengzihan <chengzihan2@huawei.com> - 1.5.1-2
|
||||
- Remove subpackage python2-cached_property
|
||||
|
||||
* Wed Feb 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.5.1-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user