diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-21 00:05:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 00:05:28 +0000 |
commit | 8a3580c2f60ab204ea35562eaae8313e0fe0ce12 (patch) | |
tree | ab5331a9b9a64353a4daf15ad9908218bf303351 /pkgs/development/python-modules | |
parent | fef688899e5882f13efb5f01d54febad37023252 (diff) | |
parent | 4218023470e5d24f3f571963ba54c74327e6c1fe (diff) | |
download | nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.gz nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.bz2 nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.lz nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.xz nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.tar.zst nixpkgs-8a3580c2f60ab204ea35562eaae8313e0fe0ce12.zip |
Merge master into haskell-updates
Diffstat (limited to 'pkgs/development/python-modules')
31 files changed, 354 insertions, 114 deletions
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index c09f1586fd6..dcede9506e3 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -37,9 +37,9 @@ in buildPythonPackage rec { pkg-config ]; checkInputs = [ - numpy ncurses + gdb numpy ncurses ]; - buildInputs = [ glibcLocales gdb ]; + buildInputs = [ glibcLocales ]; LC_ALL = "en_US.UTF-8"; patches = [ diff --git a/pkgs/development/python-modules/agate-sql/default.nix b/pkgs/development/python-modules/agate-sql/default.nix index 890f44b4ad3..68f166b3c7c 100644 --- a/pkgs/development/python-modules/agate-sql/default.nix +++ b/pkgs/development/python-modules/agate-sql/default.nix @@ -22,6 +22,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ agate sqlalchemy ]; + # crate is broken in nixpkgs, with SQLAlchemy > 1.3 + # Skip tests for now as they rely on it. + doCheck = false; + checkInputs = [ crate nose geojson ]; checkPhase = '' diff --git a/pkgs/development/python-modules/ansible/base.nix b/pkgs/development/python-modules/ansible/base.nix index 0a5cc01d929..0c88c378516 100644 --- a/pkgs/development/python-modules/ansible/base.nix +++ b/pkgs/development/python-modules/ansible/base.nix @@ -28,11 +28,11 @@ let in buildPythonPackage rec { pname = "ansible-base"; - version = "2.10.11"; + version = "2.10.12"; src = fetchPypi { inherit pname version; - sha256 = "0jr3cxqiami9k07g2kmvfp54iafbcnd1d66l8fdnaqka5bc19wdw"; + sha256 = "sha256-qWVW4tI5+Sg+FWVNQMGqhmgqTntD9Qtf8CK8jkK2mHg="; }; # ansible_connection is already wrapped, so don't pass it through diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix index 4dd606c9adb..8584ba7166a 100644 --- a/pkgs/development/python-modules/ansible/core.nix +++ b/pkgs/development/python-modules/ansible/core.nix @@ -23,17 +23,17 @@ let ansible-collections = callPackage ./collections.nix { - version = "4.1.0"; - sha256 = "0rrivq1g0vizah8zmf012lzig2xxfk5x1371k16s3nn4zfkwqqgm"; + version = "4.2.0"; + sha256 = "1l30j97q24klylchvbskdmp1xllswn9xskjvg4l0ra6pzfgq2zbk"; }; in buildPythonPackage rec { pname = "ansible-core"; - version = "2.11.2"; + version = "2.11.3"; src = fetchPypi { inherit pname version; - sha256 = "1syadgzn5ww5bhq9s2py4h1hkh11h7aac5b37zi8rw2xfvdc7r2s"; + sha256 = "sha256-DO0bT2cZftsntQk0yV1MtkTG1jXXLH+CbEQl3+RTdnQ="; }; # ansible_connection is already wrapped, so don't pass it through diff --git a/pkgs/development/python-modules/ansible/legacy.nix b/pkgs/development/python-modules/ansible/legacy.nix index 12eed6bdb29..95b127a0db3 100644 --- a/pkgs/development/python-modules/ansible/legacy.nix +++ b/pkgs/development/python-modules/ansible/legacy.nix @@ -1,5 +1,5 @@ { lib -, fetchFromGitHub +, fetchPypi , buildPythonPackage , pycrypto , paramiko @@ -18,13 +18,11 @@ buildPythonPackage rec { pname = "ansible"; - version = "2.9.23"; + version = "2.9.24"; - src = fetchFromGitHub { - owner = "ansible"; - repo = "ansible"; - rev = "v${version}"; - sha256 = "0mikykpzyqpmaiczz53f71mcyc4qvahi9ckn7wgfx7sw7s2z3skk"; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-DC9Tt75z3cNCPZZY/NGQeYl9Wx/FM8StVQ21ixea64o="; }; prePatch = '' diff --git a/pkgs/development/python-modules/btrees/default.nix b/pkgs/development/python-modules/btrees/default.nix index cebe542de26..49acee691cf 100644 --- a/pkgs/development/python-modules/btrees/default.nix +++ b/pkgs/development/python-modules/btrees/default.nix @@ -5,24 +5,45 @@ , zope_interface , transaction , zope_testrunner +, python }: buildPythonPackage rec { pname = "BTrees"; version = "4.9.2"; - buildInputs = [ transaction ]; - propagatedBuildInputs = [ persistent zope_interface ]; - checkInputs = [ zope_testrunner ]; - src = fetchPypi { inherit pname version; sha256 = "d33323655924192c4ac998d9ee3002e787915d19c1e17a6baf47c9a63d9556e3"; }; + propagatedBuildInputs = [ + persistent + zope_interface + ]; + + checkInputs = [ + transaction + zope_testrunner + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m zope.testrunner --test-path=src --auto-color --auto-progress + runHook postCheck + ''; + + pythonImportsCheck = [ + "BTrees.OOBTree" + "BTrees.IOBTree" + "BTrees.IIBTree" + "BTrees.IFBTree" + ]; + meta = with lib; { description = "Scalable persistent components"; homepage = "http://packages.python.org/BTrees"; license = licenses.zpl21; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/crate/default.nix b/pkgs/development/python-modules/crate/default.nix index 07b9652e775..c4a698c5250 100644 --- a/pkgs/development/python-modules/crate/default.nix +++ b/pkgs/development/python-modules/crate/default.nix @@ -39,5 +39,11 @@ buildPythonPackage rec { description = "A Python client library for CrateDB"; license = licenses.asl20; maintainers = with maintainers; [ doronbehar ]; + # 2021-07-12 (@layus): Please unbreak when an update fixes compatibility + # with the version of SQLAlchemy in nixpkgs + # And also re-enable tests in pythonPackages.agate-sql. + # The version string below is intentionally split, so nixpkgs-update does + # not change it. That would make this warning pretty useless. + broken = assert version == "0.2"+"6.0"; true; }; } diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix index 196c7e47b39..ae47989141e 100644 --- a/pkgs/development/python-modules/faker/default.nix +++ b/pkgs/development/python-modules/faker/default.nix @@ -6,16 +6,18 @@ , freezegun , pytestCheckHook , ukpostcodeparser +, pillow , validators }: buildPythonPackage rec { - pname = "Faker"; - version = "6.6.3"; + pname = "faker"; + version = "8.8.2"; src = fetchPypi { - inherit pname version; - sha256 = "c2852cadc99a4ebdbf06934e4c15e30f2307d414ead21d15605759602645f152"; + pname = "Faker"; + inherit version; + sha256 = "sha256-IlNMOqbS7584QDojTcm3G1y4ePt2XHKZS+Xce06vCGU="; }; propagatedBuildInputs = [ @@ -25,6 +27,7 @@ buildPythonPackage rec { checkInputs = [ freezegun + pillow pytestCheckHook ukpostcodeparser validators diff --git a/pkgs/development/python-modules/flake8-future-import/default.nix b/pkgs/development/python-modules/flake8-future-import/default.nix index 661b7c71c33..41e9680937d 100644 --- a/pkgs/development/python-modules/flake8-future-import/default.nix +++ b/pkgs/development/python-modules/flake8-future-import/default.nix @@ -1,4 +1,12 @@ -{ lib, isPy27, isPy38, fetchFromGitHub, buildPythonPackage, pythonOlder, fetchpatch, flake8, importlib-metadata, six }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonAtLeast +, isPy27 +, flake8 +, six +, python +}: buildPythonPackage rec { pname = "flake8-future-import"; @@ -12,16 +20,22 @@ buildPythonPackage rec { sha256 = "00q8n15xdnvqj454arn7xxksyrzh0dw996kjyy7g9rdk0rf8x82z"; }; - propagatedBuildInputs = [ flake8 six ] - ++ lib.optionals (pythonOlder "3.8") [ - importlib-metadata - ]; + patches = lib.optionals (pythonAtLeast "3.8") [ + ./fix-annotations-version.patch + ] ++ lib.optionals isPy27 [ + # Upstream disables this test case naturally on python 3, but it also fails + # inside NixPkgs for python 2. Since it's going to be deleted, we just skip it + # on py2 as well. + ./skip-test.patch + ]; - # Upstream disables this test case naturally on python 3, but it also fails - # inside NixPkgs for python 2. Since it's going to be deleted, we just skip it - # on py2 as well. - patches = lib.optionals isPy38 [ ./fix-annotations-version.patch ] - ++ lib.optionals isPy27 [ ./skip-test.patch ]; + propagatedBuildInputs = [ flake8 ]; + + checkInputs = [ six ]; + + checkPhase = '' + ${python.interpreter} -m test_flake8_future_import + ''; meta = with lib; { description = "A flake8 extension to check for the imported __future__ modules to make it easier to have a consistent code base"; diff --git a/pkgs/development/python-modules/fontmath/default.nix b/pkgs/development/python-modules/fontmath/default.nix index 7a23abdd037..a6982037c1e 100644 --- a/pkgs/development/python-modules/fontmath/default.nix +++ b/pkgs/development/python-modules/fontmath/default.nix @@ -1,18 +1,21 @@ -{ lib, buildPythonPackage, fetchPypi -, fonttools +{ lib, buildPythonPackage, fetchPypi, isPy27 +, fonttools, setuptools-scm , pytest, pytestrunner }: buildPythonPackage rec { pname = "fontMath"; - version = "0.6.0"; + version = "0.8.1"; + disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "09xdqdjyjlx5k9ymi36d7hkgvn55zzjzd65l2yqidkfazlmh14ss"; + sha256 = "0m2z2wwbxwljfcrg8hx4xq538adzcjpc352yqbfw0czbgs5ixmrr"; extension = "zip"; }; + nativeBuildInputs = [ setuptools-scm ]; + propagatedBuildInputs = [ fonttools ]; checkInputs = [ pytest pytestrunner ]; diff --git a/pkgs/development/python-modules/google-i18n-address/default.nix b/pkgs/development/python-modules/google-i18n-address/default.nix index 53ce654e41b..e2724ac123c 100644 --- a/pkgs/development/python-modules/google-i18n-address/default.nix +++ b/pkgs/development/python-modules/google-i18n-address/default.nix @@ -1,18 +1,26 @@ -{ buildPythonPackage, fetchPypi, pythonAtLeast, lib, requests, pytestCheckHook, mock }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, pytestCheckHook +}: buildPythonPackage rec { pname = "google-i18n-address"; - version = "2.4.0"; - disabled = pythonAtLeast "3.9"; + version = "2.5.0"; - src = fetchPypi { - inherit pname version; - sha256 = "8454a58f254a29988b8d1ca9ab663fd28a1f392a3d29b844d8824807db6333d7"; + src = fetchFromGitHub { + owner = "mirumee"; + repo = "google-i18n-address"; + rev = version; + sha256 = "0fn5sph6fq68zrjssgvnnvrkavs8arshjwgxng5dr5fsn6qii3mq"; }; propagatedBuildInputs = [ requests ]; - checkInputs = [ pytestCheckHook mock ]; + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "i18naddress" ]; meta = with lib; { description = "Google's i18n address data packaged for Python"; diff --git a/pkgs/development/python-modules/gprof2dot/default.nix b/pkgs/development/python-modules/gprof2dot/default.nix index 28609919098..3170d199cf5 100644 --- a/pkgs/development/python-modules/gprof2dot/default.nix +++ b/pkgs/development/python-modules/gprof2dot/default.nix @@ -1,12 +1,13 @@ { lib, fetchFromGitHub, buildPythonApplication, python, graphviz }: -buildPythonApplication { - name = "gprof2dot-2019-11-30"; +buildPythonApplication rec { + pname = "gprof2dot"; + version = "2019.11.30"; src = fetchFromGitHub { owner = "jrfonseca"; repo = "gprof2dot"; - rev = "2019.11.30"; + rev = version; sha256 = "1nw4cfwimd0djarw4wc756q095xir78js8flmycg6g7sl3l6p27s"; }; diff --git a/pkgs/development/python-modules/graphene/default.nix b/pkgs/development/python-modules/graphene/default.nix index c2776e20e2b..30947c14303 100644 --- a/pkgs/development/python-modules/graphene/default.nix +++ b/pkgs/development/python-modules/graphene/default.nix @@ -50,7 +50,8 @@ buildPythonPackage rec { pytestFlagsArray = [ "--benchmark-disable" ]; disabledTests = [ - # TypeError: Failed: DID NOT RAISE <class... + # Expects different Exeception classes, but receives none of them + # https://github.com/graphql-python/graphene/issues/1346 "test_unexpected_error" ]; diff --git a/pkgs/development/python-modules/greenlet/default.nix b/pkgs/development/python-modules/greenlet/default.nix index 8762d62e59b..4d829f3d647 100644 --- a/pkgs/development/python-modules/greenlet/default.nix +++ b/pkgs/development/python-modules/greenlet/default.nix @@ -3,6 +3,7 @@ , fetchPypi , six , isPyPy +, python }: @@ -16,11 +17,18 @@ buildPythonPackage rec { sha256 = "c87df8ae3f01ffb4483c796fe1b15232ce2b219f0b18126948616224d3f658ee"; }; - propagatedBuildInputs = [ six ]; + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover -v greenlet.tests + runHook postCheck + ''; - meta = { - homepage = "https://pypi.python.org/pypi/greenlet"; + meta = with lib; { + homepage = "https://github.com/python-greenlet/greenlet"; description = "Module for lightweight in-process concurrent programming"; - license = lib.licenses.lgpl2; + license = with licenses; [ + psfl # src/greenlet/slp_platformselect.h & files in src/greenlet/platform/ directory + mit + ]; }; } diff --git a/pkgs/development/python-modules/httplib2/default.nix b/pkgs/development/python-modules/httplib2/default.nix index 40bfe4d3e88..756d3e4ddcc 100644 --- a/pkgs/development/python-modules/httplib2/default.nix +++ b/pkgs/development/python-modules/httplib2/default.nix @@ -2,6 +2,7 @@ , stdenv , buildPythonPackage , fetchFromGitHub +, fetchpatch , isPy27 , mock , pyparsing @@ -24,6 +25,14 @@ buildPythonPackage rec { sha256 = "sha256-e0Mq9AVJEWQ9GEtYFXk2fMIs7GtAUsyJN6XheqAnD3I="; }; + patches = [ + # fix test_inject_space + (fetchpatch { + url = "https://github.com/httplib2/httplib2/commit/08d6993b69256fbc6c0b1c615c24910803c4d610.patch"; + sha256 = "0kbd1skn58m20kfkh4qzd66g9bvj31xlkbhsg435dkk4qz6l3yn3"; + }) + ]; + postPatch = '' sed -i "/--cov/d" setup.cfg ''; diff --git a/pkgs/development/python-modules/loguru/default.nix b/pkgs/development/python-modules/loguru/default.nix index 8146f8b183e..3134d956af7 100644 --- a/pkgs/development/python-modules/loguru/default.nix +++ b/pkgs/development/python-modules/loguru/default.nix @@ -6,15 +6,14 @@ , isPy27 , colorama , pytestCheckHook -, pythonAtLeast }: buildPythonPackage rec { pname = "loguru"; version = "0.5.3"; - # python3.9 compatibility should be in the next release after 0.5.3 - disabled = isPy27 || pythonAtLeast "3.9"; + disabled = isPy27; + src = fetchPypi { inherit pname version; sha256 = "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319"; @@ -26,6 +25,11 @@ buildPythonPackage rec { url = "https://github.com/Delgan/loguru/commit/31cf758ee9d22dbfa125f38153782fe20ac9dce5.patch"; sha256 = "1lzbs8akg1s7s6xjl3samf4c4bpssqvwg5fn3mwlm4ysr7jd5y67"; }) + # fix tests with Python 3.9 + (fetchpatch { + url = "https://github.com/Delgan/loguru/commit/19f518c5f1f355703ffc4ee62f0e1e397605863e.patch"; + sha256 = "0yn6smik58wdffr4svqsy2n212fwdlcfcwpgqhl9hq2zlivmsdc6"; + }) ]; checkInputs = [ pytestCheckHook colorama ]; diff --git a/pkgs/development/python-modules/markupsafe/default.nix b/pkgs/development/python-modules/markupsafe/default.nix index d48359af0fc..12845da7e37 100644 --- a/pkgs/development/python-modules/markupsafe/default.nix +++ b/pkgs/development/python-modules/markupsafe/default.nix @@ -6,12 +6,13 @@ }: buildPythonPackage rec { - pname = "MarkupSafe"; + pname = "markupsafe"; version = "2.0.1"; disabled = pythonOlder "3.6"; src = fetchPypi { - inherit pname version; + pname = "MarkupSafe"; + inherit version; sha256 = "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"; }; @@ -19,11 +20,12 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonImportsCheck = [ "markupsafe" ]; + meta = with lib; { description = "Implements a XML/HTML/XHTML Markup safe string"; - homepage = "http://dev.pocoo.org"; + homepage = "https://palletsprojects.com/p/markupsafe/"; license = licenses.bsd3; maintainers = with maintainers; [ domenkozar ]; }; - } diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index e4af2ddadb5..74f7d4003dc 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -14,8 +14,7 @@ buildPythonPackage rec { version = "0.53.1"; pname = "numba"; - # uses f-strings, python 3.9 is not yet supported - disabled = pythonOlder "3.6" || pythonAtLeast "3.9"; + disabled = pythonOlder "3.6" || pythonAtLeast "3.10"; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/parameterizedtestcase/default.nix b/pkgs/development/python-modules/parameterizedtestcase/default.nix new file mode 100644 index 00000000000..20e662cd66d --- /dev/null +++ b/pkgs/development/python-modules/parameterizedtestcase/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, isPy27 +}: + +buildPythonPackage rec { + pname = "parameterizedtestcase"; + version = "0.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "4ccc1d15d7e7ef153619a6a9cd45b170268cf82c67fdd336794c75139aae127e"; + }; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m parameterizedtestcase.tests + runHook postCheck + ''; + + doCheck = isPy27; + + meta = with lib; { + description = "Parameterized tests for Python's unittest module"; + homepage = "https://github.com/msabramo/python_unittest_parameterized_test_case"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/phonopy/default.nix b/pkgs/development/python-modules/phonopy/default.nix index 2ca29ffd8e3..af728d414c1 100644 --- a/pkgs/development/python-modules/phonopy/default.nix +++ b/pkgs/development/python-modules/phonopy/default.nix @@ -5,6 +5,7 @@ , pyyaml , matplotlib , h5py +, scipy , spglib , pytestCheckHook }: @@ -18,9 +19,18 @@ buildPythonPackage rec { sha256 = "58485042ab7d88fc8b83744d18b2aefd677adb071c8a717ac3710458192743d7"; }; - propagatedBuildInputs = [ numpy pyyaml matplotlib h5py spglib ]; + propagatedBuildInputs = [ + h5py + matplotlib + numpy + pyyaml + scipy + spglib + ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; # prevent pytest from importing local directory preCheck = '' diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index 0f747a8d73e..af6c3d80dea 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -1,17 +1,17 @@ { lib, stdenv, buildPythonPackage, fetchPypi, isPyPy, isPy3k -, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11 +, defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2, tk, libX11 , libxcb, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook }@args: import ./generic.nix (rec { pname = "Pillow"; - version = "8.2.0"; + version = "8.3.1"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "1qf3bz1sfz58ff6hclg8phgqyy210x3aqdk5yzjr8m5vsw8ap1x7"; + sha256 = "2cac53839bfc5cece8fdbe7f084d5e3ee61e1303cccc86511d351adcb9e2c792"; }; meta = with lib; { diff --git a/pkgs/development/python-modules/pillow/generic.nix b/pkgs/development/python-modules/pillow/generic.nix index 64ae9189559..3e33f1a8aa0 100644 --- a/pkgs/development/python-modules/pillow/generic.nix +++ b/pkgs/development/python-modules/pillow/generic.nix @@ -31,7 +31,8 @@ buildPythonPackage rec { "test_custom_metadata" ]; - propagatedBuildInputs = [ olefile ]; + propagatedBuildInputs = [ olefile ] + ++ lib.optionals (lib.versionAtLeast version "8.2.0") [ defusedxml ]; checkInputs = [ pytestCheckHook pyroma numpy ]; diff --git a/pkgs/development/python-modules/pylsp-mypy/default.nix b/pkgs/development/python-modules/pylsp-mypy/default.nix new file mode 100644 index 00000000000..a7d13bb32a2 --- /dev/null +++ b/pkgs/development/python-modules/pylsp-mypy/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, mypy +, pytestCheckHook +, python-lsp-server +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pylsp-mypy"; + version = "0.5.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "Richardk2n"; + repo = "pylsp-mypy"; + rev = version; + sha256 = "1d119csj1k5m9j0f7wdvpvnd02h548css6ybxqah92nk2v0rjscr"; + }; + + checkInputs = [ pytestCheckHook mock ]; + + propagatedBuildInputs = [ mypy python-lsp-server ]; + + meta = with lib; { + homepage = "https://github.com/Richardk2n/pylsp-mypy"; + description = "Mypy plugin for the Python LSP Server"; + license = licenses.mit; + maintainers = with maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/development/python-modules/pyqtgraph/default.nix b/pkgs/development/python-modules/pyqtgraph/default.nix index fd2b9d46185..54a136d5dcd 100644 --- a/pkgs/development/python-modules/pyqtgraph/default.nix +++ b/pkgs/development/python-modules/pyqtgraph/default.nix @@ -1,26 +1,57 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, scipy , numpy -, pyopengl , pyqt5 -, scipy +, pyopengl +, qt5 +, python +, pytestCheckHook +, freefont_ttf +, makeFontsConf +, fetchpatch }: +let + fontsConf = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; +in buildPythonPackage rec { pname = "pyqtgraph"; - version = "0.12.1"; + version = "0.12.2"; - src = fetchPypi { - inherit pname version; - sha256 = "d2ef3b5289184fb48dfe5f44ccb58d9d64ffb5452fc524a2bd7a640a36b3874d"; + src = fetchFromGitHub { + owner = "pyqtgraph"; + repo = "pyqtgraph"; + rev = "pyqtgraph-${version}"; + sha256 = "093kkxwj75nb508vz7px4x7lxrwpaff10pl15m4h74hjwyvbsg3d"; }; - propagatedBuildInputs = [ numpy pyopengl pyqt5 scipy ]; + # TODO: remove when updating to 0.12.3 + patches = [ + (fetchpatch { + url = "https://github.com/pyqtgraph/pyqtgraph/commit/2de5cd78da92b48e48255be2f41ae332cf8bb675.patch"; + sha256 = "1hy86psqyl6ipvbg23zvackkd6f7ajs6qll0mbs0x2zmrj92hk00"; + }) + ]; + + propagatedBuildInputs = [ + numpy + pyqt5 + scipy + pyopengl + ]; - doCheck = false; # tries to create windows (QApps) on collection, which fails (probably due to no display) + checkInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "pyqtgraph" ]; + preCheck = '' + export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM=offscreen + export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks + export FONTCONFIG_FILE=${fontsConf} + ''; meta = with lib; { description = "Scientific Graphics and GUI Library for Python"; diff --git a/pkgs/development/python-modules/pyyaml/default.nix b/pkgs/development/python-modules/pyyaml/default.nix index 93cfad78d50..10073176aeb 100644 --- a/pkgs/development/python-modules/pyyaml/default.nix +++ b/pkgs/development/python-modules/pyyaml/default.nix @@ -1,18 +1,37 @@ -{ lib, buildPythonPackage, fetchPypi, cython, libyaml, buildPackages }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, cython +, libyaml +, isPy27 +, python +}: buildPythonPackage rec { pname = "PyYAML"; - version = "5.4.1"; + version = "5.4.1.1"; - src = fetchPypi { - inherit pname version; - sha256 = "607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"; + src = fetchFromGitHub { + owner = "yaml"; + repo = "pyyaml"; + rev = version; + sha256 = "1v386gzdvsjg0mgix6v03rd0cgs9dl81qvn3m547849jm8r41dx8"; }; - nativeBuildInputs = [ cython buildPackages.stdenv.cc ]; + nativeBuildInputs = [ cython ]; buildInputs = [ libyaml ]; + checkPhase = let + testdir = if isPy27 then "tests/lib" else "tests/lib3"; + in '' + runHook preCheck + PYTHONPATH="${testdir}:$PYTHONPATH" ${python.interpreter} -m test_all + runHook postCheck + ''; + + pythonImportsCheck = [ "yaml" ]; + meta = with lib; { description = "The next generation YAML parser and emitter for Python"; homepage = "https://github.com/yaml/pyyaml"; diff --git a/pkgs/development/python-modules/smart-open/default.nix b/pkgs/development/python-modules/smart-open/default.nix index 051d6c97397..d4ad901fb9b 100644 --- a/pkgs/development/python-modules/smart-open/default.nix +++ b/pkgs/development/python-modules/smart-open/default.nix @@ -1,39 +1,75 @@ { lib , buildPythonPackage -, fetchPypi , pythonOlder -, boto +, fetchFromGitHub +, azure-common +, azure-core +, azure-storage-blob , boto3 -, bz2file -, mock -, moto +, google-cloud-storage , requests -, responses +, moto +, parameterizedtestcase +, pytestCheckHook }: buildPythonPackage rec { pname = "smart-open"; - version = "4.2.0"; + version = "5.1.0"; + disabled = pythonOlder "3.5"; - src = fetchPypi { - pname = "smart_open"; - inherit version; - sha256 = "d9f5a0f173ccb9bbae528db5a3804f57145815774f77ef755b9b0f3b4b2a9dcb"; + src = fetchFromGitHub { + owner = "RaRe-Technologies"; + repo = "smart_open"; + rev = "v${version}"; + sha256 = "0gv3vxpglnhh6d80wsqigxi7psn6s7ylz20kx5ahblcx5rqyhjmi"; }; - # moto>=1.0.0 is backwards-incompatible and some tests fail with it, - # so disable tests for now - doCheck = false; + propagatedBuildInputs = [ + azure-common + azure-core + azure-storage-blob + boto3 + google-cloud-storage + requests + ]; + + checkInputs = [ + moto + parameterizedtestcase + pytestCheckHook + ]; + + pytestFlagsArray = [ "smart_open" ]; + + disabledTestPaths = [ + "smart_open/tests/test_http.py" + "smart_open/tests/test_s3.py" + "smart_open/tests/test_s3_version.py" + "smart_open/tests/test_sanity.py" + ]; - checkInputs = [ mock moto responses ]; + disabledTests = [ + "test_compression_invalid" + "test_gs_uri_contains_question_mark" + "test_gzip_compress_sanity" + "test_http" + "test_ignore_ext" + "test_initialize_write" + "test_read_explicit" + "test_s3_handles_querystring" + "test_s3_uri_contains_question_mark" + "test_webhdfs" + "test_write" + ]; - # upstream code requires both boto and boto3 - propagatedBuildInputs = [ boto boto3 bz2file requests ]; + pythonImportsCheck = [ "smart_open" ]; - meta = { - license = lib.licenses.mit; + meta = with lib; { description = "Library for efficient streaming of very large file"; - maintainers = with lib.maintainers; [ jyp ]; + homepage = "https://github.com/RaRe-Technologies/smart_open"; + license = licenses.mit; + maintainers = with maintainers; [ jyp ]; }; } diff --git a/pkgs/development/python-modules/sqlalchemy/default.nix b/pkgs/development/python-modules/sqlalchemy/default.nix index 605334adf0c..6c576f0b85e 100644 --- a/pkgs/development/python-modules/sqlalchemy/default.nix +++ b/pkgs/development/python-modules/sqlalchemy/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "SQLAlchemy"; - version = "1.4.18"; + version = "1.4.20"; src = fetchPypi { inherit pname version; - sha256 = "0k3yfarfa0hcc0bza6nccy685gnmq6gikynqayrvddx6y7si0lnj"; + sha256 = "1l5miq1nzvg51yqw3pnaq17dgibhgx2m0il2ha79gwpyd8k3mviq"; }; propagatedBuildInputs = [ @@ -36,8 +36,6 @@ buildPythonPackage rec { sed -e 's:--max-worker-restart=5::g' -i setup.cfg ''; - dontUseSetuptoolsCheck = true; - # disable mem-usage tests on mac, has trouble serializing pickle files disabledTests = lib.optionals stdenv.isDarwin [ "MemUsageWBackendTest" diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index 6d73357e3bc..1c25612a16d 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -19,11 +19,11 @@ buildPythonPackage rec { pname = "urllib3"; - version = "1.26.5"; + version = "1.26.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-p6zQl3ElMl9Ra9qXNfpxQrkJqNAeiy5MgQjQmE5uAJg="; + sha256 = "sha256-9XtMFsYvonYLfj2Xw1slVRL7a1miWXMPNroyzp+ONC8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/warrant/default.nix b/pkgs/development/python-modules/warrant/default.nix index a4bbee43d01..8da1cf55b54 100644 --- a/pkgs/development/python-modules/warrant/default.nix +++ b/pkgs/development/python-modules/warrant/default.nix @@ -17,7 +17,7 @@ buildPythonPackage { patches = [ (fetchpatch { name = "fix-pip10-compat.patch"; - url = " https://github.com/capless/warrant/commit/ae17d17d9888b9218a8facf6f6ad0bf4adae9a12.patch"; + url = "https://github.com/capless/warrant/commit/ae17d17d9888b9218a8facf6f6ad0bf4adae9a12.patch"; sha256 = "1lvqi2qfa3kxdz05ab2lc7xnd3piyvvnz9kla2jl4pchi876z17c"; }) ]; diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index e5d742bef28..921ed5af4aa 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "watchdog"; - version = "2.1.2"; + version = "2.1.3"; src = fetchPypi { inherit pname version; - sha256 = "sha256-AjfbTZAkhZvqJ9DvtZ/nXu8pCDP9mIuOrXqHmwMIwts="; + sha256 = "sha256-5SNqjoYCq220uHNmTC01bDZas8rJb73sSXCtYWQV3UU="; }; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; diff --git a/pkgs/development/python-modules/xdis/default.nix b/pkgs/development/python-modules/xdis/default.nix index 59cad86606f..aec8b13a122 100644 --- a/pkgs/development/python-modules/xdis/default.nix +++ b/pkgs/development/python-modules/xdis/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "xdis"; - version = "5.0.9"; + version = "5.0.10"; disabled = isPy27; src = fetchFromGitHub { owner = "rocky"; repo = "python-xdis"; rev = version; - sha256 = "sha256-joKPTEq0UabXMyld0DHrhC1D/Om2B5st0qa2F9r0muA="; + sha256 = "sha256-/3qyMgliua7W4Va1HdRbHyiR/eBQzHK+GrZVAMvMhLA="; }; checkInputs = [ pytest ]; |