Blame python-cppy.spec

c867cb7
%global srcname cppy
c867cb7
c867cb7
Name:           python-%{srcname}
c867cb7
Version:        1.1.0
b8bddd1
Release:        2%{?dist}
c867cb7
Summary:        C++ headers for C extension development
c867cb7
c867cb7
License:        BSD
c867cb7
URL:            https://github.com/nucleic/cppy
949b3e5
Source0:        %pypi_source
949b3e5
c867cb7
BuildArch:      noarch
c867cb7
c867cb7
BuildRequires:  python3-devel
c867cb7
BuildRequires:  python3dist(setuptools)
c867cb7
BuildRequires:  python3dist(pytest)
c867cb7
c867cb7
%description
c867cb7
A small C++ header library which makes it easier to write Python extension
c867cb7
modules. The primary feature is a PyObject smart pointer which automatically
c867cb7
handles reference counting and provides convenience methods for performing
c867cb7
common object operations.
c867cb7
c867cb7
c867cb7
%package -n     python3-%{srcname}
c867cb7
Summary:        %{summary}
c867cb7
%{?python_provide:%python_provide python3-%{srcname}}
c867cb7
c867cb7
%description -n python3-%{srcname}
c867cb7
A small C++ header library which makes it easier to write Python extension
c867cb7
modules. The primary feature is a PyObject smart pointer which automatically
c867cb7
handles reference counting and provides convenience methods for performing
c867cb7
common object operations.
c867cb7
c867cb7
c867cb7
%package -n python-%{srcname}-doc
c867cb7
Summary:        cppy documentation
c867cb7
c867cb7
BuildRequires:  python3dist(sphinx)
c867cb7
BuildRequires:  python3dist(sphinx-rtd-theme)
c867cb7
c867cb7
%description -n python-%{srcname}-doc
c867cb7
Documentation for cppy
c867cb7
c867cb7
c867cb7
%prep
c867cb7
%autosetup -n %{srcname}-%{version}
c867cb7
c867cb7
# Remove bundled egg-info
c867cb7
rm -rf %{srcname}.egg-info
c867cb7
c867cb7
c867cb7
%build
c867cb7
%py3_build
c867cb7
c867cb7
# generate html docs
c867cb7
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
c867cb7
# remove the sphinx-build leftovers
c867cb7
rm -rf html/.{doctrees,buildinfo}
c867cb7
c867cb7
c867cb7
%install
c867cb7
%py3_install
c867cb7
c867cb7
c867cb7
%check
c867cb7
PYTHONPATH=%{buildroot}%{python3_sitelib} \
c867cb7
    pytest-3 tests
c867cb7
c867cb7
c867cb7
%files -n python3-%{srcname}
c867cb7
%doc README.rst
c867cb7
%license LICENSE
c867cb7
%{python3_sitelib}/%{srcname}
949b3e5
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
c867cb7
c867cb7
%files -n python-%{srcname}-doc
c867cb7
%doc html
c867cb7
%license LICENSE
c867cb7
c867cb7
c867cb7
%changelog
b8bddd1
* Mon May 25 2020 Miro HronĨok <mhroncok@redhat.com> - 1.1.0-2
b8bddd1
- Rebuilt for Python 3.9
b8bddd1
c867cb7
* Wed Apr 01 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.1.0-1
c867cb7
- Initial package.