delete python2

This commit is contained in:
s17723959267 2020-10-29 11:16:01 +08:00
parent 635e5bcce5
commit a33e6d0ddf

View File

@ -8,7 +8,7 @@ functionalities.
Name: python-inotify Name: python-inotify
Version: 0.9.6 Version: 0.9.6
Release: 16 Release: 17
Summary: A Python module for monitoring filesystems changes Summary: A Python module for monitoring filesystems changes
License: MIT License: MIT
URL: https://github.com/seb-m/pyinotify URL: https://github.com/seb-m/pyinotify
@ -21,20 +21,6 @@ BuildRequires: gmp-devel
%description %description
%{_description} %{_description}
%package -n python2-inotify
Summary: python2 edition of %{name}
BuildRequires: python2-devel
Provides: python2-inotify-examples
Obsoletes: python2-inotify-examples
%{?python_provide:%python_provide python2-inotify}
%description -n python2-inotify
This package is the python2 edition of %{name}.
%package -n python3-inotify %package -n python3-inotify
Summary: python3 edition of %{name} Summary: python3 edition of %{name}
@ -49,14 +35,11 @@ This package is the python3 edition of %{name}.
%prep %prep
%autosetup -n %{_name}-%{version} -p1 %autosetup -n %{_name}-%{version} -p1
sed -i '1c#! %{__python2}' python2/pyinotify.py
sed -i '1c#! %{__python3}' python3/pyinotify.py sed -i '1c#! %{__python3}' python3/pyinotify.py
sed -i '1c#! %{__python2}' python2/examples/*py
sed -i '1c#! %{__python3}' python3/examples/*py sed -i '1c#! %{__python3}' python3/examples/*py
cp -a . $RPM_BUILD_DIR/python3-%{_name}-%{version} cp -a . $RPM_BUILD_DIR/python3-%{_name}-%{version}
%build %build
%py2_build
cd $RPM_BUILD_DIR/python3-%{_name}-%{version} cd $RPM_BUILD_DIR/python3-%{_name}-%{version}
%py3_build %py3_build
@ -64,17 +47,7 @@ cd $RPM_BUILD_DIR/python3-%{_name}-%{version}
cd $RPM_BUILD_DIR/python3-%{_name}-%{version} cd $RPM_BUILD_DIR/python3-%{_name}-%{version}
%py3_install %py3_install
mv %{buildroot}%{_bindir}/%{_name} %{buildroot}%{_bindir}/python3-%{_name} mv %{buildroot}%{_bindir}/%{_name} %{buildroot}%{_bindir}/python3-%{_name}
cd -
%py2_install
%files -n python2-inotify
%defattr(-,root,root)
%doc ACKS
%license COPYING
%doc python2/examples/*
%{_bindir}/%{_name}
%{python2_sitelib}/*.py*
%{python2_sitelib}/%{_name}*info/
%files -n python3-inotify %files -n python3-inotify
%defattr(-,root,root) %defattr(-,root,root)
@ -91,6 +64,12 @@ cd -
%doc README.md PKG-INFO %doc README.md PKG-INFO
%changelog %changelog
* Thu Oct 29 2020 tianwei <tianwei12@huawei.com> - 0.9.6-17
- Type:NA
- ID:NA
- SUG:NA
- DESC:delete python2 require
* Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.9.6-16 * Mon Dec 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.9.6-16
- Type:NA - Type:NA
- ID:NA - ID:NA