# # 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/ # %define skip_python36 1 %define skip_python38 1 %define skip_python39 1 %define skip_python311 1 %{?sle15_python_module_pythons} %define skip_python2 1 %global 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.3 Release: 2.4 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.7 Requires: python-hypothesis >= 6.58.1 Requires: python-lark >= 0.10.1 Requires: python-libcst >= 0.4.0 %if %{with test} BuildRequires: %{python_module black} BuildRequires: %{python_module exceptiongroup} BuildRequires: %{python_module hypothesis >= 6.58.1} BuildRequires: %{python_module lark >= 0.10.1} BuildRequires: %{python_module libcst >= 0.4.0} 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 * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Wed Apr 19 2023 Matej Cepl - Switch to single spec version build for PSP * Thu Dec 15 2022 Daniel Garcia - Update requirements * Tue Dec 13 2022 Yogalakshmi Arunachalam - Update to version 0.2.3 * Actually package up the renamed grammar file this time. - Update to 0.2.2 - 2022-11-29 * Correct the minimum required version of LibCST * Use importlib.resources to load the Python grammar (zip-safe) * Tue Dec 6 2022 Yogalakshmi Arunachalam - 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 * Thu Oct 20 2022 Torsten Gruner - Update to v0.2.0 * 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... - Release v0.1.9 * Fixed rare internal error when from_node() generated misplaced except: clauses * Thu Sep 29 2022 Yogalakshmi Arunachalam - 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 * Sun Mar 21 2021 Ben Greiner - Update to v0.1.8 * Now compatible with Hypothesis 5.46 and later * Increased diversity of examples generated by from_node() - Release v0.1.7 * Adds a workaround for BPO-42218 * Bumped Hypothesis requirement to version 5.41 or later (better internal error messages) * Added MANIFEST.in so the sdist includes license, tests, etc. * Sat Nov 14 2020 John Vandenberg - Update to v0.1.6 * Improved error messages from internal compiler errors again * Bumped Hypothesis requirement to version 5.39 or later - from v0.1.5 * Emit additional debug info when Python fails to compile a string * Wed Aug 19 2020 Benjamin Greiner - Update to 0.1.4 * Improve handling of identifiers * Fix internal error in `from_grammar("single_input") - do not install myself on multibuild test flavor * Sat Aug 8 2020 Benjamin Greiner - Use github repository download for LICENSE, CHANGELOG.md (needed by tests) and test directory gh#Zac-HD/hypothesmith#5 - run tests in multibuild flavor, they are quite time-consuming and the test requirements create dependency loops - filter empty types file python-hypothesmith-rpmlintrc * Thu Aug 6 2020 Benjamin Greiner - Update to 0.1.3 * Update to latest versions of LibCST and Hypothesis, for Python 3.9 support - 0.1.2 - 2020-05-17 * Emit more debug info to diagnose a compile() issue in CPython nightly - 0.1.1 - 2020-05-17 * Emit some debug info to help diagnose a possible upstream bug in CPython nightly - 0.1.0 - 2020-04-24 * Added auto_target=True argument to the from_node() strategy. * Improved from_node() generation of comments and trailing whitespace. - 0.0.8 - 2020-04-23 * Added a from_node() strategy which uses LibCST to generate source code. This is a proof-of-concept rather than a robust tool, but IMO it's a pretty cool concept. - 0.0.7 - 2020-04-19 * The from_grammar() strategy now takes an auto_target=True argument, to drive generated examples towards (relatively) larger and more complex programs. * Thu Apr 16 2020 Tomáš Chvátal - Initial commit, needed by flake8-builtins