Name: pysubnettree Version: 0.38.1 Release: %autorelease Summary: Python Module for CIDR Lookups License: BSD-3-Clause-LBNL URL: https://github.com/zeek/pysubnettree Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # btest config file for RPM build environment Source1: btest.cfg BuildRequires: python3-devel BuildRequires: gcc-c++ BuildRequires: zeek-btest %description The PySubnetTree package provides a Python data structure SubnetTree which maps subnets given in CIDR notation (incl. corresponding IPv6 versions) to Python objects. Lookups are performed by longest-prefix matching. %package -n python3-pysubnettree Summary: %{summary} %description -n python3-pysubnettree %{summary} %prep %autosetup -p1 -n pysubnettree-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %check %py3_check_import SubnetTree cd testing cp %{SOURCE1} btest.cfg PYTHONPATH="%{buildroot}%{python3_sitearch}:$PWD/Scripts" btest -c btest.cfg -d %files -n python3-pysubnettree %doc CHANGES README %license COPYING %pycached %{python3_sitearch}/SubnetTree.py %{python3_sitearch}/_SubnetTree.cpython*.so %{python3_sitearch}/pysubnettree-%{version}.dist-info/* %changelog %autochangelog