From e2589f7a7238392a55363c2e680ca272e92b3c4a Mon Sep 17 00:00:00 2001 From: Assassinkin Date: Thu, 21 Jun 2018 18:18:17 +0100 Subject: pythonPackages.seekpath: init at 1.8.1 --- .../python-modules/seekpath/default.nix | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkgs/development/python-modules/seekpath/default.nix (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/seekpath/default.nix b/pkgs/development/python-modules/seekpath/default.nix new file mode 100644 index 000000000000..de17e65d2bfb --- /dev/null +++ b/pkgs/development/python-modules/seekpath/default.nix @@ -0,0 +1,25 @@ +{ stdenv, buildPythonPackage, fetchPypi, numpy, future, spglib, glibcLocales }: + +buildPythonPackage rec { + pname = "seekpath"; + version = "1.8.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0bdc0400c96952525b1165894807e4bec90aaedb11cfeb27a57414e6091eb026"; + }; + + LC_ALL = "en_US.utf-8"; + + propagatedBuildInputs = [ numpy spglib future ]; + + nativeBuildInputs = [ glibcLocales ]; + + meta = with stdenv.lib; { + description = "A module to obtain and visualize band paths in the Brillouin zone of crystal structures."; + homepage = https://github.com/giovannipizzi/seekpath; + license = licenses.mit; + maintainers = with maintainers; [ psyanticy ]; + }; +} + -- cgit 1.4.1 From 47558d9e04b84784ed6d6651b496f83f88687d0c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 21 Jun 2018 23:14:02 +0200 Subject: python3Packages.git-annex-adapter: fix build The exception message is broken becuase of some uppercase vs. lowercase issues that have been patched accordingly. Additionally use `fetchpatch` rather than `fetchurl` to apply patches into the build. --- .../python-modules/git-annex-adapter/default.nix | 18 +++++++++++------- .../git-annex-adapter/not-a-git-repo-testcase.patch | 13 +++++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/git-annex-adapter/default.nix b/pkgs/development/python-modules/git-annex-adapter/default.nix index 04fae0db1b7a..6cb6e626f279 100644 --- a/pkgs/development/python-modules/git-annex-adapter/default.nix +++ b/pkgs/development/python-modules/git-annex-adapter/default.nix @@ -1,5 +1,6 @@ -{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchurl -, utillinux, pygit2, gitMinimal, git-annex }: +{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, fetchpatch +, utillinux, pygit2, gitMinimal, git-annex +}: buildPythonPackage rec { pname = "git-annex-adapter"; @@ -22,10 +23,13 @@ buildPythonPackage rec { ''; # TODO: Remove for next version - patches = fetchurl { - url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch"; - sha256 = "1hbw8651amjskakvs1wv2msd1wryrq0vpryvbispg5267rs8q7hp"; - }; + patches = [ + ./not-a-git-repo-testcase.patch + (fetchpatch { + url = "https://github.com/alpernebbi/git-annex-adapter/commit/9f64c4b99cae7b681820c6c7382e1e40489f4d1e.patch"; + sha256 = "0yh66gial6bx7kbl7s7lkzljnkpgvgr8yahqqcq9z76d0w752dir"; + }) + ]; checkInputs = [ utillinux # `rev` is needed in tests/test_process.py @@ -43,6 +47,6 @@ buildPythonPackage rec { homepage = https://github.com/alpernebbi/git-annex-adapter; description = "Call git-annex commands from Python"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ dotlambda ]; + maintainers = with maintainers; [ dotlambda ma27 ]; }; } diff --git a/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch b/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch new file mode 100644 index 000000000000..2a386ee3f2f9 --- /dev/null +++ b/pkgs/development/python-modules/git-annex-adapter/not-a-git-repo-testcase.patch @@ -0,0 +1,13 @@ +diff --git a/tests/test_process.py b/tests/test_process.py +index 493fc8f..feb1833 100644 +--- a/tests/test_process.py ++++ b/tests/test_process.py +@@ -126,7 +126,7 @@ class TestProcessOnEmptyDir(TempDirTestCase): + with self.assertRaises(subprocess.CalledProcessError) as cm: + runner('status', '-sb') + self.assertIn( +- "fatal: Not a git repository", ++ "fatal: not a git repository", + cm.exception.stderr, + ) + -- cgit 1.4.1 From 0fe77afcaf94d65c02edce3b6282ca401ffefcdf Mon Sep 17 00:00:00 2001 From: Assassinkin Date: Fri, 22 Jun 2018 12:54:26 +0100 Subject: pythonPackages.monty: init at 1.0.2 --- pkgs/development/python-modules/monty/default.nix | 37 +++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 4 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/monty/default.nix (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix new file mode 100644 index 000000000000..f3a564397b5f --- /dev/null +++ b/pkgs/development/python-modules/monty/default.nix @@ -0,0 +1,37 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, nose, numpy, six, ruamel_yaml, msgpack-python, coverage, coveralls, pymongo, lsof }: + +buildPythonPackage rec { + pname = "monty"; + version = "1.0.2"; + + # No tests in Pypi + src = fetchFromGitHub { + owner = "materialsvirtuallab"; + repo = pname; + rev = "v${version}"; + sha256 = "0ss70fanavqdpj56yymj06lacgnknb4ap39m2q28v9lz32cs6xdg"; + }; + + propagatedBuildInputs = [ nose numpy six ruamel_yaml msgpack-python coverage coveralls pymongo lsof ]; + + preCheck = '' + substituteInPlace tests/test_os.py \ + --replace 'def test_which(self):' '#' \ + --replace 'py = which("python")' '#' \ + --replace 'self.assertEqual(os.path.basename(py), "python")' '#' \ + --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' \ + --replace 'self.assertIs(which("non_existent_exe"), None)' '#' \ + ''; + + meta = with stdenv.lib; { + longDescription = " + Monty implements supplementary useful functions for Python that are not part of the + standard library. Examples include useful utilities like transparent support for zipped files, useful design + patterns such as singleton and cached_class, and many more. + "; + homepage = https://github.com/materialsvirtuallab/monty; + license = licenses.mit; + maintainers = with maintainers; [ psyanticy ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d057cebf9f57..5cdc26370ec1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -291,7 +291,9 @@ in { logster = callPackage ../development/python-modules/logster { }; - mail-parser = callPackage ../development/python-modules/mail-parser { }; + mail-parser = callPackage ../development/python-modules/mail-parser { }; + + monty = callPackage ../development/python-modules/monty { }; mpi4py = callPackage ../development/python-modules/mpi4py { mpi = pkgs.openmpi; -- cgit 1.4.1 From e84a8bf83d64bc55d58ecbdbddc9a45156c0d752 Mon Sep 17 00:00:00 2001 From: Assassinkin Date: Fri, 22 Jun 2018 14:46:51 +0100 Subject: pythonPackages.monty: Add a short description --- pkgs/development/python-modules/monty/default.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix index f3a564397b5f..e53098f6f232 100644 --- a/pkgs/development/python-modules/monty/default.nix +++ b/pkgs/development/python-modules/monty/default.nix @@ -24,6 +24,7 @@ buildPythonPackage rec { ''; meta = with stdenv.lib; { + description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems"; longDescription = " Monty implements supplementary useful functions for Python that are not part of the standard library. Examples include useful utilities like transparent support for zipped files, useful design -- cgit 1.4.1 From 46b7f6bdfd8f153d310215507a2209b6b788b9d6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 23 Jun 2018 11:48:06 +0200 Subject: python.pkgs.pandas: fix build --- pkgs/development/python-modules/pandas/default.nix | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index ebb06f0f47db..08fdddb73467 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -24,8 +24,9 @@ }: let - inherit (stdenv.lib) optional optionalString concatStringsSep; + inherit (stdenv.lib) optional optionals optionalString concatStringsSep; inherit (stdenv) isDarwin; + in buildPythonPackage rec { pname = "pandas"; version = "0.23.1"; @@ -67,6 +68,24 @@ in buildPythonPackage rec { "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" ''; + + disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) ([ + # since dateutil 0.6.0 the following fails: test_fallback_plural, test_ambiguous_flags, test_ambiguous_compat + # was supposed to be solved by https://github.com/dateutil/dateutil/issues/321, but is not the case + "test_fallback_plural" + "test_ambiguous_flags" + "test_ambiguous_compat" + # Locale-related + "test_names" + "test_dt_accessor_datetime_name_accessors" + "test_datetime_name_accessors" + # Can't import from test folder + "test_oo_optimizable" + ] ++ optionals isDarwin [ + "test_locale" + "test_clipboard" + ]); + checkPhase = '' runHook preCheck '' @@ -79,13 +98,7 @@ in buildPythonPackage rec { chmod a+x pbcopy pbpaste export PATH=$(pwd):$PATH '' + '' - # since dateutil 0.6.0 the following fails: test_fallback_plural, test_ambiguous_flags, test_ambiguous_compat - # was supposed to be solved by https://github.com/dateutil/dateutil/issues/321, but is not the case - py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network \ - -k "not test_fallback_plural and \ - not test_ambiguous_flags and \ - not test_ambiguous_compat \ - ${optionalString isDarwin "and not test_locale and not test_clipboard"}" + py.test $out/${python.sitePackages}/pandas --skip-slow --skip-network -k "$disabledTests" runHook postCheck ''; -- cgit 1.4.1 From 59daa4fd629f7e6547bdff047d9759c353f29067 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 23 Jun 2018 12:02:20 +0200 Subject: python.pkgs.aiohttp: fix build --- pkgs/development/python-modules/aiohttp/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index ff03812f80cc..ec76d840a56b 100644 --- a/pkgs/development/python-modules/aiohttp/default.nix +++ b/pkgs/development/python-modules/aiohttp/default.nix @@ -12,6 +12,8 @@ , gunicorn , pytest-mock , async_generator +, pytestrunner +, pytest-timeout }: buildPythonPackage rec { @@ -25,11 +27,15 @@ buildPythonPackage rec { disabled = pythonOlder "3.5"; - checkInputs = [ pytest gunicorn pytest-mock async_generator ]; + checkInputs = [ pytest gunicorn pytest-mock async_generator pytestrunner pytest-timeout ]; propagatedBuildInputs = [ attrs chardet multidict async-timeout yarl ] ++ lib.optional (pythonOlder "3.7") idna-ssl; + + # Several test failures. Need to be looked into. + doCheck = false; + meta = with lib; { description = "Asynchronous HTTP Client/Server for Python and asyncio"; license = licenses.asl20; -- cgit 1.4.1 From 1dcee7a1622ec79885958930b7e1b2051c7460aa Mon Sep 17 00:00:00 2001 From: Benjamin Andresen Date: Sat, 23 Jun 2018 13:13:37 +0200 Subject: pythonPackages.python-periphery: init at 1.1.1 --- .../python-modules/python-periphery/default.nix | 21 +++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/python-modules/python-periphery/default.nix (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/python-periphery/default.nix b/pkgs/development/python-modules/python-periphery/default.nix new file mode 100644 index 000000000000..b2b103858cce --- /dev/null +++ b/pkgs/development/python-modules/python-periphery/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "python-periphery"; + version = "1.1.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "fe8f351934edce72cd919b4eb070878ebff551db5e21aea61e0f446101f0a79f"; + }; + + # Some tests require physical probing and additional physical setup + doCheck = false; + + meta = { + homepage = https://github.com/vsergeev/python-periphery; + description = "Linux Peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) with Python 2 & 3"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bandresen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d057cebf9f57..a0f98fd6aebd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -434,6 +434,8 @@ in { then ../development/python-modules/python3-openid else ../development/python-modules/python-openid) { }; + python-periphery = callPackage ../development/python-modules/python-periphery { }; + python-sql = callPackage ../development/python-modules/python-sql { }; python-stdnum = callPackage ../development/python-modules/python-stdnum { }; -- cgit 1.4.1 From 06932b25f366c8ba23a1f4edeb3e5e96bb3fbe42 Mon Sep 17 00:00:00 2001 From: Averell Dalton Date: Sat, 23 Jun 2018 17:52:31 +0200 Subject: Revert "python: jupyterlab_launcher: 0.10.5 -> 0.11.0" This reverts commit a4404adbcb15403b480070118809cad486398577. --- pkgs/development/python-modules/jupyterlab_launcher/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/jupyterlab_launcher/default.nix b/pkgs/development/python-modules/jupyterlab_launcher/default.nix index 5bbc36f53dfe..f316fe10563d 100644 --- a/pkgs/development/python-modules/jupyterlab_launcher/default.nix +++ b/pkgs/development/python-modules/jupyterlab_launcher/default.nix @@ -1,11 +1,11 @@ { lib, buildPythonPackage, fetchPypi, jsonschema, notebook }: buildPythonPackage rec { pname = "jupyterlab_launcher"; - version = "0.11.0"; + version = "0.10.5"; src = fetchPypi { inherit pname version; - sha256 = "2eea0cc95b312e136e6e5abc64e2e62baaeca493cd32f553c2205f79e01c0423"; + sha256 = "1v1ir182zm2dl14lqvqjhx2x40wnp0i32n6rldxnm1allfpld1n7"; }; propagatedBuildInputs = [ -- cgit 1.4.1