Files
python-minizinc/python-minizinc.spec
Stefan Brüns 59d16b99b7 Accepting request 1135907 from home:StefanBruens:branches:science
- Update to version 0.9.0:
  * Add support for MiniZinc tuple and record types.
  * Minimum supported version of MiniZinc has increased from
    2.5.0 to 2.5.4.
  * Ensure time events send using the JSON stream are parsed as
    timedelta objects.
  * Pass JSON definitions in using JSON instead of generated
    DZN files..
- Update to version 0.8.0:
  * The project no longer supports Python 3.6.
  * Fix the conversion when using a Python enumerated type in
    MiniZinc that uses non-ascii identifiers.

OBS-URL: https://build.opensuse.org/request/show/1135907
OBS-URL: https://build.opensuse.org/package/show/science/python-minizinc?expand=0&rev=2
2024-01-01 20:12:15 +00:00

87 lines
2.7 KiB
RPMSpec

#
# spec file for package python-minizinc
#
# Copyright (c) 2023 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
%define skip_python36 1
Name: python-minizinc
Version: 0.9.0
Release: 0
Summary: Python interface to MiniZinc
License: MPL-2.0
URL: https://www.minizinc.org/
Source: https://github.com/MiniZinc/minizinc-python/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: python-rpm-macros
# Test dependencies
%if 0%{?sle_version} == 150300
BuildRequires: %{python_module dataclasses}
%else
BuildRequires: %{python_module dataclasses if %python-base < 3.8}
%endif
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: minizinc >= 2.5.4
BuildRequires: gecode-minizinc
# /Test dependencies
BuildArch: noarch
Requires: python-numpy
# Python module directly calls the minizinc binary
Requires: minizinc >= 2.5.4
%if %python_version_nodots < 38
Requires: python-dataclasses
%endif
%python_subpackages
%description
MiniZinc Python provides an interface from Python to the MiniZinc driver.
%prep
%autosetup -p1 -n minizinc-python-%{version}
%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{python_expand #
export PYTHONPATH=%{buildroot}%{$python_sitelib}
export PYTHONDONTWRITEBYTECODE=1
$python -m pytest -k 'not CheckResults and not test_coinbc and not test_chuffed and not TestChecker'
$python -m pytest -k 'TestChecker'
$python -m pytest -k 'test_no_output_checker'
}
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/minizinc
%{python_sitelib}/minizinc-%{version}*-info
%changelog