diff options
Diffstat (limited to 'pkgs/development/python-modules')
19 files changed, 302 insertions, 67 deletions
diff --git a/pkgs/development/python-modules/aiosmb/default.nix b/pkgs/development/python-modules/aiosmb/default.nix index 86686d2055e..88c793f9cb5 100644 --- a/pkgs/development/python-modules/aiosmb/default.nix +++ b/pkgs/development/python-modules/aiosmb/default.nix @@ -5,6 +5,7 @@ , fetchPypi , minikerberos , prompt_toolkit +, pycryptodomex , pythonOlder , six , tqdm @@ -14,12 +15,12 @@ buildPythonPackage rec { pname = "aiosmb"; - version = "0.2.48"; + version = "0.2.49"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "f5518987e3d41d213a4ffc4dd38362465b5d2cf99417014cb5402f8ee8c5abac"; + sha256 = "sha256-XCaAaY7a6Gdddm9B0ET+rVzFra5W0GTI/HUMuvpyhzM="; }; propagatedBuildInputs = [ @@ -27,6 +28,7 @@ buildPythonPackage rec { colorama minikerberos prompt_toolkit + pycryptodomex six tqdm winacl @@ -35,6 +37,7 @@ buildPythonPackage rec { # Project doesn't have tests doCheck = false; + pythonImportsCheck = [ "aiosmb" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/bleak/default.nix b/pkgs/development/python-modules/bleak/default.nix index aecc904af50..d035e413351 100644 --- a/pkgs/development/python-modules/bleak/default.nix +++ b/pkgs/development/python-modules/bleak/default.nix @@ -4,13 +4,13 @@ buildPythonPackage rec { pname = "bleak"; - version = "0.12.0"; + version = "0.12.1"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "sha256-pNHz24YjB6FB9ZLC3LoXS+2qzhforflNXzG6OWFqCvk="; + sha256 = "1va9138igcgbpsnzgr90qwprmhr9h8lryqslc22jxra4r56a502a"; }; postPatch = '' diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix index dcd6caaffa2..3c24d5f3192 100644 --- a/pkgs/development/python-modules/breezy/default.nix +++ b/pkgs/development/python-modules/breezy/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "breezy"; - version = "3.2.0"; + version = "3.2.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-lwKPk+UxKAhfIgUb1xPLJ/za53VdHenmBrr85RTpEps="; + sha256 = "sha256-4LJo6xoooq8EUoDDfQIa4y1/8XX0ybmfM6rX2wsp2Fw="; }; propagatedBuildInputs = [ configobj patiencediff six fastimport dulwich launchpadlib ]; diff --git a/pkgs/development/python-modules/cachelib/default.nix b/pkgs/development/python-modules/cachelib/default.nix index 154c67bb379..9521d3ee03b 100644 --- a/pkgs/development/python-modules/cachelib/default.nix +++ b/pkgs/development/python-modules/cachelib/default.nix @@ -1,14 +1,30 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest-xprocess +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "cachelib"; - version = "0.1.1"; + version = "0.2.0"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "47e95a67d68c729cbad63285a790a06f0e0d27d71624c6e44c1ec3456bb4476f"; + src = fetchFromGitHub { + owner = "pallets"; + repo = pname; + rev = version; + sha256 = "1jh1ghvrv1mnw6mdq19s6x6fblz9qi0vskc6mjp0cxjpnxxblaml"; }; + checkInputs = [ + pytest-xprocess + pytestCheckHook + ]; + + pythonImportsCheck = [ "cachelib" ]; + meta = with lib; { homepage = "https://github.com/pallets/cachelib"; description = "Collection of cache libraries in the same API interface"; diff --git a/pkgs/development/python-modules/geographiclib/default.nix b/pkgs/development/python-modules/geographiclib/default.nix index 5167b986604..5ebaac9cea5 100644 --- a/pkgs/development/python-modules/geographiclib/default.nix +++ b/pkgs/development/python-modules/geographiclib/default.nix @@ -1,22 +1,28 @@ { lib , buildPythonPackage , fetchPypi +, pytestCheckHook }: buildPythonPackage rec { pname = "geographiclib"; - version = "1.50"; + version = "1.52"; src = fetchPypi { inherit pname version; - sha256 = "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"; + sha256 = "sha256-rEANZyuJVLAwa8qJCwiLuLoqdX3IEzzKC4ePNLM7J0A="; }; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "geographiclib" ]; + meta = with lib; { homepage = "https://geographiclib.sourceforge.io"; description = "Algorithms for geodesics (Karney, 2013) for solving the direct and inverse problems for an ellipsoid of revolution"; license = licenses.mit; maintainers = with maintainers; [ va1entin ]; }; - } diff --git a/pkgs/development/python-modules/gruut-ipa/default.nix b/pkgs/development/python-modules/gruut-ipa/default.nix new file mode 100644 index 00000000000..67930bcd034 --- /dev/null +++ b/pkgs/development/python-modules/gruut-ipa/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pkgs +, python +}: + +buildPythonPackage rec { + pname = "gruut-ipa"; + version = "0.9.2"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "rhasspy"; + repo = pname; + rev = "df74f7dff562d868ad8088b7251f9e7206271d37"; + sha256 = "0b2znvjngffxc0mlmqmcai8l22ff09kc39bj6f0lkjw735vclnzh"; + }; + + postPatch = '' + patchShebangs bin/speak-ipa + substituteInPlace bin/speak-ipa \ + --replace '${"\${src_dir}:"}' "$out/lib/${python.libPrefix}/site-packages:" \ + --replace "do espeak" "do ${pkgs.espeak}/bin/espeak" + ''; + + postInstall = '' + install -m0755 bin/speak-ipa $out/bin/speak-ipa + ''; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover + runHook postCheck + ''; + + pythonImportsCheck = [ + "gruut_ipa" + ]; + + meta = with lib; { + description = "Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)"; + homepage = "https://github.com/rhasspy/gruut-ipa"; + license = licenses.mit; + maintainers = teams.tts.members; + }; +} diff --git a/pkgs/development/python-modules/gruut/default.nix b/pkgs/development/python-modules/gruut/default.nix new file mode 100644 index 00000000000..c922d0b52d4 --- /dev/null +++ b/pkgs/development/python-modules/gruut/default.nix @@ -0,0 +1,74 @@ +{ lib +, buildPythonPackage +, callPackage +, pythonOlder +, fetchFromGitHub +, Babel +, gruut-ipa +, jsonlines +, num2words +, python-crfsuite +, dataclasses +, python +}: + +let + langPkgs = [ + "cs" + "de" + "es" + "fr" + "it" + "nl" + "pt" + "ru" + "sv" + "sw" + ]; +in +buildPythonPackage rec { + pname = "gruut"; + version = "1.2.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "rhasspy"; + repo = pname; + rev = "v${version}"; + sha256 = "1763qmcd1gxap27jppqaywx03k5cagcl62z2p2qdiqigdksplm2g"; + }; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "Babel~=2.8.0" "Babel" + ''; + + propagatedBuildInputs = [ + Babel + gruut-ipa + jsonlines + num2words + python-crfsuite + ] ++ lib.optionals (pythonOlder "3.7") [ + dataclasses + ] ++ (map (lang: callPackage ./language-pack.nix { + inherit lang version format src; + }) langPkgs); + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover + runHook postCheck + ''; + + pythonImportsCheck = [ + "gruut" + ]; + + meta = with lib; { + description = "A tokenizer, text cleaner, and phonemizer for many human languages"; + homepage = "https://github.com/rhasspy/gruut"; + license = licenses.mit; + maintainers = teams.tts.members; + }; +} diff --git a/pkgs/development/python-modules/gruut/language-pack.nix b/pkgs/development/python-modules/gruut/language-pack.nix new file mode 100644 index 00000000000..2d3cfa9cc51 --- /dev/null +++ b/pkgs/development/python-modules/gruut/language-pack.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage + +, lang +, version +, format +, src +}: + +buildPythonPackage rec { + pname = "gruut-lang-${lang}"; + inherit version format src; + + prePatch = '' + cd "${pname}" + ''; + + pythonImportsCheck = [ + "gruut_lang_${lang}" + ]; + + doCheck = false; + + meta = with lib; { + description = "Language files for gruut tokenizer/phonemizer"; + homepage = "https://github.com/rhasspy/gruut"; + license = licenses.mit; + maintainers = teams.tts.members; + }; +} diff --git a/pkgs/development/python-modules/gym/default.nix b/pkgs/development/python-modules/gym/default.nix index a1cd76cd38e..888dbf45342 100644 --- a/pkgs/development/python-modules/gym/default.nix +++ b/pkgs/development/python-modules/gym/default.nix @@ -11,13 +11,13 @@ buildPythonPackage rec { pname = "gym"; - version = "0.18.1"; + version = "0.18.3"; src = fetchFromGitHub { owner = "openai"; repo = pname; rev = version; - sha256 = "0mv4af2y9d1y97bsda94f21nis2jm1zkzv7c806vmvzh5s4r8nfn"; + sha256 = "sha256-10KHUG6WacYzqna97vEhSQWDmJDvDmD5QxLhPW5NQSs="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hypercorn/default.nix b/pkgs/development/python-modules/hypercorn/default.nix new file mode 100644 index 00000000000..5f384283536 --- /dev/null +++ b/pkgs/development/python-modules/hypercorn/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitLab +, pythonOlder +, typing-extensions +, wsproto +, toml +, h2 +, priority +, mock +, pytest-asyncio +, pytest-cov +, pytest-sugar +, pytest-trio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "Hypercorn"; + version = "0.11.2"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitLab { + owner = "pgjones"; + repo = pname; + rev = version; + sha256 = "0v80v6l2xqac5mgrmh2im7y23wpvz4yc2v4h9ryhvl88c2jk9mvh"; + }; + + propagatedBuildInputs = [ wsproto toml h2 priority ] + ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ]; + + checkInputs = [ + pytest-asyncio + pytest-cov + pytest-sugar + pytest-trio + pytestCheckHook + ] ++ lib.optionals (pythonOlder "3.8") [ mock ]; + + pythonImportsCheck = [ "hypercorn" ]; + + meta = with lib; { + homepage = "https://pgjones.gitlab.io/hypercorn/"; + description = "The ASGI web server inspired by Gunicorn"; + license = licenses.mit; + maintainers = with maintainers; [ dgliwka ]; + }; +} diff --git a/pkgs/development/python-modules/identify/default.nix b/pkgs/development/python-modules/identify/default.nix index 15850707b18..7e753e2e059 100644 --- a/pkgs/development/python-modules/identify/default.nix +++ b/pkgs/development/python-modules/identify/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "identify"; - version = "2.2.10"; + version = "2.2.11"; src = fetchFromGitHub { owner = "pre-commit"; repo = pname; rev = "v${version}"; - sha256 = "017xcwm8m42a1v3v0fs8v3m2sga97rx9a7vk0cb2g14777f4w4si"; + sha256 = "sha256-E95tUg1gglDXfeCTead2c1e0JOynKu+TBd4LKklrtAE="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/iso3166/default.nix b/pkgs/development/python-modules/iso3166/default.nix index 61ec91075b5..1fc5f695831 100644 --- a/pkgs/development/python-modules/iso3166/default.nix +++ b/pkgs/development/python-modules/iso3166/default.nix @@ -1,22 +1,25 @@ -{ lib, fetchFromGitHub, buildPythonPackage, pytest }: +{ lib +, fetchFromGitHub +, buildPythonPackage +, pytestCheckHook +}: -buildPythonPackage { +buildPythonPackage rec { pname = "iso3166"; - version = "0.8"; + version = "1.0.1"; src = fetchFromGitHub { owner = "deactivated"; repo = "python-iso3166"; - # repo has no version tags - rev = "f04e499447bbff10af701cf3dd81f6bcdf02f7d7"; + rev = "v${version}"; sha256 = "0zs9za9dr2nl5srxir08yibmp6nffcapmzala0fgh8ny7y6rafrx"; }; - checkInputs = [ pytest ]; + checkInputs = [ + pytestCheckHook + ]; - checkPhase = '' - py.test - ''; + pythonImportsCheck = [ "iso3166" ]; meta = with lib; { homepage = "https://github.com/deactivated/python-iso3166"; diff --git a/pkgs/development/python-modules/nexia/default.nix b/pkgs/development/python-modules/nexia/default.nix index 5a2b5f7284a..5e07d6331ac 100644 --- a/pkgs/development/python-modules/nexia/default.nix +++ b/pkgs/development/python-modules/nexia/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "nexia"; - version = "0.9.8"; + version = "0.9.9"; disabled = pythonOlder "3.5"; src = fetchFromGitHub { owner = "bdraco"; repo = pname; rev = version; - sha256 = "sha256-KjA3AnrMg4ySKSY2FDHVo0Zh9GoLUWiQDuUzo8d5At8="; + sha256 = "sha256-OamQ6p8o23lVeOB/KyNQI7G8xZaAaVNYacoRfbNKJtk="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pypandoc/default.nix b/pkgs/development/python-modules/pypandoc/default.nix index b5acf6c0543..3d3af7f4669 100644 --- a/pkgs/development/python-modules/pypandoc/default.nix +++ b/pkgs/development/python-modules/pypandoc/default.nix @@ -4,22 +4,22 @@ buildPythonPackage rec { pname = "pypandoc"; - version = "1.5"; + version = "1.6.3"; src = fetchFromGitHub { - owner = "bebraw"; + owner = "NicklasTegner"; repo = pname; rev = version; - sha256 = "1lpslfns6zxx7b0xr13bzg921lwrj5am8za0b2dviywk6iiib0ld"; + sha256 = "163wkcm06klr68dadr9mb8gblj0ls26w097bjrg4f5j0533ysdpp"; }; patches = [ (substituteAll { src = ./static-pandoc-path.patch; pandoc = "${lib.getBin pandoc}/bin/pandoc"; + pandocVersion = pandoc.version; }) ./skip-tests.patch - ./new-pandoc-headings.patch ]; checkInputs = [ @@ -28,7 +28,7 @@ buildPythonPackage rec { meta = with lib; { description = "Thin wrapper for pandoc"; - homepage = "https://github.com/bebraw/pypandoc"; + homepage = "https://github.com/NicklasTegner/pypandoc"; license = licenses.mit; maintainers = with maintainers; [ sternenseemann bennofs ]; }; diff --git a/pkgs/development/python-modules/pypandoc/new-pandoc-headings.patch b/pkgs/development/python-modules/pypandoc/new-pandoc-headings.patch deleted file mode 100644 index 6716bf57d1b..00000000000 --- a/pkgs/development/python-modules/pypandoc/new-pandoc-headings.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tests.py b/tests.py -index aede281..c400888 100755 ---- a/tests.py -+++ b/tests.py -@@ -295,7 +295,7 @@ class TestPypandoc(unittest.TestCase): - - def test_unicode_input(self): - # make sure that pandoc always returns unicode and does not mishandle it -- expected = u'üäöîôû{0}======{0}{0}'.format(os.linesep) -+ expected = u'# üäöîôû'.format(os.linesep) - written = pypandoc.convert_text(u'<h1>üäöîôû</h1>', 'md', format='html') - self.assertTrue(isinstance(written, unicode_type)) - self.assertEqualExceptForNewlineEnd(expected, written) -@@ -305,7 +305,7 @@ class TestPypandoc(unittest.TestCase): - self.assertTrue(isinstance(written, unicode_type)) - - # Only use german umlauts in th next test, as iso-8859-15 covers that -- expected = u'üäö€{0}===={0}{0}'.format(os.linesep) -+ expected = u'# üäö€'.format(os.linesep) - bytes = u'<h1>üäö€</h1>'.encode("iso-8859-15") - - # Without encoding, this fails as we expect utf-8 per default diff --git a/pkgs/development/python-modules/pypandoc/skip-tests.patch b/pkgs/development/python-modules/pypandoc/skip-tests.patch index d8f7f972177..201c5105c53 100644 --- a/pkgs/development/python-modules/pypandoc/skip-tests.patch +++ b/pkgs/development/python-modules/pypandoc/skip-tests.patch @@ -10,11 +10,3 @@ index deb50e0..aede281 100755 def test_basic_conversion_from_http_url(self): url = 'https://raw.githubusercontent.com/bebraw/pypandoc/master/README.md' received = pypandoc.convert_file(url, 'html') -@@ -247,6 +248,7 @@ class TestPypandoc(unittest.TestCase): - - self.assertRaises(RuntimeError, f) - -+ @unittest.skip("pandoc-citeproc has been deprecated") - def test_conversion_with_citeproc_filter(self): - # we just want to get a temp file name, where we can write to - filters = ['pandoc-citeproc'] diff --git a/pkgs/development/python-modules/pypandoc/static-pandoc-path.patch b/pkgs/development/python-modules/pypandoc/static-pandoc-path.patch index bb495e78bea..8f992185d61 100644 --- a/pkgs/development/python-modules/pypandoc/static-pandoc-path.patch +++ b/pkgs/development/python-modules/pypandoc/static-pandoc-path.patch @@ -5,6 +5,7 @@ index 6d5b79b..65437aa 100644 @@ -582,4 +582,4 @@ def clean_pandocpath_cache(): - __version = None +-__version = None ++__version = "@pandocVersion@" -__pandoc_path = None +__pandoc_path = "@pandoc@" diff --git a/pkgs/development/python-modules/python-crfsuite/default.nix b/pkgs/development/python-modules/python-crfsuite/default.nix new file mode 100644 index 00000000000..cd2adc48c6f --- /dev/null +++ b/pkgs/development/python-modules/python-crfsuite/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "python-crfsuite"; + version = "0.9.7"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "1ryfcdfpqbrf8rcd2rlay2gfiba3px3q508543jf81shrv93hi9v"; + }; + + preCheck = '' + # make sure import the built version, not the source one + rm -r pycrfsuite + ''; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pycrfsuite" + ]; + + meta = with lib; { + description = "Python binding for CRFsuite"; + homepage = "https://github.com/scrapinghub/python-crfsuite"; + license = licenses.mit; + maintainers = teams.tts.members; + }; +} diff --git a/pkgs/development/python-modules/pyupgrade/default.nix b/pkgs/development/python-modules/pyupgrade/default.nix index 412b032db7f..229ac69259d 100644 --- a/pkgs/development/python-modules/pyupgrade/default.nix +++ b/pkgs/development/python-modules/pyupgrade/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "pyupgrade"; - version = "2.19.1"; + version = "2.20.0"; disabled = isPy27; src = fetchFromGitHub { owner = "asottile"; repo = pname; rev = "v${version}"; - sha256 = "sha256-zDT8VskHEX4uldMvxnb9A+FKMuvZbtEcmdVl5mghTs4="; + sha256 = "sha256-Wq15JU6sbXPZSk/vAX6fTuc3vxZeRy9dSCNGGv2utY4="; }; checkInputs = [ pytestCheckHook ]; |