2018-03-10 10:18:47 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-txtorcon
|
|
|
|
#
|
2020-04-06 08:33:00 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2018-03-10 10:18: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.
|
|
|
|
|
2018-12-04 14:10:52 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-03-10 10:19:47 +00:00
|
|
|
#
|
2018-03-10 10:18:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} %{!?skip_python3:python3-%{**}}}
|
2020-04-20 08:52:04 +00:00
|
|
|
%bcond_without python2
|
2018-03-10 10:18:47 +00:00
|
|
|
Name: python-txtorcon
|
2020-04-06 08:33:00 +00:00
|
|
|
Version: 20.0.0
|
2018-03-10 10:18:47 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Twisted-based asynchronous Tor control protocol implementation
|
2018-03-10 10:19:47 +00:00
|
|
|
License: MIT
|
2018-04-23 09:17:57 +00:00
|
|
|
URL: https://txtorcon.readthedocs.org
|
2018-03-10 10:18:47 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/txtorcon/txtorcon-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools >= 36.2}
|
2018-03-10 10:19:47 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-06-17 10:31:19 +00:00
|
|
|
Requires: python-Automat
|
|
|
|
Requires: python-Twisted >= 15.5.0
|
|
|
|
Requires: python-incremental
|
|
|
|
Requires: python-zope.interface >= 3.6.1
|
2018-03-10 10:19:47 +00:00
|
|
|
BuildArch: noarch
|
2018-03-10 10:18:47 +00:00
|
|
|
# SECTION test requirements
|
2019-06-17 10:31:19 +00:00
|
|
|
BuildRequires: %{python_module Automat}
|
|
|
|
BuildRequires: %{python_module Twisted >= 15.5.0}
|
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module zope.interface >= 3.6.1}
|
2020-04-20 08:52:04 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python-ipaddress
|
|
|
|
%endif
|
2018-03-10 10:18:47 +00:00
|
|
|
# /SECTION
|
|
|
|
%ifpython2
|
2019-06-17 10:31:19 +00:00
|
|
|
Requires: python-ipaddress >= 1.0.16
|
2018-03-10 10:18:47 +00:00
|
|
|
%endif
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2018-03-10 10:19:47 +00:00
|
|
|
Twisted-based asynchronous Tor control protocol implementation. Includes
|
2018-03-10 10:18:47 +00:00
|
|
|
unit-tests, examples, state-tracking code and configuration abstraction.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n txtorcon-%{version}
|
|
|
|
|
|
|
|
sed -i '/data_files/,/\]\,/s/^/#/' setup.py
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2018-04-23 09:17:57 +00:00
|
|
|
# remove the tests from distribution
|
|
|
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/test/
|
2018-03-10 10:18:47 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-06-17 10:31:19 +00:00
|
|
|
%check
|
|
|
|
# looks more like integration tests
|
2020-04-06 08:33:00 +00:00
|
|
|
%pytest -k 'not test_real_addr'
|
2019-06-17 10:31:19 +00:00
|
|
|
|
2018-03-10 10:18:47 +00:00
|
|
|
%files %{python_files}
|
2019-06-17 10:31:19 +00:00
|
|
|
%license LICENSE docs/*.rst
|
2018-03-10 10:18:47 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|