mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sci-mathematics/cryptominisat: enable python support
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
@@ -3,7 +3,15 @@
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
CMAKE_IN_SOURCE_BUILD="ON"
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
|
||||
DISTUTILS_EXT="1"
|
||||
DISTUTILS_OPTIONAL="1"
|
||||
DISTUTILS_USE_PEP517="setuptools"
|
||||
|
||||
inherit cmake distutils-r1
|
||||
|
||||
DESCRIPTION="Advanced SAT solver with C++ and command-line interfaces"
|
||||
HOMEPAGE="https://github.com/msoos/cryptominisat/"
|
||||
@@ -21,24 +29,66 @@ fi
|
||||
|
||||
LICENSE="GPL-2 MIT"
|
||||
SLOT="0/${PV}"
|
||||
IUSE="python"
|
||||
RESTRICT="test" # Tests require some git modules.
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/boost:=
|
||||
sys-libs/zlib:=
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/tomli[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
python? (
|
||||
${DISTUTILS_DEPS}
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-5.11.21-setup-py.patch"
|
||||
"${FILESDIR}/${PN}-5.11.21-unistd.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
if use python ; then
|
||||
distutils-r1_src_prepare
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local -a mycmakeargs=(
|
||||
-DNOBREAKID=ON
|
||||
-DENABLE_TESTING=OFF
|
||||
)
|
||||
cmake_src_configure
|
||||
|
||||
if use python ; then
|
||||
python_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake_src_compile
|
||||
|
||||
if use python ; then
|
||||
distutils-r1_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
if use python ; then
|
||||
distutils-r1_src_install
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -27,13 +27,13 @@ import sys
|
||||
import os
|
||||
from setuptools import Extension, setup
|
||||
import sysconfig
|
||||
-import toml
|
||||
+import tomli
|
||||
import pathlib
|
||||
from sys import platform
|
||||
|
||||
def _parse_toml(pyproject_path):
|
||||
pyproject_text = pyproject_path.read_text()
|
||||
- pyproject_data = toml.loads(pyproject_text)
|
||||
+ pyproject_data = tomli.loads(pyproject_text)
|
||||
return pyproject_data['project']['version']
|
||||
|
||||
picosatlib = ('picosatlib', {
|
||||
Reference in New Issue
Block a user