Package init

This commit is contained in:
dogsheng 2019-12-25 16:05:48 +08:00
parent 31912a7e96
commit b694345fcc

View File

@ -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 <buildteam@openeuler.org> - 2.1.1-11
- Enabale python2
* Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.1-10
- Package init