Blob Blame History Raw
# Copyright (c) 2020 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.

Name:           python-pynest2d
Version:        4.8.0
Release:        %autorelease
Summary:        Python bindings for libnest2d
License:        LGPLv3
Source:         %{url}/archive/%{version}/pynest2d-%{version}.tar.gz
# Downstream patch: add PyQt5 namespace
Patch0:         pynest2d-PyQt5.sip.patch
# Retrieve required flags from Libnest2D target
Patch1:         Retrieve-required-flags-from-Libnest2D-target.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  libnest2d-static
BuildRequires:  python3-devel
BuildRequires:  python3-sip-devel < 5
BuildRequires:  python3-pyqt5-sip
Requires:       python3-pyqt5-sip

# we add a dependency on setuptools to provide the distutils module
# upstream already removed the distutils usage in version 5+
BuildRequires:  (python3-setuptools if python3-devel >= 3.12)

Binding allowing libnest2d to be called from Python using NumPy.

%package -n python3-pynest2d
Summary:        %{summary}

%description -n python3-pynest2d
Binding allowing libnest2d to be called from Python using NumPy.

%autosetup -n pynest2d-%{version} -p1

# Boost 1.75+ needs C++14, upstream:
sed -i 's/CMAKE_CXX_STANDARD 11/CMAKE_CXX_STANDARD 14/' CMakeLists.txt



%files -n python3-pynest2d
%license LICENSE