python-pid/python-pid.spec
2020-03-21 15:34:14 +08:00

81 lines
1.7 KiB
RPMSpec

%bcond_without python2
Name: python-pid
Version: 2.1.1
Release: 12
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.
%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
%{?python_provide:%python_provide python3-pid}
%description -n python3-pid
Python-pid for python3.
%prep
%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
%preun
%post
%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
%{python3_sitelib}/pid
%{python3_sitelib}/pid-*.egg-info
%changelog
* Sat Mar 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.1-12
- Add macro of bcond_with
* 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