about summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/devtools/default.nix28
-rw-r--r--pkgs/development/python-modules/env-canada/default.nix5
-rw-r--r--pkgs/development/python-modules/grpcio-tools/default.nix4
-rw-r--r--pkgs/development/python-modules/nengo/default.nix36
-rw-r--r--pkgs/development/python-modules/pygame-gui/default.nix53
-rw-r--r--pkgs/development/python-modules/pygame/default.nix15
-rw-r--r--pkgs/development/python-modules/pyls-flake8/default.nix29
-rw-r--r--pkgs/development/python-modules/pymunk/default.nix36
-rw-r--r--pkgs/development/python-modules/python-lsp-black/default.nix32
-rw-r--r--pkgs/development/python-modules/questionary/default.nix14
-rw-r--r--pkgs/development/python-modules/skytemple-rust/default.nix3
11 files changed, 241 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/devtools/default.nix b/pkgs/development/python-modules/devtools/default.nix
new file mode 100644
index 000000000000..32050acfdf27
--- /dev/null
+++ b/pkgs/development/python-modules/devtools/default.nix
@@ -0,0 +1,28 @@
+{ buildPythonPackage, pythonOlder, fetchFromGitHub, lib, pygments
+, pytestCheckHook, pytest-mock }:
+
+buildPythonPackage rec {
+  pname = "devtools";
+  version = "0.6.1";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "samuelcolvin";
+    repo = "python-${pname}";
+    rev = "v${version}";
+    sha256 = "0s1d2jwijini7y1a3318yhb98mh1mw4pzlfx2zck3a8nqw984ki3";
+  };
+
+  propagatedBuildInputs = [ pygments ];
+
+  checkInputs = [ pytestCheckHook pytest-mock ];
+
+  pythonImportsCheck = [ "devtools" ];
+
+  meta = with lib; {
+    description = "Python's missing debug print command and other development tools";
+    homepage = "https://python-devtools.helpmanual.io/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jdahm ];
+  };
+}
diff --git a/pkgs/development/python-modules/env-canada/default.nix b/pkgs/development/python-modules/env-canada/default.nix
index 3beb01e3b13e..22894ab9f2a6 100644
--- a/pkgs/development/python-modules/env-canada/default.nix
+++ b/pkgs/development/python-modules/env-canada/default.nix
@@ -11,13 +11,13 @@
 
 buildPythonPackage rec {
   pname = "env-canada";
-  version = "0.4.0";
+  version = "0.4.1";
 
   src = fetchFromGitHub {
     owner = "michaeldavie";
     repo = "env_canada";
     rev = "v${version}";
-    sha256 = "0y4yjzmg6ns7a13j1cxqvrff4fd6k97cpc1xjwqrwp7gq49rzhy7";
+    sha256 = "0v1wmjvi05i6mjh6yxqigbf2spf7842198yp98f7h0nyfjmz96hn";
   };
 
   propagatedBuildInputs = [
@@ -42,6 +42,7 @@ buildPythonPackage rec {
     "test_get_latest_frame"
     "test_get_loop"
     "test_get_ec_sites"
+    "test_ecradar"
   ];
 
   pythonImportsCheck = [ "env_canada" ];
diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix
index 7236f7c22e3d..0e095126676d 100644
--- a/pkgs/development/python-modules/grpcio-tools/default.nix
+++ b/pkgs/development/python-modules/grpcio-tools/default.nix
@@ -2,11 +2,11 @@
 
 buildPythonPackage rec {
   pname = "grpcio-tools";
-  version = "1.38.1";
+  version = "1.39.0";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "cd85f58038b92e1961f8127d79691e84e151390d35cae73c4c0cbe2042f76b77";
+    sha256 = "39dfe7415bc0d3860fdb8dd90607594b046b88b57dbe64284efa4820f951c805";
   };
 
   outputs = [ "out" "dev" ];
diff --git a/pkgs/development/python-modules/nengo/default.nix b/pkgs/development/python-modules/nengo/default.nix
new file mode 100644
index 000000000000..566540a4c972
--- /dev/null
+++ b/pkgs/development/python-modules/nengo/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, buildPythonPackage
+, numpy
+, scipySupport ? false, scipy
+, scikitSupport ? false, scikit-learn
+}:
+
+buildPythonPackage rec {
+  pname = "nengo";
+  version = "3.1.0";
+
+  src = fetchFromGitHub {
+    owner = "nengo";
+    repo = "nengo";
+    rev = "v${version}";
+    sha256 = "1wkayimf2jqkbr6piikh5zd6yw8gf2qv4v4bfrprs4laa6wzh2qh";
+  };
+
+  propagatedBuildInputs = [ numpy ]
+    ++ lib.optionals scipySupport [ scipy ]
+    ++ lib.optionals scikitSupport [ scikit-learn ];
+
+  # checks req missing:
+  #   pytest-allclose
+  #   pytest-plt
+  #   pytest-rng
+  doCheck = false;
+
+  pythonImportsCheck = [ "nengo" ];
+
+  meta = with lib; {
+    description = "A Python library for creating and simulating large-scale brain models";
+    homepage    = "https://nengo.ai/";
+    license     = licenses.unfreeRedistributable;
+    maintainers = with maintainers; [ arjix ];
+  };
+}
diff --git a/pkgs/development/python-modules/pygame-gui/default.nix b/pkgs/development/python-modules/pygame-gui/default.nix
new file mode 100644
index 000000000000..58f65b6d0f41
--- /dev/null
+++ b/pkgs/development/python-modules/pygame-gui/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, pkgs
+, buildPythonPackage
+, fetchFromGitHub
+, pygame
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pygame-gui";
+  version = "0.5.7";
+
+  src = fetchFromGitHub {
+    owner = "MyreMylar";
+    repo = "pygame_gui";
+    rev = "v_${lib.replaceStrings ["."] [""] version}";
+    sha256 = "4P2PT8/7oA5Q7H4+pm7BOET7w05pQYQltXVV3+YVrVE=";
+  };
+
+  propagatedBuildInputs = [ pygame ];
+
+  postPatch = ''
+    substituteInPlace pygame_gui/core/utility.py \
+      --replace "xsel" "${pkgs.xsel}/bin/xsel"
+  '';
+
+  checkInputs = [ pytestCheckHook ];
+
+  preCheck = ''
+    export HOME=$TMPDIR
+    export SDL_VIDEODRIVER=dummy
+  '';
+
+  disabledTests = [
+    # Clipboard doesn't exist in test environment
+    "test_process_event_text_ctrl_c"
+    "test_process_event_text_ctrl_v"
+    "test_process_event_text_ctrl_v_nothing"
+    "test_process_event_ctrl_v_over_limit"
+    "test_process_event_ctrl_v_at_limit"
+    "test_process_event_ctrl_v_over_limit_select_range"
+    "test_process_event_text_ctrl_v_select_range"
+    "test_process_event_text_ctrl_a"
+    "test_process_event_text_ctrl_x"
+  ];
+
+  meta = with lib; {
+    description = "A GUI system for pygame";
+    homepage = "https://github.com/MyreMylar/pygame_gui";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ angustrau ];
+  };
+}
diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix
index 333312d6aa0b..bcdce070c633 100644
--- a/pkgs/development/python-modules/pygame/default.nix
+++ b/pkgs/development/python-modules/pygame/default.nix
@@ -1,5 +1,6 @@
 { lib, fetchPypi, buildPythonPackage, python, pkg-config, libX11
 , SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, libpng, libjpeg, portmidi, freetype
+, fontconfig
 }:
 
 buildPythonPackage rec {
@@ -20,9 +21,6 @@ buildPythonPackage rec {
     portmidi libX11 freetype
   ];
 
-  # Tests fail because of no audio device and display.
-  doCheck = false;
-
   preConfigure = ''
     sed \
       -e "s/origincdirs = .*/origincdirs = []/" \
@@ -39,9 +37,18 @@ buildPythonPackage rec {
     LOCALBASE=/ ${python.interpreter} buildconfig/config.py
   '';
 
+  checkInputs = [ fontconfig ];
+
+  preCheck = ''
+    # No audio or video device in test environment
+    export SDL_VIDEODRIVER=dummy
+    export SDL_AUDIODRIVER=disk
+    export SDL_DISKAUDIOFILE=/dev/null
+  '';
+
   meta = with lib; {
     description = "Python library for games";
-    homepage = "http://www.pygame.org/";
+    homepage = "https://www.pygame.org/";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
   };
diff --git a/pkgs/development/python-modules/pyls-flake8/default.nix b/pkgs/development/python-modules/pyls-flake8/default.nix
new file mode 100644
index 000000000000..495c54d58593
--- /dev/null
+++ b/pkgs/development/python-modules/pyls-flake8/default.nix
@@ -0,0 +1,29 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, flake8
+, python-lsp-server
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "pyls-flake8";
+  version = "0.4.0";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "emanspeaks";
+    repo = "pyls-flake8";
+    rev = "3df8606ad821100e64743f457c77c20170bde722";
+    sha256 = "14wkmwh8mqr826vdzxhvhdwrnx2akzmnbv3ar391qs4imwqfjx3l";
+  };
+
+  propagatedBuildInputs = [ flake8 python-lsp-server ];
+
+  meta = with lib; {
+    homepage = "https://github.com/emanspeaks/pyls-flake8";
+    description = "A Flake8 plugin for the Python LSP Server.";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}
diff --git a/pkgs/development/python-modules/pymunk/default.nix b/pkgs/development/python-modules/pymunk/default.nix
new file mode 100644
index 000000000000..92918efa8ed8
--- /dev/null
+++ b/pkgs/development/python-modules/pymunk/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, python
+, cffi
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "pymunk";
+  version = "6.0.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    extension = "zip";
+    sha256 = "04jqqd2y0wzzkqppbl08vyzgbcpl5qj946w8da2ilypqdx7j2akp";
+  };
+
+  propagatedBuildInputs = [ cffi ];
+
+  preBuild = ''
+    ${python.interpreter} setup.py build_ext --inplace
+  '';
+
+  checkInputs = [ pytestCheckHook ];
+  pytestFlagsArray = [
+    "pymunk/tests"
+  ];
+
+  meta = with lib; {
+    description = "2d physics library";
+    homepage = "https://www.pymunk.org";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ angustrau ];
+  };
+}
diff --git a/pkgs/development/python-modules/python-lsp-black/default.nix b/pkgs/development/python-modules/python-lsp-black/default.nix
new file mode 100644
index 000000000000..3c18d291e37f
--- /dev/null
+++ b/pkgs/development/python-modules/python-lsp-black/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, black
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, python-lsp-server
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "python-lsp-black";
+  version = "1.0.0";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "python-lsp";
+    repo = "python-lsp-black";
+    rev = "v${version}";
+    sha256 = "1blxhj70jxb9xfbd4dxqikd262n6dn9dw5qhyml5yvdwxbv0bybc";
+  };
+
+  checkInputs = [ pytestCheckHook ];
+
+  propagatedBuildInputs = [ black python-lsp-server ];
+
+  meta = with lib; {
+    homepage = "https://github.com/python-lsp/python-lsp-black";
+    description = "Black plugin for the Python LSP Server";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cpcloud ];
+  };
+}
diff --git a/pkgs/development/python-modules/questionary/default.nix b/pkgs/development/python-modules/questionary/default.nix
index ecb33f6adb15..d7f93b3a47e5 100644
--- a/pkgs/development/python-modules/questionary/default.nix
+++ b/pkgs/development/python-modules/questionary/default.nix
@@ -9,19 +9,23 @@
 
 buildPythonPackage rec {
   pname = "questionary";
-  version = "1.9.0";
+  version = "1.10.0";
   format = "pyproject";
 
   src = fetchFromGitHub {
     owner = "tmbo";
     repo = pname;
     rev = version;
-    sha256 = "1x748bz7l2r48031dj6vr6jvvac28pv6vx1bina4lz60h1qac1kf";
+    sha256 = "14k24fq2nmk90iv0k7pnmmdhmk8z261397wg52sfcsccyhpdw3i7";
   };
 
-  nativeBuildInputs = [ poetry ];
+  nativeBuildInputs = [
+    poetry
+  ];
 
-  propagatedBuildInputs = [ prompt_toolkit ];
+  propagatedBuildInputs = [
+    prompt_toolkit
+  ];
 
   checkInputs = [
     pytest-cov
@@ -32,7 +36,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Python library to build command line user prompts";
-    homepage = "https://github.com/bachya/regenmaschine";
+    homepage = "https://github.com/tmbo/questionary";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
   };
diff --git a/pkgs/development/python-modules/skytemple-rust/default.nix b/pkgs/development/python-modules/skytemple-rust/default.nix
index d22d61099587..d98d23fada6d 100644
--- a/pkgs/development/python-modules/skytemple-rust/default.nix
+++ b/pkgs/development/python-modules/skytemple-rust/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, fetchFromGitHub, rustPlatform, setuptools-rust }:
+{ lib, stdenv, buildPythonPackage, fetchFromGitHub, libiconv, rustPlatform, setuptools-rust }:
 
 buildPythonPackage rec {
   pname = "skytemple-rust";
@@ -17,6 +17,7 @@ buildPythonPackage rec {
     sha256 = "1ypcsf9gbq1bz29kfn7g4kg8741mxg1lfcbb14a0vfhjq4d6pnx9";
   };
 
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
   nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook rust.cargo rust.rustc ]);
 
   doCheck = false; # there are no tests