From b694345fcc89ef921fb9ade69cea3e308860ec9e Mon Sep 17 00:00:00 2001 From: dogsheng <960055655@qq.com> Date: Wed, 25 Dec 2019 16:05:48 +0800 Subject: [PATCH] Package init --- python-pid.spec | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/python-pid.spec b/python-pid.spec index b5326f2..686360d 100644 --- a/python-pid.spec +++ b/python-pid.spec @@ -11,6 +11,17 @@ BuildArch: noarch %description A module about python pid management, with fcntl to add state to the lock file. +%if %{with python2} +%package -n python2-pid +Summary: PID file management library +BuildRequires: python2-devel python2-setuptools python2-nose +%{?python_provide:%python_provide python2-pid} + +%description -n python2-pid +Python-pid for python2. +%endif + + %package -n python3-pid Summary: PID file management library BuildRequires: python3-devel python3-setuptools python3-nose @@ -23,12 +34,15 @@ Python-pid for python3. %autosetup -n pid-%{version} %build +%py2_build %py3_build %install +%py2_install %py3_install %check +PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests-%{python2_version} %{__python3} setup.py test %pre @@ -39,6 +53,14 @@ Python-pid for python3. %postun +%if %{with python2} +%files -n python2-pid +%license LICENSE +%doc AUTHORS CHANGELOG README.rst +%{python2_sitelib}/pid +%{python2_sitelib}/pid-*.egg-info +%endif + %files -n python3-pid %license LICENSE %doc AUTHORS CHANGELOG README.rst @@ -46,5 +68,8 @@ Python-pid for python3. %{python3_sitelib}/pid-*.egg-info %changelog +* Sat Dec 21 2019 openEuler Buildteam - 2.1.1-11 +- Enabale python2 + * Fri Oct 18 2019 openEuler Buildteam - 2.1.1-10 - Package init