|
|
## START: Set by rpmautospec
|
|
|
## (rpmautospec version 0.7.2)
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
release_number = 1;
|
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
|
print(release_number + base_release_number - 1);
|
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
|
## END: Set by rpmautospec
|
|
|
|
|
|
# Sphinx-generated HTML documentation is not suitable for packaging; see
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
|
|
|
#
|
|
|
# We can generate PDF documentation as a substitute. Since the .rst sources are
|
|
|
# complete (nothing like sphinx.ext.autodoc is used) and rather readable,
|
|
|
# however, we package them directly to reduce the build-time dependencies and
|
|
|
# produce a smaller package.
|
|
|
%bcond doc_pdf 0
|
|
|
|
|
|
%global commit d20d7f815bb5504c806d4eb1fd43192f074fe268
|
|
|
%global snapdate 20240923
|
|
|
|
|
|
Name: pythoncapi-compat
|
|
|
Summary: Python C API compatibility
|
|
|
# Upstream has never versioned this project.
|
|
|
Version: 0^%{snapdate}git%{sub %{commit} 1 7}
|
|
|
Release: %autorelease
|
|
|
|
|
|
License: 0BSD
|
|
|
URL: https://github.com/python/%{name}
|
|
|
Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz
|
|
|
# Man page hand-written for Fedora in groff_man(7) format based on --help
|
|
|
Source1: upgrade_pythoncapi.py.1
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
BuildRequires: gcc-c++
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
%if %{with doc_pdf}
|
|
|
BuildRequires: make
|
|
|
BuildRequires: python3dist(sphinx)
|
|
|
BuildRequires: python3-sphinx-latex
|
|
|
BuildRequires: latexmk
|
|
|
%endif
|
|
|
|
|
|
# As a header-only library package (with an additional command-line tool
|
|
|
# subpackage), the base package is arched so that it is compiled and tested on
|
|
|
# all architectures; however, no compiled code is installed, and there are no
|
|
|
# debugging symbols.
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
%global common_description %{expand:
|
|
|
The pythoncapi-compat project can be used to write a C or C++ extension
|
|
|
supporting a wide range of Python versions with a single code base. It is made
|
|
|
of the pythoncapi_compat.h header file and the upgrade_pythoncapi.py script.}
|
|
|
|
|
|
%description %{common_description}
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
Summary: %{summary}
|
|
|
|
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries
|
|
|
Provides: %{name}-static = %{version}-%{release}
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
%description devel %{common_description}
|
|
|
|
|
|
This package provides the compatibility header library pythoncapi_compat.h.
|
|
|
|
|
|
|
|
|
%package tools
|
|
|
Summary: %{summary}
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
%description tools %{common_description}
|
|
|
|
|
|
This package provides the command-line tool upgrade_pythoncapi.py.
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
%description doc %{common_description}
|
|
|
|
|
|
|
|
|
%prep
|
|
|
%autosetup -n %{name}-%{commit}
|
|
|
# Compiling with -Werror makes sense for upstream CI, but is probably too
|
|
|
# brittle for downstream builds.
|
|
|
sed -r -i "s/^([[:blank:]]*)(['\"]-Werror)/\1# \2/" tests/setup.py
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
pushd tests >/dev/null
|
|
|
%pyproject_buildrequires
|
|
|
popd >/dev/null
|
|
|
|
|
|
|
|
|
%build
|
|
|
pushd tests >/dev/null
|
|
|
%pyproject_wheel
|
|
|
popd >/dev/null
|
|
|
|
|
|
%if %{with doc_pdf}
|
|
|
%make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}'
|
|
|
%make_build -C docs/build/latex LATEXMKOPTS='-quiet'
|
|
|
%endif
|
|
|
|
|
|
|
|
|
%install
|
|
|
install -t '%{buildroot}%{_includedir}' -D -p -m 0644 pythoncapi_compat.h
|
|
|
install -D -p -t '%{buildroot}%{_bindir}' upgrade_pythoncapi.py
|
|
|
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}'
|
|
|
%py3_shebang_fix %{buildroot}%{_bindir}/upgrade_pythoncapi.py
|
|
|
|
|
|
|
|
|
%check
|
|
|
%{py3_test_envvars} %{python3} runtests.py --current --verbose
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
%license COPYING
|
|
|
|
|
|
%{_includedir}/pythoncapi_compat.h
|
|
|
|
|
|
|
|
|
%files tools
|
|
|
%license COPYING
|
|
|
|
|
|
%{_bindir}/upgrade_pythoncapi.py
|
|
|
%{_mandir}/man1/upgrade_pythoncapi.py.1*
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
%license COPYING
|
|
|
|
|
|
# This primarily documents the script rather than the header.
|
|
|
%doc README.rst
|
|
|
%if %{with doc_pdf}
|
|
|
# This is a source for the PDF documentation, but is useful as a standalone
|
|
|
# documentation file as well.
|
|
|
%doc docs/changelog.rst
|
|
|
%doc docs/build/latex/pythoncapi_compat.pdf
|
|
|
%else
|
|
|
%doc docs/*.rst
|
|
|
%endif
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
* Sun Jan 05 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 0^20240923gitd20d7f8-1
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
## START: Generated by rpmautospec
|
|
|
* Tue Sep 24 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240923gitd20d7f8-1
|
|
|
- Update to 0^20240923gitd20d7f8
|
|
|
- Fix incorrect use of assignment in place of an equality test.
|
|
|
|
|
|
* Mon Aug 26 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240826git2d18aec-1
|
|
|
- Update to 0^20240826git2d18aec
|
|
|
- Add critical section API
|
|
|
|
|
|
* Tue Aug 06 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240806git39e2663-1
|
|
|
- Update to 0^20240806git39e2663
|
|
|
- Add `static inline` to `PyUnicodeWriter_WriteStr()` and
|
|
|
`PyUnicodeWriter_WriteRepr()`.
|
|
|
|
|
|
* Thu Jul 18 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240718git4094c64-1
|
|
|
- Update to 0^20240718git4094c64
|
|
|
- Add PyUnicodeWriter API
|
|
|
|
|
|
* Mon Jul 08 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240708gitea1f7f6-1
|
|
|
- Update to 0^20240708gitea1f7f6
|
|
|
- `PyLong_GetSign` will be added in 3.14.0a0
|
|
|
|
|
|
* Wed Jun 05 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240603git18d1df7-1
|
|
|
- Update to 0^20240603git18d1df7: Add `PyLong_GetSign()`.
|
|
|
|
|
|
* Thu May 23 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240522git9d14fad-1
|
|
|
- Update to 0^20240522git9d14fad: Fix test_frame() on Python 3.13 beta 1
|
|
|
|
|
|
* Mon Apr 08 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240408gitccea884-1
|
|
|
- Update to 0^20240408git01341ac: Fix PyDict_SetDefaultRef() definition
|
|
|
|
|
|
* Thu Apr 04 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240404git68aad45-1
|
|
|
- Update to 0^20240404git68aad45: Fix Py_GetConstant() for Python 3.13.0a5+
|
|
|
|
|
|
* Fri Mar 29 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240329gitf667991-1
|
|
|
- Update to 0^20240329gitf667991: Add `PyList_GetItemRef()`
|
|
|
|
|
|
* Thu Mar 28 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240328gitd16872a-1
|
|
|
- Update to 0^20240328gitd16872a
|
|
|
- Fix test_unicode()
|
|
|
|
|
|
* Thu Mar 28 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240321gitb16ff9a-3
|
|
|
- Update to 0^20240328gitd16872a
|
|
|
- Fix test_unicode()
|
|
|
|
|
|
* Thu Mar 28 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240321gitb16ff9a-2
|
|
|
- Add an rpmlintrc file
|
|
|
|
|
|
* Thu Mar 21 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240321gitb16ff9a-1
|
|
|
- Update to 0^20240321gitb16ff9a
|
|
|
- Add `Py_GetConstant()` and `Py_GetConstantBorrowed()`
|
|
|
- Update `_Py_NULL` for C23
|
|
|
|
|
|
* Sat Mar 09 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240309git7539c7f-1
|
|
|
- Update to 0^20240309git7539c7f
|
|
|
- Add hash constants: `PyHASH_BITS`, `PyHASH_IMAG`, `PyHASH_INF`,
|
|
|
`PyHASH_MODULUS`
|
|
|
|
|
|
* Tue Feb 20 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20240220git52486a9-1
|
|
|
- Update to 0^20240220git52486a9
|
|
|
- Add PyTime API: `PyTime_t` type, `PyTime_MIN` and `PyTime_MAX` constants,
|
|
|
`PyTime_AsSecondsDouble()`, `PyTime_Monotonic()`, `PyTime_PerfCounter()`,
|
|
|
and `PyTime_Time()`
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0^20231214gitdeb6f40-3
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0^20231214gitdeb6f40-2
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
* Fri Dec 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231214gitdeb6f40-1
|
|
|
- Update to 0^20231214gitdeb6f40
|
|
|
- API: document not supported functions
|
|
|
- Add Py_HashPointer()
|
|
|
- Update tests
|
|
|
|
|
|
* Fri Dec 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231114git5bf2fb2-4
|
|
|
- Ask runtests.py not to look for “other” Python interpreters
|
|
|
|
|
|
* Fri Dec 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231114git5bf2fb2-3
|
|
|
- Use %%py3_test_envvars when running tests
|
|
|
|
|
|
* Fri Dec 15 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231114git5bf2fb2-2
|
|
|
- Run tests verbosely
|
|
|
|
|
|
* Tue Nov 14 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231114git5bf2fb2-1
|
|
|
- Update to 0^20231114git5bf2fb2
|
|
|
- Add PyDict_Pop() and PyDict_PopString() functions
|
|
|
- Add PyList_Extend()
|
|
|
- Test Python 3.13
|
|
|
|
|
|
* Thu Oct 12 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231012git99ab0d3-1
|
|
|
- Update to 0^20231012git99ab0d3
|
|
|
- Add PyUnicode_EqualToUTF8() and PyUnicode_EqualToUTF8AndSize() functions
|
|
|
|
|
|
* Wed Oct 04 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231003gitf78c780-1
|
|
|
- Update to 0^20231003gitf78c780
|
|
|
- Add PyThreadState_GetUnchecked()
|
|
|
|
|
|
* Tue Oct 03 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20231003gita594354-1
|
|
|
- Update to 0^20231003gita594354
|
|
|
- Add PyObject_VisitManagedDict() and PyObject_ClearManagedDict()
|
|
|
|
|
|
* Fri Sep 29 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230929git671fb69-1
|
|
|
- Update to 0^20230929git671fb69
|
|
|
- Adds PyObject_HasAttrWithError() and PyObject_HasAttrStringWithError()
|
|
|
functions.
|
|
|
- Fixes PyObject_GetOptionalAttrString(): set result to NULL on error.
|
|
|
|
|
|
* Tue Sep 19 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230919git309c56d-1
|
|
|
- Update to 0^20230919git309c56d
|
|
|
- Add PyMapping_HasKeyWithError() function
|
|
|
|
|
|
* Thu Aug 24 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230824git8109811-1
|
|
|
- Update to 0^20230824git8109811
|
|
|
- Adds PyDict_ContainsString() and PyLong_AsInt() functions
|
|
|
|
|
|
* Wed Aug 23 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230823git5b5b547-1
|
|
|
- Update to 0^20230823git5b5b547 (Fix setup.py when CC contains -std=c11
|
|
|
option)
|
|
|
|
|
|
* Fri Aug 18 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230818git1bb4e16-1
|
|
|
- Update to 0^20230818git1bb4e16 (Add `Py_IsFinalizing()` function.)
|
|
|
|
|
|
* Wed Aug 16 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230816git91e323f-1
|
|
|
- Update to 0^20230816git91e323f
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0^20230710git1911dd4-2
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
* Tue Jul 11 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230710git1911dd4-1
|
|
|
- Update to 0^20230710git1911dd4
|
|
|
|
|
|
* Thu Jun 22 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230621git6c49cf3-1
|
|
|
- Update to 0^20230621git6c49cf3
|
|
|
|
|
|
* Tue Jun 20 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230601gite266312-2
|
|
|
- Use new (rpm 4.17.1+) bcond style
|
|
|
|
|
|
* Thu Jun 01 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20230601gite266312-1
|
|
|
- Update to 0^20230601gite266312
|
|
|
|
|
|
* Fri Mar 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20221127git3779f12-5
|
|
|
- Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0^20221127git3779f12-4
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
* Tue Jan 10 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20221127git3779f12-3
|
|
|
- Do not compile tests with -Werror
|
|
|
|
|
|
* Tue Jan 10 2023 Miro Hrončok <miro@hroncok.cz> - 0^20221127git3779f12-2
|
|
|
- Include the default Python shebang flags in
|
|
|
/usr/bin/upgrade_pythoncapi.py
|
|
|
|
|
|
* Mon Jan 09 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0^20221127git3779f12-1
|
|
|
- Initial import (close RHBZ#2154546)
|
|
|
## END: Generated by rpmautospec
|