forked from pool/python-hypothesis
Accepting request 615030 from home:TheBlackCat:branches:devel:languages:python
- Use github source archive as recommended by upstream. - Remove unneeded python-hypothesis-build.patch OBS-URL: https://build.opensuse.org/request/show/615030 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=61
This commit is contained in:
committed by
Git OBS Bridge
parent
d1654ba2fa
commit
815e3e08ce
@@ -16,6 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
# Note: tests require some very specific tooling, context-specific environment
|
||||
# variables (such as checking for travis), and very specific versions of all
|
||||
# dependencies. It does not appear feasible to get it to work in a consistent
|
||||
# manner.
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%if 0%{?suse_version} > 1320
|
||||
%define oldpython python2
|
||||
@@ -29,31 +34,40 @@ Release: 0
|
||||
Summary: A library for property based testing
|
||||
License: MPL-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/HypothesisWorks/hypothesis-python
|
||||
Source: https://files.pythonhosted.org/packages/source/h/hypothesis/hypothesis-%{version}.tar.gz
|
||||
Source10: https://raw.githubusercontent.com/HypothesisWorks/hypothesis/hypothesis-python-%{version}/LICENSE.txt
|
||||
Patch0: %{name}-build.patch
|
||||
URL: https://github.com/HypothesisWorks/hypothesis-python
|
||||
Source: https://github.com/HypothesisWorks/hypothesis/archive/hypothesis-python-3.57.0.tar.gz
|
||||
BuildRequires: %{python_module setuptools >= 36}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-attrs
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module attrs >= 16.0.0}
|
||||
BuildRequires: %{python_module coverage}
|
||||
BuildRequires: %{python_module flaky}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pytest >= 2.8.0}
|
||||
BuildRequires: %{python_module pytest-xdist >= 1.22.2}
|
||||
BuildRequires: %{pythons}
|
||||
# /SECTION
|
||||
Requires: python-attrs >= 16.0.0
|
||||
Requires: python-coverage
|
||||
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24
|
||||
Recommends: python-Django >= 1.8
|
||||
Recommends: python-Django >= 1.11
|
||||
Recommends: python-Faker >= 0.7.0
|
||||
Recommends: python-numpy >= 1.9.0
|
||||
Recommends: python-pandas
|
||||
Recommends: python-pytest >= 2.8.0
|
||||
Recommends: python-pytz
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%if %{with python2}
|
||||
BuildRequires: python-enum34
|
||||
BuildRequires: python-ipaddress
|
||||
BuildRequires: python-mock
|
||||
%endif
|
||||
%ifpython2
|
||||
Requires: %{oldpython}-enum34
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -68,22 +82,18 @@ PyPy3 until they support a 3.3 compatible version of the language). It does *not
|
||||
work on Jython or on Python 3.0 through 3.2.
|
||||
|
||||
%prep
|
||||
%setup -q -n hypothesis-%{version}
|
||||
# remove py2/3 and django tests as they fail
|
||||
rm -rf tests/py3 tests/py2 tests/django
|
||||
%patch0 -p1
|
||||
cp %{SOURCE10} .
|
||||
%setup -q -n hypothesis-hypothesis-python-%{version}/hypothesis-python
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.txt
|
||||
%doc ../CITATION README.rst
|
||||
%license ../LICENSE.txt
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user