diff --git a/fasteners-0.14.1.tar.gz b/fasteners-0.14.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..39ddd221b95496cfcc642c382af9b944e73429b9 Binary files /dev/null and b/fasteners-0.14.1.tar.gz differ diff --git a/fasteners-monotonic.patch b/fasteners-monotonic.patch new file mode 100644 index 0000000000000000000000000000000000000000..be2f767aec038bbc35a9249c5e987ee019a962ae --- /dev/null +++ b/fasteners-monotonic.patch @@ -0,0 +1,30 @@ +diff -uNr fasteners-0.14.1.orig/fasteners/_utils.py fasteners-0.14.1/fasteners/_utils.py +--- fasteners-0.14.1.orig/fasteners/_utils.py 2015-11-13 07:46:46.000000000 +0100 ++++ fasteners-0.14.1/fasteners/_utils.py 2018-01-17 17:42:58.715726344 +0100 +@@ -19,7 +19,10 @@ + import logging + import time + +-from monotonic import monotonic as now # noqa ++try: ++ from time import monotonic as now ++except ImportError: ++ from monotonic import monotonic as now + + # log level for low-level debugging + BLATHER = 5 +diff -uNr fasteners-0.14.1.orig/setup.py fasteners-0.14.1/setup.py +--- fasteners-0.14.1.orig/setup.py 2015-11-13 07:46:46.000000000 +0100 ++++ fasteners-0.14.1/setup.py 2018-01-17 17:50:26.654085344 +0100 +@@ -26,8 +26,10 @@ + + install_requires = [ + 'six', +- 'monotonic>=0.1', + ] ++import sys ++if sys.version_info < (3, 3, 0): ++ install_requires += ['monotonic>=0.1'] + + setup( + name='fasteners', diff --git a/python-fasteners.spec b/python-fasteners.spec new file mode 100644 index 0000000000000000000000000000000000000000..aa3b3500772bee0572243630ba2340a20407de9d --- /dev/null +++ b/python-fasteners.spec @@ -0,0 +1,62 @@ +%global pypi_name fasteners + +#%%if 0%{?rhel} >= 8 +%bcond_with pytests +#%%else +#%%bcond_without pytests +#%%endif + +Name: python-%{pypi_name} +Version: 0.14.1 +Release: 20%{?dist} +Summary: A python package that provides useful locks + +License: ASL 2.0 +URL: https://github.com/harlowja/fasteners +Source0: https://codeload.github.com/harlowja/fasteners/tar.gz/%{version}#/%{pypi_name}-%{version}.tar.gz +Patch0: fasteners-monotonic.patch +BuildArch: noarch + +%description +A python package that provides useful locks. + + +%package -n python3-%{pypi_name} +Summary: A python package that provides useful locks +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-six +BuildRequires: python3-devel +# tests +BuildRequires: python3-testtools +BuildRequires: python3-nose +Requires: python3-six + +%description -n python3-%{pypi_name} +A python package that provides useful locks. + + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} + + +%build +%py3_build + + +%install +%py3_install + +%check +nosetests-%{python3_version} + +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-*.egg-info/ + + +%changelog +* Fri Oct 30 2020 jiangxinyu - 0.14.1-21 +- Init python3-fasteners project