If a Python package does not come with either `format` or `pyproject` we consider it a setuptools build, that calls `setup.py` directly, which is deprecated. This change, as a first step, migrates a large chunk of these packages to set setuptools as their explicit format This is so we can unify the problem space for the next step of the migration.
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
boost,
|
|
gfal2,
|
|
glib,
|
|
pythonAtLeast,
|
|
# For tests
|
|
gfal2-util ? null,
|
|
}:
|
|
buildPythonPackage rec {
|
|
pname = "gfal2-python";
|
|
version = "1.13.0";
|
|
format = "setuptools";
|
|
src = fetchFromGitHub {
|
|
owner = "cern-fts";
|
|
repo = "gfal2-python";
|
|
rev = "v${version}";
|
|
hash = "sha256-TF8EwT1UEtB9lhfq8Jkn9rrSkSxMSLzuAywfB23K1kE=";
|
|
};
|
|
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 ];
|
|
};
|
|
}
|