summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2023-07-08 18:04:46 +0800
committerYt <happysalada@tuta.io>2023-07-10 15:22:16 +0800
commitdab0c5cc6ca071ac65613e3d8d46b02b71b33c1c (patch)
tree1a15f19cd562eba824ae92c2def471fc572544ea
parentpython310Packages.pdfplumber: init at 0.9.0 (diff)
downloadnixpkgs-dab0c5cc6ca071ac65613e3d8d46b02b71b33c1c.tar.gz
python310Packages.iopath: init at 0.1.9
-rw-r--r--pkgs/development/python-modules/iopath/default.nix68
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/iopath/default.nix b/pkgs/development/python-modules/iopath/default.nix
new file mode 100644
index 000000000000..0a85de0fc9ec
--- /dev/null
+++ b/pkgs/development/python-modules/iopath/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+# build inputs
+, tqdm
+, portalocker
+, boto3
+# check inputs
+, pytestCheckHook
+, torch
+}:
+let
+ pname = "iopath";
+ version = "0.1.9";
+in
+buildPythonPackage {
+ inherit pname version;
+ format = "setuptools";
+
+ disabled = pythonOlder "3.10";
+
+ src = fetchFromGitHub {
+ owner = "facebookresearch";
+ repo = "iopath";
+ rev = "refs/tags/v${version}";
+ hash = "sha256-Qubf/mWKMgYz9IVoptMZrwy4lQKsNGgdqpJB1j/u5s8=";
+ };
+
+ propagatedBuildInputs = [
+ tqdm
+ portalocker
+ ];
+
+ nativeCheckInputs = [
+ pytestCheckHook
+ torch
+ ];
+
+ disabledTests = [
+ # requires network access
+ "test_download"
+ "test_bad_args"
+ ];
+
+ disabledTestPaths = [
+ # flakey
+ "tests/async_torch_test.py"
+ "tests/async_writes_test.py"
+ ];
+
+ pythonImportsCheck = [
+ "iopath"
+ ];
+
+ passthru.optional-dependencies = {
+ aws = [ boto3 ];
+ };
+
+ meta = with lib; {
+ description = "A python library that provides common I/O interface across different storage backends.";
+ homepage = "https://github.com/facebookresearch/iopath";
+ changelog = "https://github.com/facebookresearch/iopath/releases/tag/v${version}";
+ license = licenses.mit;
+ maintainers = with maintainers; [ happysalada ];
+ };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index cc1d35ea1456..a89d37fa7b78 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5063,6 +5063,8 @@ self: super: with self; {
ionhash = callPackage ../development/python-modules/ionhash { };
+ iopath = callPackage ../development/python-modules/iopath { };
+
iotawattpy = callPackage ../development/python-modules/iotawattpy { };
iowait = callPackage ../development/python-modules/iowait { };