Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef036b9a38 | ||
|
|
9057da6de0 | ||
|
|
faa14baede | ||
|
|
e7f851fe6d | ||
|
|
499d04246c | ||
|
|
e0e5cb41e3 | ||
|
|
cbd3700a65 | ||
|
|
893de727f5 | ||
|
|
2b0dbf1d7b | ||
|
|
7ab2a499b1 | ||
|
|
ee8e800388 | ||
|
|
ae9470f609 | ||
|
|
c2ed49c209 | ||
|
|
27a8c90564 | ||
|
|
e9807173c8 | ||
|
|
fb3f2c4980 | ||
|
|
f3215b5f0b | ||
|
|
a1527d8d1e | ||
|
|
a5354800da |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/flexcache-0.2.tar.gz
|
||||
/flexcache-0.3.tar.gz
|
||||
|
||||
53
0001-Increase-the-value-of-FS_SLEEP-in-the-tests-fix-4.patch
Normal file
53
0001-Increase-the-value-of-FS_SLEEP-in-the-tests-fix-4.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From 84a33f8ada6fba17641e71aef24130b1c0022fb9 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 20 Jun 2025 11:30:03 -0400
|
||||
Subject: [PATCH] Increase the value of FS_SLEEP in the tests (fix #4)
|
||||
|
||||
---
|
||||
flexcache/testsuite/test_byhash.py | 2 +-
|
||||
flexcache/testsuite/test_bymtime.py | 2 +-
|
||||
flexcache/testsuite/test_header.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/flexcache/testsuite/test_byhash.py b/flexcache/testsuite/test_byhash.py
|
||||
index d0aa8e7..9d15fdb 100644
|
||||
--- a/flexcache/testsuite/test_byhash.py
|
||||
+++ b/flexcache/testsuite/test_byhash.py
|
||||
@@ -8,7 +8,7 @@ from flexcache import DiskCacheByHash
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def parser(p: pathlib.Path):
|
||||
diff --git a/flexcache/testsuite/test_bymtime.py b/flexcache/testsuite/test_bymtime.py
|
||||
index 0b3dc94..72cfeba 100644
|
||||
--- a/flexcache/testsuite/test_bymtime.py
|
||||
+++ b/flexcache/testsuite/test_bymtime.py
|
||||
@@ -8,7 +8,7 @@ from flexcache import DiskCacheByMTime
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def parser(p: pathlib.Path):
|
||||
diff --git a/flexcache/testsuite/test_header.py b/flexcache/testsuite/test_header.py
|
||||
index f27a516..1301273 100644
|
||||
--- a/flexcache/testsuite/test_header.py
|
||||
+++ b/flexcache/testsuite/test_header.py
|
||||
@@ -13,7 +13,7 @@ import flexcache
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def test_empty(tmp_path):
|
||||
--
|
||||
2.49.0
|
||||
|
||||
50
5.patch
Normal file
50
5.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From 84a33f8ada6fba17641e71aef24130b1c0022fb9 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 20 Jun 2025 11:30:03 -0400
|
||||
Subject: [PATCH] Increase the value of FS_SLEEP in the tests (fix #4)
|
||||
|
||||
---
|
||||
flexcache/testsuite/test_byhash.py | 2 +-
|
||||
flexcache/testsuite/test_bymtime.py | 2 +-
|
||||
flexcache/testsuite/test_header.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/flexcache/testsuite/test_byhash.py b/flexcache/testsuite/test_byhash.py
|
||||
index d0aa8e7..9d15fdb 100644
|
||||
--- a/flexcache/testsuite/test_byhash.py
|
||||
+++ b/flexcache/testsuite/test_byhash.py
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def parser(p: pathlib.Path):
|
||||
diff --git a/flexcache/testsuite/test_bymtime.py b/flexcache/testsuite/test_bymtime.py
|
||||
index 0b3dc94..72cfeba 100644
|
||||
--- a/flexcache/testsuite/test_bymtime.py
|
||||
+++ b/flexcache/testsuite/test_bymtime.py
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def parser(p: pathlib.Path):
|
||||
diff --git a/flexcache/testsuite/test_header.py b/flexcache/testsuite/test_header.py
|
||||
index f27a516..1301273 100644
|
||||
--- a/flexcache/testsuite/test_header.py
|
||||
+++ b/flexcache/testsuite/test_header.py
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
# These sleep time is needed when run on GitHub Actions
|
||||
# If not given or too short, some mtime changes are not visible.
|
||||
-FS_SLEEP = 0.010
|
||||
+FS_SLEEP = 0.100
|
||||
|
||||
|
||||
def test_empty(tmp_path):
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur flexcache-0.2-original/setup.cfg flexcache-0.2/setup.cfg
|
||||
--- flexcache-0.2-original/setup.cfg 2022-02-27 23:12:46.468990600 -0500
|
||||
+++ flexcache-0.2/setup.cfg 2024-03-11 08:32:50.998736526 -0400
|
||||
@@ -26,6 +26,8 @@
|
||||
zip_safe = True
|
||||
include_package_data = True
|
||||
python_requires = >=3.7
|
||||
+install_requires =
|
||||
+ setuptools
|
||||
setup_requires =
|
||||
setuptools
|
||||
setuptools_scm
|
||||
@@ -1,5 +1,5 @@
|
||||
Name: python-flexcache
|
||||
Version: 0.2
|
||||
Version: 0.3
|
||||
Release: %autorelease
|
||||
Summary: Cache on disk the result of expensive calculations
|
||||
|
||||
@@ -7,19 +7,20 @@ License: BSD-3-Clause
|
||||
URL: https://github.com/hgrecco/flexcache
|
||||
Source: %{pypi_source flexcache}
|
||||
|
||||
# Add setuptools to the runtime dependencies
|
||||
# Increase the value of FS_SLEEP in the tests (fix #4)
|
||||
# https://github.com/hgrecco/flexcache/pull/5
|
||||
#
|
||||
# This is needed for the “import pkg_resources” in the top-level
|
||||
# __init__.py.
|
||||
# Fixes:
|
||||
#
|
||||
# Downstream-only because version 0.3 of flexcache does not use pkg_resources,
|
||||
# so this is a temporary patch for version 0.2 only.
|
||||
Patch: flexcache-0.2-setuptools.patch
|
||||
# test_name_by_paths fails flakily on ppc64le and s390x
|
||||
# https://github.com/hgrecco/flexcache/issues/4
|
||||
Patch: %{url}/pull/5.patch
|
||||
|
||||
BuildSystem: pyproject
|
||||
BuildOption(install): -l flexcache
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
|
||||
%global common_description %{expand:
|
||||
A robust and extensible package to cache on disk the result of expensive
|
||||
calculations.}
|
||||
@@ -33,24 +34,7 @@ Summary: %{summary}
|
||||
%description -n python3-flexcache %{common_description}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n flexcache-%{version} -p1
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
||||
sed -r -i 's/^([[:blank:]]*)\b(pytest-cov)\b/\1# \2/' setup.cfg
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -x test
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files flexcache
|
||||
|
||||
%install -a
|
||||
# Upstream probably doesn’t want to install flexcache.testsuite, but we don’t
|
||||
# know how to suggest a fix given “[BUG] options.packages.find.exclude not
|
||||
# taking effect when include_package_data = True”,
|
||||
@@ -62,12 +46,7 @@ rm -rvf '%{buildroot}%{python3_sitelib}/flexcache/testsuite'
|
||||
sed -r -i '/\/flexcache\/testsuite/d' %{pyproject_files}
|
||||
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
|
||||
%files -n python3-flexcache -f %{pyproject_files}
|
||||
# pyproject_files handles AUTHORS and LICENSE; verify with “rpm -qL -p …”
|
||||
%doc README.rst
|
||||
%doc CHANGES
|
||||
|
||||
|
||||
2
sources
2
sources
@@ -1 +1 @@
|
||||
SHA512 (flexcache-0.2.tar.gz) = d06f854e32ee8b5449e695bb51968f5b674fe32f553d8357c1854b90d200cdde6d48c8d91ddce121b7cd2b1fd7d3b12cc91e708ebd9f4a1b5d622610c9302321
|
||||
SHA512 (flexcache-0.3.tar.gz) = 2e555694d7d3f613843bbcc74ae873972c90683b1fc4408507d5053bae67b5302e80c83be9170481e43c663be90f5dad24be31e08db9d5c2e2024009ba77debd
|
||||
|
||||
Reference in New Issue
Block a user