2015-11-11 11:36:03 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-hypothesis
|
|
|
|
#
|
2020-04-09 15:45:48 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-11-11 11:36:03 +01: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-09-17 15:03:22 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-12-09 11:08:24 +01:00
|
|
|
#
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
|
2017-02-24 15:34:42 +01:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define oldpython python
|
2018-09-13 16:27:57 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
2019-04-30 15:27:39 +02:00
|
|
|
%define psuffix -test
|
2018-09-13 16:27:57 +02:00
|
|
|
%bcond_without test
|
|
|
|
%else
|
2019-04-30 15:27:39 +02:00
|
|
|
%define psuffix %{nil}
|
2018-09-05 13:17:34 +02:00
|
|
|
%bcond_with test
|
2018-09-13 16:27:57 +02:00
|
|
|
%endif
|
2020-04-09 15:45:48 +02:00
|
|
|
%define skip_python2 1
|
2019-04-30 15:27:39 +02:00
|
|
|
Name: python-hypothesis%{psuffix}
|
2020-04-09 15:45:48 +02:00
|
|
|
Version: 5.8.0
|
2015-11-11 11:36:03 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A library for property based testing
|
2015-12-09 11:08:24 +01:00
|
|
|
License: MPL-2.0
|
2018-06-07 20:15:11 +02:00
|
|
|
URL: https://github.com/HypothesisWorks/hypothesis-python
|
2018-06-25 13:02:02 +02:00
|
|
|
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-%{version}.tar.gz
|
2018-03-02 12:19:22 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 36}
|
2017-06-30 09:30:34 +02:00
|
|
|
BuildRequires: fdupes
|
2017-02-24 15:34:42 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-10-16 17:28:26 +02:00
|
|
|
Requires: python-attrs >= 19.2.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Requires: python-sortedcontainers >= 2.1.0
|
2018-08-31 13:55:52 +02:00
|
|
|
Recommends: python-Django >= 1.11
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-dpcontracts >= 0.4
|
2019-03-18 09:14:01 +01:00
|
|
|
Recommends: python-lark-parser >= 0.6.5
|
2018-08-31 13:55:52 +02:00
|
|
|
Recommends: python-numpy >= 1.9.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-pandas >= 0.19
|
2019-10-16 17:28:26 +02:00
|
|
|
Recommends: python-pytest >= 4.3.0
|
2020-04-09 15:45:48 +02:00
|
|
|
Recommends: python-python-dateutil >= 1.4
|
2018-09-08 21:49:29 +02:00
|
|
|
Recommends: python-pytz >= 2014.1
|
2018-06-25 13:02:02 +02:00
|
|
|
BuildArch: noarch
|
2019-03-18 09:14:01 +01:00
|
|
|
%if %{with test}
|
2018-06-07 20:15:11 +02:00
|
|
|
# SECTION test requirements
|
2019-04-30 15:27:39 +02:00
|
|
|
BuildRequires: %{python_module Django >= 1.11}
|
2019-10-16 17:28:26 +02:00
|
|
|
BuildRequires: %{python_module attrs >= 19.2.0}
|
2018-06-07 20:15:11 +02:00
|
|
|
BuildRequires: %{python_module flaky}
|
2019-04-30 15:27:39 +02:00
|
|
|
BuildRequires: %{python_module hypothesis >= %{version}}
|
|
|
|
BuildRequires: %{python_module lark-parser >= 0.6.5}
|
2018-06-07 20:15:11 +02:00
|
|
|
BuildRequires: %{python_module mock}
|
2019-04-30 15:27:39 +02:00
|
|
|
BuildRequires: %{python_module numpy >= 1.9.0}
|
2019-10-16 17:28:26 +02:00
|
|
|
BuildRequires: %{python_module pexpect >= 4.7.0}
|
|
|
|
BuildRequires: %{python_module pytest >= 4.3.0}
|
2020-04-09 15:45:48 +02:00
|
|
|
BuildRequires: %{python_module python-dateutil >= 1.4}
|
|
|
|
BuildRequires: %{python_module sortedcontainers >= 2.1.0}
|
2019-03-18 09:14:01 +01:00
|
|
|
BuildRequires: python3-dpcontracts
|
2018-09-05 13:17:34 +02:00
|
|
|
%endif
|
2018-06-07 20:15:11 +02:00
|
|
|
# /SECTION
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_subpackages
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Hypothesis is a library for testing your Python code against a much larger range
|
|
|
|
of examples than you would ever want to write by hand. It's based on the Haskell
|
|
|
|
library, Quickcheck, and is designed to integrate seamlessly into your existing
|
|
|
|
Python unit testing work flow.
|
|
|
|
|
|
|
|
Hypothesis works with most widely used versions of Python. It supports implementations
|
|
|
|
compatible with 2.6, 2.7 and 3.3+, and is known to work on CPython and PyPy (but not
|
|
|
|
PyPy3 until they support a 3.3 compatible version of the language). It does *not* currently
|
|
|
|
work on Jython or on Python 3.0 through 3.2.
|
|
|
|
|
|
|
|
%prep
|
2018-06-07 20:15:11 +02:00
|
|
|
%setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python
|
2019-05-06 11:40:58 +02:00
|
|
|
# the django fails to initialize
|
2019-05-07 10:59:27 +02:00
|
|
|
rm -r tests/django
|
|
|
|
# do not pull in pandas as a dep in ring1; it slows down things too much
|
|
|
|
rm -r tests/pandas
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%build
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_build
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%install
|
2018-09-17 15:03:22 +02:00
|
|
|
%if !%{with test}
|
2017-02-24 15:34:42 +01:00
|
|
|
%python_install
|
2018-09-05 13:17:34 +02:00
|
|
|
%{python_expand \
|
|
|
|
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
|
|
|
|
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
2018-09-17 15:03:22 +02:00
|
|
|
%endif
|
2018-09-05 13:17:34 +02:00
|
|
|
|
|
|
|
%check
|
2019-04-30 15:27:39 +02:00
|
|
|
%if %{with test}
|
2019-05-06 12:02:51 +02:00
|
|
|
# test_prints_statistics_given_option_under_xdist - wrong xdist opts
|
2019-10-16 17:28:26 +02:00
|
|
|
%pytest tests -k "not test_prints_statistics_given_option_under_xdist"
|
2018-09-05 13:17:34 +02:00
|
|
|
%endif
|
2015-11-11 11:36:03 +01:00
|
|
|
|
2019-04-30 15:27:39 +02:00
|
|
|
%if !%{with test}
|
2017-02-24 15:34:42 +01:00
|
|
|
%files %{python_files}
|
2018-06-07 20:15:11 +02:00
|
|
|
%license ../LICENSE.txt
|
2019-03-25 09:42:00 +01:00
|
|
|
%doc ../CITATION README.rst docs/changes.rst
|
2018-07-01 23:23:01 +02:00
|
|
|
%{python_sitelib}/hypothesis*
|
2018-09-13 16:27:57 +02:00
|
|
|
%endif
|
2015-11-11 11:36:03 +01:00
|
|
|
|
|
|
|
%changelog
|