python-hypothesmith/python-hypothesmith.spec
Matej Cepl 1657ed7b2f Accepting request 1040481 from home:yarunachalam:branches:devel:languages:python
- Update to version 0.2.1 - 2022-11-25
  * Use the lark package on PyPI, for Lark version 1.0+ (requires recent Hypothesis)
  * Use updated Python grammar for from_grammar(), thanks to Lark updates
  * Drop support for Python 3.6, add 3.10 and 3.11 to CI 

- Update to 0.2.0 - 2021-11-27
  More efficient generation of Python identifiers
  Workaround for CPython parser bug in 3.9.8 (#16) Yes, yet another one - still, that's why hypothesmith exists...
- Update to 0.1.9 - 2021-08-19
  Fixed rare internal error when from_node() generated misplaced except: clauses

OBS-URL: https://build.opensuse.org/request/show/1040481
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesmith?expand=0&rev=11
2022-12-06 11:43:39 +00:00

92 lines
2.6 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-hypothesmith%{psuffix}
Version: 0.2.1
Release: 0
Summary: Hypothesis strategies for generating Python programs, something like CSmith
License: MPL-2.0
URL: https://github.com/Zac-HD/hypothesmith
Source: https://files.pythonhosted.org/packages/source/h/hypothesmith/hypothesmith-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-base >= 3.6
Requires: python-hypothesis >= 5.46
Requires: python-lark >= 0.7.2
Requires: python-libcst >= 0.3.8
%if %{with test}
BuildRequires: %{python_module black}
BuildRequires: %{python_module exceptiongroup}
BuildRequires: %{python_module hypothesis >= 5.46}
BuildRequires: %{python_module lark >= 0.7.2}
BuildRequires: %{python_module libcst >= 0.3.8}
BuildRequires: %{python_module parso}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
%endif
BuildArch: noarch
%python_subpackages
%description
Hypothesis strategies for generating Python programs, something like CSmith.
%prep
%setup -q -n hypothesmith-%{version}
# remove pytest coverage opts
rm tox.ini
%build
%if !%{with test}
%python_build
%endif
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
# multibuild: test the source dir, nothing is installed
export PYTHONPATH=$(pwd)/src
%pytest -n auto
%endif
%if !%{with test}
%files %{python_files}
%doc README.md CHANGELOG.md
%license LICENSE
%{python_sitelib}/hypothesmith
%{python_sitelib}/hypothesmith-%{version}-py*.egg-info
%endif
%changelog