%global forgeurl https://github.com/ietf-tools/xml2rfc %global version0 3.29.0 %forgemeta Name: python-xml2rfc Version: %{version0} Release: %autorelease Summary: Convert IETF RFC XML into txt format License: BSD-3-Clause URL: %{forgeurl} VCS: git:%{forgeurl}.git Source: %{forgesource} BuildArch: noarch BuildRequires: python3-devel BuildRequires: google-noto-fonts-all BuildRequires: google-roboto-mono-fonts # test dependencies BuildRequires: harfbuzz-devel BuildRequires: groff BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: make BuildRequires: pango-devel BuildRequires: python3dist(brotli) BuildRequires: python3dist(certifi) BuildRequires: python3dist(cffi) BuildRequires: python3dist(decorator) # Not packaged in Fedora BuildRequires: python3dist(dict2xml) BuildRequires: python3dist(python-fontconfig) BuildRequires: python3dist(html2text) BuildRequires: python3dist(pyflakes) BuildRequires: python3dist(pypdf) BuildRequires: python3dist(tox) BuildRequires: python3dist(tox-current-env) Requires: google-noto-sans-fonts Requires: google-noto-sans-math-fonts Requires: google-roboto-mono-fonts %global _description %{expand: The IETF uses a specific format for the standards and other documents it publishes as RFCs, and for the draft documents which are produced when developing documents for publications. There exists a number of different tools to facilitate the formatting of drafts and RFCs according to the existing rules, and this tool, xml2rfc, is one of them. It takes as input an xml file that contains the text and meta-information about author names etc., and transforms it into suitably formatted output. The input xml file should follow the grammars in RFC7749 (for v2 documents) or RFC7991 (for v3 documents). Note that the grammar for v3 is still being refined, and changes will eventually be captured in the bis draft for 7991. Changes not yet captured can be seen in the xml2rfc source v3.rng, or in the documentation xml2rfc produces with its --doc flag. xml2rfc provides a variety of output formats. See the command line help for a full list of formats. It also provides conversion from v2 to v3, and can run the preptool on its input.} %description %_description %package -n python3-xml2rfc Summary: %{summary} %description -n python3-xml2rfc %_description %pyproject_extras_subpkg -n python3-xml2rfc pdf %prep %forgeautosetup # Relax weasyprint requirements sed -i 's/weasyprint==65.0/weasyprint>=64.0/g' pyproject.toml # Do not attempt to install dependencies when testing sed -i '/python3 -m pip install . --quiet/d' Makefile # Expected failure due to network access # https://github.com/ietf-tools/xml2rfc/issues/1255 sed -i 's/@unittest.skipIf(sys.platform.startswith("win"), "Test skipped on Windows OS")/@unittest.skip("Needs network")/g' \ test.py %generate_buildrequires %pyproject_buildrequires -x pdf %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l xml2rfc %check %pyproject_check_import -t %py3_test_envvars make test %files -n python3-xml2rfc -f %{pyproject_files} %{_bindir}/xml2rfc %changelog %autochangelog