14
0

Accepting request 888636 from home:bnavigator:branches:devel:languages:python

- Add webassets-py39-threading.patch -- gh#miracle2k/webassets#529
- Add remove-nose.patch -- gh#miracle2k/webassets#539
- Install some filter packages for test suite

OBS-URL: https://build.opensuse.org/request/show/888636
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-webassets?expand=0&rev=11
This commit is contained in:
2021-04-27 05:19:24 +00:00
committed by Git OBS Bridge
parent 0be75d7d11
commit 1df81520fd
4 changed files with 1366 additions and 8 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Apr 26 23:06:51 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Add webassets-py39-threading.patch -- gh#miracle2k/webassets#529
- Add remove-nose.patch -- gh#miracle2k/webassets#539
- Install some filter packages for test suite
-------------------------------------------------------------------
Mon May 18 07:25:35 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-webassets
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,6 +17,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-webassets
Version: 2.0
Release: 0
@@ -25,19 +26,35 @@ Summary: Media asset management for Python, with glue code for various we
# jspacker=LGPL-2.1
# cssrewrite=BSD-3-Clause
# six.py=MIT
License: BSD-2-Clause AND Apache-2.0 AND LGPL-2.1-only AND BSD-3-Clause AND MIT
License: Apache-2.0 AND BSD-2-Clause AND LGPL-2.1-only AND BSD-3-Clause AND MIT
Group: Development/Languages/Python
URL: https://github.com/miracle2k/webassets/
Source: https://files.pythonhosted.org/packages/source/w/webassets/webassets-%{version}.tar.gz
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module pytest}
# PATCH-FIX-UPSTREAM webassets-py39-threading.patch -- gh#miracle2k/webassets#529
Patch0: https://github.com/miracle2k/webassets/pull/529.patch#/webassets-py39-threading.patch
# PATCH-FIX-UPSTREAM remove-nose -- gh#miracle2k/webassets#539
Patch1: remove-nose.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
# jsmin and rjsmin fail if imported: different utf8 filters
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module cssutils}
BuildRequires: %{python_module glob2}
BuildRequires: %{python_module lesscpy}
BuildRequires: %{python_module rcssmin}
BuildRequires: %{python_module slimit}
BuildRequires: sassc
%if %{with python2}
BuildRequires: python2-mock
%endif
# /SECTION
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
@@ -47,7 +64,7 @@ of different filters, including YUI, jsmin, jspacker or CSS tidy. Also supports
URL rewriting in CSS files.
%prep
%setup -q -n webassets-%{version}
%autosetup -p1 -n webassets-%{version}
sed -i 's/#!.*//' src/webassets/filter/rjsmin/rjsmin.py
# fix py2 only syntax
sed -i -e 's:e.message:e.args[0]:g' tests/test_filters.py
@@ -62,7 +79,7 @@ sed -i -e 's:e.message:e.args[0]:g' tests/test_filters.py
%check
export LANG="en_US.UTF8"
%pytest
%pytest -ra
%post
%python_install_alternative webassets

1312
remove-nose.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
From a563935df6702ff5e38e5b84a262c295e4cdf455 Mon Sep 17 00:00:00 2001
From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Date: Wed, 22 Jan 2020 00:49:31 +0530
Subject: [PATCH] Use is_alive instead of isAlive for Python 3.9 compatibility.
---
tests/test_script.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_script.py b/tests/test_script.py
index a83bc07f..d17a83bb 100644
--- a/tests/test_script.py
+++ b/tests/test_script.py
@@ -192,7 +192,7 @@ def start_watching(self):
def stop_watching(self):
"""Stop the watch command thread."""
- assert self.t.isAlive() # If it has already ended, something is wrong
+ assert self.t.is_alive() # If it has already ended, something is wrong
self.stopped = True
self.t.join(1)