diff --git a/pid-3.0.4.tar.gz b/pid-3.0.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6be14942f667add11b306cda1b3b9f077fed7cbf Binary files /dev/null and b/pid-3.0.4.tar.gz differ diff --git a/python-pid.spec b/python-pid.spec new file mode 100644 index 0000000000000000000000000000000000000000..6f64fc8443f055d9599c671bd4f7e0e731fbb63f --- /dev/null +++ b/python-pid.spec @@ -0,0 +1,76 @@ +%define anolis_release 1 +%global srcname pid + +%global common_description %{expand: +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.} + +%bcond_without python3 +%bcond_without python3_tests + +Name: python-%{srcname} +Version: 3.0.4 +Release: %{anolis_release}%{?dist} +Summary: PID file management library + +License: ASL 2.0 +URL: https://github.com/trbs/pid +Source0: %pypi_source + +BuildArch: noarch + +%description %{common_description} + +%if %{with python3} +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if %{with python3_tests} +BuildRequires: python%{python3_pkgversion}-pytest +%endif + +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} + +%description -n python%{python3_pkgversion}-%{srcname} %{common_description} +%endif + +%prep +# This needs to have a blank line after because of a bug in the EL6 macros +%autosetup -p1 -n %{srcname}-%{version} + +rm -rf %{srcname}.egg-info + +%build +%if %{with python3} +%py3_build +%endif + +%install +%if %{with python3} +%py3_install +%endif + +%check +%if %{with python3_tests} +%pytest +%endif + +%if %{with python3} +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE +%doc AUTHORS CHANGELOG README.rst +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info +%endif + +%changelog +* Mon Apr 18 2022 Chunmei Xu - 3.0.4-1 +- init from upstream