%global srcname pypugjs Name: python-%{srcname} Version: 7.0.0 Release: 1%{?dist} Summary: Pug (Jade) template compiler for Python template engines License: MIT URL: https://github.com/kakulukia/%{srcname} # GitHub tag archive rather than the PyPI sdist: the sdist omits # pypugjs/testsuite/ entirely, cases and runners both, so from PyPI there is # nothing to test against. Source0: %{url}/archive/refs/tags/v%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check -- upstream's suite exercises every backend it ships an extension for, # and Fedora has all of them. BuildRequires: python3-pytest BuildRequires: python3-pytest-asyncio BuildRequires: python3-django BuildRequires: python3-jinja2 BuildRequires: python3-mako BuildRequires: python3-tornado %global _description %{expand: PyPugJS compiles Pug templates -- the terse, indentation-based HTML syntax formerly called Jade -- into the native syntax of a Python template engine, and ships integrations for Django, Jinja2, Mako and Tornado. It is packaged here as the template layer under pdf_reports, which several tools in this repository use to render their HTML and PDF output.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} # Upstream pins charset-normalizer to ^3.4.9, released days before this tag; # Fedora has 3.4.4. The only use is charset_normalizer.from_path(f).best() in # runtime.py, an API unchanged since 2.x, so the floor tracks upstream's release # day rather than anything pypugjs needs. Relaxed to ^3.4. grep -q '^charset-normalizer = "\^3\.4\.9"$' pyproject.toml || { echo "charset-normalizer pin not as expected" >&2; exit 1; } sed -i 's/^charset-normalizer = "\^3\.4\.9"$/charset-normalizer = "^3.4"/' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check %pytest -q pypugjs/testsuite %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %changelog * Sun Sep 27 2026 Morgan Hough - 7.0.0-1 - Initial package: PyPugJS 7.0.0. Net-new to Fedora. - First of the four packages between here and genedom: pdf_reports needs this, sequenticon needs pdf_reports, and genedom needs both. - Sourced from the GitHub tag; the sdist omits pypugjs/testsuite/ completely, so from PyPI this could not be tested at all. - %%prep relaxes the charset-normalizer floor from ^3.4.9 to ^3.4. Fedora has 3.4.4 and the single call site is an API stable since 2.x. - Built with poetry-core, unlike the setuptools packages elsewhere here.