From 9cbe717fc2a34f3cdf0aef4e34e5a2c7fb5b04f0 Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Mon, 13 Nov 2023 06:54:48 +0000 Subject: [PATCH] python3Packages.gfal2-python: init at 1.12.2 --- .../python-modules/gfal2-python/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/gfal2-python/default.nix diff --git a/pkgs/development/python-modules/gfal2-python/default.nix b/pkgs/development/python-modules/gfal2-python/default.nix new file mode 100644 index 000000000000..d9ffbe8a23e7 --- /dev/null +++ b/pkgs/development/python-modules/gfal2-python/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, cmake +, pkg-config +, boost +, gfal2 +, glib +, pythonAtLeast + # For tests +, gfal2-util ? null +}: +buildPythonPackage rec { + pname = "gfal2-python"; + version = "1.12.2"; + src = fetchFromGitHub { + owner = "cern-fts"; + repo = "gfal2-python"; + rev = "v${version}"; + hash = "sha256-Xk+gLTrqfWb0kGB6QhnM62zAHVFb8rRAqCIBxn0V824="; + }; + nativeBuildInputs = [ + cmake + pkg-config + ]; + buildInputs = [ + boost + gfal2 + glib + ]; + # We don't want setup.py to (re-)execute cmake in buildPhase + # Besides, this package is totally handled by CMake, which means no additional configuration is needed. + dontConfigure = true; + pythonImportsCheck = [ + "gfal2" + ]; + passthru = { + inherit gfal2; + tests = { + inherit gfal2-util; + } + // lib.optionalAttrs (gfal2-util != null) gfal2-util.tests or { }; + }; + meta = with lib; { + description = "Python binding for gfal2"; + homepage = "https://github.com/cern-fts/gfal2-python"; + license = licenses.asl20; + maintainers = with maintainers; [ ShamrockLee ]; + # It currently fails to build against Python 3.12 or later, + # complaining CMake faililng to find Python include path, library path and site package path. + broken = pythonAtLeast "3.12"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 496add388462..104a8f5ef2b5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4685,6 +4685,8 @@ self: super: with self; { gevent-websocket = callPackage ../development/python-modules/gevent-websocket { }; + gfal2-python = callPackage ../development/python-modules/gfal2-python { }; + gflags = callPackage ../development/python-modules/gflags { }; gflanguages = callPackage ../development/python-modules/gflanguages { };