Accepting request 1198904 from devel:languages:python:django

OBS-URL: https://build.opensuse.org/request/show/1198904
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-django-compressor?expand=0&rev=14
This commit is contained in:
Ana Guerrero 2024-09-05 13:47:32 +00:00 committed by Git OBS Bridge
commit b5704e2d13
6 changed files with 25 additions and 56 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1b0acc9cfba9f69bc38e7c41da9b0d70a20bc95587b643ffef9609cf46064f67
size 422254

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1d8a48a2ee4d8b7f23c411eb9c97e2d88db18a18ba1c9e8178d5f5b8366a822
size 124734

View File

@ -1,28 +0,0 @@
From 1afd937f6a49b10013c1df71b53d054170efdce4 Mon Sep 17 00:00:00 2001
From: bcail <bcail@crossway.org>
Date: Mon, 3 Jul 2023 17:24:39 +0000
Subject: [PATCH] Add `LazyScriptNamePrefixedUrl.lstrip` to fix tests (#1196)
Needed because of cpython PR
https://github.com/python/cpython/pull/104575
---
compressor/tests/test_offline.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/compressor/tests/test_offline.py b/compressor/tests/test_offline.py
index c208048e..c49d1277 100644
--- a/compressor/tests/test_offline.py
+++ b/compressor/tests/test_offline.py
@@ -58,6 +58,12 @@ def __unicode__(self):
def __hash__(self):
return str.__hash__(str(self))
+ def lstrip(self, *args, **kwargs):
+ """
+ Override ``.lstrip()`` method to make it work with ``{% static %}``.
+ """
+ return str(self).lstrip(*args, **kwargs)
+
def split(self, *args, **kwargs):
"""
Override ``.split()`` method to make it work with ``{% static %}``.

View File

@ -1,13 +0,0 @@
diff -ruN a/setup.py b/setup.py
--- a/setup.py 2023-06-28 00:11:30.000000000 +0200
+++ b/setup.py 2023-12-11 13:19:34.154446612 +0100
@@ -164,7 +164,7 @@
zip_safe=False,
install_requires=[
"django-appconf >= 1.0.3",
- "rcssmin == 1.1.1",
- "rjsmin == 1.2.1",
+ "rcssmin >= 1.1.1",
+ "rjsmin >= 1.2.1",
],
)

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Sep 3 13:44:11 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Update to 4.5.1
* Officially support Python 3.12 (requires lxml 4.9.3 or higher)
* Drop support for Django versions before 4.2.
* Added support for Django 5.1
* Added new ``COMPRESS_STORAGE_ALIAS`` and ``COMPRESS_OFFLINE_MANIFEST_STORAGE_ALIAS``
settings. These point to keys in Django's ``storages`` handler. If set by the
user, Compressor will use these storages, or otherwise will set a default
storage, given by ``COMPRESS_STORAGE`` and
``COMPRESS_OFFLINE_MANIFEST_STORAGE`` respectively on first access.
- Drop already merged patches:
* python-django-compressor-rcssmin-and-rjsmin-versions.patch
* lstrip.patch
-------------------------------------------------------------------
Mon Dec 11 12:30:39 UTC 2023 - Jacob Michalskie <hel@lcp.world>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-django-compressor
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,18 +19,14 @@
%{?sle15_python_module_pythons}
%define mod_name django_compressor
Name: python-django-compressor
Version: 4.4
Version: 4.5.1
Release: 0
Summary: Python module to compress linked/inline JavaScript/CSS to cached files
License: Apache-2.0 AND BSD-3-Clause AND MIT
URL: https://github.com/django-compressor/django-compressor
Source: https://files.pythonhosted.org/packages/source/d/%{mod_name}/%{mod_name}-%{version}.tar.gz
#PATCH-FIX-UPSTREAM https://github.com/django-compressor/django-compressor/pull/1196 Add LazyScriptNamePrefixedUrl.lstrip to fix tests
Patch0: lstrip.patch
#PATCH-FIX-UPSTREAM https://github.com/django-compressor/django-compressor/pull/1205 Update rcssmin
Patch1: python-django-compressor-rcssmin-and-rjsmin-versions.patch
BuildRequires: %{python_module Brotli >= 1.0.6}
BuildRequires: %{python_module Django >= 2.2}
BuildRequires: %{python_module Django >= 4.2}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module calmjs}
@ -38,22 +34,20 @@ BuildRequires: %{python_module csscompressor}
BuildRequires: %{python_module django-appconf >= 1.0.3}
BuildRequires: %{python_module django-sekizai >= 2.0.0}
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module lxml >= 4.9.3}
BuildRequires: %{python_module rcssmin >= 1.1.1}
BuildRequires: %{python_module rjsmin >= 1.2.1}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module slimit}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Django >= 2.2
Requires: python-Jinja2
Requires: python-Django >= 4.2
Requires: python-beautifulsoup4
Requires: python-csscompressor
Requires: python-django-appconf >= 1.0.3
Requires: python-rcssmin >= 1.1.1
Requires: python-rjsmin >= 1.2.1
Requires: python-slimit
Recommends: python-Brotli >= 1.0.6
Recommends: python-Jinja2
Recommends: python-calmjs
Suggests: python-django-sekizai >= 2.0.0
Provides: python-django_compressor = %{version}