diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-06-23 18:14:03 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-06-23 18:14:03 +0200 |
commit | 8cfa9cc66c37fbb8a95cf6dbf2a4279bf9e32e08 (patch) | |
tree | 625d2c9ff4e8fbb672f6ea0b707d4b4753970253 /pkgs/development/python-modules | |
parent | 20e814e02496440cbc1eb2df87681c77bad54b93 (diff) | |
parent | 904114fdb85df99e5e9472c9f6fd6432dc4f9d74 (diff) |
Merge master into staging
Diffstat (limited to 'pkgs/development/python-modules')
8 files changed, 138 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/aiohttp/default.nix b/pkgs/development/python-modules/aiohttp/default.nix index ff03812f80ccf..ec76d840a56ba 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; diff --git a/pkgs/development/python-modules/git-annex-adapter/default.nix b/pkgs/development/python-modules/git-annex-adapter/default.nix index 04fae0db1b7ae..6cb6e626f279f 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 0000000000000..2a386ee3f2f91 --- /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, + ) + diff --git a/pkgs/development/python-modules/jupyterlab_launcher/default.nix b/pkgs/development/python-modules/jupyterlab_launcher/default.nix index 5bbc36f53dfe9..f316fe10563db 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 = [ diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix new file mode 100644 index 0000000000000..e53098f6f2326 --- /dev/null +++ b/pkgs/development/python-modules/monty/default.nix @@ -0,0 +1,38 @@ +{ 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; { + 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 + 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/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index ebb06f0f47dbc..08fdddb73467e 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 ''; 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 0000000000000..b2b103858ccea --- /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/development/python-modules/seekpath/default.nix b/pkgs/development/python-modules/seekpath/default.nix new file mode 100644 index 0000000000000..de17e65d2bfb5 --- /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 ]; + }; +} + |