File python-python-afl.spec of Package python-python-afl

#
# spec file for package python-python-afl
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name:           python-python-afl
Version:        0.6.1
Release:        0
License:        MIT
Summary:        American fuzzy lop fork server and instrumentation for pure-Python code
Url:            http://jwilk.net/software/python-afl
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/p/python-afl/python-afl-%{version}.tar.gz
# PATCH-FIX-OPENSUSE 
Patch0:         https://github.com/jwilk/python-afl/compare/master...sebix:fix-setup-tests.patch#/Use-setuptools-and-use-test-command-for-setup.patch
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module Cython >= 0.19}
BuildRequires:  %{python_module setuptools}
%if %{with test}
BuildRequires:  procps
BuildRequires:  afl >= 2
BuildRequires:  %{python_module nose}
%endif
BuildRequires:  fdupes
Requires:       afl >= 2
# name with _ automatically redirected by pypi to name with -
Provides:       python-python_afl

%python_subpackages

%description
python-afl is an experimental module that enables American fuzzy lop fork server and instrumentation for pure-Python code.

The scripts to run the fuzzer are only in the package for python3.

%prep
%setup -q -n python-afl-%{version}
%patch0 -p1

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%if %{with test}
%check
rm tests/test_cmin.py tests/test_fuzz.py tests/test_showmap.py tests/test_tmin.py
%python_exec setup.py test
%endif

%files %{python_files}
%doc doc/changelog doc/README doc/trophy-case
%license doc/LICENSE
%python3_only %{_bindir}/py-afl-cmin
%python3_only %{_bindir}/py-afl-fuzz
%python3_only %{_bindir}/py-afl-showmap
%python3_only %{_bindir}/py-afl-tmin
%{python_sitearch}/*

%changelog
openSUSE Build Service is sponsored by