File python-crosshair-tool.spec of Package python-crosshair-tool

#
# spec file for package python-crosshair-tool
#
# Copyright (c) 2026 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/
#


Name:           python-crosshair-tool
Version:        0.0.102
Release:        0
Summary:        Analyze Python code for correctness using symbolic execution
License:        MIT
URL:            https://github.com/pschanely/CrossHair
Source:         https://files.pythonhosted.org/packages/source/c/crosshair_tool/crosshair_tool-%{version}.tar.gz
# PATCH-FIX-UPSTREAM crosshair-numpy-bound-method.patch bugno mcepl@suse.com
# compatibility patch for Numpy 2.4.*
Patch0:         crosshair-numpy-bound-method.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-importlib_metadata >= 4.0.0
Requires:       python-packaging
Requires:       python-pygls >= 1.0.0
Requires:       python-typeshed-client >= 2.0.5
Requires:       python-typing-inspect >= 0.7.1
Requires:       python-typing_extensions >= 3.10.0
Requires:       python-z3 >= 4.13.0.0
Suggests:       python-autodocsumm >= 0.2.2
Suggests:       python-black = 25.9.0
Suggests:       python-deal >= 4.13.0
Suggests:       python-icontract >= 2.4.0
Suggests:       python-isort = 5.11.5
Suggests:       python-mypy = 1.18.1
Suggests:       python-numpy >= 2.3.3
Suggests:       python-pre-commit
Suggests:       python-pytest
Suggests:       python-pytest-xdist
Suggests:       python-rst2pdf >= 0.102
Suggests:       python-setuptools
Suggests:       python-sphinx >= 3.4.3
Suggests:       python-sphinx-rtd-theme >= 0.5.1
Suggests:       python-z3 = 4.15.4.0
# SECTION test requirements
BuildRequires:  %{python_module importlib_metadata >= 4.0.0}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module mypy}
BuildRequires:  %{python_module numpy >= 2.3.3}
BuildRequires:  %{python_module packaging}
BuildRequires:  %{python_module pygls >= 1.0.0}
BuildRequires:  %{python_module typeshed-client >= 2.0.5}
BuildRequires:  %{python_module typing-inspect >= 0.7.1}
BuildRequires:  %{python_module typing_extensions >= 3.10.0}
BuildRequires:  %{python_module z3 >= 4.13.0.0}
# /SECTION
%python_subpackages

%description
Analyze Python code for correctness using symbolic execution.

%prep
%autosetup -p1 -n crosshair_tool-%{version}

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

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/crosshair
%python_clone -a %{buildroot}%{_bindir}/mypycrosshair
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%check
skiptests="PEP316_bugs_detected_getattr_magic"
skiptests+=" or PEP316_bugs_detected_hash_consistent_with_equals"
skiptests+=" or PEP316_bugs_detected_shopping_cart or PEP316_bugs_detected_showcase"
%pytest_arch -k "not ($skiptests)"

%post
%python_install_alternative crosshair mypycrosshair

%postun
%python_uninstall_alternative crosshair

%files %{python_files}
%license LICENSE
%python_alternative %{_bindir}/crosshair
%python_alternative %{_bindir}/mypycrosshair
%{python_sitearch}/crosshair-tool
%{python_sitearch}/crosshair-tool-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by