diff --git a/cryptominisat-setuptools.patch b/cryptominisat-setuptools.patch new file mode 100644 index 0000000..e5f7f1d --- /dev/null +++ b/cryptominisat-setuptools.patch @@ -0,0 +1,27 @@ +--- python/setup.py.in.orig 2020-07-06 15:45:41.000000000 -0600 ++++ python/setup.py.in 2022-12-19 09:44:31.964206198 -0700 +@@ -26,9 +26,8 @@ + import sys + import os + import platform +-from distutils.core import setup, Extension +-from distutils import sysconfig +-from distutils.cmd import Command ++from setuptools import setup, Extension, Command ++import sysconfig + + __PACKAGE_VERSION__ = "0.2.0" + __LIBRARY_VERSION__ = "${CMS_FULL_VERSION}" +@@ -59,10 +58,9 @@ def _init_posix(init): + Forces g++ instead of gcc on most systems + credits to eric jones (eric@enthought.com) (found at Google Groups) + """ +- def wrapper(): +- init() ++ def wrapper(config_vars): ++ init(config_vars) + +- config_vars = sysconfig.get_config_vars() # by reference + if config_vars["MACHDEP"].startswith("sun"): + # Sun needs forced gcc/g++ compilation + config_vars['CC'] = 'gcc' diff --git a/cryptominisat.spec b/cryptominisat.spec index 2017580..375e399 100644 --- a/cryptominisat.spec +++ b/cryptominisat.spec @@ -5,7 +5,7 @@ Name: cryptominisat Version: 5.8.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: SAT solver # The project as a whole is MIT. @@ -15,8 +15,11 @@ URL: https://www.msoos.org/ Source0: https://github.com/msoos/%{name}/archive/%{version}/%{name}-%{version}.tar.gz # Change the CMake files to not change Fedora build flags Patch0: %{name}-cmake.patch +# Use setuptools instead of distutils (bz 2154857) +Patch1: %{name}-setuptools.patch BuildRequires: boost-devel +BuildRequires: chrpath BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gperftools-devel @@ -26,6 +29,7 @@ BuildRequires: pkgconfig(m4ri) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(zlib) BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -93,6 +97,9 @@ fi %install %cmake_install +# Remove an unwanted rpath +chrpath -d %{buildroot}%{python3_sitearch}/pycryptosat*.so + %files %doc README.markdown %{_bindir}/cryptominisat5 @@ -115,6 +122,9 @@ fi %{python3_sitearch}/pycryptosat* %changelog +* Mon Dec 19 2022 Jerry James - 5.8.0-11 +- Use setuptools instead of distutils (rhbz#2154857) + * Mon Aug 15 2022 Jerry James - 5.8.0-10 - Convert License tag to SPDX