diff --git a/fastavro-1.12.0.tar.gz b/fastavro-1.12.0.tar.gz deleted file mode 100644 index 7bcb648d1a7033926ca9b51ef94a8ce32823aeae..0000000000000000000000000000000000000000 Binary files a/fastavro-1.12.0.tar.gz and /dev/null differ diff --git a/fastavro-1.12.1.tar.gz b/fastavro-1.12.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c0da3607f0c27f94f5df2d92d2b51722846ed9ff Binary files /dev/null and b/fastavro-1.12.1.tar.gz differ diff --git a/python-fastavro.spec b/python-fastavro.spec index ab274904bb9933c4adaebb20eb7accf3bfe743cd..9268a3a05f5d0ed28731de0c52b0246d388b473a 100644 --- a/python-fastavro.spec +++ b/python-fastavro.spec @@ -1,11 +1,21 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-fastavro -Version: 1.12.0 +Version: 1.12.1 Release: 1 Summary: Fast read/write of AVRO files License: MIT URL: https://github.com/fastavro/fastavro -Source0: %{pypi_source fastavro} +Source0: https://files.pythonhosted.org/packages/source/f/fastavro/fastavro-%{version}.tar.gz + +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-cffi +BuildRequires: gcc %description Fast Avro for Python @@ -13,10 +23,6 @@ Fast Avro for Python %package -n python3-fastavro Summary: Fast read/write of AVRO files Provides: python-fastavro = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-cffi -BuildRequires: gcc %description -n python3-fastavro The `fastavro` library was written to offer performance comparable to the Java library. With regular CPython, `fastavro` uses C extensions which allow it to @@ -33,11 +39,29 @@ Development documents and examples for fastavro %prep %autosetup -n fastavro-%{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 -%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 @@ -66,6 +90,9 @@ mv %{buildroot}/filelist.lst . %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 1.12.1-1 +- Update package to version 1.12.1 + * Fri Aug 08 2025 wangkai <13474090681@163.com> - 1.12.0-1 - Update package to version 1.12.0