2018-02-08 14:04:47 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pytricia
|
|
|
|
#
|
2021-03-15 18:44:23 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-02-08 14:04:47 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-06-04 06:55:19 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-02-08 14:04:47 +00:00
|
|
|
#
|
|
|
|
|
2018-02-09 19:54:24 +00:00
|
|
|
|
2018-02-08 14:04:47 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-03-15 18:44:23 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
%define skip_python2 1
|
|
|
|
%endif
|
2018-02-08 14:04:47 +00:00
|
|
|
Name: python-pytricia
|
2020-08-03 15:07:39 +00:00
|
|
|
Version: 1.0.2
|
2018-02-08 14:04:47 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A library for IP address lookup in Python
|
2019-06-04 06:55:19 +00:00
|
|
|
License: LGPL-3.0-or-later
|
2018-02-08 14:04:47 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-03-20 09:17:39 +00:00
|
|
|
URL: https://github.com/jsommers/pytricia
|
2018-02-09 19:54:24 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytricia/pytricia-%{version}.tar.gz
|
2019-06-04 06:55:19 +00:00
|
|
|
# https://github.com/jsommers/pytricia/issues/25
|
2020-03-20 09:17:39 +00:00
|
|
|
Source2: https://raw.githubusercontent.com/jsommers/pytricia/master/test.py
|
2018-02-08 14:04:47 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
2020-03-20 09:17:39 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-02-08 14:04:47 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Pytricia is a python module to store IP prefixes in a patricia tree.
|
|
|
|
It's based on Dave Plonka's modified patricia tree code, and has three things
|
2019-06-04 07:02:52 +00:00
|
|
|
to recommend it over related modules (including py-radix and SubnetTree).
|
2018-02-08 14:04:47 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pytricia-%{version}
|
2019-06-04 06:55:19 +00:00
|
|
|
cp %{SOURCE2} .
|
2018-02-08 14:04:47 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
|
2019-06-04 06:55:19 +00:00
|
|
|
%check
|
2020-03-20 09:17:39 +00:00
|
|
|
%pytest_arch test.py
|
2019-06-04 06:55:19 +00:00
|
|
|
|
2018-02-08 14:04:47 +00:00
|
|
|
%files %{python_files}
|
2019-06-04 06:55:19 +00:00
|
|
|
%license COPYING.LESSER
|
|
|
|
%doc README.md
|
2018-02-08 14:04:47 +00:00
|
|
|
%{python_sitearch}/*
|
2018-02-09 19:54:24 +00:00
|
|
|
|
|
|
|
%changelog
|