python-django-compressor/python-django-compressor.spec
Markéta Machová 0ab37271e6 - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-compressor?expand=0&rev=30
2024-09-05 08:38:38 +00:00

88 lines
3.1 KiB
RPMSpec

#
# spec file for package python-django-compressor
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
%define mod_name django_compressor
Name: python-django-compressor
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
BuildRequires: %{python_module Brotli >= 1.0.6}
BuildRequires: %{python_module Django >= 4.2}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module calmjs}
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 >= 4.9.3}
BuildRequires: %{python_module rcssmin >= 1.1.1}
BuildRequires: %{python_module rjsmin >= 1.2.1}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
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
Recommends: python-Brotli >= 1.0.6
Recommends: python-Jinja2
Recommends: python-calmjs
Suggests: python-django-sekizai >= 2.0.0
Provides: python-django_compressor = %{version}
Obsoletes: python-django_compressor < %{version}
BuildArch: noarch
%python_subpackages
%description
Django Compressor combines and compresses linked and inline Javascript or CSS
in a Django templates into cacheable static files by using the "compress"
template tag.
%prep
%setup -q -n %{mod_name}-%{version}
%autopatch -p1
sed -i '1{/env python/d}' compressor/tests/precompiler.py
%build
%python_build
%install
%python_install
%{python_expand #
echo '/* empty file */' >> %{buildroot}%{$python_sitelib}/compressor/tests/static/CACHE/css/output.e3b0c44298fc.css
%fdupes %{buildroot}%{$python_sitelib}
}
%check
%python_expand $python -m django test --settings=compressor.test_settings compressor --pythonpath=`pwd` -v2
%files %{python_files}
%license LICENSE
%doc AUTHORS README.rst
%{python_sitelib}/compressor
%{python_sitelib}/django_compressor-%{version}*-info
%changelog