diff --git a/cppy-1.2.1.tar.gz b/cppy-1.2.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..71334aab1bf4693226de3fe76df065c021a9dafd Binary files /dev/null and b/cppy-1.2.1.tar.gz differ diff --git a/python-cppy.spec b/python-cppy.spec new file mode 100644 index 0000000000000000000000000000000000000000..5406a2b0428b22517698c14d059c9303836ac5e0 --- /dev/null +++ b/python-cppy.spec @@ -0,0 +1,84 @@ +%define anolis_release 1 +%global srcname cppy +%bcond_with doc + +Name: python-%{srcname} +Version: 1.2.1 +Release: %{anolis_release}%{?dist} +Summary: C++ headers for C extension development + +License: BSD +URL: https://github.com/nucleic/cppy +Source0: %pypi_source + +BuildArch: noarch + +BuildRequires: python3-devel +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} + +%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 python3-%{srcname}-doc +Summary: cppy documentation +Requires: python3-%{srcname} = %{version}-%{release} + +%if %{with doc} +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinx-rtd-theme) +%endif + +%description -n python3-%{srcname}-doc +Documentation for cppy + + +%prep +%autosetup -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%build +%pyproject_wheel + +%if %{with doc} +# generate html docs +PYTHONPATH="%{pyproject_build_lib}" sphinx-build-3 docs/source html +%endif +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + + +%install +%pyproject_install +%pyproject_save_files %{srcname} + +%check +%{pytest} tests + +%files -n python3-%{srcname} -f %{pyproject_files} +%license LICENSE + +%files -n python3-%{srcname}-doc +%if %{with doc} +%doc html +%endif +%doc README.rst + +%changelog +* Tue Mar 28 2023 happy_orange - 1.2.1-1 +- init package from upstream