commit 2ca10e6061ffa1ea1d98667d6b561e1d29db72b3 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:15:01 2019 -0400 Package init diff --git a/pyinotify-0.9.6-epoint.patch b/pyinotify-0.9.6-epoint.patch new file mode 100644 index 0000000..879daf4 --- /dev/null +++ b/pyinotify-0.9.6-epoint.patch @@ -0,0 +1,11 @@ +diff --git a/setup.py b/setup.py +index 15d68ab..cf6dc5b 100755 +--- a/setup.py ++++ b/setup.py +@@ -115,4 +115,6 @@ setup( + ext_modules=ext_mod, + py_modules=['pyinotify'], + package_dir=package_dir, ++ entry_points = { 'console_scripts' : ++ [ 'pyinotify = pyinotify:command_line', ] }, + ) diff --git a/pyinotify-0.9.6.tar.gz b/pyinotify-0.9.6.tar.gz new file mode 100644 index 0000000..3150ad3 Binary files /dev/null and b/pyinotify-0.9.6.tar.gz differ diff --git a/python-inotify.spec b/python-inotify.spec new file mode 100644 index 0000000..da18637 --- /dev/null +++ b/python-inotify.spec @@ -0,0 +1,102 @@ +%global _name pyinotify +%global _description Pyinotify is a Python module for monitoring filesystems changes. \ +Pyinotify relies on a Linux Kernel feature (merged in kernel 2.6.13) called inotify. \ +inotify is an event-driven notifier, its notifications are exported from kernel space \ +to user space through three system calls. pyinotify binds these system calls and provides \ +an implementation on top of them offering a generic and abstract way to manipulate those \ +functionalities. + +Name: python-inotify +Version: 0.9.6 +Release: 15 +Summary: A Python module for monitoring filesystems changes +License: MIT +URL: https://github.com/seb-m/pyinotify +Source0: https://github.com/seb-m/pyinotify/archive/%{version}.tar.gz#/%{_name}-%{version}.tar.gz + +# PATCH-FIX-EULEROS:fix the build of python3, from Fedora29 +Patch0: pyinotify-0.9.6-epoint.patch +BuildArch: noarch +BuildRequires: gmp-devel + +%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 +Summary: python3 edition of %{name} + +BuildRequires: python3-devel + +%{?python_provide:%python_provide python3-inotify} + +%description -n python3-inotify +This package is the python3 edition of %{name}. + +%package_help + +%prep +%autosetup -n %{_name}-%{version} -p1 +sed -i '1c#! %{__python2}' python2/pyinotify.py +sed -i '1c#! %{__python3}' python3/pyinotify.py +sed -i '1c#! %{__python2}' python2/examples/*py +sed -i '1c#! %{__python3}' python3/examples/*py +cp -a . $RPM_BUILD_DIR/python3-%{_name}-%{version} + +%build +%py2_build +cd $RPM_BUILD_DIR/python3-%{_name}-%{version} +%py3_build + +%install +cd $RPM_BUILD_DIR/python3-%{_name}-%{version} +%py3_install +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 +%defattr(-,root,root) +%doc ACKS +%license COPYING +%doc python3/examples/* +%{_bindir}/*3-%{_name} +%{python3_sitelib}/*.py* +%{python3_sitelib}/%{_name}*info/ +%{python3_sitelib}/__pycache__/*.pyc + +%files help +%defattr(-,root,root) +%doc README.md PKG-INFO + +%changelog +* Fri Sep 27 2019 shenyangyang - 0.9.6-15 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:move license file + +* Thu Sep 12 2019 openEuler Buildteam - 0.9.6-14 +- Package init