diff --git a/mkdocstrings_python-1.18.2.tar.gz b/mkdocstrings_python-1.18.2.tar.gz deleted file mode 100644 index a1b1067e5461a21b182d5e9f51be19d2e7eb5809..0000000000000000000000000000000000000000 Binary files a/mkdocstrings_python-1.18.2.tar.gz and /dev/null differ diff --git a/mkdocstrings_python-1.19.0.tar.gz b/mkdocstrings_python-1.19.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..dc9dd81fcb5f28de4565578893b63c1d9e0d92b5 Binary files /dev/null and b/mkdocstrings_python-1.19.0.tar.gz differ diff --git a/python-mkdocstrings-python.spec b/python-mkdocstrings-python.spec index 42e2d2027c839356a8a53cadb4719b626f736c64..9e8524e1d077e2d722a42b86482846e3823392eb 100644 --- a/python-mkdocstrings-python.spec +++ b/python-mkdocstrings-python.spec @@ -2,14 +2,15 @@ %global pypi_name mkdocstrings-python %global source_name mkdocstrings_python +%undefine _python_dist_allow_version_zero Name: python-%{pypi_name} -Version: 1.18.2 +Version: 1.19.0 Release: 1 Summary: A Python handler for mkdocstrings.The Python handler uses Griffe to collect documentation from Python source code. License: ISC URL: https://github.com/mkdocstrings/python -Source0: %{url}/archive/%{version}/%{source_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/m/mkdocstrings_python/mkdocstrings_python-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel @@ -20,6 +21,8 @@ BuildRequires: python3-hatchling BuildRequires: python3-virtualenv BuildRequires: python3-poetry-core BuildRequires: python3-pdm-backend +BuildRequires: python3-certifi +BuildRequires: python3-build %description A Python handler for mkdocstrings.The Python handler uses Griffe to collect documentation from Python source code. @@ -33,10 +36,28 @@ A Python handler for mkdocstrings.The Python handler uses Griffe to collect docu %prep %autosetup -p1 -n mkdocstrings_python-%{version} +# 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 +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_build %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 %files -n python3-%{pypi_name} @@ -46,6 +67,10 @@ A Python handler for mkdocstrings.The Python handler uses Griffe to collect docu %{python3_sitelib}/mkdocstrings_handlers %changelog +* Fri Nov 21 2025 zhao6777 - 1.19.0-1 +- Update to 1.19.0 +- Add python3-certifi to BuildRequires (fix SSL certificate file not found error) + * Thu Oct 09 2025 zengliwen - 1.18.2-1 - Update package to version 1.18.2 normalize spaces to underscores when passing object to rendering context using its kind as key