diff --git a/atpublic-6.0.2.tar.gz b/atpublic-6.0.2.tar.gz deleted file mode 100644 index b076cd4d6560dc04434f8f92a6b9c7571e56f0f4..0000000000000000000000000000000000000000 Binary files a/atpublic-6.0.2.tar.gz and /dev/null differ diff --git a/atpublic-7.0.0.tar.gz b/atpublic-7.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f5d32d01db96da5126859b7a84456699106654c6 Binary files /dev/null and b/atpublic-7.0.0.tar.gz differ diff --git a/python-atpublic.spec b/python-atpublic.spec index 66e008ef7f921625565d1e2020cfda924f4eedfe..191efeeeed880f538ab49972a268613cdd6074b7 100644 --- a/python-atpublic.spec +++ b/python-atpublic.spec @@ -1,6 +1,7 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-atpublic -Version: 6.0.2 +Version: 7.0.0 Release: 1 Summary: public -- @public for populating __all__ License: Apache-2.0 @@ -14,6 +15,10 @@ BuildRequires: python3-pdm-pep517 BuildRequires: python3-pdm-backend BuildRequires: python3-hatchling +BuildRequires: python3-build +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description This is a very simple decorator and function which populates a module's __all__ and optionally the module globals. @@ -24,8 +29,6 @@ proposed that the C implementation be added to builtins_ for Python 3.6. %package -n python3-atpublic Summary: public -- @public for populating __all__ Provides: python-atpublic = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools %description -n python3-atpublic This is a very simple decorator and function which populates a module's __all__ and optionally the module globals. @@ -46,10 +49,28 @@ proposed that the C implementation be added to builtins_ for Python 3.6. %prep %autosetup -n atpublic-%{version} -p1 +# 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 install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -63,6 +84,9 @@ if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi %{_docdir}/* %changelog +* Mon Dec 01 2025 zhangzeyang0718 - 7.0.0-1 +- Update package to version 7.0.0 + * Wed Oct 15 2025 lilu - 6.0.2-1 - update to 6.0.2: * Documentation improvements and CI updates.