Skip to content

Commit

Permalink
python312Packages.trx-python: init at 0.3; python312Packages.dipy: 1.…
Browse files Browse the repository at this point in the history
…7.0 -> 1.9.0 (#353282)
  • Loading branch information
natsukium authored Nov 8, 2024
2 parents 9cc818c + b688cdd commit c6f1ef9
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkgs/development/python-modules/dipy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,51 @@
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
meson-python,
packaging,
cython,
numpy,
scipy,
h5py,
nibabel,
tqdm,
trx-python,
}:

buildPythonPackage rec {
pname = "dipy";
version = "1.7.0";
format = "setuptools";
version = "1.9.0";
pyproject = true;

disabled = pythonOlder "3.6";

src = fetchFromGitHub {
owner = "dipy";
repo = pname;
repo = "dipy";
rev = "refs/tags/${version}";
hash = "sha256-sfqCK2r9Io1gDDHL9s9R37J0h9KcOQML3B2zJx2+QuA=";
hash = "sha256-6cpxuk2PL43kjQ+6UGiUHUXC7pC9OlW9kZvGOdEXyzw=";
};

nativeBuildInputs = [
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "numpy==" "numpy>="
'';

build-system = [
cython
meson-python
numpy
packaging
];

propagatedBuildInputs = [
dependencies = [
numpy
scipy
h5py
nibabel
packaging
tqdm
trx-python
];

# disable tests for now due to:
Expand All @@ -53,7 +64,6 @@ buildPythonPackage rec {
"dipy.reconst"
"dipy.io"
"dipy.viz"
"dipy.boots"
"dipy.data"
"dipy.utils"
"dipy.segment"
Expand Down
65 changes: 65 additions & 0 deletions pkgs/development/python-modules/trx-python/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
cython,
setuptools,
setuptools-scm,
deepdiff,
nibabel,
numpy,
pytestCheckHook,
psutil,
}:

buildPythonPackage rec {
pname = "trx-python";
version = "0.3";
pyproject = true;

src = fetchFromGitHub {
owner = "tee-ar-ex";
repo = "trx-python";
rev = "refs/tags/${version}";
hash = "sha256-gKPgP3GJ7QY0Piylk5L0HxnscRCREP1Hm5HZufL2h5g=";
};

build-system = [
cython
setuptools
setuptools-scm
];

dependencies = [
deepdiff
nibabel
numpy
];

pythonImportsCheck = [ "trx" ];

nativeCheckInputs = [
pytestCheckHook
psutil
];

preCheck = ''
export HOME=$TMPDIR
'';

pytestFlagsArray = [ "trx/tests" ];

disabledTestPaths = [
# access to network
"trx/tests/test_memmap.py"
"trx/tests/test_io.py"
];

meta = {
description = "Python implementation of the TRX file format";
homepage = "https://github.com/tee-ar-ex/trx-python";
changelog = "https://github.com/tee-ar-ex/trx-python/releases/tag/${version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16116,6 +16116,8 @@ self: super: with self; {

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

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

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

ts1-signatures = callPackage ../development/python-modules/ts1-signatures { };
Expand Down

0 comments on commit c6f1ef9

Please sign in to comment.