Blame SPECS/py3c.spec

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