%global srcname webassets %global _description %{expand:Asset management application for Python web development - use it to merge and compress your JavaScript and CSS files.} Name: python-%{srcname} Version: 2.0 Release: 1%{?dist} Summary: Asset management for Python web development License: BSD-2-Clause URL: https://%{srcname}.readthedocs.io/ Source0: https://github.com/miracle2k/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz # - Fix Python dependency versions for tests # - Drop test dependencies on Python filters not available in Fedora # - Fix tests with latest versions of Python 3 # - Fix filter detection in tests Patch0: %{name}-2.0-tests.patch BuildRequires: python3-devel # Needed for filter tests BuildRequires: %{py3_dist rjsmin} BuildRequires: coffee-script BuildRequires: nodejs-less BuildRequires: nodejs-typescript BuildRequires: uglify-js BuildArch: noarch %description %{_description} %package -n python3-%{srcname} Summary: %{summary} Requires: %{py3_dist rjsmin} %description -n python3-%{srcname} %{_description} %prep %autosetup -n %{srcname}-%{version} -p0 # Remove bundled rjsmin rm src/webassets/filter/rjsmin/rjsmin.py %generate_buildrequires %pyproject_buildrequires -r %pyproject_buildrequires -r requirements-dev.pip %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check # Disable tests for NodeJS sass (unavailable in Fedora, RubyGems sass is tested # instead) %pytest --deselect=tests/test_filters.py::TestSass %files -n python3-%{srcname} -f %{pyproject_files} %doc CHANGES README.rst TODO %license LICENSE %{_bindir}/%{srcname} %changelog * Mon Jan 02 2023 Mohamed El Morabity - 2.0-1 - Initial RPM release