|
|
e6f5c70 |
# A header-only library has no debuginfo
|
|
|
e6f5c70 |
%global debug_package %{nil}
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
Name: py3c
|
|
|
44882d7 |
Version: 1.1
|
|
|
7959489 |
Release: 2%{?dist}
|
|
|
e6f5c70 |
Summary: Guide and compatibility macros for porting extensions to Python 3
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
# Licences differ for subpackages
|
|
|
e6f5c70 |
License: MIT and CC-BY-SA
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
URL: http://py3c.readthedocs.io/
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
Source0: https://github.com/encukou/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
e6f5c70 |
|
|
|
f496414 |
BuildRequires: gcc
|
|
|
e6f5c70 |
BuildRequires: python2-devel
|
|
|
e6f5c70 |
BuildRequires: python3-devel
|
|
|
e6f5c70 |
BuildRequires: python3-sphinx
|
|
|
e6f5c70 |
BuildRequires: python3-sphinx_rtd_theme
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%description
|
|
|
e6f5c70 |
py3c helps you port C extensions to Python 3.
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
It provides a detailed guide, and a set of macros to make porting easy
|
|
|
e6f5c70 |
and reduce boilerplate.
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%package devel
|
|
|
e6f5c70 |
License: MIT
|
|
|
e6f5c70 |
Summary: Header files for py3c
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
# Do not *require* python?-devel, because some projects can drop support
|
|
|
e6f5c70 |
# for one of the Python versions, but still use the compat macros.
|
|
|
e6f5c70 |
Suggests: python2-devel
|
|
|
e6f5c70 |
Suggests: python3-devel
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
# A header-only library counts as static
|
|
|
e6f5c70 |
Provides: %{name}-static = %{version}-%{release}
|
|
|
e6f5c70 |
%{?_isa:Provides: %{name}-static%{?_isa} = %{version}-%{release}}
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%description devel
|
|
|
e6f5c70 |
%{name}-devel is only required for building software that uses py3c.
|
|
|
e6f5c70 |
Because py3c is a header-only library, there is no matching run-time package.
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%package doc
|
|
|
e6f5c70 |
BuildArch: noarch
|
|
|
e6f5c70 |
License: CC-BY-SA
|
|
|
e6f5c70 |
Summary: Guide for porting C extensions to Python 3
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
Requires: python3-sphinx_rtd_theme
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%description doc
|
|
|
e6f5c70 |
Guide for porting CPython extensions from Python 2 to Python 3, using the
|
|
|
e6f5c70 |
py3c macros.
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%prep
|
|
|
e6f5c70 |
%setup -q
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%build
|
|
|
e6f5c70 |
make %{?_smp_mflags} py3c.pc includedir=%{_includedir}
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
make %{?_smp_mflags} doc SPHINXBUILD=sphinx-build-3
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
# unbundle fonts provided by the theme package
|
|
|
e6f5c70 |
bundledfonts=doc/build/html/_static/fonts
|
|
|
e6f5c70 |
themefonts=%{python3_sitelib}/sphinx_rtd_theme/static/fonts
|
|
|
e6f5c70 |
diff -r $bundledfonts $themefonts
|
|
|
e6f5c70 |
rm -rv $bundledfonts
|
|
|
e6f5c70 |
ln -s $themefonts $bundledfonts
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%check
|
|
|
e6f5c70 |
export CFLAGS="%{optflags}"
|
|
|
61ce694 |
make %{?_smp_mflags} test-python2
|
|
|
e6f5c70 |
make %{?_smp_mflags} test-python3
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%install
|
|
|
e6f5c70 |
make install prefix=%{buildroot}%{_prefix} includedir=%{buildroot}%{_includedir}
|
|
|
e6f5c70 |
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
|
e6f5c70 |
cp -rv doc/build/html/* %{buildroot}%{_pkgdocdir}
|
|
|
e6f5c70 |
|
|
|
61ce694 |
# Strip buildroot name from the pkgconfig file
|
|
|
61ce694 |
sed --in-place -e's!%{buildroot}!!' %{buildroot}%{_datadir}/pkgconfig/py3c.pc
|
|
|
61ce694 |
|
|
|
e6f5c70 |
%files devel
|
|
|
e6f5c70 |
%license LICENSE.MIT
|
|
|
e6f5c70 |
%doc README.rst
|
|
|
e6f5c70 |
%{_includedir}/py3c.h
|
|
|
e6f5c70 |
%{_includedir}/py3c/
|
|
|
e6f5c70 |
%{_datadir}/pkgconfig/py3c.pc
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%files doc
|
|
|
e6f5c70 |
%license doc/LICENSE.CC-BY-SA-3.0
|
|
|
e6f5c70 |
%doc %{_pkgdocdir}/
|
|
|
e6f5c70 |
|
|
|
e6f5c70 |
%changelog
|
|
|
7959489 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
|
|
|
7959489 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
7959489 |
|
|
|
44882d7 |
* Fri Oct 04 2019 Petr Viktorin <pviktori@redhat.com> - 1.1-1
|
|
|
44882d7 |
- Update to 1.1 to fix Python 3.8 compatibility in tests
|
|
|
44882d7 |
https://bugzilla.redhat.com/show_bug.cgi?id=1758446
|
|
|
44882d7 |
|
|
|
9fb6408 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-6
|
|
|
9fb6408 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
9fb6408 |
|
|
|
e06648e |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-5
|
|
|
e06648e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
e06648e |
|
|
|
62a9307 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4
|
|
|
62a9307 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
62a9307 |
|
|
|
5d747ef |
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 1.0-3
|
|
|
5d747ef |
- Rebuilt for Python 3.7
|
|
|
5d747ef |
|
|
|
f496414 |
* Mon Feb 19 2018 Petr Viktorin <pviktori@redhat.com> - 1.0-2
|
|
|
f496414 |
- Add BuildRequires: gcc
|
|
|
f496414 |
|
|
|
a8e7090 |
* Sun Feb 11 2018 Petr Viktorin <pviktorin@redhat.com> - 1.0-1
|
|
|
61ce694 |
- Update to 1.0 (adds Py_UNREACHABLE, Py_RETURN_RICHCOMPARE, Py_UNUSED)
|
|
|
61ce694 |
- Strip buildroot name from the pkgconfig file
|
|
|
61ce694 |
|
|
|
cbfc386 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-5
|
|
|
cbfc386 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
cbfc386 |
|
|
|
1f0a44b |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-4
|
|
|
1f0a44b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
1f0a44b |
|
|
|
e53dd77 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-3
|
|
|
e53dd77 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
e53dd77 |
|
|
|
e1042fe |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8-2
|
|
|
e1042fe |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
e1042fe |
|
|
|
eaf95c1 |
|
|
|
eaf95c1 |
* Wed Feb 01 2017 Petr Viktorin <pviktorin@redhat.com> - 0.8-1
|
|
|
eaf95c1 |
- Update to 0.8:
|
|
|
eaf95c1 |
- Add backports for PyMem_Raw*
|
|
|
eaf95c1 |
|
|
|
60547db |
* Thu May 19 2016 Petr Viktorin <pviktorin@redhat.com> - 0.7-1
|
|
|
60547db |
- Update to 0.7:
|
|
|
60547db |
- Fix file shim tests on big endian architectures
|
|
|
60547db |
(bug in the test suite only, does not affect behavior)
|
|
|
60547db |
|
|
|
e6f5c70 |
* Thu May 19 2016 Petr Viktorin <pviktorin@redhat.com> - 0.6-2
|
|
|
e6f5c70 |
- Initial package
|