From 8da4cb4feaf06a156faf6b660983d0cda733727f Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 20 Dec 2024 16:52:55 -0600 Subject: [PATCH] Fix building with Python 3.14; resolves: rhbz#2322719 Signed-off-by: Michel Lind --- django-compressor-py314-ast.diff | 11 +++++++++++ python-django-compressor.spec | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 django-compressor-py314-ast.diff diff --git a/django-compressor-py314-ast.diff b/django-compressor-py314-ast.diff new file mode 100644 index 0000000..75d8a43 --- /dev/null +++ b/django-compressor-py314-ast.diff @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -14,7 +14,7 @@ class VersionFinder(ast.NodeVisitor): + + def visit_Assign(self, node): + if node.targets[0].id == "__version__": +- self.version = node.value.s ++ self.version = node.value.value + + + def read(*parts): diff --git a/python-django-compressor.spec b/python-django-compressor.spec index 5f2e927..1b34fd5 100644 --- a/python-django-compressor.spec +++ b/python-django-compressor.spec @@ -17,7 +17,10 @@ License: MIT URL: https://github.com/django-compressor/django-compressor Source0: %{pypi_source django_compressor} -Patch0: rdep-version.patch +Patch: rdep-version.patch +# Fix for https://github.com/django-compressor/django-compressor/issues/1270 +# https://github.com/django-compressor/django-compressor/pull/1271 +Patch: django-compressor-py314-ast.diff BuildArch: noarch