diff --git a/posix_ipc-0.9.8.tar.gz b/posix_ipc-0.9.8.tar.gz new file mode 100644 index 0000000..9e43285 Binary files /dev/null and b/posix_ipc-0.9.8.tar.gz differ diff --git a/python-posix_ipc.spec b/python-posix_ipc.spec new file mode 100644 index 0000000..6e32dd2 --- /dev/null +++ b/python-posix_ipc.spec @@ -0,0 +1,73 @@ +%global with_python3 1 +%global with_python2 0 +Name: python-posix_ipc +Version: 0.9.8 +Release: 1 +Summary: POSIX IPC primitives (semaphores and shared memory) for Python +License: BSD +URL: http://semanchuk.com/philip/posix_ipc/ +Source0: http://semanchuk.com/philip/posix_ipc/posix_ipc-%{version}.tar.gz +BuildRequires: gcc +%global _description\ +posix_ipc is a Python module (written in C) that permits creation and\ +manipulation of POSIX inter-process semaphores, shared memory and message\ +queues on platforms supporting POSIX Realtime Extensions, POSIX 1003.1b-1993. +%description %_description + +%if 0%{?with_python2} +%package -n python2-posix_ipc +Summary: %summary +BuildRequires: python2-devel python2-setuptools +%{?python_provide:%python_provide python2-posix_ipc} +%description -n python2-posix_ipc %_description +%endif # with_python2 + +%if 0%{?with_python3} +%package -n python3-posix_ipc +Summary: POSIX IPC primitives (semaphores and shared memory) for Python +BuildRequires: python3-devel python3-setuptools +%description -n python3-posix_ipc %_description +%endif # with_python3 + +%prep +%setup -q -n posix_ipc-%{version} +chmod 644 demo/make_all.sh +chmod 644 demo2/cleanup.py +chmod 644 demo/cleanup.py +%if 0%{?with_python3} +find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +%endif # with_python3 + +%build +%if 0%{?with_python2} +%py2_build +%endif + +%if 0%{?with_python3} +%py3_build +%endif + +%install +%if 0%{?with_python2} +%py2_install +%endif + +%if 0%{?with_python3} +%py3_install +%endif + +%if 0%{?with_python2} +%files -n python2-posix_ipc +%doc README LICENSE demo demo2 +%{python2_sitearch}/* +%endif + +%if 0%{?with_python3} +%files -n python3-posix_ipc +%doc README LICENSE demo demo2 +%{python3_sitearch}/* +%endif + +%changelog +* Sat May 8 2021 baizhonggui - 0.9.8-1 +- package init