From c867cb7861fed25910e600aa69df443c28c3cf29 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Apr 17 2020 06:44:44 +0000 Subject: Initial commit (#1819968). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5fe6e45 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/cppy-1.1.0.tar.gz diff --git a/python-cppy.spec b/python-cppy.spec new file mode 100644 index 0000000..7902ab2 --- /dev/null +++ b/python-cppy.spec @@ -0,0 +1,83 @@ +%global srcname cppy + +Name: python-%{srcname} +Version: 1.1.0 +Release: 1%{?dist} +Summary: C++ headers for C extension development + +License: BSD +URL: https://github.com/nucleic/cppy +Source0: https://files.pythonhosted.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(pytest) + +%description +A small C++ header library which makes it easier to write Python extension +modules. The primary feature is a PyObject smart pointer which automatically +handles reference counting and provides convenience methods for performing +common object operations. + + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +A small C++ header library which makes it easier to write Python extension +modules. The primary feature is a PyObject smart pointer which automatically +handles reference counting and provides convenience methods for performing +common object operations. + + +%package -n python-%{srcname}-doc +Summary: cppy documentation + +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinx-rtd-theme) + +%description -n python-%{srcname}-doc +Documentation for cppy + + +%prep +%autosetup -n %{srcname}-%{version} + +# Remove bundled egg-info +rm -rf %{srcname}.egg-info + + +%build +%py3_build + +# generate html docs +PYTHONPATH=${PWD} sphinx-build-3 docs/source html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + + +%install +%py3_install + + +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} \ + pytest-3 tests + + +%files -n python3-%{srcname} +%doc README.rst +%license LICENSE +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info + +%files -n python-%{srcname}-doc +%doc html +%license LICENSE + + +%changelog +* Wed Apr 01 2020 Elliott Sales de Andrade - 1.1.0-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..a015ab4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (cppy-1.1.0.tar.gz) = 9ef4db580c963219a111ab10bc263cdf2c4386e27fce8ffe5c785fc7e8f6c6b60cb23ce918959c6f17194fd6977cc65fa64d167a0b62e6cff0cf662154bc734c