Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.bids-validator: fix build #353943

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions pkgs/development/python-modules/bids-validator/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,40 @@
# build-system
setuptools,
versioneer,

# dependencies
bidsschematools,
}:

buildPythonPackage rec {
pname = "bids-validator";
version = "1.14.7.post0";
pyproject = true;

disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";

src = fetchPypi {
pname = "bids_validator";
inherit version;
hash = "sha256-5gBaUAt1+KlhWT+2fUYIUQfa2xFvWaXDtSSqBpeUW2Y=";
};

nativeBuildInputs = [
build-system = [
setuptools
versioneer
];

# needs packages which are not available in nixpkgs
doCheck = false;
dependencies = [
bidsschematools
];

pythonImportsCheck = [ "bids_validator" ];

meta = with lib; {
meta = {
description = "Validator for the Brain Imaging Data Structure";
homepage = "https://github.com/bids-standard/bids-validator";
changelog = "https://github.com/bids-standard/bids-validator/releases/tag/v${version}";
license = licenses.mit;
maintainers = [ ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wegank ];
};
}
45 changes: 45 additions & 0 deletions pkgs/development/python-modules/bidsschematools/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
buildPythonPackage,
pythonOlder,
fetchPypi,
setuptools,
click,
pyyaml,
jsonschema,
}:

buildPythonPackage rec {
pname = "bidsschematools";
version = "0.11.3";
pyproject = true;

disabled = pythonOlder "3.9";

src = fetchPypi {
pname = "bidsschematools";
inherit version;
hash = "sha256-GvR3pOXXmdpjH2xdL+trhLW6ZdsTpEWUdNUlVQ4gFXo=";
};

build-system = [
setuptools
];

dependencies = [
click
pyyaml
jsonschema
];

pythonImportsCheck = [
"bidsschematools"
];

meta = {
description = "Python tools for working with the BIDS schema";
homepage = "https://github.com/bids-standard/bids-specification/tree/master/tools/schemacode";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wegank ];
};
}
12 changes: 7 additions & 5 deletions pkgs/development/python-modules/pybids/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
nibabel,
bids-validator,
sqlalchemy,
universal-pathlib,
pytestCheckHook,
versioneer,
}:
Expand All @@ -31,12 +32,12 @@ buildPythonPackage rec {
"sqlalchemy"
];

nativeBuildInputs = [
build-system = [
setuptools
versioneer
] ++ versioneer.optional-dependencies.toml;

propagatedBuildInputs = [
dependencies = [
bids-validator
click
formulaic
Expand All @@ -46,6 +47,7 @@ buildPythonPackage rec {
pandas
scipy
sqlalchemy
universal-pathlib
];

pythonImportsCheck = [ "bids" ];
Expand All @@ -64,12 +66,12 @@ buildPythonPackage rec {
"test_to_df"
];

meta = with lib; {
meta = {
description = "Python tools for querying and manipulating BIDS datasets";
homepage = "https://github.com/bids-standard/pybids";
changelog = "https://github.com/bids-standard/pybids/blob/${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = [ ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wegank ];
mainProgram = "pybids";
};
}
18 changes: 15 additions & 3 deletions pkgs/development/python-modules/templateflow/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
fetchFromGitHub,
pythonOlder,
setuptools-scm,
hatchling,
hatch-vcs,
nipreps-versions,
pybids,
requests,
Expand All @@ -24,16 +26,26 @@ buildPythonPackage rec {
hash = "sha256-COS767n2aC65m6AJihZb4NhJ4ZK9YkTAZR7Hcnc/LMs=";
};

nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
build-system = [
setuptools-scm
hatchling
hatch-vcs
];

dependencies = [
nipreps-versions
pybids
requests
tqdm
];

doCheck = false; # most tests try to download data
#pythonImportsCheck = [ "templateflow" ]; # touches $HOME/.cache, hence needs https://github.com/NixOS/nixpkgs/pull/120300

postFixup = ''
export HOME=$(mktemp -d)
'';

pythonImportsCheck = [ "templateflow" ];

meta = with lib; {
homepage = "https://templateflow.org/python-client";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,8 @@ self: super: with self; {

bids-validator = callPackage ../development/python-modules/bids-validator { };

bidsschematools = callPackage ../development/python-modules/bidsschematools { };

biliass = callPackage ../development/python-modules/biliass { };

bilibili-api-python = callPackage ../development/python-modules/bilibili-api-python { };
Expand Down