python-pid/python-pid.spec
2015-08-05 11:38:28 -04:00

89 lines
2.1 KiB
RPMSpec

%global srcname pid
Name: python-%{srcname}
Version: 2.0.1
Release: 2%{?dist}
Summary: PID file management library
License: ASL 2.0
URL: https://pypi.python.org/pypi/%{srcname}
Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
BuildRequires: python2-devel python3-devel
BuildRequires: python-setuptools python3-setuptools
BuildArch: noarch
%description
pid provides a PidFile class that manages PID files. PidFile features:
- stale detection
- locking using fcntl
- chmod (default is 0o644)
- chown
- custom exceptions
PidFile can also be used as a context manager or a decorator.
%package -n python2-%{srcname}
Summary: PID file management library
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
pid provides a PidFile class that manages PID files. PidFile features:
- stale detection
- locking using fcntl
- chmod (default is 0o644)
- chown
- custom exceptions
PidFile can also be used as a context manager or a decorator.
%package -n python3-%{srcname}
Summary: PID file management library
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
pid provides a PidFile class that manages PID files. PidFile features:
- stale detection
- locking using fcntl
- chmod (default is 0o644)
- chown
- custom exceptions
PidFile can also be used as a context manager or a decorator.
%prep
%autosetup -n %{srcname}-%{version}
rm -rf *.egg-info
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{srcname}
%license LICENSE
%doc AUTHORS CHANGELOG README.rst
%{python2_sitelib}/pid
%{python2_sitelib}/pid-*.egg-info
%files -n python3-%{srcname}
%license LICENSE
%doc AUTHORS CHANGELOG README.rst
%{python3_sitelib}/pid
%{python3_sitelib}/pid-*.egg-info
%changelog
* Wed Aug 05 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.0.1-2
- Update to modern python packaging guidelines
* Tue Aug 4 2015 David Shea <dshea@redhat.com> - 2.0.1-1
- Initial package