diff --git a/python-xml2rfc.spec b/python-xml2rfc.spec index 3358483b199db7c2ec0075084cb5f29dee81a069..16a24284b80bb87d2260ca1ddf686974d55ee73c 100644 --- a/python-xml2rfc.spec +++ b/python-xml2rfc.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-xml2rfc -Version: 3.0.0 +Version: 3.31.0 Release: 1 Summary: Xml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies. License: BSD-3-Clause URL: https://tools.ietf.org/tools/xml2rfc/trac/ -Source0: https://files.pythonhosted.org/packages/1a/6a/8fd3e8acd01518f04b33152f1bdf8d02d26d89dc01c3ba19c15ad7dbab53/xml2rfc-3.0.0.tar.gz +Source0: https://files.pythonhosted.org/packages/source/x/xml2rfc/xml2rfc-%{version}.tar.gz BuildArch: noarch @@ -24,13 +25,18 @@ Changes not yet captured can be seen in the xml2rfc source `v3.rng`.\ 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. +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description %_description %package -n python3-xml2rfc Summary: Xml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies. Provides: python-xml2rfc -BuildRequires: python3-devel -BuildRequires: python3-setuptools %description -n python3-xml2rfc %_description %package help @@ -41,11 +47,29 @@ Provides: python3-xml2rfc-doc %prep %autosetup -n xml2rfc-3.0.0 +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi + %build -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build %install -%py3_install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -79,5 +103,8 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 3.31.0-1 +- Update package to version 3.31.0 + * Wed Sep 02 2020 Python_Bot - Package Spec generated diff --git a/xml2rfc-3.0.0.tar.gz b/xml2rfc-3.0.0.tar.gz deleted file mode 100644 index 2ede9ca87bbed699d75f89cb084eebf5fc69f589..0000000000000000000000000000000000000000 Binary files a/xml2rfc-3.0.0.tar.gz and /dev/null differ diff --git a/xml2rfc-3.31.0.tar.gz b/xml2rfc-3.31.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9ea5080d06f264b2c07323e73c9e27ae0b154ba6 Binary files /dev/null and b/xml2rfc-3.31.0.tar.gz differ