Update to 0.17

This commit is contained in:
Benjamin A. Beasley 2022-05-04 09:08:03 -04:00
parent bf4d389ea6
commit bf165d9a02
5 changed files with 64 additions and 55 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/fasteners-0.12.0.tar.gz
/fasteners-0.13.0.tar.gz
/fasteners-0.14.1.tar.gz
/fasteners-0.17.tar.gz

View File

@ -0,0 +1,18 @@
From 49d8f5bb56157a82ff3e6128b506638a214e6d43 Mon Sep 17 00:00:00 2001
From: Paulius Sarka <paulius.sarka@gmail.com>
Date: Tue, 8 Feb 2022 18:46:36 +0100
Subject: [PATCH] Remove futures from the requirements-test.txt
---
requirements-test.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/requirements-test.txt b/requirements-test.txt
index 38cd410..0f40737 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -1,4 +1,3 @@
diskcache
more_itertools
-futures
pytest

View File

@ -1,30 +0,0 @@
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',

View File

@ -1,42 +1,55 @@
%global pypi_name fasteners
%if 0%{?rhel} >= 8
%bcond_with pytests
%else
%bcond_without pytests
%endif
%bcond_without tests
# The python-diskcache package, used in some of the tests, has been retired.
%bcond_with diskcache
Name: python-%{pypi_name}
Version: 0.14.1
Release: 27%{?dist}
Version: 0.17
Release: 1%{?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
# We need to use the GitHub archive instead of the PyPI sdist to get tests.
Source0: %{url}/archive/%{version}/fasteners-%{version}.tar.gz
# “Remove futures from the requirements-test.txt”
# Backport upstream commit 49d8f5b to remove a test dependency that is no
# longer used and only supports Python 2.
Patch: %{url}/commit/49d8f5bb56157a82ff3e6128b506638a214e6d43.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%if %{with tests}
# requirements-test.txt
%if %{with diskcache}
BuildRequires: python3dist(diskcache)
%endif
BuildRequires: python3dist(more-itertools)
BuildRequires: python3dist(pytest)
%endif
%global common_description %{expand: \
Cross platform locks for threads and processes}
%description
A python package that provides useful locks.
%{common_description}
%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
BuildRequires: python3-setuptools
# tests
%if %{with pytests}
BuildRequires: python3-testtools
BuildRequires: python3-nose
Requires: python3-six
%if 0%{?el8}
# This is obsolete on EPEL9 and Fedora:
%{?python_provide:%python_provide python3-%{pypi_name}}
%endif
%description -n python3-%{pypi_name}
A python package that provides useful locks.
%{common_description}
%prep
@ -50,19 +63,26 @@ A python package that provides useful locks.
%install
%py3_install
%if %{with pytests}
%check
nosetests-%{python3_version}
%if %{with tests}
%pytest %{?!with_diskcache:--ignore=tests/test_reader_writer_lock.py}
%endif
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%doc ChangeLog
%doc README.md
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%changelog
* Tue May 03 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.17-1
- Update to 0.17
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1 +1 @@
f641c55508d30b29eacd8c7a8785fab0 fasteners-0.14.1.tar.gz
SHA512 (fasteners-0.17.tar.gz) = b0072144f16486202f8e8d5e8fc9f87999ec932502023f6e3f066b8ea8f535f70032000609928b717799a378a167019f30af052a31acbdf5932da8a054211eaf