diff --git a/python-restfly.spec b/python-restfly.spec index 9830f348affe8fbf00a7fca3c64634b3eb0c22e7..8e8611cfe89b77ea2d0561568f53a392f899dde3 100644 --- a/python-restfly.spec +++ b/python-restfly.spec @@ -1,11 +1,12 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-restfly -Version: 1.3.5 +Version: 1.5.1 Release: 1 Summary: A simple framework for building RESTful API libraries License: MIT URL: https://github.com/stevemcgrath/restfly -Source0: https://files.pythonhosted.org/packages/3b/05/f7bc7fca981fb2fecb63b75fabb8c090c933cdd7b0dd198ef3f0f17d5605/restfly-1.3.5.tar.gz +Source0: https://files.pythonhosted.org/packages/source/r/restfly/restfly-%{version}.tar.gz BuildArch: noarch %global _description\ @@ -19,13 +20,18 @@ can also serve as a reference implimentation of the given APIs.\ for more information, please refer to the documentation at \ https://restfly.readthedocs.io +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description %_description %package -n python3-restfly Summary: A simple framework for building RESTful API libraries Provides: python-restfly -BuildRequires: python3-devel -BuildRequires: python3-setuptools %description -n python3-restfly %_description %package help @@ -36,11 +42,29 @@ Provides: python3-restfly-doc %prep %autosetup -n restfly-1.3.5 +# 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 @@ -74,5 +98,8 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 1.5.1-1 +- Update package to version 1.5.1 + * Thu Sep 03 2020 Python_Bot - Package Spec generated diff --git a/restfly-1.3.5.tar.gz b/restfly-1.3.5.tar.gz deleted file mode 100644 index 21dbf37763b26edacea8e2f543018b088019f5d7..0000000000000000000000000000000000000000 Binary files a/restfly-1.3.5.tar.gz and /dev/null differ diff --git a/restfly-1.5.1.tar.gz b/restfly-1.5.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..211d634d8507b65728cd7a37d48608e75d5ffb18 Binary files /dev/null and b/restfly-1.5.1.tar.gz differ