From d2dfca50b83fd7edc42696165647cd72ece05e66 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Oct 13 2016 15:18:27 +0000 Subject: Initial import (#1376001). --- diff --git a/.gitignore b/.gitignore index e69de29..a819259 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/flufl.lock-2.4.1.tar.gz diff --git a/python-flufl-lock.spec b/python-flufl-lock.spec new file mode 100644 index 0000000..37e0fed --- /dev/null +++ b/python-flufl-lock.spec @@ -0,0 +1,123 @@ +%global srcname flufl.lock +%global pkgname flufl-lock +%global summary NFS-safe file locking with timeouts for POSIX systems +%global _description \ +The flufl.lock library provides an NFS-safe file-based locking algorithm \ +influenced by the GNU/Linux "open(2)" man page, under the description of \ +the "O_EXCL" option. + +# EPEL7 support: default Python is Python 2, and Python2 packages prefix +# is unversioned. +%if 0%{?rhel} && 0%{?rhel} <= 7 +%global py2_namespace python +%else +%global py2_namespace python2 +%endif + +Name: python-%{pkgname} +Version: 2.4.1 +Release: 1%{?dist} +Summary: %{summary} + +License: LGPLv3+ +URL: https://gitlab.com/warsaw/flufl.lock +Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: %{py2_namespace}-devel +BuildRequires: %{py2_namespace}-setuptools +# Python3 +BuildRequires: python3-pkgversion-macros +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if 0%{?with_python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel +BuildRequires: python%{python3_other_pkgversion}-setuptools +%endif + +%description %{_description} + + +%if %{py2_namespace} != python +%package -n %{py2_namespace}-%{pkgname} +Summary: %{summary} +%{?python_provide:%python_provide %{py2_namespace}-%{pkgname}} +Requires: %{py2_namespace}-setuptools + +%description -n %{py2_namespace}-%{pkgname} %{_description} +%endif + + +%package -n python%{python3_pkgversion}-%{pkgname} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} +Requires: python%{python3_pkgversion}-setuptools + +%description -n python%{python3_pkgversion}-%{pkgname} %{_description} + + +%if 0%{?with_python3_other} +%package -n python%{python3_other_pkgversion}-%{pkgname} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pkgname}} +Requires: python%{python3_other_pkgversion}-setuptools + +%description -n python%{python3_other_pkgversion}-%{pkgname} %{_description} +%endif + + +%prep +%autosetup -n %{srcname}-%{version} + + +%build +%py2_build +%py3_build +%if 0%{?with_python3_other} +%py3_other_build +%endif + + +%install +%py2_install +%py3_install +%if 0%{?with_python3_other} +%py3_other_install +%endif + +# This will go in %%doc +rm -rf %{buildroot}%{_prefix}/lib/python*/site-packages/flufl/lock/{*.rst,docs,conf.py} + + +%check +%{__python2} setup.py test +%{__python3} setup.py test +%if 0%{?with_python3_other} +%{__python3_other} setup.py test +%endif + + +%files -n %{py2_namespace}-%{pkgname} +%doc flufl/lock/README.rst flufl/lock/NEWS.rst flufl/lock/docs/using.rst +%{python2_sitelib}/flufl/ +%{python2_sitelib}/%{srcname}-%{version}*-py%{python2_version}.egg-info/ +%{python2_sitelib}/%{srcname}-%{version}*-py%{python2_version}-nspkg.pth + +%files -n python%{python3_pkgversion}-%{pkgname} +%doc flufl/lock/README.rst flufl/lock/NEWS.rst flufl/lock/docs/using.rst +%{python3_sitelib}/flufl/ +%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/ +%{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}-nspkg.pth + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-%{pkgname} +%doc flufl/lock/README.rst flufl/lock/NEWS.rst flufl/lock/docs/using.rst +%{python3_other_sitelib}/flufl/ +%{python3_other_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/ +%{python3_other_sitelib}/%{srcname}-%{version}*-py%{python3_other_version}-nspkg.pth +%endif + + +%changelog +* Wed Sep 14 2016 Aurelien Bompard - 2.4.1-1 +- Initial package. diff --git a/sources b/sources index e69de29..e9bff5c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +294da1c7a7473a5f9e8d3ad01b4a1259 flufl.lock-2.4.1.tar.gz