python3Packages.segyio: build with buildPythonPackage, fix build

This commit is contained in:
aleksana
2024-06-19 16:15:51 +08:00
parent 1fef68b065
commit 1fec677109
3 changed files with 57 additions and 6 deletions
@@ -0,0 +1,47 @@
From 64f06c0643f1f8691a8f2757496b60f1ab98c866 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sa=C3=AFd=20Benaissa?= <sbenaissa@shearwatergeo.com>
Date: Fri, 8 Dec 2023 21:51:32 +0100
Subject: [PATCH] Add include for cstdint, fix segyio build on fedora
---
lib/experimental/segyio/segyio.hpp | 1 +
python/segyio/segyio.cpp | 1 +
python/setup.py | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/experimental/segyio/segyio.hpp b/lib/experimental/segyio/segyio.hpp
index 706f07ff5..7ba3ffb99 100644
--- a/lib/experimental/segyio/segyio.hpp
+++ b/lib/experimental/segyio/segyio.hpp
@@ -13,6 +13,7 @@
#include <vector>
#include <segyio/segy.h>
+#include <cstdint>
/*
* KNOWN ISSUES AND TODOs:
diff --git a/python/segyio/segyio.cpp b/python/segyio/segyio.cpp
index 76da965c3..bd8a8622e 100644
--- a/python/segyio/segyio.cpp
+++ b/python/segyio/segyio.cpp
@@ -16,6 +16,7 @@
#include <cstring>
#include <sstream>
#include <stdexcept>
+#include <cstdint>
#if PY_MAJOR_VERSION >= 3
#define IS_PY3K
diff --git a/python/setup.py b/python/setup.py
index 6c6553bc7..654075be9 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -1,6 +1,6 @@
import os
import sys
-import skbuild
+import skbuild # pip install scikit-build
import setuptools
long_description = """
@@ -1,18 +1,23 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
cmake,
ninja,
python,
scikit-build,
pytest,
numpy,
}:
stdenv.mkDerivation rec {
buildPythonPackage rec {
pname = "segyio";
version = "1.9.12";
pyproject = false; # Built with cmake
patches = [
# https://github.com/equinor/segyio/pull/570
./add_missing_cstdint.patch
];
postPatch = ''
# Removing unecessary build dependency
@@ -34,7 +39,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
ninja
python
scikit-build
];
+2 -2
View File
@@ -13792,9 +13792,9 @@ self: super: with self; {
segno = callPackage ../development/python-modules/segno { };
segyio = toPythonModule (callPackage ../development/python-modules/segyio {
segyio = callPackage ../development/python-modules/segyio {
inherit (pkgs) cmake ninja;
});
};
selectors2 = callPackage ../development/python-modules/selectors2 { };