python-pid/python-pid.spec

81 lines
1.7 KiB
RPMSpec
Raw Normal View History

2020-03-21 15:34:14 +08:00
%bcond_without python2
2019-11-06 19:49:47 +08:00
Name: python-pid
Version: 2.1.1
2020-03-21 15:34:14 +08:00
Release: 12
2019-11-06 19:49:47 +08:00
Summary: Python pid management
License: ASL 2.0
URL: https://pypi.python.org/pypi/pid
Source0: https://pypi.python.org/packages/source/p/pid/pid-%{version}.tar.gz
BuildArch: noarch
%description
A module about python pid management, with fcntl to add state to the lock file.
2019-12-25 16:05:48 +08:00
%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
2019-11-06 19:49:47 +08:00
%package -n python3-pid
Summary: PID file management library
BuildRequires: python3-devel python3-setuptools python3-nose
%{?python_provide:%python_provide python3-pid}
%description -n python3-pid
Python-pid for python3.
%prep
%autosetup -n pid-%{version}
%build
2019-12-25 16:05:48 +08:00
%py2_build
2019-11-06 19:49:47 +08:00
%py3_build
%install
2019-12-25 16:05:48 +08:00
%py2_install
2019-11-06 19:49:47 +08:00
%py3_install
%check
2019-12-25 16:05:48 +08:00
PYTHONPATH=%{buildroot}%{python2_sitelib} nosetests-%{python2_version}
2019-11-06 19:49:47 +08:00
%{__python3} setup.py test
%pre
%preun
%post
%postun
2019-12-25 16:05:48 +08:00
%if %{with python2}
%files -n python2-pid
%license LICENSE
%doc AUTHORS CHANGELOG README.rst
%{python2_sitelib}/pid
%{python2_sitelib}/pid-*.egg-info
%endif
2019-11-06 19:49:47 +08:00
%files -n python3-pid
%license LICENSE
%doc AUTHORS CHANGELOG README.rst
%{python3_sitelib}/pid
%{python3_sitelib}/pid-*.egg-info
%changelog
2020-03-21 15:34:14 +08:00
* Sat Mar 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.1-12
- Add macro of bcond_with
2019-12-25 16:05:48 +08:00
* Sat Dec 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.1-11
- Enabale python2
2019-11-06 19:49:47 +08:00
* Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.1-10
- Package init