diff --git a/pymdown_extensions-10.17.1.tar.gz b/pymdown_extensions-10.17.1.tar.gz deleted file mode 100644 index 41739d7e6373bb0412353eec4b8727d9931fd98f..0000000000000000000000000000000000000000 Binary files a/pymdown_extensions-10.17.1.tar.gz and /dev/null differ diff --git a/pymdown_extensions-10.17.2.tar.gz b/pymdown_extensions-10.17.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..50d3767e82383fb3ded8369bfd4f64678533a447 Binary files /dev/null and b/pymdown_extensions-10.17.2.tar.gz differ diff --git a/python-pymdown-extensions.spec b/python-pymdown-extensions.spec index 24c9faae0c612a4d23534429dcb689c2a2b9342c..eaa12624eca86001d5a4eb3d6ebdbbd9127c0f28 100644 --- a/python-pymdown-extensions.spec +++ b/python-pymdown-extensions.spec @@ -2,13 +2,14 @@ %global pypi_name pymdown-extensions %global source_name pymdown_extensions +%undefine _python_dist_allow_version_zero Name: python-%{pypi_name} -Version: 10.17.1 +Version: 10.17.2 Release: 1 Summary: Extension pack for Python Markdown. License: MIT URL: https://github.com/facelessuser/pymdown-extensions -Source0: %{pypi_source %{source_name}} +Source0: https://files.pythonhosted.org/packages/source/p/pymdown_extensions/pymdown_extensions-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel @@ -17,6 +18,8 @@ BuildRequires: python3-pip BuildRequires: python3-wheel BuildRequires: python3-hatchling +BuildRequires: python3-build + %description Extension pack for Python Markdown. @@ -31,10 +34,28 @@ Extension pack for Python Markdown. %prep %autosetup -p1 -n %{source_name}-%{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} @@ -44,6 +65,9 @@ Extension pack for Python Markdown. %{python3_sitelib}/pymdown_extensions*.dist-info/ %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 10.17.2-1 +- Update package to version 10.17.2 + * Tue Nov 18 2025 lvwq - 10.17.1-1 - Update to 10.17.1