python312Packages.cgal: init at 5.6.1.post202403291426

This commit is contained in:
Peder Bergebakken Sundt 2024-09-28 01:08:06 +02:00
parent 09736ade02
commit fc958cc146
2 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,89 @@
{
lib,
stdenv,
python,
buildPythonPackage,
fetchFromGitHub,
setuptools,
boost,
cgal,
cmake,
gmp,
tbb,
LAStools,
eigen,
mpfr,
numpy,
swig,
zlib,
withLAS ? false, # unfree
}:
buildPythonPackage rec {
pname = "cgal";
version = "5.6.1.post202403291426";
pyproject = true;
src = fetchFromGitHub {
owner = "CGAL";
repo = "cgal-swig-bindings";
rev = "v${version}";
hash = "sha256-EcvS1TWL3uGCE1G8Lbfiu/AzifMdUSei+z91bzkiKes=";
};
dontUseCmakeConfigure = true;
build-system = [
setuptools
cmake
swig
];
buildInputs =
[
cgal
gmp
mpfr
boost
zlib
tbb
eigen
]
++ lib.optionals withLAS [
LAStools
];
dependencies = [
numpy
];
pythonImportsCheck = [ "CGAL" ];
postFixup = lib.optionalString stdenv.hostPlatform.isElf ''
mv $out/${python.sitePackages}/{lib,CGAL/_lib}
for file in $out/${python.sitePackages}/CGAL/_*.so; do
patchelf "$file" --add-rpath $out/${python.sitePackages}/CGAL/_lib
done
'';
checkPhase = ''
runHook preCheck
(cd examples/python/
bash ./test.sh
cat error.txt
if grep -qi ' run error$' <error.txt; then
false
fi
)
runHook postCheck
'';
meta = {
description = "CGAL bindings using SWIG";
homepage = "https://github.com/CGAL/cgal-swig-bindings";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ pbsds ];
# error: no template named 'unary_function' in namespace 'boost::functional::detail'
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@ -2156,6 +2156,10 @@ self: super: with self; {
cftime = callPackage ../development/python-modules/cftime { };
cgal = callPackage ../development/python-modules/cgal {
inherit (pkgs) cgal;
};
cgen = callPackage ../development/python-modules/cgen { };
cgroup-utils = callPackage ../development/python-modules/cgroup-utils { };