diff options
Diffstat (limited to 'pkgs/development/python-modules')
17 files changed, 146 insertions, 147 deletions
diff --git a/pkgs/development/python-modules/auth0-python/default.nix b/pkgs/development/python-modules/auth0-python/default.nix index 10ad9c5a301..67701afc0eb 100644 --- a/pkgs/development/python-modules/auth0-python/default.nix +++ b/pkgs/development/python-modules/auth0-python/default.nix @@ -1,10 +1,10 @@ { lib , buildPythonPackage , fetchPypi -, requests , mock , pyjwt , pytestCheckHook +, requests }: buildPythonPackage rec { @@ -13,7 +13,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "4a5a709a5d460ddc406783fa567d9baebba94687e2387be6405dba97482d4c93"; + sha256 = "sha256-Slpwml1GDdxAZ4P6Vn2brrupRofiOHvmQF26l0gtTJM="; }; propagatedBuildInputs = [ @@ -23,23 +23,21 @@ buildPythonPackage rec { checkInputs = [ mock + pyjwt pytestCheckHook ]; - pytestFlagsArray = [ - # jwt package is not available in nixpkgs - "--ignore=auth0/v3/test/authentication/test_token_verifier.py" - ]; - - # tries to ping websites (e.g. google.com) disabledTests = [ + # tries to ping websites (e.g. google.com) "can_timeout" ]; + pythonImportsCheck = [ "auth0" ]; + meta = with lib; { description = "Auth0 Python SDK"; homepage = "https://github.com/auth0/auth0-python"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index 55ba3ad6ba7..b51ac1701a2 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -2,7 +2,6 @@ , stdenv , bokeh , buildPythonPackage -, fetchpatch , fetchFromGitHub , fsspec , pytestCheckHook @@ -21,14 +20,14 @@ buildPythonPackage rec { pname = "dask"; - version = "2021.03.0"; + version = "2021.06.1"; disabled = pythonOlder "3.5"; src = fetchFromGitHub { owner = "dask"; repo = pname; rev = version; - sha256 = "LACv7lWpQULQknNGX/9vH9ckLsypbqKDGnsNBgKT1eI="; + sha256 = "sha256-wrUqLSmlKhd0NSjWBwbow8aX53ZBTgl2n4lEmvxC3bs="; }; propagatedBuildInputs = [ @@ -54,16 +53,6 @@ buildPythonPackage rec { dontUseSetuptoolsCheck = true; - patches = [ - # dask dataframe cannot be imported in sandboxed builds - # See https://github.com/dask/dask/pull/7601 - (fetchpatch { - url = "https://github.com/dask/dask/commit/9ce5b0d258cecb3ef38fd844135ad1f7ac3cea5f.patch"; - sha256 = "sha256-1EVRYwAdTSEEH9jp+UOnrijzezZN3iYR6q6ieYJM3kY="; - name = "fix-dask-dataframe-imports-in-sandbox.patch"; - }) - ]; - postPatch = '' # versioneer hack to set version of github package echo "def get_versions(): return {'dirty': False, 'error': None, 'full-revisionid': None, 'version': '${version}'}" > dask/_version.py @@ -82,6 +71,12 @@ buildPythonPackage rec { # this test requires features of python3Packages.psutil that are # blocked in sandboxed-builds "test_auto_blocksize_csv" + ] ++ [ + # A deprecation warning from newer sqlalchemy versions makes these tests + # to fail https://github.com/dask/dask/issues/7406 + "test_sql" + # Test interrupt fails intermittently https://github.com/dask/dask/issues/2192 + "test_interrupt" ]; __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/databases/default.nix b/pkgs/development/python-modules/databases/default.nix index 3a1da0697c0..98e047836d0 100644 --- a/pkgs/development/python-modules/databases/default.nix +++ b/pkgs/development/python-modules/databases/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , sqlalchemy , aiocontextvars , isPy27 @@ -23,6 +24,18 @@ buildPythonPackage rec { sha256 = "0aq88k7d9036cy6qvlfv9p2dxd6p6fic3j0az43gn6k1ardhdsgf"; }; + patches = [ + # sqlalchemy 1.4 compat, https://github.com/encode/databases/pull/299 + (fetchpatch { + url = "https://github.com/encode/databases/commit/9d6e0c024833bd41421f0798a94ef2bbf27a31d5.patch"; + sha256 = "0wz9dz6g88ifvvwlhy249cjvqpx72x99wklzcl7b23srpcvb5gv1"; + }) + (fetchpatch { + url = "https://github.com/encode/databases/commit/40c41c2b7b3fedae484ad94d81b27ce88a09c5ed.patch"; + sha256 = "0z458l3vkg4faxbnf31lszfby5d10fa9kgxxy4xxcm0py6d8a2pi"; + }) + ]; + propagatedBuildInputs = [ aiocontextvars sqlalchemy diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix index 17070acaa55..5738dc64e75 100644 --- a/pkgs/development/python-modules/datashader/default.nix +++ b/pkgs/development/python-modules/datashader/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "e89b1c1e6d508c399738b2daf37aa102f63fc70be53cce9db90d654b19c2555f"; + sha256 = "sha256-6JscHm1QjDmXOLLa83qhAvY/xwvlPM6duQ1lSxnCVV8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/distributed/default.nix b/pkgs/development/python-modules/distributed/default.nix index 0daa4658051..605e905d4ab 100644 --- a/pkgs/development/python-modules/distributed/default.nix +++ b/pkgs/development/python-modules/distributed/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { # get full repository need conftest.py to run tests src = fetchPypi { inherit pname version; - sha256 = "67bf61fd6022a397625f69b20a1c7c1cf0167b6441e008f0ed86dc8785d46057"; + sha256 = "sha256-Z79h/WAio5diX2myChx8HPAWe2RB4Ajw7Ybch4XUYFc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hvac/default.nix b/pkgs/development/python-modules/hvac/default.nix index ea221bc0d99..70cd9ca5abd 100644 --- a/pkgs/development/python-modules/hvac/default.nix +++ b/pkgs/development/python-modules/hvac/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchPypi, requests, six }: +{ lib +, buildPythonPackage +, fetchPypi +, pyhcl +, requests +, six +}: buildPythonPackage rec { pname = "hvac"; @@ -6,10 +12,14 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "0c616f29d6642adaabcd408a04469374ed83be12b24501bb337e8f37badfef22"; + sha256 = "sha256-DGFvKdZkKtqrzUCKBEaTdO2DvhKyRQG7M36PN7rf7yI="; }; - propagatedBuildInputs = [ requests six ]; + propagatedBuildInputs = [ + pyhcl + requests + six + ]; # Requires running a Vault server doCheck = false; @@ -20,5 +30,6 @@ buildPythonPackage rec { description = "HashiCorp Vault API client"; homepage = "https://github.com/ianunruh/hvac"; license = licenses.asl20; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/intake/default.nix b/pkgs/development/python-modules/intake/default.nix index 41207295a2c..fff6d74b56a 100644 --- a/pkgs/development/python-modules/intake/default.nix +++ b/pkgs/development/python-modules/intake/default.nix @@ -73,6 +73,7 @@ buildPythonPackage rec { # broken test "test_read_pattern" + "test_remote_arr" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/ncclient/default.nix b/pkgs/development/python-modules/ncclient/default.nix index e865c7a7367..010e2a5bae3 100644 --- a/pkgs/development/python-modules/ncclient/default.nix +++ b/pkgs/development/python-modules/ncclient/default.nix @@ -1,34 +1,34 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , paramiko , selectors2 , lxml -, nose -, rednose +, pytestCheckHook }: buildPythonPackage rec { pname = "ncclient"; version = "0.6.12"; - src = fetchPypi { - inherit pname version; - sha256 = "37c8a9f9a44f0346144119ab17ae6559e44b5a991f4c34ea3765c678079e4beb"; + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1sjvqaxb54nmqljiw5bg1423msa9rg015wiix9fsm6djk3wpklmk"; }; - checkInputs = [ nose rednose ]; - propagatedBuildInputs = [ - paramiko lxml selectors2 + paramiko + lxml + selectors2 ]; - checkPhase = '' - nosetests test --rednose --verbosity=3 --with-coverage --cover-package ncclient - ''; + checkInputs = [ + pytestCheckHook + ]; - #Unfortunately the test hangs at te end - doCheck = false; + pythonImportsCheck = [ "ncclient" ]; meta = with lib; { homepage = "https://github.com/ncclient/ncclient"; diff --git a/pkgs/development/python-modules/pg8000/default.nix b/pkgs/development/python-modules/pg8000/default.nix index 80bac373894..5560e918ac4 100644 --- a/pkgs/development/python-modules/pg8000/default.nix +++ b/pkgs/development/python-modules/pg8000/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "dcb9afb9cb87acc79388ae633c45cf7f806aabe3bb5d8cf154572b699393f937"; + sha256 = "sha256-3LmvucuHrMeTiK5jPEXPf4Bqq+O7XYzxVFcraZOT+Tc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/privacyidea/default.nix b/pkgs/development/python-modules/privacyidea/default.nix deleted file mode 100644 index 11ff6f71af6..00000000000 --- a/pkgs/development/python-modules/privacyidea/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python, nixosTests - -, cryptography, pyrad, pymysql, python-dateutil, flask-versioned, flask_script -, defusedxml, croniter, flask_migrate, pyjwt1, configobj, sqlsoup, pillow -, python-gnupg, passlib, pyopenssl, beautifulsoup4, smpplib, flask-babel -, ldap3, huey, pyyaml, qrcode, oauth2client, requests, lxml, cbor2, psycopg2 -, pydash, ecdsa - -, mock, pytestCheckHook, responses, testfixtures -}: - -buildPythonPackage rec { - pname = "privacyIDEA"; - version = "3.5.2"; - - src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-k2om2LjkFRCT53ECPAJEztCiMdz4fF5eoipVUvSoyGo="; - fetchSubmodules = true; - }; - - patches = [ - # Subset of https://github.com/privacyidea/privacyidea/commit/359db6dd10212b8a210e0a83536e92e9e796a1f8, - # fixes app context errors in tests. Can be removed on the next bump. - ./fix-tests.patch - ]; - - propagatedBuildInputs = [ - cryptography pyrad pymysql python-dateutil flask-versioned flask_script - defusedxml croniter flask_migrate pyjwt1 configobj sqlsoup pillow - python-gnupg passlib pyopenssl beautifulsoup4 smpplib flask-babel - ldap3 huey pyyaml qrcode oauth2client requests lxml cbor2 psycopg2 - pydash ecdsa - ]; - - passthru.tests = { inherit (nixosTests) privacyidea; }; - - checkInputs = [ openssl mock pytestCheckHook responses testfixtures ]; - disabledTests = [ - "AESHardwareSecurityModuleTestCase" - "test_01_cert_request" - "test_01_loading_scripts" - "test_02_api_push_poll" - "test_02_cert_enrolled" - "test_02_enroll_rights" - "test_02_get_resolvers" - "test_02_success" - "test_03_get_identifiers" - "test_04_remote_user_auth" - "test_14_convert_timestamp_to_utc" - ]; - - pythonImportsCheck = [ "privacyidea" ]; - - postPatch = '' - substituteInPlace privacyidea/lib/resolvers/LDAPIdResolver.py --replace \ - "/etc/privacyidea/ldap-ca.crt" \ - "${cacert}/etc/ssl/certs/ca-bundle.crt" - ''; - - postInstall = '' - rm -rf $out/${python.sitePackages}/tests - ''; - - meta = with lib; { - description = "Multi factor authentication system (2FA, MFA, OTP Server)"; - license = licenses.agpl3Plus; - homepage = "http://www.privacyidea.org"; - maintainers = with maintainers; [ globin ma27 ]; - }; -} diff --git a/pkgs/development/python-modules/privacyidea/fix-tests.patch b/pkgs/development/python-modules/privacyidea/fix-tests.patch deleted file mode 100644 index 67c22d2052e..00000000000 --- a/pkgs/development/python-modules/privacyidea/fix-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/privacyidea/lib/resolvers/LDAPIdResolver.py b/privacyidea/lib/resolvers/LDAPIdResolver.py -index ae9d87764..cfc609931 100644 ---- a/privacyidea/lib/resolvers/LDAPIdResolver.py -+++ b/privacyidea/lib/resolvers/LDAPIdResolver.py -@@ -97,11 +97,6 @@ - SERVERPOOL_ROUNDS = 2 - # The number of seconds a non-responding server is removed from the server pool - SERVERPOOL_SKIP = 30 --# The number of seconds that ldap3 waits if no server is left in the pool, before --# starting the next round --pooling_loop_timeout = get_app_config_value("PI_LDAP_POOLING_LOOP_TIMEOUT", 10) --log.info("Setting system wide POOLING_LOOP_TIMEOUT to {0!s}.".format(pooling_loop_timeout)) --ldap3.set_config_parameter("POOLING_LOOP_TIMEOUT", pooling_loop_timeout) - - # 1 sec == 10^9 nano secs == 10^7 * (100 nano secs) - MS_AD_MULTIPLYER = 10 ** 7 -@@ -314,6 +309,11 @@ def __init__(self): - self.serverpool_rounds = SERVERPOOL_ROUNDS - self.serverpool_skip = SERVERPOOL_SKIP - self.serverpool = None -+ # The number of seconds that ldap3 waits if no server is left in the pool, before -+ # starting the next round -+ pooling_loop_timeout = get_app_config_value("PI_LDAP_POOLING_LOOP_TIMEOUT", 10) -+ log.info("Setting system wide POOLING_LOOP_TIMEOUT to {0!s}.".format(pooling_loop_timeout)) -+ ldap3.set_config_parameter("POOLING_LOOP_TIMEOUT", pooling_loop_timeout) - - def checkPass(self, uid, password): - """ diff --git a/pkgs/development/python-modules/python-ethtool/default.nix b/pkgs/development/python-modules/python-ethtool/default.nix new file mode 100644 index 00000000000..03c14739706 --- /dev/null +++ b/pkgs/development/python-modules/python-ethtool/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pkg-config +, libnl +, nettools +}: + +buildPythonPackage rec { + pname = "python-ethtool"; + version = "0.14"; + + src = fetchFromGitHub { + owner = "fedora-python"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Sp7ssfLZ/1FEKrvX257pKcaureZ5mdpJ7jCEh/ft1l0="; + }; + + postPatch = '' + substituteInPlace tests/parse_ifconfig.py --replace "Popen('ifconfig'," "Popen('${nettools}/bin/ifconfig'," + ''; + + buildInputs = [ libnl ]; + nativeBuildInputs = [ pkg-config ]; + pythonImportsCheck = [ "ethtool" ]; + + meta = with lib; { + description = "Python bindings for the ethtool kernel interface"; + homepage = "https://github.com/fedora-python/python-ethtool"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ elohmeier ]; + }; +} diff --git a/pkgs/development/python-modules/python-linux-procfs/default.nix b/pkgs/development/python-modules/python-linux-procfs/default.nix new file mode 100644 index 00000000000..702be64075a --- /dev/null +++ b/pkgs/development/python-modules/python-linux-procfs/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, fetchgit, six }: + +buildPythonPackage rec { + pname = "python-linux-procfs"; + version = "0.6.3"; + + src = fetchgit { + url = "https://git.kernel.org/pub/scm/libs/python/${pname}/${pname}.git"; + rev = "v${version}"; + sha256 = "sha256-PPgMlL9oj4HYUsr444ZrGo1LSZBl9hL5SE98IASUpbc="; + }; + + propagatedBuildInputs = [ six ]; + + # contains no tests + doCheck = false; + pythonImportsCheck = [ "procfs" ]; + + meta = with lib; { + description = "Python classes to extract information from the Linux kernel /proc files"; + homepage = "https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ elohmeier ]; + }; +} diff --git a/pkgs/development/python-modules/streamz/default.nix b/pkgs/development/python-modules/streamz/default.nix index 62e71bd2fd1..2b327174524 100644 --- a/pkgs/development/python-modules/streamz/default.nix +++ b/pkgs/development/python-modules/streamz/default.nix @@ -1,4 +1,7 @@ -{ lib, buildPythonPackage, fetchPypi +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch , confluent-kafka , distributed , flaky @@ -22,6 +25,14 @@ buildPythonPackage rec { sha256 = "04446ece273c041506b1642bd3d8380367a8372196be4d6d6d03faafadc590b2"; }; + patches = [ + # Fix apply import from dask + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/python-streamz/streamz/pull/423.patch"; + sha256 = "sha256-CR+uRvzaFu9WQ633tbvX3gAnudhlVN6VvmxKiR37diw="; + }) + ]; + propagatedBuildInputs = [ networkx tornado @@ -46,6 +57,7 @@ buildPythonPackage rec { checkPhase = '' pytest --deselect=streamz/tests/test_sources.py::test_tcp_async \ --deselect=streamz/tests/test_sources.py::test_tcp \ + --deselect=streamz/tests/test_core.py::test_partition_timeout \ --ignore=streamz/tests/test_kafka.py ''; diff --git a/pkgs/development/python-modules/sunpy/default.nix b/pkgs/development/python-modules/sunpy/default.nix index 84728223642..987523ed42b 100644 --- a/pkgs/development/python-modules/sunpy/default.nix +++ b/pkgs/development/python-modules/sunpy/default.nix @@ -31,12 +31,12 @@ buildPythonPackage rec { pname = "sunpy"; - version = "2.1.5"; + version = "3.0.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "df46101107b248577483d88e547badfc041dcbf6932bdc82004c4b3ee958baff"; + sha256 = "sha256-N/DAvnO+S9E4tndEWpiG84P3FCFwxYNdGFxbxUVsTx8="; }; nativeBuildInputs = [ @@ -74,9 +74,12 @@ buildPythonPackage rec { # darwin has write permission issues doCheck = stdenv.isLinux; + # ignore documentation tests checkPhase = '' - PY_IGNORE_IMPORTMISMATCH=1 HOME=$(mktemp -d) pytest sunpy -k 'not rst' + PY_IGNORE_IMPORTMISMATCH=1 HOME=$(mktemp -d) pytest sunpy -k 'not rst' \ + --deselect=sunpy/tests/tests/test_self_test.py::test_main_nonexisting_module \ + --deselect=sunpy/tests/tests/test_self_test.py::test_main_stdlib_module ''; meta = with lib; { diff --git a/pkgs/development/python-modules/wxPython/4.0.nix b/pkgs/development/python-modules/wxPython/4.0.nix index 2fc9a98a26f..3a86ef4c639 100644 --- a/pkgs/development/python-modules/wxPython/4.0.nix +++ b/pkgs/development/python-modules/wxPython/4.0.nix @@ -18,6 +18,8 @@ , AudioToolbox , OpenGL , CoreFoundation +, pillow +, numpy }: buildPythonPackage rec { @@ -42,6 +44,8 @@ buildPythonPackage rec { [ wxGTK.gtk ] ); + propagatedBuildInputs = [ pillow numpy ]; + DOXYGEN = "${doxygen}/bin/doxygen"; preConfigure = lib.optionalString (!stdenv.isDarwin) '' diff --git a/pkgs/development/python-modules/wxPython/4.1.nix b/pkgs/development/python-modules/wxPython/4.1.nix index a86e07729d9..89796500e04 100644 --- a/pkgs/development/python-modules/wxPython/4.1.nix +++ b/pkgs/development/python-modules/wxPython/4.1.nix @@ -11,6 +11,8 @@ , ncurses , pango , wxGTK +, pillow +, numpy }: let dynamic-linker = stdenv.cc.bintools.dynamicLinker; @@ -36,6 +38,8 @@ buildPythonPackage rec { ncurses ]; + propagatedBuildInputs = [ pillow numpy ]; + DOXYGEN = "${doxygen}/bin/doxygen"; preConfigure = lib.optionalString (!stdenv.isDarwin) '' |