%global pypi_name aiocoap %global pre_release 0.4b3 Name: python-%{pypi_name} Version: 0.4 Release: 0.b3%{?dist} Summary: Python CoAP library License: MIT URL: https://github.com/chrysn/aiocoap Source0: %{url}/archive/%{pre_release}/%{pypi_name}-%{pre_release}.tar.gz BuildArch: noarch %global _description %{expand: The aiocoap package is an implementation of CoAP, the Constrained Application\ Protocol.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(pytest) %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} The aiocoap package is an implementation of CoAP, the Constrained Application Protocol. %package -n python-%{pypi_name}-doc Summary: aiocoap documentation BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-argparse) %description -n python-%{pypi_name}-doc Documentation for aiocoap. %{?python_extras_subpkg:%python_extras_subpkg -n python3-%{pypi_name} -i %{python3_sitelib}/*.egg-info linkheader} %{?python_extras_subpkg:%python_extras_subpkg -n python3-%{pypi_name} -i %{python3_sitelib}/*.egg-info prettyprint} %prep %autosetup -n %{pypi_name}-%{pre_release} rm -rf %{pypi_name}.egg-info sed -i -e '/^#!\//, 1d' aiocoap/cli/common.py %build %py3_build %install %py3_install PYTHONPATH=${PWD} sphinx-build-3 doc html rm -rf html/.{doctrees,buildinfo} %check # There are missing dependencies %pytest -v tests -k "not test_registration" --ignore tests/test_oscore_plugtest.py %files -n python3-%{pypi_name} %license doc/LICENSE.rst LICENSE %doc doc/README.doc README.rst %{_bindir}/aiocoap-* %{python3_sitelib}/%{pypi_name}/ %exclude %{python3_sitelib}/tests %{python3_sitelib}/%{pypi_name}-%{pre_release}-py%{python3_version}.egg-info/ %files -n python-%{pypi_name}-doc %doc html %license doc/LICENSE.rst LICENSE %changelog * Tue Oct 06 2020 Fabian Affolter - 0.4-0.b3 - Update to latest pre-release 0.4b3 * Sun Feb 23 2020 Fabian Affolter - 0.3-1 - Initial package for Fedora