diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules')
586 files changed, 8950 insertions, 2898 deletions
diff --git a/pkgs/development/python-modules/Babel/default.nix b/pkgs/development/python-modules/Babel/default.nix index 1074d2eef48c..183478396eb7 100644 --- a/pkgs/development/python-modules/Babel/default.nix +++ b/pkgs/development/python-modules/Babel/default.nix @@ -1,38 +1,17 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, fetchpatch, pytz, pytest, freezegun, glibcLocales }: +{ stdenv, lib, buildPythonPackage, fetchPypi, pytz, pytestCheckHook, freezegun }: buildPythonPackage rec { pname = "Babel"; - version = "2.7.0"; + version = "2.9.0"; src = fetchPypi { inherit pname version; - sha256 = "e86135ae101e31e2c8ec20a4e0c5220f4eed12487d5cf3f78be7e98d3a57fc28"; + sha256 = "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"; }; - patches = [ - # The following 2 patches fix the test suite failing on nix < 2.3 with - # Python < 3 because those nix versions do not run in a pseudoterminal, - # which makes Python 2 not set the default encoding to UTF-8, and the - # Babel code crashes when printing a warning in that case. - # See #75676 and https://github.com/python-babel/babel/pull/691. - # It is important to fix this because otherwise Babel is not buildable - # with older nix versions (e.g. on machines used as --builders). - # TODO: Remove at release > 2.8.0. - (fetchpatch { - name = "Babel-Introduce-invariant-that-invalid_pofile-takes-unicode-line.patch"; - url = "https://github.com/python-babel/babel/commit/f4f6653e6aa053724d2c6dc0ee71dcb928013352.patch"; - sha256 = "1kyknwn9blspcf9yxmgdiaxdii1dnkblyhcflqwhxyl1mss1dxv5"; - }) - (fetchpatch { - name = "Babel-Fix-unicode-printing-error-on-Python-2-without-TTY.patch"; - url = "https://github.com/python-babel/babel/commit/da7f31143847659b6b74d802618b03438aceb350.patch"; - sha256 = "09yny8614knr8ngrrddmqzkxk70am135rccv2ncc6dji4xbqbfln"; - }) - ]; - propagatedBuildInputs = [ pytz ]; - checkInputs = [ pytest freezegun ]; + checkInputs = [ pytestCheckHook freezegun ]; doCheck = !stdenv.isDarwin; diff --git a/pkgs/development/python-modules/Markups/default.nix b/pkgs/development/python-modules/Markups/default.nix index 012f31c266b2..d997b120d3bf 100644 --- a/pkgs/development/python-modules/Markups/default.nix +++ b/pkgs/development/python-modules/Markups/default.nix @@ -5,6 +5,7 @@ , markdown , docutils , pygments +, pyyaml }: buildPythonPackage rec { @@ -16,7 +17,7 @@ buildPythonPackage rec { sha256 = "e309d79dde0935576ce1def6752f2127a12e2c2ea2ae8b0c69f99ff8bc12181d"; }; - checkInputs = [ markdown docutils pygments ]; + checkInputs = [ markdown docutils pygments pyyaml ]; propagatedBuildInputs = [ python-markdown-math ]; meta = { diff --git a/pkgs/development/python-modules/Nikola/default.nix b/pkgs/development/python-modules/Nikola/default.nix index d8c49c99eba3..17a6e4d6a899 100644 --- a/pkgs/development/python-modules/Nikola/default.nix +++ b/pkgs/development/python-modules/Nikola/default.nix @@ -1,79 +1,112 @@ { lib -, stdenv +, aiohttp +, Babel +, blinker , buildPythonPackage -, isPy3k -, fetchPypi -, doit -, glibcLocales -, pytest -, pytestcov -, mock -, pygments -, pillow , dateutil , docutils -, Mako -, unidecode +, doit +, fetchPypi +, freezegun +, ghp-import +, hsluv +, html5lib +, ipykernel +, jinja2 , lxml -, Yapsy -, PyRSS2Gen -, Logbook -, blinker -, natsort -, requests -, piexif +, Mako , markdown -, phpserialize -, jinja2 -, Babel -, freezegun -, toml +, micawber +, mock +, natsort , notebook +, phpserialize +, piexif +, pillow +, pygal +, pygments +, pyphen +, PyRSS2Gen +, pytestCheckHook +, pythonOlder +, requests , ruamel_yaml -, aiohttp +, stdenv +, toml +, typogrify +, unidecode , watchdog +, Yapsy }: buildPythonPackage rec { pname = "Nikola"; version = "8.1.3"; - - # Nix contains only Python 3 supported version of doit, which is a dependency - # of Nikola. Python 2 support would require older doit 0.29.0 (which on the - # other hand doesn't support Python 3.3). So, just disable Python 2. - disabled = !isPy3k; - - checkInputs = [ pytest pytestcov mock glibcLocales freezegun ]; - - propagatedBuildInputs = [ - # requirements.txt - doit pygments pillow dateutil docutils Mako markdown unidecode - lxml Yapsy PyRSS2Gen Logbook blinker natsort requests piexif Babel - # requirements-extras.txt - phpserialize jinja2 toml notebook ruamel_yaml aiohttp watchdog - ]; + disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; sha256 = "05eac356bb4273cdd05d2dd6ad676226133496c457af91987c3f0d40e2fe57ef"; }; - patchPhase = '' - # upstream added bound so that requires.io doesn't send mails about update - # nikola should work with markdown 3.0: https://github.com/getnikola/nikola/pull/3175#issue-220147596 - sed -i 's/Markdown>.*/Markdown/' requirements.txt - ''; + propagatedBuildInputs = [ + aiohttp + Babel + blinker + dateutil + docutils + doit + ghp-import + hsluv + html5lib + ipykernel + jinja2 + lxml + Mako + markdown + micawber + natsort + notebook + phpserialize + piexif + pillow + pygal + pygments + pyphen + PyRSS2Gen + requests + ruamel_yaml + toml + typogrify + unidecode + watchdog + Yapsy + ]; + + checkInputs = [ + freezegun + mock + pytestCheckHook + ]; - checkPhase = '' - LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" py.test . + postPatch = '' + substituteInPlace setup.cfg \ + --replace "--cov nikola --cov-report term-missing" "" ''; - meta = { + disabledTests = [ + # AssertionError + "test_compiling_markdown" + ]; + + pythonImportsCheck = [ "nikola" ]; + + meta = with lib; { + description = "Static website and blog generator"; homepage = "https://getnikola.com/"; - description = "A modular, fast, simple, static website and blog generator"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ jluttine ]; - # all tests fail + license = licenses.mit; + maintainers = with maintainers; [ jluttine ]; + # All tests fail broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/python-modules/PyRMVtransport/default.nix b/pkgs/development/python-modules/PyRMVtransport/default.nix index cfbf3be1c40c..aee4789f93bf 100644 --- a/pkgs/development/python-modules/PyRMVtransport/default.nix +++ b/pkgs/development/python-modules/PyRMVtransport/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "PyRMVtransport"; - version = "0.3.1"; + version = "0.3.2"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "cgtobi"; repo = pname; rev = "v${version}"; - sha256 = "1savzndg8l7rrc5dgzgsrdz9hnnjfv6qs5drznqmdw4f2rq84ypa"; + sha256 = "0m74m3dhxmbv10hsvs7cpshzs3pg66va5lyq94i5j1nxrl9i7spb"; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/accuweather/default.nix b/pkgs/development/python-modules/accuweather/default.nix index 01a299c89fde..ccacef6df575 100644 --- a/pkgs/development/python-modules/accuweather/default.nix +++ b/pkgs/development/python-modules/accuweather/default.nix @@ -11,20 +11,20 @@ buildPythonPackage rec { pname = "accuweather"; - version = "0.1.1"; + version = "0.2.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "bieniu"; repo = pname; rev = version; - sha256 = "sha256-fjOwa13hxY8/gCM6TCAFWVmEY1oZyqKyc6o3OSsxHpY="; + sha256 = "sha256-Swe8vegRcyaeG4n/8aeGFLrXkwcLM/Al53yD6oD/0GA="; }; postPatch = '' substituteInPlace setup.py \ --replace "pytest-runner" "" - substituteInPlace pytest.ini \ + substituteInPlace setup.cfg \ --replace "--cov --cov-report term-missing" "" ''; diff --git a/pkgs/development/python-modules/adafruit-platformdetect/default.nix b/pkgs/development/python-modules/adafruit-platformdetect/default.nix index 5d0ee6f7c42e..c7fc8b0b5742 100644 --- a/pkgs/development/python-modules/adafruit-platformdetect/default.nix +++ b/pkgs/development/python-modules/adafruit-platformdetect/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "adafruit-platformdetect"; - version = "3.8.0"; + version = "3.13.1"; src = fetchPypi { pname = "Adafruit-PlatformDetect"; inherit version; - sha256 = "sha256-AjUpxdY/5IoWMBtufP3OVnMpUwpxgpCNWoydH1w+t+Y="; + sha256 = "sha256-SUK2EpOHCFWm4zV+yRtzz81B0GMcwRsVnTOh2msSsSk="; }; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/adb-enhanced/default.nix b/pkgs/development/python-modules/adb-enhanced/default.nix index d782de26ab72..62922efa530c 100644 --- a/pkgs/development/python-modules/adb-enhanced/default.nix +++ b/pkgs/development/python-modules/adb-enhanced/default.nix @@ -30,5 +30,6 @@ buildPythonPackage rec { homepage = "https://github.com/ashishb/adb-enhanced"; license = licenses.asl20; maintainers = with maintainers; [ vtuan10 ]; + mainProgram = "adbe"; }; } diff --git a/pkgs/development/python-modules/adb-shell/default.nix b/pkgs/development/python-modules/adb-shell/default.nix index 5377785ff25a..6cbbe7c5d802 100644 --- a/pkgs/development/python-modules/adb-shell/default.nix +++ b/pkgs/development/python-modules/adb-shell/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "adb-shell"; - version = "0.3.1"; + version = "0.3.2"; disabled = !isPy3k; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "JeffLIrion"; repo = "adb_shell"; rev = "v${version}"; - sha256 = "sha256-b+9ySme44TdIlVnF8AHBBGd8pkoeYG99wmDK/nyAreo="; + sha256 = "sha256-+K4fV8dlRpOZC5B7cvkfPRVK/2OBkH9qOmAnOwsm7kQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/agate-excel/default.nix b/pkgs/development/python-modules/agate-excel/default.nix index af98bbded8c4..752c905ee8e6 100644 --- a/pkgs/development/python-modules/agate-excel/default.nix +++ b/pkgs/development/python-modules/agate-excel/default.nix @@ -1,5 +1,5 @@ { lib, fetchPypi, buildPythonPackage -, agate, openpyxl, xlrd, nose +, agate, openpyxl, xlrd, pytestCheckHook }: buildPythonPackage rec { @@ -13,11 +13,12 @@ buildPythonPackage rec { propagatedBuildInputs = [ agate openpyxl xlrd ]; - checkInputs = [ nose ]; + checkInputs = [ pytestCheckHook ]; - checkPhase = '' - nosetests - ''; + disabledTests = [ + # See https://github.com/wireservice/agate-excel/issues/45 + "test_ambiguous_date" + ]; meta = with lib; { description = "Adds read support for excel files to agate"; diff --git a/pkgs/development/python-modules/ailment/default.nix b/pkgs/development/python-modules/ailment/default.nix index f7194f8dd2f5..514194407929 100644 --- a/pkgs/development/python-modules/ailment/default.nix +++ b/pkgs/development/python-modules/ailment/default.nix @@ -7,14 +7,14 @@ buildPythonPackage rec { pname = "ailment"; - version = "9.0.6852"; + version = "9.0.6885"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "angr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-yIYZubZ8073voe4C78QITP3Pau/mrpNTyhPpU/QftXo="; + sha256 = "sha256-AtaAVfMCIzStgwwPEt+6tAzjgpSK+KhhMksYK4BH9V0="; }; propagatedBuildInputs = [ pyvex ]; diff --git a/pkgs/development/python-modules/aioamqp/compat-pamqp-3.patch b/pkgs/development/python-modules/aioamqp/compat-pamqp-3.patch new file mode 100644 index 000000000000..0d319eb2a0d4 --- /dev/null +++ b/pkgs/development/python-modules/aioamqp/compat-pamqp-3.patch @@ -0,0 +1,498 @@ +From 17b5be250cb5ecf95cf4f77c8c930450d876efa6 Mon Sep 17 00:00:00 2001 +From: dzen <benoit.calvez@polyconseil.fr> +Date: Thu, 12 Mar 2020 08:32:29 +0100 +Subject: [PATCH 1/3] Moves to pamqp 3.0 + +--- + aioamqp/channel.py | 114 +++++++++++++++++++------------------- + aioamqp/frame.py | 1 - + aioamqp/protocol.py | 22 ++++---- + aioamqp/tests/testcase.py | 2 +- + 4 files changed, 69 insertions(+), 70 deletions(-) + +diff --git a/aioamqp/channel.py b/aioamqp/channel.py +index 7f0f402..ea164c4 100644 +--- a/aioamqp/channel.py ++++ b/aioamqp/channel.py +@@ -9,7 +9,7 @@ + from itertools import count + import warnings + +-import pamqp.specification ++import pamqp.commands + + from . import frame as amqp_frame + from . import exceptions +@@ -78,35 +78,35 @@ def connection_closed(self, server_code=None, server_reason=None, exception=None + + async def dispatch_frame(self, frame): + methods = { +- pamqp.specification.Channel.OpenOk.name: self.open_ok, +- pamqp.specification.Channel.FlowOk.name: self.flow_ok, +- pamqp.specification.Channel.CloseOk.name: self.close_ok, +- pamqp.specification.Channel.Close.name: self.server_channel_close, +- +- pamqp.specification.Exchange.DeclareOk.name: self.exchange_declare_ok, +- pamqp.specification.Exchange.BindOk.name: self.exchange_bind_ok, +- pamqp.specification.Exchange.UnbindOk.name: self.exchange_unbind_ok, +- pamqp.specification.Exchange.DeleteOk.name: self.exchange_delete_ok, +- +- pamqp.specification.Queue.DeclareOk.name: self.queue_declare_ok, +- pamqp.specification.Queue.DeleteOk.name: self.queue_delete_ok, +- pamqp.specification.Queue.BindOk.name: self.queue_bind_ok, +- pamqp.specification.Queue.UnbindOk.name: self.queue_unbind_ok, +- pamqp.specification.Queue.PurgeOk.name: self.queue_purge_ok, +- +- pamqp.specification.Basic.QosOk.name: self.basic_qos_ok, +- pamqp.specification.Basic.ConsumeOk.name: self.basic_consume_ok, +- pamqp.specification.Basic.CancelOk.name: self.basic_cancel_ok, +- pamqp.specification.Basic.GetOk.name: self.basic_get_ok, +- pamqp.specification.Basic.GetEmpty.name: self.basic_get_empty, +- pamqp.specification.Basic.Deliver.name: self.basic_deliver, +- pamqp.specification.Basic.Cancel.name: self.server_basic_cancel, +- pamqp.specification.Basic.Ack.name: self.basic_server_ack, +- pamqp.specification.Basic.Nack.name: self.basic_server_nack, +- pamqp.specification.Basic.RecoverOk.name: self.basic_recover_ok, +- pamqp.specification.Basic.Return.name: self.basic_return, +- +- pamqp.specification.Confirm.SelectOk.name: self.confirm_select_ok, ++ pamqp.commands.Channel.OpenOk.name: self.open_ok, ++ pamqp.commands.Channel.FlowOk.name: self.flow_ok, ++ pamqp.commands.Channel.CloseOk.name: self.close_ok, ++ pamqp.commands.Channel.Close.name: self.server_channel_close, ++ ++ pamqp.commands.Exchange.DeclareOk.name: self.exchange_declare_ok, ++ pamqp.commands.Exchange.BindOk.name: self.exchange_bind_ok, ++ pamqp.commands.Exchange.UnbindOk.name: self.exchange_unbind_ok, ++ pamqp.commands.Exchange.DeleteOk.name: self.exchange_delete_ok, ++ ++ pamqp.commands.Queue.DeclareOk.name: self.queue_declare_ok, ++ pamqp.commands.Queue.DeleteOk.name: self.queue_delete_ok, ++ pamqp.commands.Queue.BindOk.name: self.queue_bind_ok, ++ pamqp.commands.Queue.UnbindOk.name: self.queue_unbind_ok, ++ pamqp.commands.Queue.PurgeOk.name: self.queue_purge_ok, ++ ++ pamqp.commands.Basic.QosOk.name: self.basic_qos_ok, ++ pamqp.commands.Basic.ConsumeOk.name: self.basic_consume_ok, ++ pamqp.commands.Basic.CancelOk.name: self.basic_cancel_ok, ++ pamqp.commands.Basic.GetOk.name: self.basic_get_ok, ++ pamqp.commands.Basic.GetEmpty.name: self.basic_get_empty, ++ pamqp.commands.Basic.Deliver.name: self.basic_deliver, ++ pamqp.commands.Basic.Cancel.name: self.server_basic_cancel, ++ pamqp.commands.Basic.Ack.name: self.basic_server_ack, ++ pamqp.commands.Basic.Nack.name: self.basic_server_nack, ++ pamqp.commands.Basic.RecoverOk.name: self.basic_recover_ok, ++ pamqp.commands.Basic.Return.name: self.basic_return, ++ ++ pamqp.commands.Confirm.SelectOk.name: self.confirm_select_ok, + } + + if frame.name not in methods: +@@ -144,7 +144,7 @@ async def _write_frame_awaiting_response(self, waiter_id, channel_id, request, + + async def open(self): + """Open the channel on the server.""" +- request = pamqp.specification.Channel.Open() ++ request = pamqp.commands.Channel.Open() + return (await self._write_frame_awaiting_response( + 'open', self.channel_id, request, no_wait=False, check_open=False)) + +@@ -159,7 +159,7 @@ async def close(self, reply_code=0, reply_text="Normal Shutdown"): + if not self.is_open: + raise exceptions.ChannelClosed("channel already closed or closing") + self.close_event.set() +- request = pamqp.specification.Channel.Close(reply_code, reply_text, class_id=0, method_id=0) ++ request = pamqp.commands.Channel.Close(reply_code, reply_text, class_id=0, method_id=0) + return (await self._write_frame_awaiting_response( + 'close', self.channel_id, request, no_wait=False, check_open=False)) + +@@ -169,7 +169,7 @@ async def close_ok(self, frame): + self.protocol.release_channel_id(self.channel_id) + + async def _send_channel_close_ok(self): +- request = pamqp.specification.Channel.CloseOk() ++ request = pamqp.commands.Channel.CloseOk() + await self._write_frame(self.channel_id, request) + + async def server_channel_close(self, frame): +@@ -183,7 +183,7 @@ async def server_channel_close(self, frame): + self.connection_closed(results['reply_code'], results['reply_text']) + + async def flow(self, active): +- request = pamqp.specification.Channel.Flow(active) ++ request = pamqp.commands.Channel.Flow(active) + return (await self._write_frame_awaiting_response( + 'flow', self.channel_id, request, no_wait=False, + check_open=False)) +@@ -201,7 +201,7 @@ async def flow_ok(self, frame): + + async def exchange_declare(self, exchange_name, type_name, passive=False, durable=False, + auto_delete=False, no_wait=False, arguments=None): +- request = pamqp.specification.Exchange.Declare( ++ request = pamqp.commands.Exchange.Declare( + exchange=exchange_name, + exchange_type=type_name, + passive=passive, +@@ -222,7 +222,7 @@ async def exchange_declare_ok(self, frame): + return future + + async def exchange_delete(self, exchange_name, if_unused=False, no_wait=False): +- request = pamqp.specification.Exchange.Delete(exchange=exchange_name, if_unused=if_unused, nowait=no_wait) ++ request = pamqp.commands.Exchange.Delete(exchange=exchange_name, if_unused=if_unused, nowait=no_wait) + return await self._write_frame_awaiting_response( + 'exchange_delete', self.channel_id, request, no_wait) + +@@ -235,7 +235,7 @@ async def exchange_bind(self, exchange_destination, exchange_source, routing_key + no_wait=False, arguments=None): + if arguments is None: + arguments = {} +- request = pamqp.specification.Exchange.Bind( ++ request = pamqp.commands.Exchange.Bind( + destination=exchange_destination, + source=exchange_source, + routing_key=routing_key, +@@ -255,7 +255,7 @@ async def exchange_unbind(self, exchange_destination, exchange_source, routing_k + if arguments is None: + arguments = {} + +- request = pamqp.specification.Exchange.Unbind( ++ request = pamqp.commands.Exchange.Unbind( + destination=exchange_destination, + source=exchange_source, + routing_key=routing_key, +@@ -297,7 +297,7 @@ async def queue_declare(self, queue_name=None, passive=False, durable=False, + + if not queue_name: + queue_name = 'aioamqp.gen-' + str(uuid.uuid4()) +- request = pamqp.specification.Queue.Declare( ++ request = pamqp.commands.Queue.Declare( + queue=queue_name, + passive=passive, + durable=durable, +@@ -327,7 +327,7 @@ async def queue_delete(self, queue_name, if_unused=False, if_empty=False, no_wai + if_empty: bool, the queue is deleted if it has no messages. Raise if not. + no_wait: bool, if set, the server will not respond to the method + """ +- request = pamqp.specification.Queue.Delete( ++ request = pamqp.commands.Queue.Delete( + queue=queue_name, + if_unused=if_unused, + if_empty=if_empty, +@@ -346,7 +346,7 @@ async def queue_bind(self, queue_name, exchange_name, routing_key, no_wait=False + if arguments is None: + arguments = {} + +- request = pamqp.specification.Queue.Bind( ++ request = pamqp.commands.Queue.Bind( + queue=queue_name, + exchange=exchange_name, + routing_key=routing_key, +@@ -367,7 +367,7 @@ async def queue_unbind(self, queue_name, exchange_name, routing_key, arguments=N + if arguments is None: + arguments = {} + +- request = pamqp.specification.Queue.Unbind( ++ request = pamqp.commands.Queue.Unbind( + queue=queue_name, + exchange=exchange_name, + routing_key=routing_key, +@@ -383,7 +383,7 @@ async def queue_unbind_ok(self, frame): + logger.debug("Queue unbound") + + async def queue_purge(self, queue_name, no_wait=False): +- request = pamqp.specification.Queue.Purge( ++ request = pamqp.commands.Queue.Purge( + queue=queue_name, nowait=no_wait + ) + return (await self._write_frame_awaiting_response( +@@ -406,7 +406,7 @@ async def basic_publish(self, payload, exchange_name, routing_key, + if properties is None: + properties = {} + +- method_request = pamqp.specification.Basic.Publish( ++ method_request = pamqp.commands.Basic.Publish( + exchange=exchange_name, + routing_key=routing_key, + mandatory=mandatory, +@@ -417,7 +417,7 @@ async def basic_publish(self, payload, exchange_name, routing_key, + + header_request = pamqp.header.ContentHeader( + body_size=len(payload), +- properties=pamqp.specification.Basic.Properties(**properties) ++ properties=pamqp.commands.Basic.Properties(**properties) + ) + await self._write_frame(self.channel_id, header_request, drain=False) + +@@ -446,7 +446,7 @@ async def basic_qos(self, prefetch_size=0, prefetch_count=0, connection_global=F + settings should apply per-consumer channel; and global=true to mean + that the QoS settings should apply per-channel. + """ +- request = pamqp.specification.Basic.Qos( ++ request = pamqp.commands.Basic.Qos( + prefetch_size, prefetch_count, connection_global + ) + return (await self._write_frame_awaiting_response( +@@ -490,7 +490,7 @@ async def basic_consume(self, callback, queue_name='', consumer_tag='', no_local + if arguments is None: + arguments = {} + +- request = pamqp.specification.Basic.Consume( ++ request = pamqp.commands.Basic.Consume( + queue=queue_name, + consumer_tag=consumer_tag, + no_local=no_local, +@@ -561,7 +561,7 @@ async def server_basic_cancel(self, frame): + callback, error) + + async def basic_cancel(self, consumer_tag, no_wait=False): +- request = pamqp.specification.Basic.Cancel(consumer_tag, no_wait) ++ request = pamqp.commands.Basic.Cancel(consumer_tag, no_wait) + return (await self._write_frame_awaiting_response( + 'basic_cancel', self.channel_id, request, no_wait=no_wait) + ) +@@ -575,7 +575,7 @@ async def basic_cancel_ok(self, frame): + logger.debug("Cancel ok") + + async def basic_get(self, queue_name='', no_ack=False): +- request = pamqp.specification.Basic.Get(queue=queue_name, no_ack=no_ack) ++ request = pamqp.commands.Basic.Get(queue=queue_name, no_ack=no_ack) + return (await self._write_frame_awaiting_response( + 'basic_get', self.channel_id, request, no_wait=False) + ) +@@ -606,11 +606,11 @@ async def basic_get_empty(self, frame): + future.set_exception(exceptions.EmptyQueue) + + async def basic_client_ack(self, delivery_tag, multiple=False): +- request = pamqp.specification.Basic.Ack(delivery_tag, multiple) ++ request = pamqp.commands.Basic.Ack(delivery_tag, multiple) + await self._write_frame(self.channel_id, request) + + async def basic_client_nack(self, delivery_tag, multiple=False, requeue=True): +- request = pamqp.specification.Basic.Nack(delivery_tag, multiple, requeue) ++ request = pamqp.commands.Basic.Nack(delivery_tag, multiple, requeue) + await self._write_frame(self.channel_id, request) + + async def basic_server_ack(self, frame): +@@ -620,15 +620,15 @@ async def basic_server_ack(self, frame): + fut.set_result(True) + + async def basic_reject(self, delivery_tag, requeue=False): +- request = pamqp.specification.Basic.Reject(delivery_tag, requeue) ++ request = pamqp.commands.Basic.Reject(delivery_tag, requeue) + await self._write_frame(self.channel_id, request) + + async def basic_recover_async(self, requeue=True): +- request = pamqp.specification.Basic.RecoverAsync(requeue) ++ request = pamqp.commands.Basic.RecoverAsync(requeue) + await self._write_frame(self.channel_id, request) + + async def basic_recover(self, requeue=True): +- request = pamqp.specification.Basic.Recover(requeue) ++ request = pamqp.commands.Basic.Recover(requeue) + return (await self._write_frame_awaiting_response( + 'basic_recover', self.channel_id, request, no_wait=False) + ) +@@ -681,7 +681,7 @@ async def publish(self, payload, exchange_name, routing_key, properties=None, ma + delivery_tag = next(self.delivery_tag_iter) # pylint: disable=stop-iteration-return + fut = self._set_waiter('basic_server_ack_{}'.format(delivery_tag)) + +- method_request = pamqp.specification.Basic.Publish( ++ method_request = pamqp.commands.Basic.Publish( + exchange=exchange_name, + routing_key=routing_key, + mandatory=mandatory, +@@ -689,7 +689,7 @@ async def publish(self, payload, exchange_name, routing_key, properties=None, ma + ) + await self._write_frame(self.channel_id, method_request, drain=False) + +- properties = pamqp.specification.Basic.Properties(**properties) ++ properties = pamqp.commands.Basic.Properties(**properties) + header_request = pamqp.header.ContentHeader( + body_size=len(payload), properties=properties + ) +@@ -710,7 +710,7 @@ async def publish(self, payload, exchange_name, routing_key, properties=None, ma + async def confirm_select(self, *, no_wait=False): + if self.publisher_confirms: + raise ValueError('publisher confirms already enabled') +- request = pamqp.specification.Confirm.Select(nowait=no_wait) ++ request = pamqp.commands.Confirm.Select(nowait=no_wait) + + return (await self._write_frame_awaiting_response( + 'confirm_select', self.channel_id, request, no_wait) +diff --git a/aioamqp/frame.py b/aioamqp/frame.py +index d70cfd7..af27ab5 100644 +--- a/aioamqp/frame.py ++++ b/aioamqp/frame.py +@@ -42,7 +42,6 @@ + import socket + + import pamqp.encode +-import pamqp.specification + import pamqp.frame + + from . import exceptions +diff --git a/aioamqp/protocol.py b/aioamqp/protocol.py +index e111dea..f0b928d 100644 +--- a/aioamqp/protocol.py ++++ b/aioamqp/protocol.py +@@ -5,9 +5,9 @@ + import asyncio + import logging + ++import pamqp.commands + import pamqp.frame + import pamqp.heartbeat +-import pamqp.specification + + from . import channel as amqp_channel + from . import constants as amqp_constants +@@ -159,7 +159,7 @@ async def close(self, no_wait=False, timeout=None): + """Close connection (and all channels)""" + await self.ensure_open() + self.state = CLOSING +- request = pamqp.specification.Connection.Close( ++ request = pamqp.commands.Connection.Close( + reply_code=0, + reply_text='', + class_id=0, +@@ -254,11 +254,11 @@ async def dispatch_frame(self, frame_channel=None, frame=None): + """Dispatch the received frame to the corresponding handler""" + + method_dispatch = { +- pamqp.specification.Connection.Close.name: self.server_close, +- pamqp.specification.Connection.CloseOk.name: self.close_ok, +- pamqp.specification.Connection.Tune.name: self.tune, +- pamqp.specification.Connection.Start.name: self.start, +- pamqp.specification.Connection.OpenOk.name: self.open_ok, ++ pamqp.commands.Connection.Close.name: self.server_close, ++ pamqp.commands.Connection.CloseOk.name: self.close_ok, ++ pamqp.commands.Connection.Tune.name: self.tune, ++ pamqp.commands.Connection.Start.name: self.start, ++ pamqp.commands.Connection.OpenOk.name: self.open_ok, + } + if frame_channel is None and frame is None: + frame_channel, frame = await self.get_frame() +@@ -395,7 +395,7 @@ async def start_ok(self, client_properties, mechanism, auth, locale): + def credentials(): + return '\0{LOGIN}\0{PASSWORD}'.format(**auth) + +- request = pamqp.specification.Connection.StartOk( ++ request = pamqp.commands.Connection.StartOk( + client_properties=client_properties, + mechanism=mechanism, + locale=locale, +@@ -417,7 +417,7 @@ async def server_close(self, frame): + self._stream_writer.close() + + async def _close_ok(self): +- request = pamqp.specification.Connection.CloseOk() ++ request = pamqp.commands.Connection.CloseOk() + await self._write_frame(0, request) + + async def tune(self, frame): +@@ -426,7 +426,7 @@ async def tune(self, frame): + self.server_heartbeat = frame.heartbeat + + async def tune_ok(self, channel_max, frame_max, heartbeat): +- request = pamqp.specification.Connection.TuneOk( ++ request = pamqp.commands.Connection.TuneOk( + channel_max, frame_max, heartbeat + ) + await self._write_frame(0, request) +@@ -436,7 +436,7 @@ async def secure_ok(self, login_response): + + async def open(self, virtual_host, capabilities='', insist=False): + """Open connection to virtual host.""" +- request = pamqp.specification.Connection.Open( ++ request = pamqp.commands.Connection.Open( + virtual_host, capabilities, insist + ) + await self._write_frame(0, request) +diff --git a/aioamqp/tests/testcase.py b/aioamqp/tests/testcase.py +index 120104b..d6d702b 100644 +--- a/aioamqp/tests/testcase.py ++++ b/aioamqp/tests/testcase.py +@@ -147,7 +147,7 @@ def server_version(self, amqp=None): + if amqp is None: + amqp = self.amqp + +- server_version = tuple(int(x) for x in amqp.server_properties['version'].decode().split('.')) ++ server_version = tuple(int(x) for x in amqp.server_properties['version'].split('.')) + return server_version + + async def check_exchange_exists(self, exchange_name): + +From c900f6d5e8ef273000d221d0e46ab81ed4aed2a2 Mon Sep 17 00:00:00 2001 +From: dzen <benoit.calvez@polyconseil.fr> +Date: Wed, 25 Mar 2020 11:02:04 +0100 +Subject: [PATCH 2/3] fix pamqp version for tests on travis + +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index a740243..2277b28 100644 +--- a/setup.py ++++ b/setup.py +@@ -25,7 +25,7 @@ + 'aioamqp', + ], + install_requires=[ +- 'pamqp>=2.2.0,<3', ++ 'pamqp>=3.0.0', # TODO(bcalvez): for tests purpose, until 3.0 is released + ], + classifiers=[ + "Development Status :: 4 - Beta", + +From 836340e8d881a93b0111b9aed6f2bb2926f38de6 Mon Sep 17 00:00:00 2001 +From: dzen <benoit.calvez@polyconseil.fr> +Date: Wed, 25 Mar 2020 11:37:45 +0100 +Subject: [PATCH 3/3] pamqp 3.0 is no more compatible with 3.5 + +--- + .travis.yml | 1 - + setup.cfg | 2 +- + setup.py | 2 +- + 3 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index 1069e7c..46d6fea 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,7 +1,6 @@ + language: python + dist: bionic + python: +-- 3.5 + - 3.6 + - 3.7-dev + - 3.8 +diff --git a/setup.cfg b/setup.cfg +index 0ab7d0b..d0ba16e 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,2 +1,2 @@ + [bdist_wheel] +-python-tag = py35.py36.py37.py38 ++python-tag = py36.py37.py38 +diff --git a/setup.py b/setup.py +index 2277b28..c413078 100644 +--- a/setup.py ++++ b/setup.py +@@ -27,6 +27,7 @@ + install_requires=[ + 'pamqp==3.0.0a6', # TODO(bcalvez): for tests purpose, until 3.0 is released + ], ++ python_requires=">=3.6", + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", +@@ -34,7 +35,6 @@ + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", +- "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", diff --git a/pkgs/development/python-modules/aioamqp/default.nix b/pkgs/development/python-modules/aioamqp/default.nix index 5be5b6a1dd08..a2882ce1288b 100644 --- a/pkgs/development/python-modules/aioamqp/default.nix +++ b/pkgs/development/python-modules/aioamqp/default.nix @@ -20,6 +20,8 @@ buildPythonPackage rec { sha256 = "1gpfsrc2vi6w33c9zsycd2qn589pr7a222rb41r85m915283zy48"; }; + patches = [ ./compat-pamqp-3.patch ]; + propagatedBuildInputs = [ pamqp ]; diff --git a/pkgs/development/python-modules/aioasuswrt/default.nix b/pkgs/development/python-modules/aioasuswrt/default.nix index edd2796eca48..a6bd79e80ef1 100644 --- a/pkgs/development/python-modules/aioasuswrt/default.nix +++ b/pkgs/development/python-modules/aioasuswrt/default.nix @@ -9,18 +9,16 @@ buildPythonPackage rec { pname = "aioasuswrt"; - version = "1.3.3"; + version = "1.3.4"; src = fetchFromGitHub { owner = "kennedyshead"; repo = pname; - rev = "V${version}"; - sha256 = "1h1qwc7szgrcwiz4q6x4mlf26is20lj1ds5rcb9i611j26656v6d"; + rev = version; + sha256 = "101d76zarvilzfmcy8n3bjqzyars8hsjzr0zc80d4rngv4vhrki1"; }; postPatch = '' - substituteInPlace setup.py \ - --replace "cryptography==3.3.2" "cryptography" substituteInPlace setup.cfg \ --replace "--cov-report html" "" \ --replace "--cov-report term-missing" "" diff --git a/pkgs/development/python-modules/aiobotocore/default.nix b/pkgs/development/python-modules/aiobotocore/default.nix index f75a0d6bb60b..1ebf66a2597f 100644 --- a/pkgs/development/python-modules/aiobotocore/default.nix +++ b/pkgs/development/python-modules/aiobotocore/default.nix @@ -10,18 +10,18 @@ buildPythonPackage rec { pname = "aiobotocore"; - version = "1.2.2"; + version = "1.3.0"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "37c23166603a3bd134e5f6fc22dbbf8c274d4d24c71418fba292ed2cd7a0bf43"; + sha256 = "17pcdi69bwdfw2wv3a0fhira5gimw88sp2wf47yqz50z1ckhv2c1"; }; # relax version constraints: aiobotocore works with newer botocore versions # the pinning used to match some `extras_require` we're not using. - preConfigure = '' - substituteInPlace setup.py --replace 'botocore>=1.17.44,<1.17.45' 'botocore' + postPatch = '' + substituteInPlace setup.py --replace 'botocore>=1.20.49,<1.20.50' 'botocore' ''; propagatedBuildInputs = [ wrapt aiohttp aioitertools botocore ]; @@ -31,7 +31,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "aiobotocore" ]; meta = with lib; { - description = "Async client for amazon services using botocore and aiohttp/asyncio."; + description = "Python client for amazon services"; license = licenses.asl20; homepage = "https://github.com/aio-libs/aiobotocore"; maintainers = with maintainers; [ teh ]; diff --git a/pkgs/development/python-modules/aiodiscover/default.nix b/pkgs/development/python-modules/aiodiscover/default.nix index 8a7f72f8b863..db3b043e8355 100644 --- a/pkgs/development/python-modules/aiodiscover/default.nix +++ b/pkgs/development/python-modules/aiodiscover/default.nix @@ -1,6 +1,6 @@ { lib -, async-dns , buildPythonPackage +, dnspython , fetchFromGitHub , ifaddr , pyroute2 @@ -11,18 +11,18 @@ buildPythonPackage rec { pname = "aiodiscover"; - version = "1.3.4"; + version = "1.4.2"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "sha256-TmWl5d5HwyqWPUjwtEvc5FzVfxV/K1pekljcMkGN0Ag="; + sha256 = "sha256-xiIN/YLIOdPuqenyxybu0iUpYEy3MyBssXswza5InU0="; }; propagatedBuildInputs = [ - async-dns + dnspython pyroute2 ifaddr ]; @@ -36,10 +36,6 @@ buildPythonPackage rec { pytestCheckHook ]; - preBuild = '' - export HOME=$TMPDIR - ''; - disabledTests = [ # Tests require access to /etc/resolv.conf "test_async_discover_hosts" diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index 05e17ec12f43..b2d725e8378c 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -1,11 +1,11 @@ { lib, buildPythonPackage, fetchPypi, pythonOlder -, isPy27, isPyPy, python, pycares, typing ? null -, trollius ? null +, python, pycares, typing ? null }: buildPythonPackage rec { pname = "aiodns"; version = "2.0.0"; + disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; @@ -13,8 +13,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ pycares ] - ++ lib.optional (pythonOlder "3.7") typing - ++ lib.optional (isPy27 || isPyPy) trollius; + ++ lib.optional (pythonOlder "3.7") typing; checkPhase = '' ${python.interpreter} tests.py diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix index 425575442592..686163f35749 100644 --- a/pkgs/development/python-modules/aioesphomeapi/default.nix +++ b/pkgs/development/python-modules/aioesphomeapi/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "aioesphomeapi"; - version = "2.6.6"; + version = "2.7.0"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "sha256-LdBUtU5rNoixh7DPIFkHxLMvBeI6MZH57sO0IjuOQAw="; + sha256 = "sha256-PCoSJnt8EptVq5u0+NgEBwY6zLkD87XqVRBDdqBziM8="; }; propagatedBuildInputs = [ attrs protobuf zeroconf ]; @@ -22,6 +22,6 @@ buildPythonPackage rec { description = "Python Client for ESPHome native API"; homepage = "https://github.com/esphome/aioesphomeapi"; license = licenses.mit; - maintainers = with maintainers; [ dotlambda ]; + maintainers = with maintainers; [ fab hexa ]; }; } diff --git a/pkgs/development/python-modules/aioeventlet/default.nix b/pkgs/development/python-modules/aioeventlet/default.nix deleted file mode 100644 index ef0166e5d624..000000000000 --- a/pkgs/development/python-modules/aioeventlet/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, eventlet -, trollius ? null -, mock -, python -}: - -buildPythonPackage rec { - pname = "aioeventlet"; - # version is called 0.5.1 on PyPI, but the filename is aioeventlet-0.5.2.tar.gz - version = "0.5.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "cecb51ea220209e33b53cfb95124d90e4fcbee3ff8ba8a179a57120b8624b16a"; - }; - - propagatedBuildInputs = [ eventlet trollius ]; - buildInputs = [ mock ]; - - # 2 tests error out - doCheck = false; - checkPhase = '' - ${python.interpreter} runtests.py - ''; - - meta = with lib; { - description = "aioeventlet implements the asyncio API (PEP 3156) on top of eventlet. It makes"; - homepage = "https://pypi.org/project/aioeventlet/"; - license = licenses.asl20; - }; - -} diff --git a/pkgs/development/python-modules/aiohttp-socks/default.nix b/pkgs/development/python-modules/aiohttp-socks/default.nix index 7b0bfe80684a..4e75f56a8dab 100644 --- a/pkgs/development/python-modules/aiohttp-socks/default.nix +++ b/pkgs/development/python-modules/aiohttp-socks/default.nix @@ -1,16 +1,16 @@ -{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp, attrs }: +{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp, python-socks, attrs }: buildPythonPackage rec { pname = "aiohttp-socks"; - version = "0.3.9"; + version = "0.6.0"; src = fetchPypi { inherit version; pname = "aiohttp_socks"; - sha256 = "1mn2ng66951mri49f99zh3660j83kvqhr6dpx90s9fkjwk83hmjy"; + sha256 = "04w010bvi719ifpc3sshav95k10hf9nq8czn9yglkj206yxcypdr"; }; - propagatedBuildInputs = [ aiohttp attrs ]; + propagatedBuildInputs = [ aiohttp attrs python-socks ]; # Checks needs internet access doCheck = false; diff --git a/pkgs/development/python-modules/aiohue/default.nix b/pkgs/development/python-modules/aiohue/default.nix index b495bf4df463..65baaec37190 100644 --- a/pkgs/development/python-modules/aiohue/default.nix +++ b/pkgs/development/python-modules/aiohue/default.nix @@ -1,19 +1,34 @@ -{ lib, buildPythonPackage, fetchPypi, aiohttp }: +{ lib +, buildPythonPackage +, fetchPypi +, aiohttp +}: buildPythonPackage rec { pname = "aiohue"; - version = "2.2.0"; + version = "2.3.1"; src = fetchPypi { inherit pname version; - sha256 = "35696d04d6eb0328b7031ea3c0a3cfe5d83dfcf62f920522e4767d165c6bc529"; + sha256 = "1qxvqqsflcn263yg7r8vvfc2c2fl3rh4dkzwzh926ijnbc2sk4nm"; }; - propagatedBuildInputs = [ aiohttp ]; + propagatedBuildInputs = [ + aiohttp + ]; + + pythonImportsCheck = [ + "aiohue" + "aiohue.discovery" + ]; + + # Project has no tests + doCheck = false; meta = with lib; { - description = "asyncio package to talk to Philips Hue"; - homepage = "https://github.com/balloob/aiohue"; - license = licenses.asl20; + description = "Python package to talk to Philips Hue"; + homepage = "https://github.com/home-assistant-libs/aiohue"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/aiomysql/default.nix b/pkgs/development/python-modules/aiomysql/default.nix index 803f642406c8..3432931f9356 100644 --- a/pkgs/development/python-modules/aiomysql/default.nix +++ b/pkgs/development/python-modules/aiomysql/default.nix @@ -4,6 +4,7 @@ , pymysql , pytest , isPy27 +, fetchpatch }: buildPythonPackage rec { @@ -18,6 +19,14 @@ buildPythonPackage rec { sha256 = "1qvy3phbsxp55161dnppjfx2m1kn82v0irc3xzqw0adfd81vaiad"; }; + patches = [ + (fetchpatch { + # vendor functions previously provided by pymysql.util + url = "https://github.com/aio-libs/aiomysql/pull/554/commits/919b997a9de7f53d721af76762fba425e306531e.patch"; + sha256 = "V1VYyqr6RwTXoVoGVyMuJst6uqTuuHbpMOpLoVZO1XA="; + }) + ]; + propagatedBuildInputs = [ pymysql ]; diff --git a/pkgs/development/python-modules/aiopg/default.nix b/pkgs/development/python-modules/aiopg/default.nix new file mode 100644 index 000000000000..cb9cd327e8ce --- /dev/null +++ b/pkgs/development/python-modules/aiopg/default.nix @@ -0,0 +1,42 @@ +{ lib +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, psycopg2 +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiopg"; + version = "1.2.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "aio-libs"; + repo = pname; + rev = "v${version}"; + sha256 = "0c6s2p1fjbdk1ygpl6a1s1rbnsk8gw9kj99pf98nxhb9j3iahas4"; + }; + + propagatedBuildInputs = [ + async-timeout + psycopg2 + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "psycopg2-binary" "psycopg2" + ''; + + # Tests requires a PostgreSQL Docker instance + doCheck = false; + + pythonImportsCheck = [ "aiopg" ]; + + meta = with lib; { + description = "Python library for accessing a PostgreSQL database"; + homepage = "https://aiopg.readthedocs.io/"; + license = with licenses; [ bsd2 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aiopvpc/default.nix b/pkgs/development/python-modules/aiopvpc/default.nix new file mode 100644 index 000000000000..489ca5d6f6fb --- /dev/null +++ b/pkgs/development/python-modules/aiopvpc/default.nix @@ -0,0 +1,66 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, pytest-asyncio +, pytest-timeout +, pytestCheckHook +, pythonOlder +, pytz +}: + +buildPythonPackage rec { + pname = "aiopvpc"; + version = "2.0.2"; + disabled = pythonOlder "3.7"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "azogue"; + repo = pname; + rev = "v${version}"; + sha256 = "1ajs4kbdlfn4h7f3d6lwkp4yl1rl7zyvj997nhsz93jjwxbajkpv"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + pytz + async-timeout + ]; + + checkInputs = [ + pytest-asyncio + pytest-timeout + pytestCheckHook + ]; + + patches = [ + # Switch to poetry-core, https://github.com/azogue/aiopvpc/pull/10 + (fetchpatch { + name = "use-peotry-core.patch"; + url = "https://github.com/azogue/aiopvpc/commit/4bc2740ffd485a60acf579b4f3eb5ee6a353245c.patch"; + sha256 = "0ynj7pqq3akdvdrvqcwnnslay3mn1q92qhk8fg95ppflzscixli6"; + }) + ]; + + postPatch = '' + substituteInPlace pytest.ini --replace \ + " --cov --cov-report term --cov-report html" "" + ''; + + pythonImportsCheck = [ "aiopvpc" ]; + + meta = with lib; { + description = "Python module to download Spanish electricity hourly prices (PVPC)"; + homepage = "https://github.com/azogue/aiopvpc"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/aiorecollect/default.nix b/pkgs/development/python-modules/aiorecollect/default.nix index 53daf1f22696..1bce60ce6af9 100644 --- a/pkgs/development/python-modules/aiorecollect/default.nix +++ b/pkgs/development/python-modules/aiorecollect/default.nix @@ -1,7 +1,6 @@ { lib , aiohttp , aresponses -, async-timeout , buildPythonPackage , fetchFromGitHub , freezegun @@ -13,19 +12,23 @@ buildPythonPackage rec { pname = "aiorecollect"; - version = "1.0.3"; + version = "1.0.4"; format = "pyproject"; src = fetchFromGitHub { owner = "bachya"; repo = pname; rev = version; - sha256 = "sha256-S4HL8vJS/dTKsR5egKRSHqZYPClcET5Le06euHPyIkU="; + sha256 = "sha256-A4qk7eo4maCRP4UmtWrRCPvG6YrLVSOiOcfN8pEj5Po="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; - propagatedBuildInputs = [ aiohttp ]; + propagatedBuildInputs = [ + aiohttp + ]; checkInputs = [ aresponses @@ -35,8 +38,8 @@ buildPythonPackage rec { pytestCheckHook ]; - # Ignore the examples as they are prefixed with test_ - pytestFlagsArray = [ "--ignore examples/" ]; + disabledTestPaths = [ "examples/" ]; + pythonImportsCheck = [ "aiorecollect" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/aioshelly/default.nix b/pkgs/development/python-modules/aioshelly/default.nix index aa5e227ca65b..05b4794a826c 100644 --- a/pkgs/development/python-modules/aioshelly/default.nix +++ b/pkgs/development/python-modules/aioshelly/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "aioshelly"; - version = "0.6.2"; + version = "0.6.3"; src = fetchFromGitHub { owner = "home-assistant-libs"; repo = pname; rev = version; - sha256 = "sha256-vlIon+VAHeJiaSIVMEKEpwQC4gXA52vxfEkiQMC9yiw="; + sha256 = "sha256-c4EFR7rcYdrCdM0AfmX/d7cP4woh6P1iAjeSQV9ieKM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/aioymaps/default.nix b/pkgs/development/python-modules/aioymaps/default.nix new file mode 100644 index 000000000000..4a6d806dee1d --- /dev/null +++ b/pkgs/development/python-modules/aioymaps/default.nix @@ -0,0 +1,33 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchPypi +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aioymaps"; + version = "1.1.0"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1rvgf4flvnpjj0sm14xlnfmmnlmkz6xq5h5mfb14amkfy76za3jm"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "aioymaps" ]; + + meta = with lib; { + description = "Python package fetch data from Yandex maps"; + homepage = "https://github.com/devbis/aioymaps"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/amqtt/default.nix b/pkgs/development/python-modules/amqtt/default.nix new file mode 100644 index 000000000000..8ab0e7a7c0cc --- /dev/null +++ b/pkgs/development/python-modules/amqtt/default.nix @@ -0,0 +1,64 @@ +{ lib +, buildPythonPackage +, docopt +, fetchFromGitHub +, hypothesis +, passlib +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, pyyaml +, transitions +, websockets +}: + +buildPythonPackage rec { + pname = "amqtt"; + version = "0.10.0-alpha.3"; + format = "pyproject"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Yakifo"; + repo = pname; + rev = "v${version}"; + sha256 = "0wz85ykjgi2174qcdgpakmc4m0p96v62az7pvc9hyallq1v1k4n6"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ + docopt + passlib + pyyaml + transitions + websockets + ]; + + checkInputs = [ + hypothesis + pytest-asyncio + pytestCheckHook + ]; + + disabledTestPaths = [ + # Test are not ported from hbmqtt yet + "tests/test_cli.py" + "tests/test_client.py" + ]; + + disabledTests = [ + # Requires network access + "test_connect_tcp" + ]; + + pythonImportsCheck = [ "amqtt" ]; + + meta = with lib; { + description = "Python MQTT client and broker implementation"; + homepage = "https://amqtt.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/androidtv/default.nix b/pkgs/development/python-modules/androidtv/default.nix index 98ab09fd8e6b..02edcea42efd 100644 --- a/pkgs/development/python-modules/androidtv/default.nix +++ b/pkgs/development/python-modules/androidtv/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "androidtv"; - version = "0.0.58"; + version = "0.0.59"; # pypi does not contain tests, using github sources instead src = fetchFromGitHub { owner = "JeffLIrion"; repo = "python-androidtv"; rev = "v${version}"; - sha256 = "sha256-/5sYiYRFa8XJJ4QSxLzJBHaKfAKsGETiVDHerNQ79U8="; + sha256 = "sha256-QuKWOo+QMBpVJglwvaSMbKKYMN/MW31E7BgIMchESG8="; }; propagatedBuildInputs = [ adb-shell pure-python-adb ] diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index 588e647647d1..5f545c96c9c0 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -42,14 +42,14 @@ in buildPythonPackage rec { pname = "angr"; - version = "9.0.6852"; + version = "9.0.6885"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-8BN706jqflhKmHVLQ1Y0k3GMScB1Hs5E/zndgq0sXB8="; + sha256 = "sha256-+d1CtouaGv2GussG3QlQMzX0qcmJht9V3QW8RwH6da8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/angrop/default.nix b/pkgs/development/python-modules/angrop/default.nix index 1237ed6fa46d..d1c80772bc3b 100644 --- a/pkgs/development/python-modules/angrop/default.nix +++ b/pkgs/development/python-modules/angrop/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "angrop"; - version = "9.0.6852"; + version = "9.0.6885"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "angr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-uOf2d3TbTdLobqfdOUSVQ/mqyD3TaYPlPCNFsqcPrXo="; + sha256 = "sha256-B/1BO0MnqklMbyXqdBPA2Dfhr4pMjIIrzXmTzr81OdY="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/aniso8601/default.nix b/pkgs/development/python-modules/aniso8601/default.nix index f28668a8912b..9cc3fb827755 100644 --- a/pkgs/development/python-modules/aniso8601/default.nix +++ b/pkgs/development/python-modules/aniso8601/default.nix @@ -1,22 +1,35 @@ -{ lib, buildPythonPackage, fetchPypi -, dateutil, mock, isPy3k }: +{ lib +, buildPythonPackage +, dateutil +, fetchPypi +, isPy3k +, mock +, pytestCheckHook +}: buildPythonPackage rec { pname = "aniso8601"; version = "9.0.1"; - meta = with lib; { - description = "Parses ISO 8601 strings."; - homepage = "https://bitbucket.org/nielsenb/aniso8601"; - license = licenses.bsd3; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-cuMRdmfu32aVG7LZP0KWpWuUsHioqVkFoFJhH7PxuXM="; }; - propagatedBuildInputs = [ dateutil ]; + propagatedBuildInputs = [ + dateutil + ]; - checkInputs = lib.optional (!isPy3k) mock; + checkInputs = [ + pytestCheckHook + ] ++ lib.optional (!isPy3k) mock; - src = fetchPypi { - inherit pname version; - sha256 = "72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"; + pythonImportsCheck = [ "aniso8601" ]; + + meta = with lib; { + description = "Python Parser for ISO 8601 strings"; + homepage = "https://bitbucket.org/nielsenb/aniso8601"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/ansible-lint/default.nix b/pkgs/development/python-modules/ansible-lint/default.nix index dfa8d5c17997..b9d4f47b4aca 100644 --- a/pkgs/development/python-modules/ansible-lint/default.nix +++ b/pkgs/development/python-modules/ansible-lint/default.nix @@ -1,73 +1,90 @@ { lib -, stdenv -, fetchPypi , buildPythonPackage , isPy27 -, ansible +, fetchPypi +, setuptools-scm +, ansible-base +, enrich +, flaky , pyyaml -, ruamel-yaml , rich -, pytestCheckHook -, pytest-xdist -, git +, ruamel-yaml +, tenacity , wcmatch -, enrich -, python +, yamllint +, pytest-xdist +, pytestCheckHook }: buildPythonPackage rec { pname = "ansible-lint"; - version = "5.0.2"; + version = "5.0.8"; disabled = isPy27; format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-vgt/KqNozTPaON/I19SybBZuo7bbl3Duq5dTBTMlj44="; + sha256 = "sha256-tnuWKEB66bwVuwu3H3mHG99ZP+/msGhMDMRL5fyQgD8="; }; - postPatch = '' - substituteInPlace src/ansiblelint/file_utils.py \ - --replace 'raise RuntimeError("Unable to determine file type for %s" % pathex)' 'return "playbook"' - ''; + nativeBuildInputs = [ + setuptools-scm + ]; - buildInputs = [ python ]; + propagatedBuildInputs = [ + ansible-base + enrich + flaky + pyyaml + rich + ruamel-yaml + tenacity + wcmatch + yamllint + ]; - propagatedBuildInputs = [ ansible enrich pyyaml rich ruamel-yaml wcmatch ]; + checkInputs = [ + pytest-xdist + pytestCheckHook + ]; - checkInputs = [ pytestCheckHook pytest-xdist git ]; + pytestFlagsArray = [ + "--numprocesses" "auto" + ]; + + postPatch = '' + # Both patches are addressed in https://github.com/ansible-community/ansible-lint/pull/1549 + # and should be removed once merged upstream + + # fixes test_get_yaml_files_umlaut and test_run_inside_role_dir + substituteInPlace src/ansiblelint/file_utils.py \ + --replace 'os.path.join(root, name)' 'os.path.normpath(os.path.join(root, name))' + # fixes test_custom_kinds + substituteInPlace src/ansiblelint/file_utils.py \ + --replace "if name.endswith('.yaml') or name.endswith('.yml')" "" + ''; preCheck = '' # ansible wants to write to $HOME and crashes if it can't export HOME=$(mktemp -d) - export PATH=$PATH:${lib.makeBinPath [ ansible ]} + export PATH=$PATH:${lib.makeBinPath [ ansible-base ]} # create a working ansible-lint executable export PATH=$PATH:$PWD/src/ansiblelint ln -rs src/ansiblelint/__main__.py src/ansiblelint/ansible-lint patchShebangs src/ansiblelint/__main__.py + + # create symlink like in the git repo so test_included_tasks does not fail + ln -s ../roles examples/playbooks/roles ''; disabledTests = [ # requires network "test_prerun_reqs_v1" "test_prerun_reqs_v2" - # Assertion error with negative numbers; maybe requieres an ansible update? - "test_negative" - "test_example" - "test_playbook" - "test_included_tasks" - "test_long_line" - - "test_get_yaml_files_umlaut" - "test_run_inside_role_dir" - "test_role_handler_positive" ]; - # fails to run tests due to issues with temporary directory - doCheck = !stdenv.isDarwin; - - makeWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath [ ansible ]) ]; + makeWrapperArgs = [ "--prefix" "PATH" ":" (lib.makeBinPath [ ansible-base ]) ]; meta = with lib; { homepage = "https://github.com/ansible-community/ansible-lint"; diff --git a/pkgs/development/python-modules/ansible/base.nix b/pkgs/development/python-modules/ansible/base.nix new file mode 100644 index 000000000000..f3470f80b50f --- /dev/null +++ b/pkgs/development/python-modules/ansible/base.nix @@ -0,0 +1,78 @@ +{ lib +, buildPythonPackage +, fetchPypi +, installShellFiles +, ansible-collections +, cryptography +, jinja2 +, junit-xml +, lxml +, ncclient +, packaging +, paramiko +, pexpect +, psutil +, pycrypto +, pyyaml +, requests +, scp +, windowsSupport ? false, pywinrm +, xmltodict +}: + +buildPythonPackage rec { + pname = "ansible-base"; + version = "2.10.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "0l91bwbavjnaqsnb4c6f17xl7r0cvglz3rxqfs63aagw10z5sqq4"; + }; + + # ansible_connection is already wrapped, so don't pass it through + # the python interpreter again, as it would break execution of + # connection plugins. + postPatch = '' + substituteInPlace lib/ansible/executor/task_executor.py \ + --replace "[python," "[" + ''; + + nativeBuildInputs = [ + installShellFiles + ]; + + propagatedBuildInputs = [ + # depend on ansible-collections instead of the other way around + ansible-collections + # from requirements.txt + cryptography + jinja2 + packaging + pyyaml + # optional dependencies + junit-xml + lxml + ncclient + paramiko + pexpect + psutil + pycrypto + requests + scp + xmltodict + ] ++ lib.optional windowsSupport pywinrm; + + postInstall = '' + installManPage docs/man/man1/*.1 + ''; + + # internal import errors, missing dependencies + doCheck = false; + + meta = with lib; { + description = "Radically simple IT automation"; + homepage = "https://www.ansible.com"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/ansible/collections.nix b/pkgs/development/python-modules/ansible/collections.nix new file mode 100644 index 000000000000..9547b9a09187 --- /dev/null +++ b/pkgs/development/python-modules/ansible/collections.nix @@ -0,0 +1,77 @@ +{ lib +, buildPythonPackage +, fetchPypi +, ansible-base +, jsonschema +, jxmlease +, ncclient +, netaddr +, paramiko +, pynetbox +, scp +, textfsm +, ttp +, xmltodict +, withJunos ? false +, withNetbox ? false +}: + +buildPythonPackage rec { + pname = "ansible"; + version = "3.4.0"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a"; + }; + + postPatch = '' + # make ansible-base depend on ansible-collection, not the other way around + sed -i '/ansible-base/d' setup.py + ''; + + propagatedBuildInputs = lib.unique ([ + # Support ansible collections by default, make all others optional + # ansible.netcommon + jxmlease + ncclient + netaddr + paramiko + xmltodict + # ansible.posix + # ansible.utils + jsonschema + textfsm + ttp + xmltodict + # ansible.windows + + # lots of collections with dedicated requirements.txt and pyproject.toml files, + # add the dependencies for the collections you need conditionally and install + # ansible using overrides to enable the collections you need. + ] ++ lib.optionals (withJunos) [ + # ansible_collections/junipernetworks/junos/requirements.txt + jxmlease + ncclient + paramiko + scp + xmltodict + ] ++ lib.optionals (withNetbox) [ + # ansible_collections/netbox/netbox/pyproject.toml + pynetbox + ]); + + # don't try and fail to strip 48000+ non strippable files, it takes >5 minutes! + dontStrip = true; + + # difficult to test + doCheck = false; + + meta = with lib; { + description = "Radically simple IT automation"; + homepage = "http://www.ansible.com"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/ansible/default.nix b/pkgs/development/python-modules/ansible/legacy.nix index 245375c26be0..2779feffee87 100644 --- a/pkgs/development/python-modules/ansible/default.nix +++ b/pkgs/development/python-modules/ansible/legacy.nix @@ -18,13 +18,13 @@ buildPythonPackage rec { pname = "ansible"; - version = "2.9.12"; + version = "2.9.21"; src = fetchFromGitHub { owner = "ansible"; repo = "ansible"; rev = "v${version}"; - sha256 = "0c794k0cyl54807sh9in0l942ah6g6wlz5kf3qvy5lhd581zlgyb"; + sha256 = "1pfiwq2wfw11vmxdq2yhk86hm5jljlrnphlzfjr01kwzfikkdp5m"; }; prePatch = '' diff --git a/pkgs/development/python-modules/anytree/default.nix b/pkgs/development/python-modules/anytree/default.nix index c11833ba5793..fa92bc44891a 100644 --- a/pkgs/development/python-modules/anytree/default.nix +++ b/pkgs/development/python-modules/anytree/default.nix @@ -52,6 +52,6 @@ buildPythonPackage rec { description = "Powerful and Lightweight Python Tree Data Structure"; homepage = "https://github.com/c0fec0de/anytree"; license = licenses.asl20; - maintainers = [ maintainers.worldofpeace ]; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/apispec/default.nix b/pkgs/development/python-modules/apispec/default.nix index 13fb71d7f2f2..1262bb3338a3 100644 --- a/pkgs/development/python-modules/apispec/default.nix +++ b/pkgs/development/python-modules/apispec/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, pythonOlder , pyyaml , prance , marshmallow @@ -11,16 +12,20 @@ buildPythonPackage rec { pname = "apispec"; - version = "4.3.0"; + version = "4.4.1"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "5ec0fe72f1422a1198973fcbb48d0eb5c7390f4b0fbe55474fce999ad6826a9b"; + sha256 = "sha256-qt7UrkUXUsWLcOV5kj2Nt9rwtx9i3vjI/noqUr18BqI="; }; - checkInputs = [ + propagatedBuildInputs = [ pyyaml prance + ]; + + checkInputs = [ openapi-spec-validator marshmallow mock diff --git a/pkgs/development/python-modules/aplpy/default.nix b/pkgs/development/python-modules/aplpy/default.nix index e253c610c214..682ef6e17fdf 100644 --- a/pkgs/development/python-modules/aplpy/default.nix +++ b/pkgs/development/python-modules/aplpy/default.nix @@ -27,13 +27,26 @@ buildPythonPackage rec { sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3"; }; - patches = [ (fetchpatch { - # Can be removed in next release after 2.0.3 + patches = [ + # Fixes compatibility with astropy-helpers. This patch has been merged into + # the master branch as of May 2020, and should be part of the next + # upstream release (v2.0.3 was tagged in Feb. 2019). + (fetchpatch { url = "https://github.com/aplpy/aplpy/pull/448.patch"; sha256 = "1pnzh7ykjc8hwahzbzyryrzv5a8fddgd1bmzbhagkrn6lmvhhpvq"; excludes = [ "tox.ini" "azure-pipelines.yml" ".circleci/config.yml" "MANIFEST.in" ".gitignore" "setup.cfg" "appveyor.yml" "readthedocs.yml" "CHANGES.rst" ".gitmodules" ".travis.yml" "astropy_helpers" ]; }) + # Fix for matplotlib >= 3.4 (https://github.com/aplpy/aplpy/pull/466) + # Note: because of a security thing, github will refuse to serve this patch from the + # "normal" location + # (https://github.com/aplpy/aplpy/commit/56c1cc694fdea69e7da8506d3212c4495adb0ca5.patch) + # due to the fact that it contains the PDF magic bytes, but it will serve it from + # this githubusercontent domain. + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/aplpy/aplpy/pull/466/commit/56c1cc694fdea69e7da8506d3212c4495adb0ca5.patch"; + sha256 = "0jna2n1cgfzr0a27m5z94wwph7qg25hs7lycrdb2dp3943rb35g4"; + }) ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/apprise/default.nix b/pkgs/development/python-modules/apprise/default.nix index fad9e7d03fa8..61cfed3dbb9e 100644 --- a/pkgs/development/python-modules/apprise/default.nix +++ b/pkgs/development/python-modules/apprise/default.nix @@ -5,11 +5,11 @@ buildPythonPackage rec { pname = "apprise"; - version = "0.9.1"; + version = "0.9.3"; src = fetchPypi { inherit pname version; - sha256 = "sha256-FW5gt35yoXVr2+hiGBDJ/5jFFfIpn2Z9sDN8acoO4FI="; + sha256 = "sha256-yKzpyJHUIkVYVwrL6oCPMd+QSVML2czWmQHCemXWAMQ="; }; nativeBuildInputs = [ Babel installShellFiles ]; diff --git a/pkgs/development/python-modules/archinfo/default.nix b/pkgs/development/python-modules/archinfo/default.nix index 7802df99ebed..3a5db77cd476 100644 --- a/pkgs/development/python-modules/archinfo/default.nix +++ b/pkgs/development/python-modules/archinfo/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "archinfo"; - version = "9.0.6852"; + version = "9.0.6885"; src = fetchFromGitHub { owner = "angr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-NlL/uRI568HYkt8T2kuzyHNXpWybOLbFduE+1dzm4Qo="; + sha256 = "sha256-j0Hxao04ctcV8xCjQjzyQEM4Y3VCFRPuEc9NIhDRut0="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/astroid/1.6.nix b/pkgs/development/python-modules/astroid/1.6.nix index 2c763e214e87..47c7e8f6eb3f 100644 --- a/pkgs/development/python-modules/astroid/1.6.nix +++ b/pkgs/development/python-modules/astroid/1.6.nix @@ -34,6 +34,6 @@ buildPythonPackage rec { homepage = "https://github.com/PyCQA/astroid"; license = licenses.lgpl2; platforms = platforms.all; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/astroid/default.nix b/pkgs/development/python-modules/astroid/default.nix index 77ac408076cc..d6fda529d5da 100644 --- a/pkgs/development/python-modules/astroid/default.nix +++ b/pkgs/development/python-modules/astroid/default.nix @@ -35,6 +35,6 @@ buildPythonPackage rec { homepage = "https://github.com/PyCQA/astroid"; license = licenses.lgpl21Plus; platforms = platforms.all; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/astropy-healpix/default.nix b/pkgs/development/python-modules/astropy-healpix/default.nix index e82faba97583..80ef403b2cc0 100644 --- a/pkgs/development/python-modules/astropy-healpix/default.nix +++ b/pkgs/development/python-modules/astropy-healpix/default.nix @@ -3,25 +3,42 @@ , fetchPypi , numpy , astropy -, astropy-helpers +, astropy-extension-helpers +, setuptools-scm +, pytestCheckHook +, pytest-doctestplus +, hypothesis }: buildPythonPackage rec { pname = "astropy-healpix"; version = "0.6"; - doCheck = false; # tests require pytest-astropy - src = fetchPypi { - inherit pname version; + inherit version; + pname = lib.replaceStrings ["-"] ["_"] pname; sha256 = "409a6621c383641456c074f0f0350a24a4a58e910eaeef14e9bbce3e00ad6690"; }; - propagatedBuildInputs = [ numpy astropy astropy-helpers ]; + nativeBuildInputs = [ + astropy-extension-helpers + setuptools-scm + ]; + + propagatedBuildInputs = [ + numpy + astropy + ]; + + checkInputs = [ + pytestCheckHook + pytest-doctestplus + hypothesis + ]; - # Disable automatic update of the astropy-helper module - postPatch = '' - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" + # tests must be run in the build directory + preCheck = '' + cd build/lib* ''; meta = with lib; { diff --git a/pkgs/development/python-modules/async-upnp-client/default.nix b/pkgs/development/python-modules/async-upnp-client/default.nix index 2fa186a07d16..cc0e0513ed1f 100644 --- a/pkgs/development/python-modules/async-upnp-client/default.nix +++ b/pkgs/development/python-modules/async-upnp-client/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "async-upnp-client"; - version = "0.16.2"; + version = "0.17.0"; disabled = pythonOlder "3.5"; src = fetchFromGitHub { owner = "StevenLooman"; repo = "async_upnp_client"; rev = version; - sha256 = "0raq3jgh2aqllycvvi0x2j5f602vv8ggmyd3879jzqbz2znngsgb"; + sha256 = "sha256-k71fpwL999Qz/vOsmpxykMVKgASzHis/exY/8aDoAkg="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/asyncssh/default.nix b/pkgs/development/python-modules/asyncssh/default.nix index 9271adeb617f..f6d59c633cd9 100644 --- a/pkgs/development/python-modules/asyncssh/default.nix +++ b/pkgs/development/python-modules/asyncssh/default.nix @@ -50,6 +50,6 @@ buildPythonPackage rec { description = "Provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework"; homepage = "https://asyncssh.readthedocs.io/en/latest"; license = licenses.epl20; - maintainers = with maintainers; [ worldofpeace ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/asyncstdlib/default.nix b/pkgs/development/python-modules/asyncstdlib/default.nix new file mode 100644 index 000000000000..63e096bdc0f2 --- /dev/null +++ b/pkgs/development/python-modules/asyncstdlib/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, typing-extensions +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "asyncstdlib"; + version = "3.9.1"; + disabled = pythonOlder "3.7"; + format = "flit"; + + src = fetchFromGitHub { + owner = "maxfischer2781"; + repo = pname; + rev = "v${version}"; + sha256 = "13ranr7zi61w52vfrxwkf32bbhk88j0r5c5z2x2h5vw268001lk2"; + }; + + propagatedBuildInputs = [ + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "asyncstdlib" ]; + + meta = with lib; { + description = "Python library that extends the Python asyncio standard library"; + homepage = "https://asyncstdlib.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/atlassian-python-api/default.nix b/pkgs/development/python-modules/atlassian-python-api/default.nix index 617d5562b43a..31d615f5314b 100755 --- a/pkgs/development/python-modules/atlassian-python-api/default.nix +++ b/pkgs/development/python-modules/atlassian-python-api/default.nix @@ -1,30 +1,28 @@ { lib , buildPythonPackage -, fetchPypi -, isPy3k -, certifi -, chardet +, fetchFromGitHub , deprecated -, idna , oauthlib , requests , requests_oauthlib , six -, urllib3 -, pytestrunner -, pytest +, pytestCheckHook }: buildPythonPackage rec { pname = "atlassian-python-api"; version = "3.8.0"; - src = fetchPypi { - inherit pname version; - sha256 = "7ef384a91a790c807336e2bd6b7554284691aadd6d7413d199baf752dd84c53e"; + src = fetchFromGitHub { + owner = "atlassian-api"; + repo = pname; + rev = version; + sha256 = "sha256-J0/CtfBtOdWReKQS/VvOL/3r+j4zJfnv/ICIXepKUvc="; }; - checkInputs = [ pytestrunner pytest ]; + checkInputs = [ + pytestCheckHook + ]; propagatedBuildInputs = [ deprecated oauthlib requests requests_oauthlib six ]; diff --git a/pkgs/development/python-modules/authcaptureproxy/default.nix b/pkgs/development/python-modules/authcaptureproxy/default.nix new file mode 100644 index 000000000000..0f1f6d046463 --- /dev/null +++ b/pkgs/development/python-modules/authcaptureproxy/default.nix @@ -0,0 +1,60 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, aiohttp +, beautifulsoup4 +, httpx +, importlib-metadata +, multidict +, typer +, yarl +, pytest-asyncio +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "authcaptureproxy"; + version = "1.0.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "alandtse"; + repo = "auth_capture_proxy"; + rev = "v${version}"; + sha256 = "1fbrmh6qa3dm3q3zdxaa0fls94wardbcvnjgwxk686wpjgs1xrs4"; + }; + + postPatch = '' + # https://github.com/alandtse/auth_capture_proxy/issues/14 + substituteInPlace pyproject.toml --replace \ + "poetry.masonry.api" \ + "poetry.core.masonry.api" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + beautifulsoup4 + httpx + importlib-metadata + multidict + typer + yarl + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + meta = with lib; { + description = "A proxy to capture authentication information from a webpage"; + homepage = "https://github.com/alandtse/auth_capture_proxy"; + license = licenses.asl20; + maintainers = with maintainers; [ graham33 hexa ]; + }; +} diff --git a/pkgs/development/python-modules/autobahn/default.nix b/pkgs/development/python-modules/autobahn/default.nix index 386d4766bbfa..52def3d6ee17 100644 --- a/pkgs/development/python-modules/autobahn/default.nix +++ b/pkgs/development/python-modules/autobahn/default.nix @@ -1,35 +1,78 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, - six, txaio, twisted, zope_interface, cffi, - trollius ? null, futures ? null, - mock, pytest, cryptography, pynacl +{ lib +, argon2_cffi +, attrs +, buildPythonPackage +, cbor +, cbor2 +, cffi +, cryptography +, fetchPypi +, flatbuffers +, mock +, msgpack +, passlib +, pynacl +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, twisted +, py-ubjson +, txaio +, ujson +, zope_interface }: + buildPythonPackage rec { pname = "autobahn"; version = "21.3.1"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "e126c1f583e872fb59e79d36977cfa1f2d0a8a79f90ae31f406faae7664b8e03"; + sha256 = "00wf9dkfgakg80gy62prg650lb8zz9y9fdlxwxcznwp8hgsw29p1"; }; - propagatedBuildInputs = [ six txaio twisted zope_interface cffi cryptography pynacl ] ++ - (lib.optionals (!isPy3k) [ trollius futures ]); + propagatedBuildInputs = [ + argon2_cffi + cbor + cbor2 + cffi + cryptography + flatbuffers + msgpack + passlib + py-ubjson + pynacl + twisted + txaio + ujson + zope_interface + ]; + + checkInputs = [ + mock + pytest-asyncio + pytestCheckHook + ]; - checkInputs = [ mock pytest ]; - checkPhase = '' - runHook preCheck - USE_TWISTED=true py.test $out - runHook postCheck + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest>=2.8.6,<3.3.0" "pytest" ''; - # Tests do no seem to be compatible yet with pytest 5.1 - # https://github.com/crossbario/autobahn-python/issues/1235 - doCheck = false; + preCheck = '' + # Run asyncio tests (requires twisted) + export USE_ASYNCIO=1 + ''; + + pytestFlagsArray = [ "--pyargs autobahn" ]; + + pythonImportsCheck = [ "autobahn" ]; meta = with lib; { - description = "WebSocket and WAMP in Python for Twisted and asyncio."; - homepage = "https://crossbar.io/autobahn"; - license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + description = "WebSocket and WAMP in Python for Twisted and asyncio"; + homepage = "https://crossbar.io/autobahn"; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/autoit-ripper/default.nix b/pkgs/development/python-modules/autoit-ripper/default.nix new file mode 100644 index 000000000000..2276241d25e9 --- /dev/null +++ b/pkgs/development/python-modules/autoit-ripper/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, lief +, pythonOlder +}: + +buildPythonPackage rec { + pname = "autoit-ripper"; + version = "1.0.1"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mbsrfa72n7y1vkm9jhwhn1z3k45jxrlgx58ia1l2bp6chnnn2zy"; + }; + + propagatedBuildInputs = [ + lief + ]; + + postPatch = '' + substituteInPlace requirements.txt --replace "lief==0.10.1" "lief>=0.10.1" + ''; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "autoit_ripper" ]; + + meta = with lib; { + description = "Python module to extract AutoIt scripts embedded in PE binaries"; + homepage = "https://github.com/nazywam/AutoIt-Ripper"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index 491663b56cd0..737989ac3183 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "autopep8"; - version = "1.5.6"; + version = "1.5.7"; src = fetchPypi { inherit pname version; - sha256 = "5454e6e9a3d02aae38f866eec0d9a7de4ab9f93c10a273fb0340f3d6d09f7514"; + sha256 = "276ced7e9e3cb22e5d7c14748384a5cf5d9002257c0ed50c0e075b68011bb6d0"; }; propagatedBuildInputs = [ pycodestyle toml ]; diff --git a/pkgs/development/python-modules/awkward/default.nix b/pkgs/development/python-modules/awkward/default.nix index 2acec8ccc6f1..4057758155e6 100644 --- a/pkgs/development/python-modules/awkward/default.nix +++ b/pkgs/development/python-modules/awkward/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "awkward"; - version = "1.2.2"; + version = "1.2.3"; src = fetchPypi { inherit pname version; - sha256 = "89f126a072d3a6eee091e1afeed87e0b2ed3c34ed31a1814062174de3cab8d9b"; + sha256 = "7d727542927a926f488fa62d04e2c5728c72660f17f822e627f349285f295063"; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/awscrt/default.nix b/pkgs/development/python-modules/awscrt/default.nix new file mode 100644 index 000000000000..73679eca1e4d --- /dev/null +++ b/pkgs/development/python-modules/awscrt/default.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonPackage, fetchPypi, cmake, perl, stdenv, gcc10, darwin }: + +buildPythonPackage rec { + pname = "awscrt"; + version = "0.11.13"; + + buildInputs = lib.optionals stdenv.isDarwin + (with darwin.apple_sdk.frameworks; [ CoreFoundation Security ]); + + # Required to suppress -Werror + # https://github.com/NixOS/nixpkgs/issues/39687 + hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; + + nativeBuildInputs = [ cmake ] ++ lib.optionals stdenv.isAarch64 ([ gcc10 perl ]); + + dontUseCmakeConfigure = true; + + # Unable to import test module + # https://github.com/awslabs/aws-crt-python/issues/281 + doCheck = false; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-G/bf2AzWp8AHL4of0zfX3jIYyTtmTLBIC2ZKiMi19c0="; + }; + + meta = with lib; { + homepage = "https://github.com/awslabs/aws-crt-python"; + description = "Python bindings for the AWS Common Runtime"; + license = licenses.asl20; + maintainers = with maintainers; [ davegallant ]; + }; +} diff --git a/pkgs/development/python-modules/azure-common/default.nix b/pkgs/development/python-modules/azure-common/default.nix index f77c938b1d7f..2312df1cafaf 100644 --- a/pkgs/development/python-modules/azure-common/default.nix +++ b/pkgs/development/python-modules/azure-common/default.nix @@ -9,14 +9,14 @@ }: buildPythonPackage rec { - version = "1.1.26"; + version = "1.1.27"; pname = "azure-common"; disabled = isPyPy; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "b2866238aea5d7492cfb0282fc8b8d5f6d06fb433872345864d45753c10b6e4f"; + sha256 = "9f3f5d991023acbd93050cf53c4e863c6973ded7e236c69e99c8ff5c7bad41ef"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-core/default.nix b/pkgs/development/python-modules/azure-core/default.nix index 2bcb4d42646c..a63f33d74218 100644 --- a/pkgs/development/python-modules/azure-core/default.nix +++ b/pkgs/development/python-modules/azure-core/default.nix @@ -14,14 +14,14 @@ }: buildPythonPackage rec { - version = "1.12.0"; + version = "1.13.0"; pname = "azure-core"; disabled = isPy27; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "adf2b1c6ef150a92295b4b405f982a9d2c55c4846728cb14760ca592acbb09ec"; + sha256 = "624b46db407dbed9e03134ab65214efab5b5315949a1fbd6cd592c46fb272588"; }; propagatedBuildInputs = [ @@ -45,6 +45,8 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/" ]; # disable tests which touch network disabledTests = [ "aiohttp" "multipart_send" "response" "request" "timeout" ]; + # requires testing modules which aren't published, and likely to create cyclic dependencies + disabledTestPaths = [ "tests/test_connection_string_parsing.py" ]; meta = with lib; { description = "Microsoft Azure Core Library for Python"; diff --git a/pkgs/development/python-modules/azure-datalake-store/default.nix b/pkgs/development/python-modules/azure-datalake-store/default.nix index f2c57d76623d..b201b39d52db 100644 --- a/pkgs/development/python-modules/azure-datalake-store/default.nix +++ b/pkgs/development/python-modules/azure-datalake-store/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "azure-datalake-store"; - version = "0.0.51"; + version = "0.0.52"; src = fetchPypi { inherit pname version; - sha256 = "b871ebb3bcfd292e8a062dbbaacbc132793d98f1b60f549a8c3b672619603fc1"; + sha256 = "4198ddb32614d16d4502b43d5c9739f81432b7e0e4d75d30e05149fe6007fea2"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-eventgrid/default.nix b/pkgs/development/python-modules/azure-eventgrid/default.nix index 3d8e4df56540..e33f89c5a641 100644 --- a/pkgs/development/python-modules/azure-eventgrid/default.nix +++ b/pkgs/development/python-modules/azure-eventgrid/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "azure-eventgrid"; - version = "4.1.0"; + version = "4.1.1"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c4f29b2d9b717dad7919048f0a458dd84f83637c3d5c8f5a7e64634b22086719"; + sha256 = "c3bd28ccf6c837b58b58fc61275dace5348a823660c3ca21166a88aa2a8377a4"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-apimanagement/default.nix b/pkgs/development/python-modules/azure-mgmt-apimanagement/default.nix index 4432595a12e7..8ca4df197bb7 100644 --- a/pkgs/development/python-modules/azure-mgmt-apimanagement/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-apimanagement/default.nix @@ -6,13 +6,13 @@ }: buildPythonPackage rec { - version = "1.0.0"; + version = "2.0.0"; pname = "azure-mgmt-apimanagement"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "3ad7e2c3d20dd0141f9e2c0ae923121f7cbe7333bb314850e6f8b606636e3589"; + sha256 = "54fade87af54904c8ac9785efccebc537c58a3c1f8726e929e473698f06ebbfc"; extension = "zip"; }; diff --git a/pkgs/development/python-modules/azure-mgmt-cdn/default.nix b/pkgs/development/python-modules/azure-mgmt-cdn/default.nix index dfadfbbc10e4..ca662f6b1455 100644 --- a/pkgs/development/python-modules/azure-mgmt-cdn/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-cdn/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "azure-mgmt-cdn"; - version = "10.0.0"; + version = "11.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "f1216f505126483c568be511a3e0e654f886f13730dae5368609ff0573528cf2"; + sha256 = "28e7070001e7208cdb6c2ad253ec78851abdd73be482230d2c0874eed5bc0907"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-compute/default.nix b/pkgs/development/python-modules/azure-mgmt-compute/default.nix index 2bfa56dc81c5..c03855f816fd 100644 --- a/pkgs/development/python-modules/azure-mgmt-compute/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-compute/default.nix @@ -6,13 +6,13 @@ }: buildPythonPackage rec { - version = "19.0.0"; + version = "20.0.0"; pname = "azure-mgmt-compute"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "65afe759c6ee87dd89d65d59c8da4b2c04d197c07c1fbfdc56ef1aea468e4525"; + sha256 = "7920bea2e11d78fa616992813aea470a8fb50eab2e646e032e138f93d53b70e8"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix index 8433025bbc04..76d5c11cb6fd 100644 --- a/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-containerservice/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "azure-mgmt-containerservice"; - version = "15.0.0"; + version = "15.1.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "e205aada94bb630e1ba5ee57751849456e1535aec3f2173edf2cbf596b99c0d9"; + sha256 = "51c64e01e614c9b88723b86b36b48f8417171610a098bf4690e39e71cefc32d9"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-cosmosdb/default.nix b/pkgs/development/python-modules/azure-mgmt-cosmosdb/default.nix index 22823bfdd583..46890f7ab5b3 100644 --- a/pkgs/development/python-modules/azure-mgmt-cosmosdb/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-cosmosdb/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "azure-mgmt-cosmosdb"; - version = "6.1.0"; + version = "6.2.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "7eb28eae4354e0a68e098de314b380d92f6482f53b2947dc8a36913195bdfde0"; + sha256 = "116b5bf9433ad89078c743b617c5b1c51f9ce1a1f128fb2e4bbafb5efb2d2c74"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-databoxedge/default.nix b/pkgs/development/python-modules/azure-mgmt-databoxedge/default.nix index 317019844cb0..7c76daf619d5 100644 --- a/pkgs/development/python-modules/azure-mgmt-databoxedge/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-databoxedge/default.nix @@ -1,21 +1,23 @@ { lib, buildPythonPackage, fetchPypi , msrestazure , azure-common +, azure-mgmt-core }: buildPythonPackage rec { pname = "azure-mgmt-databoxedge"; - version = "0.2.0"; + version = "1.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "g8BtUpIGOse8Jrws48gQ/o7sgymlgX0XIxl1ThHS3XA="; + sha256 = "04090062bc1e8f00c2f45315a3bceb0fb3b3479ec1474d71b88342e13499b087"; }; propagatedBuildInputs = [ msrestazure azure-common + azure-mgmt-core ]; # no tests in pypi tarball diff --git a/pkgs/development/python-modules/azure-mgmt-datamigration/default.nix b/pkgs/development/python-modules/azure-mgmt-datamigration/default.nix index f8f0818598d3..f7d2b7b9db04 100644 --- a/pkgs/development/python-modules/azure-mgmt-datamigration/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-datamigration/default.nix @@ -7,22 +7,24 @@ , msrestazure , azure-common , azure-mgmt-nspkg +, azure-mgmt-core }: buildPythonPackage rec { pname = "azure-mgmt-datamigration"; - version = "4.1.0"; + version = "9.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c33d1deb0ee173a15c8ec21a1e714ba544fe5f4895d3b1d8b0581f3c1b2e8ce4"; + sha256 = "70373dbeb35a7768a47341bb3b570c559197bc1ba36fc8f8bf15139e4c8bad70"; }; propagatedBuildInputs = [ msrest msrestazure azure-common + azure-mgmt-core ] ++ lib.optionals (!isPy3k) [ azure-mgmt-nspkg ]; diff --git a/pkgs/development/python-modules/azure-mgmt-dns/default.nix b/pkgs/development/python-modules/azure-mgmt-dns/default.nix index 37511456fe6f..7daca780853a 100644 --- a/pkgs/development/python-modules/azure-mgmt-dns/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-dns/default.nix @@ -6,24 +6,24 @@ , msrest , msrestazure , azure-common -, azure-mgmt-nspkg +, azure-mgmt-core }: buildPythonPackage rec { pname = "azure-mgmt-dns"; - version = "3.0.0"; + version = "8.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "0zxkcczf01b64qfwj98jqdvnwqahygcyccf37rcxpdcfgpkg9kbf"; + sha256 = "407c2dacb33513ffbe9ca4be5addb5e9d4bae0cb7efa613c3f7d531ef7bf8de8"; }; propagatedBuildInputs = [ msrest msrestazure azure-common - azure-mgmt-nspkg + azure-mgmt-core ]; # this is still needed for when the version is overrided diff --git a/pkgs/development/python-modules/azure-mgmt-hanaonazure/default.nix b/pkgs/development/python-modules/azure-mgmt-hanaonazure/default.nix index c4453e8c0c11..9b9a84bbe21e 100644 --- a/pkgs/development/python-modules/azure-mgmt-hanaonazure/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-hanaonazure/default.nix @@ -4,24 +4,26 @@ , msrest , msrestazure , azure-common +, azure-mgmt-core , azure-mgmt-nspkg , isPy3k }: buildPythonPackage rec { pname = "azure-mgmt-hanaonazure"; - version = "0.15.0"; + version = "1.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "f5699cd2f6ad09555c3f1a75c8703e12db76bbbb7ec8b621dcb948d4fc9829a5"; + sha256 = "f2f8342fbfded8be4165fb0d6f010b68df074886811db3e2c9a50b360ee2dd3a"; }; propagatedBuildInputs = [ msrest msrestazure azure-common + azure-mgmt-core ] ++ lib.optionals (!isPy3k) [ azure-mgmt-nspkg ]; diff --git a/pkgs/development/python-modules/azure-mgmt-keyvault/default.nix b/pkgs/development/python-modules/azure-mgmt-keyvault/default.nix index 10c4604ec186..c7aa05d25bd2 100644 --- a/pkgs/development/python-modules/azure-mgmt-keyvault/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-keyvault/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "azure-mgmt-keyvault"; - version = "8.0.0"; + version = "9.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "2c974c6114d8d27152642c82a975812790a5e86ccf609bf370a476d9ea0d2e7d"; + sha256 = "2890c489289b8a0bf833852014f2f494eb96873834896910ddfa58cfa97b90da"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-kusto/default.nix b/pkgs/development/python-modules/azure-mgmt-kusto/default.nix index c5adc61ea203..fb82c33ba9be 100644 --- a/pkgs/development/python-modules/azure-mgmt-kusto/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-kusto/default.nix @@ -6,13 +6,13 @@ }: buildPythonPackage rec { - version = "1.0.0"; + version = "2.0.0"; pname = "azure-mgmt-kusto"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "fa3ede0ebd6489bbf993f420bcb5fc63d9fad2a1e945c3c49b26fa012bb3534e"; + sha256 = "81601479e2b6da3e69654462674ef1474218c4415ef25c1d9892939721732153"; extension = "zip"; }; diff --git a/pkgs/development/python-modules/azure-mgmt-loganalytics/default.nix b/pkgs/development/python-modules/azure-mgmt-loganalytics/default.nix index 9eb1d2afc149..f14aa34c3239 100644 --- a/pkgs/development/python-modules/azure-mgmt-loganalytics/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-loganalytics/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "azure-mgmt-loganalytics"; - version = "8.0.0"; + version = "9.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "3e7a93186594c328a6f34f0e0d9209a05021228baa85aa4c1c4ffdbf8005a45f"; + sha256 = "c0b702753c0774a25bcb49b967573b0ec2bef5262c24bc371c219a750ba3c4fd"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-managedservices/default.nix b/pkgs/development/python-modules/azure-mgmt-managedservices/default.nix index 4d059480c442..140f08e13f4a 100644 --- a/pkgs/development/python-modules/azure-mgmt-managedservices/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-managedservices/default.nix @@ -1,21 +1,27 @@ { lib, buildPythonPackage, fetchPypi, isPy27 , azure-common +, azure-mgmt-core , msrest , msrestazure }: buildPythonPackage rec { - version = "1.0.0"; + version = "6.0.0"; pname = "azure-mgmt-managedservices"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "06ddfqriqlvwjsjhqka9r5vhshardyj9c10xgjissfkpqsgkkn7y"; + sha256 = "ec0cb3858bcf8edf5eee0eddee81560424eb84352e0df082ddc94eb99badfd5e"; extension = "zip"; }; - propagatedBuildInputs = [ azure-common msrest msrestazure ]; + propagatedBuildInputs = [ + azure-common + azure-mgmt-core + msrest + msrestazure + ]; # no tests included doCheck = false; diff --git a/pkgs/development/python-modules/azure-mgmt-maps/default.nix b/pkgs/development/python-modules/azure-mgmt-maps/default.nix index c0f418ed725c..69ed75dda307 100644 --- a/pkgs/development/python-modules/azure-mgmt-maps/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-maps/default.nix @@ -6,24 +6,24 @@ , msrest , msrestazure , azure-common -, azure-mgmt-nspkg +, azure-mgmt-core }: buildPythonPackage rec { pname = "azure-mgmt-maps"; - version = "0.1.0"; + version = "1.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c120e210bb61768da29de24d28b82f8d42ae24e52396eb6569b499709e22f006"; + sha256 = "dafbe23bdbe9c01f88ce91c5b8587eefc73ac2d637ebcdc59ded6d332932e3ab"; }; propagatedBuildInputs = [ msrest msrestazure azure-common - azure-mgmt-nspkg + azure-mgmt-core ]; pythonNamespaces = [ "azure.mgmt" ]; diff --git a/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix b/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix index 98855730ba34..c6ed92e0428d 100644 --- a/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-privatedns/default.nix @@ -1,21 +1,27 @@ { lib, buildPythonPackage, fetchPypi, isPy27 , azure-common +, azure-mgmt-core , msrest , msrestazure }: buildPythonPackage rec { - version = "0.1.0"; + version = "1.0.0"; pname = "azure-mgmt-privatedns"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "08wdvfkk8jh90m3l4nz7knd5vikgfvsx70lk7mkhcvl0xj6gv76j"; + sha256 = "b60f16e43f7b291582c5f57bae1b083096d8303e9d9958e2c29227a55cc27c45"; extension = "zip"; }; - propagatedBuildInputs = [ azure-common msrest msrestazure ]; + propagatedBuildInputs = [ + azure-common + azure-mgmt-core + msrest + msrestazure + ]; # no tests included doCheck = false; diff --git a/pkgs/development/python-modules/azure-mgmt-resource/default.nix b/pkgs/development/python-modules/azure-mgmt-resource/default.nix index 5cbbee77ae8e..447b377715d8 100644 --- a/pkgs/development/python-modules/azure-mgmt-resource/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-resource/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { - version = "16.0.0"; + version = "16.1.0"; pname = "azure-mgmt-resource"; disabled = !isPy3k; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "0bdbdc9c1ed2ef975d8dff45f358d1e06dc6761eace5b6817f13993447e48a68"; + sha256 = "b814ee27b37f030fe69461ef6f514661340dc8b1f28736362541e1c0d31d90ae"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-servicefabricmanagedclusters/default.nix b/pkgs/development/python-modules/azure-mgmt-servicefabricmanagedclusters/default.nix new file mode 100644 index 000000000000..b79c73ab026c --- /dev/null +++ b/pkgs/development/python-modules/azure-mgmt-servicefabricmanagedclusters/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +, isPy3k +, msrest +, msrestazure +, azure-common +, azure-mgmt-core +}: + +buildPythonPackage rec { + pname = "azure-mgmt-servicefabricmanagedclusters"; + version = "1.0.0"; + + src = fetchPypi { + inherit pname version; + extension = "zip"; + sha256 = "sha256-EJyjolHrt92zWg+IKWFKTapwZaFrwTtSyEIu5/mZXOg="; + }; + + propagatedBuildInputs = [ + msrest + msrestazure + azure-common + azure-mgmt-core + ]; + + pythonNamespaces = [ "azure.mgmt" ]; + + # has no tests + doCheck = false; + + meta = with lib; { + description = "This is the Microsoft Azure Service Fabric Cluster Management Client Library"; + homepage = "https://github.com/Azure/azure-sdk-for-python"; + license = licenses.mit; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/development/python-modules/azure-mgmt-storage/default.nix b/pkgs/development/python-modules/azure-mgmt-storage/default.nix index 6f14ce174cd2..6789a7512a6e 100644 --- a/pkgs/development/python-modules/azure-mgmt-storage/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-storage/default.nix @@ -8,14 +8,14 @@ }: buildPythonPackage rec { - version = "17.0.0"; + version = "17.1.0"; pname = "azure-mgmt-storage"; disabled = !isPy3k; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c0e3fd99028d98c80dddabe1c22dfeb3d694e5c1393c6de80766eb240739e4bc"; + sha256 = "01acb8e988c8082174fa952e1638d700146185644fbe4b126e65843e63d44600"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-mgmt-synapse/default.nix b/pkgs/development/python-modules/azure-mgmt-synapse/default.nix index 1b26495e9b7b..a09677ab8e7d 100644 --- a/pkgs/development/python-modules/azure-mgmt-synapse/default.nix +++ b/pkgs/development/python-modules/azure-mgmt-synapse/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "azure-mgmt-synapse"; - version = "1.0.0"; + version = "2.0.0"; disabled = pythonOlder "3"; src = fetchPypi { inherit pname version; - sha256 = "d5514dfef93294a2d9b8ff6fdb353b3102abd5750f147d904e6012f24113ff9c"; + sha256 = "bec6bdfaeb55b4fdd159f2055e8875bf50a720bb0fce80a816e92a2359b898c8"; extension = "zip"; }; diff --git a/pkgs/development/python-modules/azure-servicebus/default.nix b/pkgs/development/python-modules/azure-servicebus/default.nix index d885166daa91..899c952b3577 100644 --- a/pkgs/development/python-modules/azure-servicebus/default.nix +++ b/pkgs/development/python-modules/azure-servicebus/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "azure-servicebus"; - version = "7.1.0"; + version = "7.1.1"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c5b3681ce4d7a44c223ddddfdec4c8d2eadede3b11b598ac09c4dbf4b729e89b"; + sha256 = "58797defe666dd17ae11a8895395e7e844f11d2076ba4a9ce63682ac02f665d9"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-servicefabric/default.nix b/pkgs/development/python-modules/azure-servicefabric/default.nix index 743f0abd9256..283a31466620 100644 --- a/pkgs/development/python-modules/azure-servicefabric/default.nix +++ b/pkgs/development/python-modules/azure-servicefabric/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "azure-servicefabric"; - version = "7.2.0.46"; + version = "8.0.0.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "c15fd5e8fe33a12295435f16e007edcfd8f660547795742f9b74ef8fb3a431ba"; + sha256 = "f414cc114e28a358a7f39772205f3f15d7fc1aa30a08d106b0b80623f4303f1d"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-storage-blob/default.nix b/pkgs/development/python-modules/azure-storage-blob/default.nix index bbcf84ef6acd..fe36536dfe21 100644 --- a/pkgs/development/python-modules/azure-storage-blob/default.nix +++ b/pkgs/development/python-modules/azure-storage-blob/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "azure-storage-blob"; - version = "12.8.0"; + version = "12.8.1"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "36b85a3423379d4a93f663022487cf53aa3043a355f8414321dde878c00cb577"; + sha256 = "eb37b50ddfb6e558b29f6c8c03b0666514e55d6170bf4624e7261a3af93c6401"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-storage-file-share/default.nix b/pkgs/development/python-modules/azure-storage-file-share/default.nix index fc98e4207e8b..a1322c03c9f9 100644 --- a/pkgs/development/python-modules/azure-storage-file-share/default.nix +++ b/pkgs/development/python-modules/azure-storage-file-share/default.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "azure-storage-file-share"; - version = "12.4.1"; + version = "12.4.2"; disabled = !isPy3k; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "7503d05882970abc977529ff5a4b81e79f62fd51b238fe306f72e13f57a522ca"; + sha256 = "6c458d1e3db38fdd502d8f77107c81e6859654f02c0e7f2a98214289d9e0dde2"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-storage/default.nix b/pkgs/development/python-modules/azure-storage/default.nix index 258a5ebabb2c..8afb9b751ee9 100644 --- a/pkgs/development/python-modules/azure-storage/default.nix +++ b/pkgs/development/python-modules/azure-storage/default.nix @@ -3,6 +3,7 @@ , fetchPypi , python , azure-common +, cryptography , futures ? null , dateutil , requests @@ -18,7 +19,7 @@ buildPythonPackage rec { sha256 = "0pyasfxkin6j8j00qmky7d9cvpxgis4fi9bscgclj6yrpvf14qpv"; }; - propagatedBuildInputs = [ azure-common dateutil requests ] + propagatedBuildInputs = [ azure-common cryptography dateutil requests ] ++ pkgs.lib.optionals (!isPy3k) [ futures ]; postPatch = '' diff --git a/pkgs/development/python-modules/azure-synapse-artifacts/default.nix b/pkgs/development/python-modules/azure-synapse-artifacts/default.nix index 76ad61636061..f17c3e5f6bc2 100644 --- a/pkgs/development/python-modules/azure-synapse-artifacts/default.nix +++ b/pkgs/development/python-modules/azure-synapse-artifacts/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "azure-synapse-artifacts"; - version = "0.5.0"; + version = "0.6.0"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "a13124dc9405277f697f6452728d7dcf4c50601ee76055fd42f12b51494d6579"; + sha256 = "ec113d37386b8787862baaf9da0318364a008004a377d20fdfca31cfe8d16210"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/b2sdk/default.nix b/pkgs/development/python-modules/b2sdk/default.nix index b4a3e7acaec0..47ed0fe5fd68 100644 --- a/pkgs/development/python-modules/b2sdk/default.nix +++ b/pkgs/development/python-modules/b2sdk/default.nix @@ -1,17 +1,48 @@ -{ lib, buildPythonPackage, fetchPypi, setuptools-scm, isPy27, pytestCheckHook -, requests, arrow, logfury, tqdm }: +{ lib +, arrow +, buildPythonPackage +, fetchPypi +, importlib-metadata +, isPy27 +, logfury +, pytestCheckHook +, pytest-lazy-fixture +, pytest-mock +, pythonOlder +, requests +, setuptools-scm +, tqdm +}: buildPythonPackage rec { pname = "b2sdk"; - version = "1.6.0"; - + version = "1.7.0"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-6fjreuMUC056ljddfAidfBbJkvEDndB/dIkx1bF7efs="; + sha256 = "sha256-8X5XLh9SxZI1P7/2ZjOy8ipcEzTcriJfGI7KlMXncv4="; }; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + arrow + logfury + requests + tqdm + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ + pytestCheckHook + pytest-lazy-fixture + pytest-mock + ]; + postPatch = '' substituteInPlace setup.py \ --replace 'setuptools_scm<6.0' 'setuptools_scm' @@ -19,16 +50,16 @@ buildPythonPackage rec { --replace 'arrow>=0.8.0,<1.0.0' 'arrow' ''; - pythonImportsCheck = [ "b2sdk" ]; - - nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ requests arrow logfury tqdm ]; + disabledTests = [ + # Test requires an API key + "test_raw_api" + "test_files_headers" + ]; - # requires unpackaged dependencies like liccheck - doCheck = false; + pythonImportsCheck = [ "b2sdk" ]; meta = with lib; { - description = "Client library and utilities for access to B2 Cloud Storage (backblaze)."; + description = "Client library and utilities for access to B2 Cloud Storage (backblaze)"; homepage = "https://github.com/Backblaze/b2-sdk-python"; license = licenses.mit; }; diff --git a/pkgs/development/python-modules/backports-zoneinfo/default.nix b/pkgs/development/python-modules/backports-zoneinfo/default.nix new file mode 100644 index 000000000000..a9bc0b55955b --- /dev/null +++ b/pkgs/development/python-modules/backports-zoneinfo/default.nix @@ -0,0 +1,39 @@ +{ lib, buildPythonPackage, fetchFromGitHub +, pythonOlder +, importlib-resources +, hypothesis +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "backports-zoneinfo"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "pganssle"; + repo = "zoneinfo"; + rev = version; + sha256 = "sha256-00xdDOVdDanfsjQTd3yjMN2RFGel4cWRrAA3CvSnl24="; + }; + + propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ + importlib-resources + ]; + + pythonImportsCheck = [ "backports.zoneinfo" ]; + + checkInputs = [ + hypothesis + pytestCheckHook + ]; + + # unfortunately /etc/zoneinfo doesn't exist in sandbox, and many tests fail + doCheck = false; + + meta = with lib; { + description = "Backport of the standard library module zoneinfo"; + homepage = "https://github.com/pganssle/zoneinfo"; + license = licenses.asl20; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/development/python-modules/bacpypes/default.nix b/pkgs/development/python-modules/bacpypes/default.nix index f07c5e90d517..e07b02a08e74 100644 --- a/pkgs/development/python-modules/bacpypes/default.nix +++ b/pkgs/development/python-modules/bacpypes/default.nix @@ -1,15 +1,16 @@ { lib, buildPythonPackage, fetchPypi, fetchFromGitHub -, wheel, pytestCheckHook, pytestrunner }: +, wheel, pytestCheckHook, pytestrunner, pythonAtLeast }: buildPythonPackage rec { - version = "0.18.1"; + version = "0.18.4"; pname = "bacpypes"; + disabled = pythonAtLeast "3.9"; src = fetchFromGitHub { owner = "JoelBender"; repo = "bacpypes"; rev = version; - sha256 = "1fxrh57z3fjl95db8jh71grkv5id8qk65g6k5jqcs9v3dgkg8jkl"; + sha256 = "1z5v0i7ms8na062wxd5ki43yy5z2d9cns0p4vdmkx2drwsbzlav2"; }; propagatedBuildInputs = [ wheel ]; diff --git a/pkgs/development/python-modules/batchgenerators/default.nix b/pkgs/development/python-modules/batchgenerators/default.nix index 8706a31d5711..336c6b2e5134 100644 --- a/pkgs/development/python-modules/batchgenerators/default.nix +++ b/pkgs/development/python-modules/batchgenerators/default.nix @@ -8,7 +8,7 @@ , numpy , pillow , scipy -, scikitlearn +, scikit-learn , scikitimage , threadpoolctl }: @@ -28,7 +28,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - future numpy pillow scipy scikitlearn scikitimage threadpoolctl + future numpy pillow scipy scikit-learn scikitimage threadpoolctl ]; checkInputs = [ pytestCheckHook unittest2 ]; diff --git a/pkgs/development/python-modules/bayesian-optimization/default.nix b/pkgs/development/python-modules/bayesian-optimization/default.nix index c41181ca7b04..1e896d82678a 100644 --- a/pkgs/development/python-modules/bayesian-optimization/default.nix +++ b/pkgs/development/python-modules/bayesian-optimization/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , python -, scikitlearn +, scikit-learn , scipy , pytest , isPy27 @@ -21,7 +21,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/beancount_docverif/default.nix b/pkgs/development/python-modules/beancount_docverif/default.nix index 0067716b6265..44ebb5d94f01 100644 --- a/pkgs/development/python-modules/beancount_docverif/default.nix +++ b/pkgs/development/python-modules/beancount_docverif/default.nix @@ -1,4 +1,5 @@ { lib, buildPythonPackage, fetchPypi, isPy3k +, setuptools-scm , beancount , pytest, sh }: @@ -14,6 +15,10 @@ buildPythonPackage rec { sha256 = "1kjc0axrxpvm828lqq5m2ikq0ls8xksbmm7312zw867gdx56x5aj"; }; + nativeBuildInputs = [ + setuptools-scm + ]; + propagatedBuildInputs = [ beancount ]; diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix index 43c74fc95716..1198f034d00a 100644 --- a/pkgs/development/python-modules/behave/default.nix +++ b/pkgs/development/python-modules/behave/default.nix @@ -17,6 +17,12 @@ buildPythonApplication rec { }; checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ]; + + # upstream tests are failing, so instead we only check if we can import it + doCheck = false; + + pythonImportsCheck = [ "behave" ]; + buildInputs = [ glibcLocales ]; propagatedBuildInputs = [ colorama cucumber-tag-expressions parse parse-type six ]; diff --git a/pkgs/development/python-modules/bellows/default.nix b/pkgs/development/python-modules/bellows/default.nix index 79bcaa91cbe7..7df23d1a25aa 100644 --- a/pkgs/development/python-modules/bellows/default.nix +++ b/pkgs/development/python-modules/bellows/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "bellows"; - version = "0.23.1"; + version = "0.24.0"; src = fetchFromGitHub { owner = "zigpy"; repo = "bellows"; rev = version; - sha256 = "sha256-c9rKRmGMlYrzVQmUuM9P3c/Jm4QVM2aBRSZ0OkyrPTY="; + sha256 = "00sa4x1qzv861z9d83lk4lp1g2pqiv9hpawj92w4qn1wnqxbz6rw"; }; prePatch = '' diff --git a/pkgs/development/python-modules/blist/default.nix b/pkgs/development/python-modules/blist/default.nix index d4dcb54c5cd1..af129f4aa5dc 100644 --- a/pkgs/development/python-modules/blist/default.nix +++ b/pkgs/development/python-modules/blist/default.nix @@ -22,6 +22,12 @@ buildPythonPackage rec { url = "https://github.com/DanielStutzbach/blist/commit/2dc1ec28ed68611fcec9ac1c68070c782d6b4b4e.patch"; sha256 = "0ma0z6ga80w3wzh3sidwd8ckfbgx4j1y7cc29q6j9ddrvxpf276y"; }) + + # Fixes compatibility for Python 3.9 https://github.com/DanielStutzbach/blist/pull/91 + (fetchpatch { + url = "https://github.com/DanielStutzbach/blist/pull/91/commits/e63514f805e42dc6a5708e629e4153d91bc90bff.patch"; + sha256 = "1prx8znk7008v4ky7q2lx0pi6hzqd4kxgfdwbsr4zylwbrdqvsga"; + }) ]; meta = with lib; { diff --git a/pkgs/development/python-modules/blspy/default.nix b/pkgs/development/python-modules/blspy/default.nix new file mode 100644 index 000000000000..e75e474bdab1 --- /dev/null +++ b/pkgs/development/python-modules/blspy/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchFromGitHub +, setuptools-scm +, substituteAll +, cmake +, boost +, gmp +, pybind11 +, pythonOlder +}: + +buildPythonPackage rec { + pname = "blspy"; + version = "1.0.2"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-N1mk83uZrzSty2DyXfKiVp85z/jmztiUSRXKfNBRJV4="; + }; + + patches = [ + # prevent CMake from trying to get libraries on the Internet + (substituteAll { + src = ./dont_fetch_dependencies.patch; + pybind11_src = pybind11.src; + relic_src = fetchFromGitHub { + owner = "relic-toolkit"; + repo = "relic"; + rev = "1885ae3b681c423c72b65ce1fe70910142cf941c"; # pinned by blspy + hash = "sha256-tsSZTcssl8t7Nqdex4BesgQ+ACPgTdtHnJFvS9josN0="; + }; + }) + ]; + + nativeBuildInputs = [ cmake setuptools-scm ]; + + buildInputs = [ boost gmp.static pybind11 ]; + + pythonImportsCheck = [ + "blspy" + ]; + + # Note: upstream testsuite is just a single test.py script outside of any framework + doCheck = false; + + # CMake needs to be run by setuptools rather than by its hook + dontConfigure = true; + + meta = with lib; { + description = "BLS signatures with aggregation"; + homepage = "https://github.com/Chia-Network/bls-signatures/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch b/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch new file mode 100644 index 000000000000..f9c41d9420be --- /dev/null +++ b/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch @@ -0,0 +1,38 @@ +diff --git a/python-bindings/CMakeLists.txt b/python-bindings/CMakeLists.txt +index 255e3bb..5f99c3a 100644 +--- a/python-bindings/CMakeLists.txt ++++ b/python-bindings/CMakeLists.txt +@@ -6,8 +6,7 @@ include(FetchContent) + + FetchContent_Declare( + pybind11 +- GIT_REPOSITORY https://github.com/pybind/pybind11.git +- GIT_TAG v2.6.2 ++ SOURCE_DIR @pybind11_src@ + ) + FetchContent_MakeAvailable(pybind11 relic) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index faecc61..3272116 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,18 +4,9 @@ set (CMAKE_CXX_STANDARD 17) + # CMake 3.14+ + include(FetchContent) + +-if (DEFINED ENV{RELIC_MAIN}) +- set(RELIC_GIT_TAG "origin/main") +-else () +- set(RELIC_GIT_TAG "1885ae3b681c423c72b65ce1fe70910142cf941c") +-endif () +- +-message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}") +- + FetchContent_Declare( + relic +- GIT_REPOSITORY https://github.com/relic-toolkit/relic.git +- GIT_TAG ${RELIC_GIT_TAG} ++ SOURCE_DIR @relic_src@ + ) + FetchContent_MakeAvailable(relic) + diff --git a/pkgs/development/python-modules/bpython/default.nix b/pkgs/development/python-modules/bpython/default.nix index 55e66545538f..64fe3c455ee5 100644 --- a/pkgs/development/python-modules/bpython/default.nix +++ b/pkgs/development/python-modules/bpython/default.nix @@ -3,12 +3,15 @@ , fetchPypi , curtsies , greenlet -, mock +, jedi , pygments +, pyxdg , requests , substituteAll , urwid -, which }: +, watchdog +, which +}: buildPythonPackage rec { pname = "bpython"; @@ -24,17 +27,22 @@ buildPythonPackage rec { which = "${which}/bin/which"; })]; - propagatedBuildInputs = [ curtsies greenlet pygments requests urwid ]; + propagatedBuildInputs = [ + curtsies + greenlet + pygments + pyxdg + requests + urwid + ]; postInstall = '' substituteInPlace "$out/share/applications/org.bpython-interpreter.bpython.desktop" \ --replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython" ''; - checkInputs = [ mock ]; - - # tests fail: https://github.com/bpython/bpython/issues/712 - doCheck = false; + checkInputs = [ jedi watchdog ]; + pythonImportsCheck = [ "bpython" ]; meta = with lib; { description = "A fancy curses interface to the Python interactive interpreter"; diff --git a/pkgs/development/python-modules/braintree/default.nix b/pkgs/development/python-modules/braintree/default.nix index 28b6fccfca90..7e1c8f5a583f 100644 --- a/pkgs/development/python-modules/braintree/default.nix +++ b/pkgs/development/python-modules/braintree/default.nix @@ -22,6 +22,6 @@ buildPythonPackage rec { description = "Python library for integration with Braintree"; homepage = "https://github.com/braintree/braintree_python"; license = licenses.mit; - maintainers = [ maintainers.ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix index 21d0b6d9f308..dcd6caaffa21 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.1.0"; + version = "3.2.0"; src = fetchPypi { inherit pname version; - sha256 = "1eff207403f48898fa3b3ffa7a4275197c6c58fec105ef267caf1f5fd5a6c7be"; + sha256 = "sha256-lwKPk+UxKAhfIgUb1xPLJ/za53VdHenmBrr85RTpEps="; }; propagatedBuildInputs = [ configobj patiencediff six fastimport dulwich launchpadlib ]; diff --git a/pkgs/development/python-modules/brother/default.nix b/pkgs/development/python-modules/brother/default.nix index 9f41ed5756f5..2f4552ca3f6c 100644 --- a/pkgs/development/python-modules/brother/default.nix +++ b/pkgs/development/python-modules/brother/default.nix @@ -5,29 +5,29 @@ , pytest-asyncio , pytest-error-for-skips , pytest-runner -, pytest-tornasync -, pytest-trio , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "brother"; - version = "1.0.0"; + version = "1.0.2"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "bieniu"; repo = pname; rev = version; - sha256 = "sha256-0NfqPlQiOkNhR+H55E9LE4dGa9R8vcSyPNbbIeiRJV8="; + sha256 = "sha256-xs/GIsJUuKKbDotV1BeT/ng86UVkNsH48uHR4i3vqow="; }; + nativeBuildInputs = [ + pytest-runner + ]; + postPatch = '' - substituteInPlace pytest.ini \ + substituteInPlace setup.cfg \ --replace "--cov --cov-report term-missing " "" - substituteInPlace requirements-test.txt \ - --replace "pytest-cov" "" ''; propagatedBuildInputs = [ @@ -37,9 +37,6 @@ buildPythonPackage rec { checkInputs = [ pytest-asyncio pytest-error-for-skips - pytest-runner - pytest-tornasync - pytest-trio pytestCheckHook ]; diff --git a/pkgs/development/python-modules/btrfs/default.nix b/pkgs/development/python-modules/btrfs/default.nix index ff21d5670d72..9bcb8f37330b 100644 --- a/pkgs/development/python-modules/btrfs/default.nix +++ b/pkgs/development/python-modules/btrfs/default.nix @@ -1,17 +1,15 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi }: buildPythonPackage rec { pname = "btrfs"; - version = "12"; + version = "13"; - src = fetchFromGitHub { - owner = "knorrie"; - repo = "python-btrfs"; - rev = "v${version}"; - sha256 = "sha256-ZQSp+pbHABgBTrCwC2YsUUXAf/StP4ny7MEhBgCRqgE="; + src = fetchPypi { + inherit pname version; + sha256 = "sha256-NSyzhpHYDkunuU104XnbVCcVRNDoVBz4KuJRrE7WMO0="; }; # no tests (in v12) @@ -23,6 +21,6 @@ buildPythonPackage rec { homepage = "https://github.com/knorrie/python-btrfs"; license = licenses.lgpl3Plus; platforms = platforms.linux; - maintainers = [ maintainers.evils ]; + maintainers = with maintainers; [ evils Luflosi ]; }; } diff --git a/pkgs/development/python-modules/buildbot/default.nix b/pkgs/development/python-modules/buildbot/default.nix index 52a43d0d1137..043a1cd3e136 100644 --- a/pkgs/development/python-modules/buildbot/default.nix +++ b/pkgs/development/python-modules/buildbot/default.nix @@ -25,11 +25,11 @@ let package = buildPythonPackage rec { pname = "buildbot"; - version = "3.1.0"; + version = "3.1.1"; src = fetchPypi { inherit pname version; - sha256 = "1b9m9l8bz2slkrq0l5z8zd8pd0js5w4k7dam8bdp00kv3aln4si9"; + sha256 = "0vh2v1qs65kwcj1x8r1wj2g456kflspyz7mjara9ph9qs7j97y74"; }; propagatedBuildInputs = [ @@ -101,7 +101,7 @@ let meta = with lib; { homepage = "https://buildbot.net/"; description = "An open-source continuous integration framework for automating software build, test, and release processes"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; }; diff --git a/pkgs/development/python-modules/buildbot/pkg.nix b/pkgs/development/python-modules/buildbot/pkg.nix index 4c17eb2b6e53..b00a2ece5684 100644 --- a/pkgs/development/python-modules/buildbot/pkg.nix +++ b/pkgs/development/python-modules/buildbot/pkg.nix @@ -6,7 +6,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "0bv1qq4cf24cklxfqfnkhjb6w4xqcp3afdcan75n6v7mnwqxyyvr"; + sha256 = "13bcshfas3r7hl205il9fzdjfhd18jf0lxrr5wd8r6qzdrl6i1y6"; }; postPatch = '' @@ -25,7 +25,7 @@ buildPythonPackage rec { meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot Packaging Helper"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; } diff --git a/pkgs/development/python-modules/buildbot/plugins.nix b/pkgs/development/python-modules/buildbot/plugins.nix index 042bddc1d124..62f32a00fb45 100644 --- a/pkgs/development/python-modules/buildbot/plugins.nix +++ b/pkgs/development/python-modules/buildbot/plugins.nix @@ -7,7 +7,7 @@ src = fetchPypi { inherit pname version; - sha256 = "1a40fbmbf4gb0hgpr40yr9fb17ynxwi6vj8hvv3mm1fm9nqiggm1"; + sha256 = "1qb82s72mrm39123kwkypa2nhdsks6v9nkpw4vvscnq4p9xbzw2c"; }; # Remove unneccessary circular dependency on buildbot @@ -23,7 +23,7 @@ meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot UI"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; }; @@ -34,7 +34,7 @@ src = fetchPypi { inherit pname version; - sha256 = "1fcm4h489sb5a1hk82y1a8575s4k6qd82qkfbm2q5gd14bdvysb0"; + sha256 = "0kwzj28dmhkcr44nf39s82xjc9y5p27w4ywxfpm55cim3hwxbcb1"; }; buildInputs = [ buildbot-pkg ]; @@ -45,7 +45,7 @@ meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot Console View Plugin"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; }; @@ -56,7 +56,7 @@ src = fetchPypi { inherit pname version; - sha256 = "1qw9g2maixlcm5l1kpmc721b2p4b7adw5rsimlqcjz96mjya7acj"; + sha256 = "0vvp6z0d0qf5i5kykzph28hr3g9wgzrmmbbzdnm94yk4wsqq7w86"; }; buildInputs = [ buildbot-pkg ]; @@ -67,7 +67,7 @@ meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot Waterfall View Plugin"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; }; @@ -78,7 +78,7 @@ src = fetchPypi { inherit pname version; - sha256 = "1q0fm2h4alcck6g8fwwd42jsmkw3gdy9xmw1p78xnvk5dgs6cf9c"; + sha256 = "0y839swv9vdkwi4i1hjiyrjbj1bs74sbkpr5f58ivkjlf5alb56b"; }; buildInputs = [ buildbot-pkg ]; @@ -89,7 +89,7 @@ meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot Grid View Plugin"; - maintainers = with maintainers; [ nand0p lopsided98 ]; + maintainers = with maintainers; [ lopsided98 ]; license = licenses.gpl2; }; }; @@ -100,7 +100,7 @@ src = fetchPypi { inherit pname version; - sha256 = "0n8q607rl1qs012gpkxpq1n7ny8306n4vr3hjlz96pm60a7j7904"; + sha256 = "1zsh1bvrl3byx0ycz5jnhijzifxglm8w7kcxp79k7frw7i02fpvy"; }; buildInputs = [ buildbot-pkg ]; diff --git a/pkgs/development/python-modules/buildbot/worker.nix b/pkgs/development/python-modules/buildbot/worker.nix index 242849e2c79e..4313d16d0b77 100644 --- a/pkgs/development/python-modules/buildbot/worker.nix +++ b/pkgs/development/python-modules/buildbot/worker.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, buildbot, setuptoolsTrial, mock, twisted, - future, coreutils }: + future, coreutils, nixosTests }: buildPythonPackage (rec { pname = "buildbot-worker"; @@ -7,7 +7,7 @@ buildPythonPackage (rec { src = fetchPypi { inherit pname version; - sha256 = "0n5p9x9gz276nv1m8vn3d74jfbd35gff332cjxxqvabk06iqcjp6"; + sha256 = "0q16vgvlhiybq5rhva9kcj5v2mhfpdb5czm2vng4rrfqqiqq918m"; }; propagatedBuildInputs = [ twisted future ]; @@ -19,10 +19,14 @@ buildPythonPackage (rec { --replace /usr/bin/tail "${coreutils}/bin/tail" ''; + passthru.tests = { + smoke-test = nixosTests.buildbot; + }; + meta = with lib; { homepage = "https://buildbot.net/"; description = "Buildbot Worker Daemon"; - maintainers = with maintainers; [ nand0p ryansydnor lopsided98 ]; + maintainers = with maintainers; [ ryansydnor lopsided98 ]; license = licenses.gpl2; }; }) diff --git a/pkgs/development/python-modules/cartopy/default.nix b/pkgs/development/python-modules/cartopy/default.nix index 87eafc265501..d3953137167a 100644 --- a/pkgs/development/python-modules/cartopy/default.nix +++ b/pkgs/development/python-modules/cartopy/default.nix @@ -1,29 +1,21 @@ -{ buildPythonPackage, lib, fetchPypi, fetchpatch +{ buildPythonPackage, lib, fetchPypi , pytestCheckHook, filelock, mock, pep8 , cython , six, pyshp, shapely, geos, numpy , gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona -, proj +, proj, flufl_lock }: buildPythonPackage rec { pname = "cartopy"; - version = "0.18.0"; + version = "0.19.0.post1"; src = fetchPypi { inherit version; pname = "Cartopy"; - sha256 = "0d24fk0cbp29gmkysrwq05vry13swmwi3vx3cpcy04c0ixz33ykz"; + sha256 = "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"; }; - patches = [ - # Fix numpy-1.20 compatibility. Will be part of 0.19. - (fetchpatch { - url = "https://github.com/SciTools/cartopy/commit/e663bbbef07989a5f8484a8f36ea9c07e61d14ce.patch"; - sha256 = "061kbjgzkc3apaz6sxy00pkgy3n9dxcgps5wzj4rglb5iy86n2kq"; - }) - ]; - buildInputs = [ geos proj ]; @@ -36,7 +28,7 @@ buildPythonPackage rec { gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib ]; - checkInputs = [ pytestCheckHook filelock mock pep8 ]; + checkInputs = [ pytestCheckHook filelock mock pep8 flufl_lock ]; pytestFlagsArray = [ "--pyargs" "cartopy" @@ -46,6 +38,7 @@ buildPythonPackage rec { disabledTests = [ "test_nightshade_image" "background_img" + "test_gridliner_labels_bbox_style" ]; nativeBuildInputs = [ @@ -56,7 +49,7 @@ buildPythonPackage rec { meta = with lib; { description = "Process geospatial data to create maps and perform analyses"; - license = licenses.lgpl3; + license = licenses.lgpl3Plus; homepage = "https://scitools.org.uk/cartopy/docs/latest/"; maintainers = with maintainers; [ mredaelli ]; }; diff --git a/pkgs/development/python-modules/cassandra-driver/default.nix b/pkgs/development/python-modules/cassandra-driver/default.nix index 16479302221b..e5b1a4c4fb0f 100644 --- a/pkgs/development/python-modules/cassandra-driver/default.nix +++ b/pkgs/development/python-modules/cassandra-driver/default.nix @@ -1,4 +1,8 @@ -{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, pythonOlder +{ stdenv +, lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder , cython , eventlet , futures ? null @@ -21,14 +25,14 @@ buildPythonPackage rec { pname = "cassandra-driver"; - version = "3.24.0"; + version = "3.25.0"; # pypi tarball doesn't include tests src = fetchFromGitHub { owner = "datastax"; repo = "python-driver"; rev = version; - sha256 = "1rr69hly5q810xpn8rkzxwzlq55wxxp7kwki9vfri3gh674d2wip"; + sha256 = "1dn7iiavsrhh6i9hcyw0mk8j95r5ym0gbrvdca998hx2rnz5ark6"; }; nativeBuildInputs = [ cython ]; @@ -66,8 +70,10 @@ buildPythonPackage rec { pytestFlagsArray = [ "tests/unit" + ]; + disabledTestPaths = [ # requires puresasl - "--ignore=tests/unit/advanced/test_auth.py" + "tests/unit/advanced/test_auth.py" ]; disabledTests = [ # doesn't seem to be intended to be run directly diff --git a/pkgs/development/python-modules/castepxbin/default.nix b/pkgs/development/python-modules/castepxbin/default.nix new file mode 100644 index 000000000000..3c4466648633 --- /dev/null +++ b/pkgs/development/python-modules/castepxbin/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, scipy +, pymatgen +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "castepxbin"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "zhubonan"; + repo = "castepxbin"; + rev = "v${version}"; + sha256 = "16wnd1mwhl204d1s3har2fhyhyjg86sypg00bj812dxk8zixxszf"; + }; + + propagatedBuildInputs = [ + numpy + scipy + pymatgen + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "A collection of readers for CASTEP binary outputs"; + homepage = "https://github.com/zhubonan/castepxbin"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/catalogue/default.nix b/pkgs/development/python-modules/catalogue/default.nix index d07b7f29dc39..fbbaf92f4eb8 100644 --- a/pkgs/development/python-modules/catalogue/default.nix +++ b/pkgs/development/python-modules/catalogue/default.nix @@ -2,23 +2,20 @@ , buildPythonPackage , fetchPypi , pythonOlder -, importlib-metadata , pytestCheckHook }: buildPythonPackage rec { pname = "catalogue"; - version = "2.0.1"; + version = "2.0.4"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "0d01077dbfca7aa53f3ef4adecccce636bce4f82e5b52237703ab2f56478e56e"; + hash = "sha256-ntNF0ShVrzFfFxVYNhKya4YhorCi4775dNxdcS95g6o="; }; - propagatedBuildInputs = [ importlib-metadata ]; - checkInputs = [ pytestCheckHook ]; meta = with lib; { diff --git a/pkgs/development/python-modules/certbot/default.nix b/pkgs/development/python-modules/certbot/default.nix index 169a3112d962..88b63d80c51e 100644 --- a/pkgs/development/python-modules/certbot/default.nix +++ b/pkgs/development/python-modules/certbot/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "certbot"; - version = "1.14.0"; + version = "1.15.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-J514zgmIcHpwySChFBXGKR4552wS9z5x8Berk/irHSU="; + sha256 = "sha256-Z5ZIA0ib+N7La6Z0Taf6DovCF6fXnEDppPQt6Vgwl0c="; }; sourceRoot = "source/${pname}"; diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 1e64aad68ea3..55e2bbe4c4bf 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytest }: +{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytestCheckHook }: if isPyPy then null else buildPythonPackage rec { pname = "cffi"; @@ -11,8 +11,9 @@ if isPyPy then null else buildPythonPackage rec { outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ libffi pycparser ]; - checkInputs = [ pytest ]; + buildInputs = [ libffi ]; + + propagatedBuildInputs = [ pycparser ]; # On Darwin, the cffi tests want to hit libm a lot, and look for it in a global # impure search path. It's obnoxious how much repetition there is, and how difficult @@ -33,9 +34,8 @@ if isPyPy then null else buildPythonPackage rec { "-Wno-unused-command-line-argument -Wno-unreachable-code"; doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate - checkPhase = '' - py.test -k "not test_char_pointer_conversion" - ''; + + checkInputs = [ pytestCheckHook ]; meta = with lib; { maintainers = with maintainers; [ domenkozar lnl7 ]; diff --git a/pkgs/development/python-modules/chalice/default.nix b/pkgs/development/python-modules/chalice/default.nix index e99f321df37f..70aa31a0d8bf 100644 --- a/pkgs/development/python-modules/chalice/default.nix +++ b/pkgs/development/python-modules/chalice/default.nix @@ -7,6 +7,7 @@ , click , enum-compat , hypothesis +, inquirer , jmespath , mock , mypy-extensions @@ -35,6 +36,7 @@ buildPythonPackage rec { botocore click enum-compat + inquirer jmespath mypy-extensions pip diff --git a/pkgs/development/python-modules/chiabip158/default.nix b/pkgs/development/python-modules/chiabip158/default.nix new file mode 100644 index 000000000000..f2c309593610 --- /dev/null +++ b/pkgs/development/python-modules/chiabip158/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cmake +, pybind11 +, pythonOlder +, pytestCheckHook +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "chiabip158"; + version = "1.0"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-dG6A4n30uPswQWY/Wmi75HK4ZMCDNr9Lt05FRWEPYV8="; + }; + + nativeBuildInputs = [ cmake setuptools-scm ]; + + buildInputs = [ pybind11 ]; + + checkInputs = [ + pytestCheckHook + ]; + + # CMake needs to be run by setuptools rather than by its hook + dontConfigure = true; + + meta = with lib; { + description = "Chia's implementation of BIP 158"; + homepage = "https://www.chia.net/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/chiapos/default.nix b/pkgs/development/python-modules/chiapos/default.nix new file mode 100644 index 000000000000..1faf5a94f8cc --- /dev/null +++ b/pkgs/development/python-modules/chiapos/default.nix @@ -0,0 +1,48 @@ +{ lib +, substituteAll +, buildPythonPackage +, fetchPypi +, cmake +, cxxopts +, ghc_filesystem +, pybind11 +, pythonOlder +, psutil +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "chiapos"; + version = "1.0.1"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-kJx57EtwPBrGMpjnSzeYYhWqc/g1N1Bg8slW5oZKjg8="; + }; + + patches = [ + # prevent CMake from trying to get libraries on the Internet + (substituteAll { + src = ./dont_fetch_dependencies.patch; + inherit cxxopts ghc_filesystem; + pybind11_src = pybind11.src; + }) + ]; + + nativeBuildInputs = [ cmake setuptools-scm ]; + + buildInputs = [ pybind11 ]; + + checkInputs = [ psutil ]; + + # CMake needs to be run by setuptools rather than by its hook + dontConfigure = true; + + meta = with lib; { + description = "Chia proof of space library"; + homepage = "https://www.chia.net/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/chiapos/dont_fetch_dependencies.patch b/pkgs/development/python-modules/chiapos/dont_fetch_dependencies.patch new file mode 100644 index 000000000000..ca18fd292ca8 --- /dev/null +++ b/pkgs/development/python-modules/chiapos/dont_fetch_dependencies.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b4a2f5..86f849c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,22 +18,19 @@ include(FetchContent) + + FetchContent_Declare( + pybind11-src +- GIT_REPOSITORY https://github.com/pybind/pybind11.git +- GIT_TAG v2.6.2 ++ SOURCE_DIR @pybind11_src@ + ) + FetchContent_MakeAvailable(pybind11-src) + + FetchContent_Declare( + cxxopts +- GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git +- GIT_TAG v2.2.1 ++ SOURCE_DIR @cxxopts@ + ) + FetchContent_MakeAvailable(cxxopts) + + FetchContent_Declare( + gulrak +- GIT_REPOSITORY https://github.com/gulrak/filesystem.git +- GIT_TAG v1.5.4 ++ SOURCE_DIR @ghc_filesystem@ + ) + FetchContent_MakeAvailable(gulrak) + + diff --git a/pkgs/development/python-modules/chiavdf/default.nix b/pkgs/development/python-modules/chiavdf/default.nix new file mode 100644 index 000000000000..deb7d21adc76 --- /dev/null +++ b/pkgs/development/python-modules/chiavdf/default.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, setuptools-scm +, substituteAll +, cmake +, boost +, gmp +, pybind11 +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "chiavdf"; + version = "1.0.1"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-z0od/VrH580+9641lKNI7jbVMlJZKCWnoT+GljnFxmU="; + }; + + patches = [ + # prevent CMake from trying to get libraries on the Internet + (substituteAll { + src = ./dont_fetch_dependencies.patch; + pybind11_src = pybind11.src; + }) + ]; + + # x86 instructions are needed for this component + BUILD_VDF_CLIENT = lib.optionalString (!stdenv.isx86_64) "N"; + + nativeBuildInputs = [ cmake setuptools-scm ]; + + buildInputs = [ boost gmp pybind11 ]; + + checkInputs = [ + pytestCheckHook + ]; + + # CMake needs to be run by setuptools rather than by its hook + dontConfigure = true; + + meta = with lib; { + description = "Chia verifiable delay function utilities"; + homepage = "https://www.chia.net/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/chiavdf/dont_fetch_dependencies.patch b/pkgs/development/python-modules/chiavdf/dont_fetch_dependencies.patch new file mode 100644 index 000000000000..9b49db81fcf5 --- /dev/null +++ b/pkgs/development/python-modules/chiavdf/dont_fetch_dependencies.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c975128..a9f6910 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,8 +31,7 @@ include(FetchContent) + + FetchContent_Declare( + pybind11-src +- GIT_REPOSITORY https://github.com/pybind/pybind11.git +- GIT_TAG v2.6.2 ++ SOURCE_DIR @pybind11_src@ + ) + FetchContent_MakeAvailable(pybind11-src) + diff --git a/pkgs/development/python-modules/cirq-core/default.nix b/pkgs/development/python-modules/cirq-core/default.nix new file mode 100644 index 000000000000..54e2fa1954df --- /dev/null +++ b/pkgs/development/python-modules/cirq-core/default.nix @@ -0,0 +1,98 @@ +{ stdenv +, lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, matplotlib +, networkx +, numpy +, pandas +, requests +, scipy +, sortedcontainers +, sympy +, tqdm +, typing-extensions + # Contrib requirements +, withContribRequires ? false +, autoray ? null +, opt-einsum +, ply +, pylatex ? null +, pyquil ? null +, quimb ? null + # test inputs +, pytestCheckHook +, freezegun +, pytest-asyncio +}: +buildPythonPackage rec { + pname = "cirq-core"; + version = "0.11.0"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "quantumlib"; + repo = "cirq"; + rev = "v${version}"; + hash = "sha256-JaKTGnkYhzIFb35SGaho8DRupoT0JFYKA5+rJEq4oXw="; + }; + + sourceRoot = "source/${pname}"; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "matplotlib~=3.0" "matplotlib" \ + --replace "networkx~=2.4" "networkx" \ + --replace "numpy~=1.16" "numpy" \ + --replace "requests~=2.18" "requests" + ''; + + propagatedBuildInputs = [ + matplotlib + networkx + numpy + pandas + requests + scipy + sortedcontainers + sympy + tqdm + typing-extensions + ] ++ lib.optionals withContribRequires [ + autoray + opt-einsum + ply + pylatex + pyquil + quimb + ]; + + checkInputs = [ + pytestCheckHook + pytest-asyncio + freezegun + ]; + + pytestFlagsArray = lib.optionals (!withContribRequires) [ + # requires external (unpackaged) libraries, so untested. + "--ignore=cirq/contrib/" + ]; + disabledTests = [ + "test_metadata_search_path" # tries to import flynt, which isn't in Nixpkgs + "test_benchmark_2q_xeb_fidelities" # fails due pandas MultiIndex. Maybe issue with pandas version in nix? + ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ + # Seem to fail due to math issues on aarch64? + "expectation_from_wavefunction" + "test_single_qubit_op_to_framed_phase_form_output_on_example_case" + ]; + + meta = with lib; { + description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits."; + homepage = "https://github.com/quantumlib/cirq"; + changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ drewrisinger ]; + }; +} diff --git a/pkgs/development/python-modules/cirq-google/default.nix b/pkgs/development/python-modules/cirq-google/default.nix new file mode 100644 index 000000000000..8692aef4b678 --- /dev/null +++ b/pkgs/development/python-modules/cirq-google/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, pythonOlder +, cirq-core +, google-api-core +, protobuf +# test inputs +, pytestCheckHook +, freezegun +}: + +buildPythonPackage rec { + pname = "cirq-google"; + inherit (cirq-core) version src meta; + + sourceRoot = "source/${pname}"; + + postPatch = '' + substituteInPlace requirements.txt --replace "protobuf~=3.13.0" "protobuf" + ''; + + propagatedBuildInputs = [ + cirq-core + google-api-core + protobuf + ]; + + checkInputs = [ pytestCheckHook freezegun ]; +} diff --git a/pkgs/development/python-modules/cirq/default.nix b/pkgs/development/python-modules/cirq/default.nix index f0b576299b21..f8afdcbbb050 100644 --- a/pkgs/development/python-modules/cirq/default.nix +++ b/pkgs/development/python-modules/cirq/default.nix @@ -1,114 +1,28 @@ -{ stdenv -, lib +{ lib , buildPythonPackage -, pythonOlder -, fetchFromGitHub -, google-api-core -, matplotlib -, networkx -, numpy -, pandas -, protobuf -, requests -, scipy -, sortedcontainers -, sympy -, tqdm -, typing-extensions +, cirq-core +, cirq-google # test inputs -, freezegun , pytestCheckHook -, pytest-asyncio -, pytest-benchmark -, ply -, pydot -, pyyaml -, pygraphviz }: buildPythonPackage rec { pname = "cirq"; - version = "0.10.0"; - - disabled = pythonOlder "3.6"; - - src = fetchFromGitHub { - owner = "quantumlib"; - repo = "cirq"; - rev = "v${version}"; - sha256 = "0xinml44n2lfl0q2lb2apmn69gsszlwim83082f66vyk0gpwd4lr"; - }; - - postPatch = '' - substituteInPlace requirements.txt \ - --replace "matplotlib~=3.0" "matplotlib" \ - --replace "networkx~=2.4" "networkx" \ - --replace "numpy~=1.16" "numpy" \ - --replace "protobuf~=3.13.0" "protobuf" - ''; + inherit (cirq-core) version src meta; propagatedBuildInputs = [ - google-api-core - matplotlib - networkx - numpy - pandas - protobuf - requests - scipy - sortedcontainers - sympy - tqdm - typing-extensions + cirq-core + cirq-google ]; # pythonImportsCheck = [ "cirq" "cirq.Circuit" ]; # cirq's importlib hook doesn't work here - checkInputs = [ - pytestCheckHook - freezegun - pytest-asyncio - pytest-benchmark - ply - pydot - pyyaml - pygraphviz - ]; + checkInputs = [ pytestCheckHook ]; - pytestFlagsArray = [ - "--ignore=dev_tools" # Only needed when developing new code, which is out-of-scope - "--ignore=cirq/contrib/" # requires external (unpackaged) python packages, so untested. - "--benchmark-disable" # Don't need to run benchmarks when packaging. - ]; - disabledTests = lib.optionals stdenv.isAarch64 [ - # Seem to fail due to math issues on aarch64? - "expectation_from_wavefunction" - "test_single_qubit_op_to_framed_phase_form_output_on_example_case" - ] ++ [ - # slow tests, for quicker building - "test_anneal_search_method_calls" - "test_density_matrix_from_state_tomography_is_correct" - "test_example_runs_qubit_characterizations" - "test_example_runs_hello_line_perf" - "test_example_runs_bc_mean_field_perf" - "test_main_loop" - "test_clifford_circuit_2" - "test_decompose_specific_matrices" - "test_two_qubit_randomized_benchmarking" - "test_kak_decomposition_perf" - "test_example_runs_simon" - "test_decompose_random_unitary" - "test_decompose_size_special_unitary" - "test_api_retry_5xx_errors" - "test_xeb_fidelity" - "test_example_runs_phase_estimator_perf" - "test_cross_entropy_benchmarking" + # Don't run submodule or development tool tests + disabledTestPaths = [ + "cirq-google" + "cirq-core" + "dev_tools" ]; - meta = with lib; { - description = "A framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits."; - homepage = "https://github.com/quantumlib/cirq"; - changelog = "https://github.com/quantumlib/Cirq/releases/tag/v${version}"; - license = licenses.asl20; - maintainers = with maintainers; [ drewrisinger ]; - }; } diff --git a/pkgs/development/python-modules/claripy/default.nix b/pkgs/development/python-modules/claripy/default.nix index c3a715c15274..4d8a79a8c991 100644 --- a/pkgs/development/python-modules/claripy/default.nix +++ b/pkgs/development/python-modules/claripy/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "claripy"; - version = "9.0.6852"; + version = "9.0.6885"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "angr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-31zaL3PJDXyLvVD3Xdc2qoLSrXipwTawHoj+I+Y6fng="; + sha256 = "sha256-UCO6kXI4W/fCFgevXaRrGMjMH3ZhG7dXmFi+pemX9sE="; }; # Use upstream z3 implementation diff --git a/pkgs/development/python-modules/cle/default.nix b/pkgs/development/python-modules/cle/default.nix index 4daab5059627..51d0c263d302 100644 --- a/pkgs/development/python-modules/cle/default.nix +++ b/pkgs/development/python-modules/cle/default.nix @@ -15,7 +15,7 @@ let # The binaries are following the argr projects release cycle - version = "9.0.6852"; + version = "9.0.6885"; # Binary files from https://github.com/angr/binaries (only used for testing and only here) binaries = fetchFromGitHub { @@ -35,7 +35,7 @@ buildPythonPackage rec { owner = "angr"; repo = pname; rev = "v${version}"; - sha256 = "sha256-IRyRio3M7YZtdBqb7PGoWs2Lyt8hjBLYM1zQYbhjYEs="; + sha256 = "sha256-ubBs55ZIGssAwD+3YsZYzDA7/dwQ+UD9GtWPDGQrO80="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/clevercsv/default.nix b/pkgs/development/python-modules/clevercsv/default.nix index 36944b5dbec4..233b7164989d 100644 --- a/pkgs/development/python-modules/clevercsv/default.nix +++ b/pkgs/development/python-modules/clevercsv/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "clevercsv"; - version = "0.6.7"; + version = "0.6.8"; format = "setuptools"; src = fetchFromGitHub { owner = "alan-turing-institute"; repo = "CleverCSV"; rev = "v${version}"; - sha256 = "0j3959bji48pkp0vnk7yls5l75ywjl77jdkvzs62n5mi5lky88p9"; + sha256 = "0jpgyh65zqr76sz2s63zsjyb49dpg2xdmf72jvpicw923bdzhqvp"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/click-configfile/default.nix b/pkgs/development/python-modules/click-configfile/default.nix new file mode 100644 index 000000000000..0d87aa890d2a --- /dev/null +++ b/pkgs/development/python-modules/click-configfile/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, click +, six +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "click-configfile"; + version = "0.2.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "lb7sE77pUOmPQ8gdzavvT2RAkVWepmKY+drfWTUdkNE="; + }; + + propagatedBuildInputs = [ + click + six + ]; + + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + "test_configfile__with_unbound_section" + "test_matches_section__with_bad_arg" + ]; + + meta = with lib; { + description = "Add support for commands that use configuration files to Click"; + homepage = "https://github.com/click-contrib/click-configfile"; + license = licenses.bsd3; + maintainers = with maintainers; [ jtojnar ]; + }; +} diff --git a/pkgs/development/python-modules/click-spinner/default.nix b/pkgs/development/python-modules/click-spinner/default.nix new file mode 100644 index 000000000000..e0d862ab1310 --- /dev/null +++ b/pkgs/development/python-modules/click-spinner/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchPypi +, click +, six +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "click-spinner"; + version = "0.1.10"; + + src = fetchPypi { + inherit pname version; + sha256 = "h+rPnXKYlzol12Fe9X1Hgq6/kTpTK7pLKKN+Nm6XXa8="; + }; + + checkInputs = [ + click + six + pytestCheckHook + ]; + + meta = with lib; { + description = "Add support for showwing that command line app is active to Click"; + homepage = "https://github.com/click-contrib/click-spinner"; + license = licenses.mit; + maintainers = with maintainers; [ jtojnar ]; + }; +} diff --git a/pkgs/development/python-modules/clickhouse-driver/default.nix b/pkgs/development/python-modules/clickhouse-driver/default.nix index a1addcfc97ab..9a4c0f0f92be 100644 --- a/pkgs/development/python-modules/clickhouse-driver/default.nix +++ b/pkgs/development/python-modules/clickhouse-driver/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , setuptools , pytz , tzlocal @@ -10,15 +10,20 @@ , freezegun , mock , nose +, pytestCheckHook +, pytest-xdist }: buildPythonPackage rec { pname = "clickhouse-driver"; version = "0.2.0"; - src = fetchPypi { - inherit pname version; - sha256 = "62d37f93872d5a13eb6b0d52bab2b593ed0e14cf9200949aa2d02f9801064c0f"; + # pypi source doesn't contain tests + src = fetchFromGitHub { + owner = "mymarilyn"; + repo = "clickhouse-driver"; + rev = "96b7ba448c63ca2670cc9aa70d4a0e08826fb650"; + sha256 = "sha256-HFKUxJOlBCVlu7Ia8heGpwX6+HdKuwSy92s3v+GKGwE="; }; propagatedBuildInputs = [ @@ -34,9 +39,30 @@ buildPythonPackage rec { freezegun mock nose + pytest-xdist + pytestCheckHook ]; - doCheck = true; + postPatch = '' + substituteInPlace setup.py \ + --replace "lz4<=3.0.1" "lz4<=4" + ''; + + # remove source to prevent pytest testing source instead of the build artifacts + # (the source doesn't contain the extension modules) + preCheck = '' + rm -rf clickhouse_driver + ''; + + # some test in test_buffered_reader.py doesn't seem to return + disabledTestPaths = [ "tests/test_buffered_reader.py" ]; + + pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" ]; + + # most tests require `clickhouse` + # TODO: enable tests after `clickhouse` unbroken + doCheck = false; + pythonImportsCheck = [ "clickhouse_driver" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/cloudsmith-api/default.nix b/pkgs/development/python-modules/cloudsmith-api/default.nix new file mode 100644 index 000000000000..57316ae9d6ce --- /dev/null +++ b/pkgs/development/python-modules/cloudsmith-api/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, certifi +, six +, dateutil +, urllib3 +}: + +buildPythonPackage rec { + pname = "cloudsmith-api"; + version = "0.54.15"; + + format = "wheel"; + + src = fetchPypi { + pname = "cloudsmith_api"; + inherit format version; + sha256 = "X72xReosUnUlj69Gq+i+izhaKZuakM9mUrRHZI5L9h0="; + }; + + propagatedBuildInputs = [ + certifi + six + dateutil + urllib3 + ]; + + # Wheels have no tests + doCheck = false; + + pythonImportsCheck = [ + "cloudsmith_api" + ]; + + meta = with lib; { + description = "Cloudsmith API Client"; + homepage = "https://github.com/cloudsmith-io/cloudsmith-api"; + license = licenses.asl20; + maintainers = with maintainers; [ jtojnar ]; + }; +} diff --git a/pkgs/development/python-modules/clvm-rs/default.nix b/pkgs/development/python-modules/clvm-rs/default.nix new file mode 100644 index 000000000000..4e5f69f8cd50 --- /dev/null +++ b/pkgs/development/python-modules/clvm-rs/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, rustPlatform +, pythonOlder +, openssl +, perl +}: + +buildPythonPackage rec { + pname = "clvm_rs"; + version = "0.1.7"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Chia-Network"; + repo = "clvm_rs"; + rev = version; + sha256 = "sha256-ves23q1uQ3lexwK9l1xGRss05jYObJDi/aY9Yvp4aPU="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-3kPzM2EX61ZvU6VKXY1OG/ic+9FU3Et4RuKp+3QYzSo="; + }; + + format = "pyproject"; + + nativeBuildInputs = [ + perl # used by openssl-sys to configure + ] ++ (with rustPlatform; [ + cargoSetupHook + maturinBuildHook + ]); + + buildInputs = [ openssl ]; + + pythonImportsCheck = [ "clvm_rs" ]; + + meta = with lib; { + homepage = "https://chialisp.com/"; + description = "Rust implementation of clvm"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/clvm-tools/default.nix b/pkgs/development/python-modules/clvm-tools/default.nix new file mode 100644 index 000000000000..365f21e8c36e --- /dev/null +++ b/pkgs/development/python-modules/clvm-tools/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, clvm +, setuptools-scm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "clvm_tools"; + version = "0.4.3"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Chia-Network"; + repo = "clvm_tools"; + rev = version; + sha256 = "sha256-bWz3YCrakob/kROq+LOA+yD1wtIbInVrmDqtg4/cV4g="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + clvm + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "clvm_tools" + ]; + + disabledTests = [ + "test_cmd_unknown-1_txt" + ]; + + # give a hint to setuptools_scm on package version + SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"; + + meta = with lib; { + description = "Tools for clvm development"; + homepage = "https://www.chialisp.com/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/clvm/default.nix b/pkgs/development/python-modules/clvm/default.nix new file mode 100644 index 000000000000..f7168832fa43 --- /dev/null +++ b/pkgs/development/python-modules/clvm/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, blspy +, setuptools-scm +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "clvm"; + version = "0.9.6"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Chia-Network"; + repo = "clvm"; + rev = version; + sha256 = "sha256-XBQEilDFhx0kT9bEMD4jX+SDk3cAC1BUCWhbtpgrLcA="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + # give a hint to setuptools_scm on package version + SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}"; + + propagatedBuildInputs = [ + blspy + ]; + + checkInputs = [ + pytestCheckHook + ]; + + disabledTestPaths = [ + # all tests in this file have a circular dependency on clvm-tools + "tests/cmds_test.py" + ]; + + pythonImportsCheck = [ + "clvm" + ]; + + meta = with lib; { + description = "Chia Lisp virtual machine"; + homepage = "https://www.chia.net/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/cnvkit/default.nix b/pkgs/development/python-modules/cnvkit/default.nix index 5baa28e4bd7f..6347c8552bf6 100644 --- a/pkgs/development/python-modules/cnvkit/default.nix +++ b/pkgs/development/python-modules/cnvkit/default.nix @@ -6,7 +6,7 @@ , biopython , numpy , scipy -, scikitlearn +, scikit-learn , pandas , matplotlib , reportlab @@ -42,7 +42,7 @@ buildPythonPackage rec { biopython numpy scipy - scikitlearn + scikit-learn pandas matplotlib reportlab diff --git a/pkgs/development/python-modules/colored-traceback/default.nix b/pkgs/development/python-modules/colored-traceback/default.nix new file mode 100644 index 000000000000..35d1d5a896c2 --- /dev/null +++ b/pkgs/development/python-modules/colored-traceback/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pygments +}: + +buildPythonPackage rec { + pname = "colored-traceback"; + version = "0.3.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-bafOKx2oafa7VMkntBW5VyfEu22ahMRhXqd9mHKRGwU="; + }; + + buildInputs = [ pygments ]; + + # No setuptools tests for the package. + doCheck = false; + + pythonImportsCheck = [ "colored_traceback" ]; + + meta = with lib; { + homepage = "https://github.com/staticshock/colored-traceback.py"; + description = "Automatically color Python's uncaught exception tracebacks"; + license = licenses.isc; + maintainers = with maintainers; [ pamplemousse ]; + }; +} diff --git a/pkgs/development/python-modules/concurrent-log-handler/default.nix b/pkgs/development/python-modules/concurrent-log-handler/default.nix new file mode 100644 index 000000000000..5880cdf961e7 --- /dev/null +++ b/pkgs/development/python-modules/concurrent-log-handler/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, portalocker +}: + +buildPythonPackage rec { + pname = "concurrent-log-handler"; + version = "0.9.19"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-sS95q+0/lBIcJc6cJM21fYiSguxv9h9VNasgaNw31Ak="; + }; + + propagatedBuildInputs = [ + portalocker + ]; + + pythonImportsCheck = [ + "concurrent_log_handler" + ]; + + doCheck = false; # upstream has no tests + + meta = with lib; { + description = "Python logging handler that allows multiple processes to safely write to the same log file concurrently"; + homepage = "https://www.chia.net/"; + license = licenses.asl20; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/connexion/default.nix b/pkgs/development/python-modules/connexion/default.nix index 25925f56069a..0429ee7a507a 100644 --- a/pkgs/development/python-modules/connexion/default.nix +++ b/pkgs/development/python-modules/connexion/default.nix @@ -1,89 +1,60 @@ -{ buildPythonPackage -, fetchFromGitHub -, isPy3k -, glibcLocales -, lib -, pythonOlder - +{ lib , aiohttp -, aiohttp-swagger , aiohttp-jinja2 +, aiohttp-remotes +, aiohttp-swagger +, buildPythonPackage , clickclick , decorator -, flake8 +, fetchFromGitHub , flask -, gevent , inflection , jsonschema -, mock , openapi-spec-validator -, pathlib -, pytest , pytest-aiohttp -, pytestcov +, pytestCheckHook +, pythonOlder , pyyaml , requests -, six , swagger-ui-bundle , testfixtures -, typing ? null -, ujson }: buildPythonPackage rec { pname = "connexion"; - version = "2.4.0"; + version = "2.7.0"; + disabled = pythonOlder "3.6"; - # we're fetching from GitHub because tests weren't distributed on PyPi src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = version; - sha256 = "1b9q027wrks0afl7l3a1wxymz3aick26b9fq2m07pc5wb9np0vvg"; + sha256 = "15iflq5403diwda6n6qrpq67wkdcvl3vs0gsg0fapxqnq3a2m7jj"; }; - checkInputs = [ - decorator - mock - pytest - pytestcov - testfixtures - flask - swagger-ui-bundle - ] - ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson pytest-aiohttp ] - ++ lib.optional (pythonOlder "3.7") glibcLocales - ; propagatedBuildInputs = [ + aiohttp + aiohttp-jinja2 + aiohttp-swagger clickclick + flask + inflection jsonschema + openapi-spec-validator pyyaml requests - six - inflection - openapi-spec-validator swagger-ui-bundle - flask - ] - ++ lib.optional (pythonOlder "3.4") pathlib - ++ lib.optional (pythonOlder "3.6") typing - ++ lib.optionals isPy3k [ aiohttp aiohttp-jinja2 aiohttp-swagger ujson ] - ; - - preConfigure = lib.optional (pythonOlder "3.7") '' - export LANG=en_US.UTF-8 - ''; + ]; - postPatch = '' - substituteInPlace setup.py --replace "'aiohttp>=2.3.10,<3.5.2'" "'aiohttp>=2.3.10'" - ''; + checkInputs = [ + aiohttp-remotes + decorator + pytest-aiohttp + pytestCheckHook + testfixtures + ]; - checkPhase = if isPy3k then '' - pytest -k "not test_app_get_root_path and \ - not test_verify_oauth_scopes_remote and \ - not test_verify_oauth_scopes_local and \ - not test_run_with_aiohttp_not_installed"'' - else "pytest --ignore=tests/aiohttp"; + pythonImportsCheck = [ "connexion" ]; meta = with lib; { description = "Swagger/OpenAPI First framework on top of Flask"; diff --git a/pkgs/development/python-modules/cookiecutter/default.nix b/pkgs/development/python-modules/cookiecutter/default.nix index c5ee4d8617d0..b2a13cdbb654 100644 --- a/pkgs/development/python-modules/cookiecutter/default.nix +++ b/pkgs/development/python-modules/cookiecutter/default.nix @@ -5,14 +5,14 @@ buildPythonPackage rec { pname = "cookiecutter"; - version = "1.7.2"; + version = "1.7.3"; # not sure why this is broken disabled = isPyPy; src = fetchPypi { inherit pname version; - sha256 = "efb6b2d4780feda8908a873e38f0e61778c23f6a2ea58215723bcceb5b515dac"; + sha256 = "sha256-a5pNcoguJDvgd6c5fQ8fdv5mzz35HzEV27UzDiFPpFc="; }; checkInputs = [ pytest pytestcov pytest-mock freezegun ]; diff --git a/pkgs/development/python-modules/coqpit/default.nix b/pkgs/development/python-modules/coqpit/default.nix new file mode 100644 index 000000000000..c4df114e24df --- /dev/null +++ b/pkgs/development/python-modules/coqpit/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "coqpit"; + version = "0.0.6.6"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "coqui-ai"; + repo = pname; + rev = "v${version}"; + sha256 = "0wb5wf84i5h4ycm732kn4316v7schhm91s2rrklfw9sny5dqmdnh"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "coqpit" + "coqpit.coqpit" + ]; + + meta = with lib; { + description = "Simple but maybe too simple config management through python data classes"; + longDescription = '' + Simple, light-weight and no dependency config handling through python data classes with to/from JSON serialization/deserialization. + ''; + homepage = "https://github.com/coqui-ai/coqpit"; + license = licenses.mit; + maintainers = with maintainers; [ hexa mic92 ]; + }; +} diff --git a/pkgs/development/python-modules/coreapi/default.nix b/pkgs/development/python-modules/coreapi/default.nix index 8b957fee4f6e..ad9fd3d7ef73 100644 --- a/pkgs/development/python-modules/coreapi/default.nix +++ b/pkgs/development/python-modules/coreapi/default.nix @@ -39,6 +39,6 @@ buildPythonPackage rec { description = "Python client library for Core API"; homepage = "https://github.com/core-api/python-client"; license = licenses.bsd3; - maintainers = with maintainers; [ ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/coreschema/default.nix b/pkgs/development/python-modules/coreschema/default.nix index 65bdee5a8da9..d22e7f4ecd91 100644 --- a/pkgs/development/python-modules/coreschema/default.nix +++ b/pkgs/development/python-modules/coreschema/default.nix @@ -29,6 +29,6 @@ buildPythonPackage rec { description = "Python client library for Core Schema"; homepage = "https://github.com/ivegotasthma/python-coreschema"; license = licenses.bsd3; - maintainers = with maintainers; [ ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/crate/default.nix b/pkgs/development/python-modules/crate/default.nix index 9be85ff4b3cd..07b9652e7753 100644 --- a/pkgs/development/python-modules/crate/default.nix +++ b/pkgs/development/python-modules/crate/default.nix @@ -29,6 +29,9 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = [ + "RequestsCaBundleTest" + ]; disabledTestPaths = lib.optionals stdenv.isDarwin [ "src/crate/client/test_http.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 4671f607bbac..1bf3602a7b10 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { inherit src; sourceRoot = "${pname}-${version}/${cargoRoot}"; name = "${pname}-${version}"; - sha256 = "1wisxmq26b8ml144m2458sgcbk8jpv419j01qmffsrfy50x9i1yw"; + sha256 = "1m6smky4nahwlp4hn6yzibrcxlbsw4nx162dsq48vlw8h1lgjl62"; }; cargoRoot = "src/rust"; diff --git a/pkgs/development/python-modules/csvw/default.nix b/pkgs/development/python-modules/csvw/default.nix index e4bd7ab2b624..27f3f291113c 100644 --- a/pkgs/development/python-modules/csvw/default.nix +++ b/pkgs/development/python-modules/csvw/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, isPy27 +, pythonOlder , attrs , isodate , dateutil @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "csvw"; - version = "1.10.1"; - disabled = isPy27; + version = "1.11.0"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "cldf"; repo = "csvw"; rev = "v${version}"; - sha256 = "1764nfa4frjdd7v6wj35y7prnciaqz57wwygy5zfavl4laxn4nxd"; + sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg"; }; patchPhase = '' @@ -42,6 +42,12 @@ buildPythonPackage rec { pytest-mock ]; + disabledTests = [ + # this test is flaky on darwin because it depends on the resolution of filesystem mtimes + # https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257 + "test_write_file_exists" + ]; + meta = with lib; { description = "CSV on the Web"; homepage = "https://github.com/cldf/csvw"; diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix index dc32bcdf74c9..7b34884e26e2 100644 --- a/pkgs/development/python-modules/curtsies/default.nix +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -1,22 +1,14 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, blessings, mock, nose, pyte, wcwidth, typing ? null}: +{ lib, buildPythonPackage, fetchPypi, pythonOlder, blessings, mock, nose, pyte, cwcwidth, typing ? null}: buildPythonPackage rec { pname = "curtsies"; - version = "0.3.0"; + version = "0.3.5"; src = fetchPypi { inherit pname version; - sha256 = "89c802ec051d01dec6fc983e9856a3706e4ea8265d2940b1f6d504a9e26ed3a9"; + sha256 = "1g8dwafx4vx06isjkn28r3cwb0hw1bv67lgygaz34yk66lrzz1x5"; }; - patches = [ - # Fix dependency on typing. Remove with the next release - (fetchpatch { - url = "https://github.com/bpython/curtsies/commit/217b4f83e954837f8adc4c549c1f2f9f2bb272a7.patch"; - sha256 = "1d3zwx9c7i0drb4nvydalm9mr83jrvdm75ffgisri89h337hiffs"; - }) - ]; - - propagatedBuildInputs = [ blessings wcwidth ] + propagatedBuildInputs = [ blessings cwcwidth ] ++ lib.optionals (pythonOlder "3.5") [ typing ]; checkInputs = [ mock pyte nose ]; diff --git a/pkgs/development/python-modules/cvxpy/default.nix b/pkgs/development/python-modules/cvxpy/default.nix index 1d060c41bb21..359ee96f60a9 100644 --- a/pkgs/development/python-modules/cvxpy/default.nix +++ b/pkgs/development/python-modules/cvxpy/default.nix @@ -9,7 +9,7 @@ , osqp , scipy , scs -, useOpenmp ? true +, useOpenmp ? (!stdenv.isDarwin) # Check inputs , pytestCheckHook }: diff --git a/pkgs/development/python-modules/cwcwidth/default.nix b/pkgs/development/python-modules/cwcwidth/default.nix new file mode 100644 index 000000000000..a17a8a936aa0 --- /dev/null +++ b/pkgs/development/python-modules/cwcwidth/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonPackage, fetchPypi, cython, pytestCheckHook }: + +buildPythonPackage rec { + pname = "cwcwidth"; + version = "0.1.4"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"; + }; + + nativeBuildInputs = [ cython ]; + + checkInputs = [ pytestCheckHook ]; + # Hack needed to make pytest + cython work + # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298 + preCheck = '' + export HOME=$(mktemp -d) + cp -r $TMP/$sourceRoot/tests $HOME + pushd $HOME + ''; + postCheck = "popd"; + + pythonImportsCheck = [ "cwcwidth" ]; + + meta = with lib; { + description = "Python bindings for wc(s)width"; + homepage = "https://github.com/sebastinas/cwcwidth"; + changelog = "https://github.com/sebastinas/cwcwidth/blob/main/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ eduardosm ]; + }; +} diff --git a/pkgs/development/python-modules/cxxfilt/default.nix b/pkgs/development/python-modules/cxxfilt/default.nix index 580d698d8dab..1cc5ad19bda2 100644 --- a/pkgs/development/python-modules/cxxfilt/default.nix +++ b/pkgs/development/python-modules/cxxfilt/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , gcc-unwrapped @@ -12,9 +13,11 @@ buildPythonPackage rec { sha256 = "ef6810e76d16c95c11b96371e2d8eefd1d270ec03f9bcd07590e8dcc2c69e92b"; }; - postPatch = '' + postPatch = let + libstdcpp = "${lib.getLib gcc-unwrapped}/lib/libstdc++${stdenv.hostPlatform.extensions.sharedLibrary}"; + in '' substituteInPlace cxxfilt/__init__.py \ - --replace "find_any_library('stdc++', 'c++')" '"${lib.getLib gcc-unwrapped}/lib/libstdc++.so"' + --replace "find_any_library('stdc++', 'c++')" '"${libstdcpp}"' ''; # no tests diff --git a/pkgs/development/python-modules/dask-glm/default.nix b/pkgs/development/python-modules/dask-glm/default.nix index ca25e05bb1ed..9072a691c20a 100644 --- a/pkgs/development/python-modules/dask-glm/default.nix +++ b/pkgs/development/python-modules/dask-glm/default.nix @@ -7,8 +7,8 @@ , multipledispatch , setuptools-scm , scipy -, scikitlearn -, pytest +, scikit-learn +, pytestCheckHook }: buildPythonPackage rec { @@ -21,12 +21,8 @@ buildPythonPackage rec { }; nativeBuildInputs = [ setuptools-scm ]; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikitlearn ]; - - checkPhase = '' - py.test dask_glm - ''; + checkInputs = [ pytestCheckHook ]; + propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikit-learn ]; meta = with lib; { homepage = "https://github.com/dask/dask-glm/"; diff --git a/pkgs/development/python-modules/dask-image/default.nix b/pkgs/development/python-modules/dask-image/default.nix index a38350f0f6ac..e3ab607dcac0 100644 --- a/pkgs/development/python-modules/dask-image/default.nix +++ b/pkgs/development/python-modules/dask-image/default.nix @@ -2,41 +2,32 @@ , buildPythonPackage , fetchPypi , dask -, numpy, toolz # dask[array] , scipy , pims -, pytest -, pytest-flake8 , scikitimage +, pytestCheckHook }: buildPythonPackage rec { - version = "0.5.0"; + version = "0.6.0"; pname = "dask-image"; src = fetchPypi { inherit pname version; - sha256 = "0bf7ea8dcd9d795505b498bd632394720c048f50761e23c574d9a6bacfb27cbb"; + sha256 = "1zzxrvbm52xn7azkn74pjinlk0jkpdcyl3r5vxxy5lmjnmzlrrpy"; }; - nativeBuildInputs = [ pytest-flake8 ]; - propagatedBuildInputs = [ dask numpy toolz scipy pims ]; - checkInputs = [ - pytest - scikitimage - ]; + propagatedBuildInputs = [ dask scipy pims ]; - # ignore errors from newer versions of flake8 prePatch = '' - substituteInPlace setup.cfg \ - --replace "docs/conf.py,versioneer.py" \ - "docs/conf.py,versioneer.py,dask_image/ndfilters/_utils.py" + substituteInPlace setup.cfg --replace "--flake8" "" ''; - # scikit.external is not exported - checkPhase = '' - pytest --ignore=tests/test_dask_image/ - ''; + checkInputs = [ + pytestCheckHook + scikitimage + ]; + pythonImportsCheck = [ "dask_image" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/dask-ml/default.nix b/pkgs/development/python-modules/dask-ml/default.nix index 517056866bb4..ff1b145ee8a2 100644 --- a/pkgs/development/python-modules/dask-ml/default.nix +++ b/pkgs/development/python-modules/dask-ml/default.nix @@ -6,7 +6,7 @@ , numpy, toolz # dask[array] , numba , pandas -, scikitlearn +, scikit-learn , scipy , dask-glm , six @@ -26,6 +26,10 @@ buildPythonPackage rec { sha256 = "8fc4ac3ec1915e382fb8cae9ff1ec9b5ac1bee0b6f4c6975d6e6cb7191a4a815"; }; + nativeBuildInputs = [ + setuptools-scm + ]; + propagatedBuildInputs = [ dask dask-glm @@ -35,11 +39,10 @@ buildPythonPackage rec { numpy packaging pandas - scikitlearn + scikit-learn scipy six toolz - setuptools-scm ]; # has non-standard build from source, and pypi doesn't include tests diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index 1c6d37681a68..55ba3ad6ba7f 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , bokeh , buildPythonPackage , fetchpatch @@ -77,9 +78,7 @@ buildPythonPackage rec { "-m 'not network'" ]; - disabledTests = [ - "test_annotation_pack_unpack" - "test_annotations_blockwise_unpack" + disabledTests = lib.optionals stdenv.isDarwin [ # this test requires features of python3Packages.psutil that are # blocked in sandboxed-builds "test_auto_blocksize_csv" diff --git a/pkgs/development/python-modules/databases/default.nix b/pkgs/development/python-modules/databases/default.nix index f5a7c52ef8e5..3a1da0697c0d 100644 --- a/pkgs/development/python-modules/databases/default.nix +++ b/pkgs/development/python-modules/databases/default.nix @@ -4,7 +4,8 @@ , sqlalchemy , aiocontextvars , isPy27 -, pytest +, pytestCheckHook +, pymysql , asyncpg , aiomysql , aiosqlite @@ -12,33 +13,37 @@ buildPythonPackage rec { pname = "databases"; - version = "0.2.6"; + version = "0.4.3"; disabled = isPy27; src = fetchFromGitHub { owner = "encode"; repo = pname; rev = version; - sha256 = "0cdb4vln4zdmqbbcj7711b81b2l64jg1miihqcg8gpi35v404h2q"; + sha256 = "0aq88k7d9036cy6qvlfv9p2dxd6p6fic3j0az43gn6k1ardhdsgf"; }; propagatedBuildInputs = [ - sqlalchemy aiocontextvars + sqlalchemy ]; checkInputs = [ - pytest - asyncpg aiomysql aiosqlite + asyncpg + pymysql + pytestCheckHook ]; - # big chunk to tests depend on existing posgresql and mysql databases - # some tests are better than no tests - checkPhase = '' - pytest --ignore=tests/test_integration.py --ignore=tests/test_databases.py - ''; + disabledTestPaths = [ + # ModuleNotFoundError: No module named 'aiopg' + "tests/test_connection_options.py" + # circular dependency on starlette + "tests/test_integration.py" + # TEST_DATABASE_URLS is not set. + "tests/test_databases.py" + ]; meta = with lib; { description = "Async database support for Python"; diff --git a/pkgs/development/python-modules/datatable/default.nix b/pkgs/development/python-modules/datatable/default.nix index 1519dc905de6..29c3826d14a7 100644 --- a/pkgs/development/python-modules/datatable/default.nix +++ b/pkgs/development/python-modules/datatable/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { checkInputs = [ docutils pytestCheckHook ]; LLVM = llvm; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-isystem ${lib.getDev libcxx}/include/c++/v1"; pytestFlagsArray = let # ini file (not included in tarball) required to change python_files setting, diff --git a/pkgs/development/python-modules/dawg-python/default.nix b/pkgs/development/python-modules/dawg-python/default.nix new file mode 100644 index 000000000000..ba9c298a2e82 --- /dev/null +++ b/pkgs/development/python-modules/dawg-python/default.nix @@ -0,0 +1,24 @@ +{ lib +, fetchPypi +, buildPythonPackage +}: + +buildPythonPackage rec { + pname = "dawg-python"; + version = "0.7.2"; + + src = fetchPypi { + inherit version; + pname = "DAWG-Python"; + hash = "sha256-Sl4yhuYmHMoC8gXP1VFqerEBkPowxRwo00WAj1leNCE="; + }; + + pythonImportsCheck = [ "dawg_python" ]; + + meta = with lib; { + description = "Pure Python reader for DAWGs created by dawgdic C++ library or DAWG Python extension"; + homepage = "https://github.com/pytries/DAWG-Python"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix index beb5ba9c46b7..37717f76f335 100644 --- a/pkgs/development/python-modules/debugpy/default.nix +++ b/pkgs/development/python-modules/debugpy/default.nix @@ -17,13 +17,13 @@ buildPythonPackage rec { pname = "debugpy"; - version = "1.2.1"; + version = "1.3.0"; src = fetchFromGitHub { owner = "Microsoft"; repo = pname; rev = "v${version}"; - sha256 = "1dgjbbhy228w2zbfq5pf0hkai7742zw8mmybnzjdc9l6pw7360rq"; + hash = "sha256-YGzc9mMIzPTmUgIXuZROLdYKjUm69x9SR+JtYRVpn24="; }; patches = [ @@ -33,6 +33,7 @@ buildPythonPackage rec { inherit gdb; }) + # Use nixpkgs version instead of versioneer (substituteAll { src = ./hardcode-version.patch; inherit version; @@ -87,6 +88,8 @@ buildPythonPackage rec { "gevent" ]; + pythonImportsCheck = [ "debugpy" ]; + meta = with lib; { description = "An implementation of the Debug Adapter Protocol for Python"; homepage = "https://github.com/microsoft/debugpy"; diff --git a/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch b/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch index 751351e03cde..f74b53a831b3 100644 --- a/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch +++ b/pkgs/development/python-modules/debugpy/fix-test-pythonpath.patch @@ -1,8 +1,8 @@ diff --git a/tests/debug/session.py b/tests/debug/session.py -index 2b39106..6d45a10 100644 +index 101492f..4ee7cfb 100644 --- a/tests/debug/session.py +++ b/tests/debug/session.py -@@ -625,6 +625,7 @@ class Session(object): +@@ -630,6 +630,7 @@ class Session(object): if "PYTHONPATH" in self.config.env: # If specified, launcher will use it in lieu of PYTHONPATH it inherited # from the adapter when spawning debuggee, so we need to adjust again. diff --git a/pkgs/development/python-modules/debut/default.nix b/pkgs/development/python-modules/debut/default.nix deleted file mode 100644 index 02eece2fc242..000000000000 --- a/pkgs/development/python-modules/debut/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, chardet -, attrs -, pytestCheckHook -}: -buildPythonPackage rec { - pname = "debut"; - version = "0.9.9"; - - src = fetchPypi { - inherit pname version; - sha256 = "a3a71e475295f4cf4292440c9c7303ebca0309d395536d2a7f86a5f4d7465dc1"; - }; - - dontConfigure = true; - - propagatedBuildInputs = [ - chardet - attrs - ]; - - checkInputs = [ - pytestCheckHook - ]; - - pythonImportsCheck = [ - "debut" - ]; - - meta = with lib; { - description = "Python library to parse Debian deb822-style control and copyright files "; - homepage = "https://github.com/nexB/debut"; - license = with licenses; [ asl20 bsd3 mit ]; - maintainers = teams.determinatesystems.members; - }; -} diff --git a/pkgs/development/python-modules/decopatch/default.nix b/pkgs/development/python-modules/decopatch/default.nix new file mode 100644 index 000000000000..7fa3c6465db4 --- /dev/null +++ b/pkgs/development/python-modules/decopatch/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, makefun +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "decopatch"; + version = "1.4.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "0i6i811s2j1z0cl6y177dwsbfxib8dvb5c2jpgklvc2xy4ahhsy6"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + propagatedBuildInputs = [ makefun ]; + + postPatch = '' + substituteInPlace setup.py --replace "'pytest-runner', " "" + ''; + + # Tests would introduce multiple cirucular dependencies + # Affected: makefun, pytest-cases + doCheck = false; + + pythonImportsCheck = [ "decopatch" ]; + + meta = with lib; { + description = "Python helper for decorators"; + homepage = "https://github.com/smarie/python-decopatch"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/deepdiff/default.nix b/pkgs/development/python-modules/deepdiff/default.nix index 83140ff0bb00..e414d8633502 100644 --- a/pkgs/development/python-modules/deepdiff/default.nix +++ b/pkgs/development/python-modules/deepdiff/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "deepdiff"; - version = "5.3.0"; + version = "5.5.0"; format = "setuptools"; # pypi source does not contain all fixtures required for tests @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "seperman"; repo = "deepdiff"; rev = version; - sha256 = "1izw2qpd93nj948zakamjn7q7dlmmr7sapg0c65hxvs0nmij8sl4"; + sha256 = "sha256-PQijGub0sAW0aBYI+Ir89SraXaWx7OcQ+txZSqodJ6w="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/deltachat/default.nix b/pkgs/development/python-modules/deltachat/default.nix new file mode 100644 index 000000000000..ffa9b8d7d63a --- /dev/null +++ b/pkgs/development/python-modules/deltachat/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, isPy27 +, fetchpatch +, setuptools-scm +, libdeltachat +, cffi +, IMAPClient +, pluggy +, requests +, setuptools +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "deltachat"; + inherit (libdeltachat) version src; + sourceRoot = "${src.name}/python"; + + disabled = isPy27; + + nativeBuildInputs = [ + setuptools-scm + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + buildInputs = [ + libdeltachat + ]; + + propagatedBuildInputs = [ + cffi + IMAPClient + pluggy + requests + setuptools + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "deltachat" + "deltachat.account" + "deltachat.contact" + "deltachat.chat" + "deltachat.message" + ]; + + meta = with lib; { + description = "Python bindings for the Delta Chat Core library"; + homepage = "https://github.com/deltachat/deltachat-core-rust/tree/master/python"; + changelog = "https://github.com/deltachat/deltachat-core-rust/blob/${version}/python/CHANGELOG"; + license = licenses.mpl20; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/dendropy/default.nix b/pkgs/development/python-modules/dendropy/default.nix index 05737ecf9a86..be1b705dc02b 100644 --- a/pkgs/development/python-modules/dendropy/default.nix +++ b/pkgs/development/python-modules/dendropy/default.nix @@ -1,38 +1,40 @@ { lib -, pkgs , buildPythonPackage , fetchFromGitHub -, pytest +, pytestCheckHook }: buildPythonPackage rec { - pname = "DendroPy"; - version = "4.4.0"; + pname = "dendropy"; + version = "4.5.1"; - # tests are incorrectly packaged in pypi version src = fetchFromGitHub { owner = "jeetsukumaran"; repo = pname; rev = "v${version}"; - sha256 = "097hfyv2kaf4x92i4rjx0paw2cncxap48qivv8zxng4z7nhid0x9"; + sha256 = "sha256-FP0+fJkkFtSysPxoHXjyMgF8pPin7aRyzmHe9bH8LlM="; }; - preCheck = '' - # Needed for unicode python tests - export LC_ALL="en_US.UTF-8" - cd tests # to find the 'support' module - ''; + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ pytest pkgs.glibcLocales ]; + disabledTests = [ + # FileNotFoundError: [Errno 2] No such file or directory: 'paup' + "test_basic_split_count_with_incorrect_rootings_raises_error" + "test_basic_split_count_with_incorrect_weight_treatment_raises_error" + "test_basic_split_counting_under_different_rootings" + "test_group1" + # AssertionError: 6 != 5 + "test_by_num_lineages" + ]; - checkPhase = '' - pytest -k 'not test_dataio_nexml_reader_tree_list and not test_pscores_with' - ''; + pythonImportsCheck = [ "dendropy" ]; - meta = { + meta = with lib; { + description = "Python library for phylogenetic computing"; homepage = "https://dendropy.org/"; - description = "A Python library for phylogenetic computing"; - maintainers = with lib.maintainers; [ unode ]; - license = lib.licenses.bsd3; + license = licenses.bsd3; + maintainers = with maintainers; [ unode ]; }; } diff --git a/pkgs/development/python-modules/denonavr/default.nix b/pkgs/development/python-modules/denonavr/default.nix index b02e1e498b9d..e4e36a196fe0 100644 --- a/pkgs/development/python-modules/denonavr/default.nix +++ b/pkgs/development/python-modules/denonavr/default.nix @@ -1,33 +1,51 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy27, requests, netifaces -, pytestCheckHook, testtools, requests-mock }: +{ lib +, asyncstdlib +, attrs +, buildPythonPackage +, defusedxml +, fetchFromGitHub +, httpx +, netifaces +, pytest-asyncio +, pytestCheckHook +, pytest-httpx +, pytest-timeout +, pythonOlder +}: buildPythonPackage rec { pname = "denonavr"; - version = "0.9.10"; - disabled = isPy27; + version = "0.10.8"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "scarface-4711"; - repo = "denonavr"; + repo = pname; rev = version; - sha256 = "sha256-3ap8F3ayBTpaR98md+gT0+hkIWlFBNxStTGWT5AL//A="; + sha256 = "02q76mbmg2rkm4shy2apwbw9pvicy9j5v4zgpjwzxif9yf7m8aqk"; }; propagatedBuildInputs = [ - requests + asyncstdlib + attrs + defusedxml + httpx netifaces ]; checkInputs = [ + pytest-asyncio pytestCheckHook - testtools - requests-mock + pytest-httpx + pytest-timeout ]; + pythonImportsCheck = [ "denonavr" ]; + meta = with lib; { + description = "Automation Library for Denon AVR receivers"; homepage = "https://github.com/scarface-4711/denonavr"; - description = "Automation Library for Denon AVR receivers."; - license = licenses.mit; + license = with licenses; [ mit ]; maintainers = with maintainers; [ colemickens ]; }; } diff --git a/pkgs/development/python-modules/dependency-injector/default.nix b/pkgs/development/python-modules/dependency-injector/default.nix index 9c977ecc5f0c..8958566070ed 100644 --- a/pkgs/development/python-modules/dependency-injector/default.nix +++ b/pkgs/development/python-modules/dependency-injector/default.nix @@ -1,27 +1,53 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, six, unittest2, pyyaml, flask }: - -let - testPath = - if isPy3k - then "test_*_py3.py" - else "test_*_py2_py3.py"; -in +{ lib +, aiohttp +, buildPythonPackage +, fastapi +, fetchFromGitHub +, flask +, httpx +, mypy-boto3-s3 +, numpy +, scipy +, pydantic +, pytestCheckHook +, pyyaml +, six +}: buildPythonPackage rec { pname = "dependency-injector"; - version = "4.31.1"; + version = "4.32.2"; - src = fetchPypi { - inherit pname version; - sha256 = "b6b28b9571f44d575367c6005ba8aaa9fd2b70310e1c15410925d6f1ee2769ad"; + src = fetchFromGitHub { + owner = "ets-labs"; + repo = "python-dependency-injector"; + rev = version; + sha256 = "1gkkka0hl2hl4axf3gfm58mzv92bg0frr5jikw8g32hd4q4aagcg"; }; - propagatedBuildInputs = [ six ]; - checkInputs = [ unittest2 pyyaml flask ]; + propagatedBuildInputs = [ + six + ]; + + checkInputs = [ + aiohttp + fastapi + flask + httpx + mypy-boto3-s3 + numpy + pydantic + scipy + pytestCheckHook + pyyaml + ]; + + disabledTestPaths = [ + # There is no unique identifier to disable the one failing test + "tests/unit/ext/test_aiohttp_py35.py" + ]; - checkPhase = '' - unit2 discover -s tests/unit -p "${testPath}" - ''; + pythonImportsCheck = [ "dependency_injector" ]; meta = with lib; { description = "Dependency injection microframework for Python"; diff --git a/pkgs/development/python-modules/dftfit/default.nix b/pkgs/development/python-modules/dftfit/default.nix index 73791bdaa9a6..778b8c3d9843 100644 --- a/pkgs/development/python-modules/dftfit/default.nix +++ b/pkgs/development/python-modules/dftfit/default.nix @@ -8,7 +8,7 @@ , pandas , scipy , numpy -, scikitlearn +, scikit-learn , lammps-cython , pymatgen-lammps , pytestrunner @@ -34,7 +34,7 @@ buildPythonPackage rec { pandas scipy numpy - scikitlearn + scikit-learn lammps-cython pymatgen-lammps ]; diff --git a/pkgs/development/python-modules/discordpy/default.nix b/pkgs/development/python-modules/discordpy/default.nix index d4f742d97f5b..3fb5e7ae55e4 100644 --- a/pkgs/development/python-modules/discordpy/default.nix +++ b/pkgs/development/python-modules/discordpy/default.nix @@ -5,25 +5,23 @@ , libopus , pynacl , pythonOlder -, websockets , withVoice ? true }: buildPythonPackage rec { pname = "discord.py"; - version = "1.7.1"; + version = "1.7.2"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "Rapptz"; repo = pname; rev = "v${version}"; - sha256 = "sha256-dpASIqe6rJEyiWJyPbQhq9M54lX1ilfp4UuGnbJcFLo="; + sha256 = "sha256-NY1/RKp8w9gAqGYXnCNhNZqR/inGMvUvxjJ1MMs62B8="; }; propagatedBuildInputs = [ aiohttp - websockets ] ++ lib.optionalString withVoice [ libopus pynacl diff --git a/pkgs/development/python-modules/distro/default.nix b/pkgs/development/python-modules/distro/default.nix index 16d26e741aa9..885538de65ce 100644 --- a/pkgs/development/python-modules/distro/default.nix +++ b/pkgs/development/python-modules/distro/default.nix @@ -18,6 +18,6 @@ buildPythonPackage rec { homepage = "https://github.com/nir0s/distro"; description = "Linux Distribution - a Linux OS platform information API."; license = licenses.asl20; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/django-anymail/default.nix b/pkgs/development/python-modules/django-anymail/default.nix index 6f1d81c9287a..9b5c8e1d00b5 100644 --- a/pkgs/development/python-modules/django-anymail/default.nix +++ b/pkgs/development/python-modules/django-anymail/default.nix @@ -42,6 +42,6 @@ buildPythonPackage rec { description = "Django email backends and webhooks for Mailgun"; homepage = "https://github.com/anymail/django-anymail"; license = licenses.bsd3; - maintainers = with maintainers; [ ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/django-cors-headers/default.nix b/pkgs/development/python-modules/django-cors-headers/default.nix index 1bc9153d0063..ace1dc4f2de5 100644 --- a/pkgs/development/python-modules/django-cors-headers/default.nix +++ b/pkgs/development/python-modules/django-cors-headers/default.nix @@ -30,6 +30,6 @@ buildPythonPackage rec { description = "Django app for handling server Cross-Origin Resource Sharing (CORS) headers"; homepage = "https://github.com/OttoYiu/django-cors-headers"; license = licenses.mit; - maintainers = [ maintainers.ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/django-extensions/default.nix b/pkgs/development/python-modules/django-extensions/default.nix index 3e7a1163b96f..8ee903bedc2a 100644 --- a/pkgs/development/python-modules/django-extensions/default.nix +++ b/pkgs/development/python-modules/django-extensions/default.nix @@ -18,13 +18,13 @@ buildPythonPackage rec { pname = "django-extensions"; - version = "3.1.1"; + version = "3.1.3"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "0ss5x3d21c3g8i1s79l4akazlf116yp4y50gx4vrk1dxh3jb29zj"; + sha256 = "03mhikhh49z8bxajbjf1j790b9c9vl4zf4f86iwz7g0zrd7jqlvm"; }; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/development/python-modules/django-pipeline/default.nix b/pkgs/development/python-modules/django-pipeline/default.nix deleted file mode 100644 index 92aefe4a408b..000000000000 --- a/pkgs/development/python-modules/django-pipeline/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy3k -, django, futures ? null, mock ? null, jinja2, jsmin, slimit }: - -buildPythonPackage rec { - pname = "django-pipeline"; - version = "1.6.14"; - - # no tests on PyPI - src = fetchFromGitHub { - owner = "jazzband"; - repo = pname; - rev = version; - sha256 = "1xf732bd17mgha75jfhlnms46ib2pffhpfa0ca7bmng9jhbvsl9j"; - }; - - postPatch = '' - substituteInPlace tests/tests/test_compiler.py \ - --replace "/usr/bin/env" "" - ''; - - propagatedBuildInputs = [ django ] ++ lib.optional (!isPy3k) futures; - - checkInputs = [ jinja2 jsmin slimit ] ++ lib.optional (!isPy3k) mock; - - checkPhase = '' - export PYTHONPATH=.:$PYTHONPATH - export DJANGO_SETTINGS_MODULE=tests.settings - ${django}/bin/django-admin.py test tests - ''; - - meta = with lib; { - description = "Pipeline is an asset packaging library for Django"; - homepage = "https://github.com/cyberdelia/django-pipeline"; - license = licenses.mit; - broken = true; - }; -} diff --git a/pkgs/development/python-modules/django-rest-auth/default.nix b/pkgs/development/python-modules/django-rest-auth/default.nix index 9e11c2b6a03e..e04581b3574b 100644 --- a/pkgs/development/python-modules/django-rest-auth/default.nix +++ b/pkgs/development/python-modules/django-rest-auth/default.nix @@ -24,6 +24,6 @@ buildPythonPackage rec { description = "Django app that makes registration and authentication easy"; homepage = "https://github.com/Tivix/django-rest-auth"; license = licenses.mit; - maintainers = [ maintainers.ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/django/2.nix b/pkgs/development/python-modules/django/2.nix index 991c353df179..e0d3cd12f8fd 100644 --- a/pkgs/development/python-modules/django/2.nix +++ b/pkgs/development/python-modules/django/2.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "Django"; - version = "2.2.20"; + version = "2.2.22"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "0r3a6gbhwngxl172yy6n0sq5knibl2vxc0wbk1g8licfbzfgjs95"; + sha256 = "db2214db1c99017cbd971e58824e6f424375154fe358afc30e976f5b99fc6060"; }; patches = lib.optional withGdal diff --git a/pkgs/development/python-modules/django/3.nix b/pkgs/development/python-modules/django/3.nix index 62ca390eac5b..321582946b3b 100644 --- a/pkgs/development/python-modules/django/3.nix +++ b/pkgs/development/python-modules/django/3.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "Django"; - version = "3.2"; + version = "3.2.2"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "179qdxa438fnycnnf1j5z6359h1kbp2q7djf01v5jrr26xjgkw11"; + sha256 = "0a1d195ad65c52bf275b8277b3d49680bd1137a5f55039a806f25f6b9752ce3d"; }; patches = lib.optional withGdal diff --git a/pkgs/development/python-modules/djangorestframework-jwt/default.nix b/pkgs/development/python-modules/djangorestframework-jwt/default.nix deleted file mode 100644 index 643218242d79..000000000000 --- a/pkgs/development/python-modules/djangorestframework-jwt/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib -, fetchPypi -, django -, pyjwt -, djangorestframework -, buildPythonPackage -}: - -buildPythonPackage rec { - pname = "djangorestframework-jwt"; - version = "1.11.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "19rng6v1sw14mbjp5cplnrgxjnhlj8faalfw02iihi9s5w1k7zjy"; - }; - - propagatedBuildInputs = [ pyjwt django djangorestframework ]; - - # ./runtests.py fails because the project must be tested against a django - # installation, there are missing database tables for User, that don't exist. - doCheck = false; - - meta = with lib; { - description = "JSON Web Token Authentication support for Django REST Framework"; - homepage = "https://github.com/GetBlimp/django-rest-framework-jwt"; - license = licenses.mit; - maintainers = [ maintainers.ivegotasthma ]; - }; -} diff --git a/pkgs/development/python-modules/dnspython/1.nix b/pkgs/development/python-modules/dnspython/1.nix index 30f280a5029e..5ff02c043380 100644 --- a/pkgs/development/python-modules/dnspython/1.nix +++ b/pkgs/development/python-modules/dnspython/1.nix @@ -1,4 +1,8 @@ -{ buildPythonPackage, fetchPypi, lib, pythonOlder }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +}: buildPythonPackage rec { pname = "dnspython"; @@ -12,11 +16,11 @@ buildPythonPackage rec { # needs networking for some tests doCheck = false; + pythonImportsCheck = [ "dns" ]; - meta = { - description = "A DNS toolkit for Python 3.x"; + meta = with lib; { + description = "A DNS toolkit for Python"; homepage = "http://www.dnspython.org"; - # BSD-like, check https://www.dnspython.org/LICENSE for details - license = lib.licenses.free; + license = with licenses; [ isc ]; }; } diff --git a/pkgs/development/python-modules/dnspython/default.nix b/pkgs/development/python-modules/dnspython/default.nix index afb85fb61f57..56e69aac0443 100644 --- a/pkgs/development/python-modules/dnspython/default.nix +++ b/pkgs/development/python-modules/dnspython/default.nix @@ -1,4 +1,8 @@ -{ buildPythonPackage, fetchPypi, lib, pythonOlder }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +}: buildPythonPackage rec { pname = "dnspython"; @@ -13,11 +17,11 @@ buildPythonPackage rec { # needs networking for some tests doCheck = false; + pythonImportsCheck = [ "dns" ]; - meta = { - description = "A DNS toolkit for Python 3.x"; + meta = with lib; { + description = "A DNS toolkit for Python"; homepage = "http://www.dnspython.org"; - # BSD-like, check https://www.dnspython.org/LICENSE for details - license = lib.licenses.free; + license = with licenses; [ isc ]; }; } diff --git a/pkgs/development/python-modules/dogtail/default.nix b/pkgs/development/python-modules/dogtail/default.nix index 4981440c7ccd..808c2916ddd9 100644 --- a/pkgs/development/python-modules/dogtail/default.nix +++ b/pkgs/development/python-modules/dogtail/default.nix @@ -10,7 +10,7 @@ , gsettings-desktop-schemas , fetchurl , dbus -, xvfb_run +, xvfb-run , wrapGAppsHook # , fetchPypi }: @@ -33,7 +33,7 @@ buildPythonPackage { ./nix-support.patch ]; - nativeBuildInputs = [ gobject-introspection dbus xvfb_run wrapGAppsHook ]; # for setup hooks + nativeBuildInputs = [ gobject-introspection dbus xvfb-run wrapGAppsHook ]; # for setup hooks propagatedBuildInputs = [ at-spi2-core gtk3 pygobject3 pyatspi pycairo ]; strictDeps = false; # issue 56943 diff --git a/pkgs/development/python-modules/dotmap/default.nix b/pkgs/development/python-modules/dotmap/default.nix new file mode 100644 index 000000000000..cb5f032a6f26 --- /dev/null +++ b/pkgs/development/python-modules/dotmap/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "dotmap"; + version = "1.3.23"; + + src = fetchPypi { + inherit pname version; + sha256 = "0hy88kzzb7zhxfr7iyvl6rhmvz02538pbna7zypaard4a88bbbka"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "dotmap/test.py" ]; + + pythonImportsCheck = [ "dotmap" ]; + + meta = with lib; { + description = "Python for dot-access dictionaries"; + homepage = "https://github.com/drgrib/dotmap"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/drf-jwt/default.nix b/pkgs/development/python-modules/drf-jwt/default.nix new file mode 100644 index 000000000000..ad3edc59246d --- /dev/null +++ b/pkgs/development/python-modules/drf-jwt/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pyjwt +, djangorestframework +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "drf-jwt"; + version = "1.19.0"; + + src = fetchFromGitHub { + owner = "Styria-Digital"; + repo = "django-rest-framework-jwt"; + rev = version; + sha256 = "012rmm25w5gvkzi4lyyhn47y1n6g68q9gasga2mkv9i6mn8n4kp7"; + }; + + propagatedBuildInputs = [ + pyjwt + djangorestframework + ]; + + # requires setting up a django instance + doCheck = false; + + pythonImportsCheck = [ + "rest_framework_jwt" + "rest_framework_jwt.blacklist" + # require setting DJANGO_SETTINGS_MODULE + # "rest_framework_jwt.authentication" + # "rest_framework_jwt.blacklist.views" + # "rest_framework_jwt.settings" + # "rest_framework_jwt.utils" + # "rest_framework_jwt.views" + ]; + + meta = with lib; { + description = "JSON Web Token based authentication for Django REST framework"; + homepage = "https://github.com/Styria-Digital/django-rest-framework-jwt"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/drf-nested-routers/default.nix b/pkgs/development/python-modules/drf-nested-routers/default.nix index d265838526da..db0212e45697 100644 --- a/pkgs/development/python-modules/drf-nested-routers/default.nix +++ b/pkgs/development/python-modules/drf-nested-routers/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "drf-nested-routers"; - version = "0.92.5"; + version = "0.93.3"; src = fetchFromGitHub { owner = "alanjds"; repo = "drf-nested-routers"; rev = "v${version}"; - sha256 = "1l1jza8xz6xcm3gwxh1k6pc8fs95cq3v751gxj497y1a83d26j8i"; + sha256 = "1gmw6gwiqzfysx8qn7aan7xgkizxy64db94z30pm3bvn6jxv08si"; }; propagatedBuildInputs = [ django djangorestframework setuptools ]; diff --git a/pkgs/development/python-modules/drf-yasg/default.nix b/pkgs/development/python-modules/drf-yasg/default.nix index ab1d551fea35..5342ff8da83f 100644 --- a/pkgs/development/python-modules/drf-yasg/default.nix +++ b/pkgs/development/python-modules/drf-yasg/default.nix @@ -52,7 +52,7 @@ buildPythonPackage rec { meta = with lib; { description = "Generation of Swagger/OpenAPI schemas for Django REST Framework"; homepage = "https://github.com/axnsan12/drf-yasg"; - maintainers = with maintainers; [ ivegotasthma ]; + maintainers = with maintainers; [ ]; license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index c98937804a31..3bb9269d460b 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy27 }: buildPythonPackage rec { - version = "2.2.1"; + version = "2.2.2"; pname = "elementpath"; disabled = isPy27; # uses incompatible class syntax @@ -9,7 +9,7 @@ buildPythonPackage rec { owner = "sissaschool"; repo = "elementpath"; rev = "v${version}"; - sha256 = "15yjl18n81zddd27789mcy12gnja3cqycjdykybwgd9i0ysj96gl"; + sha256 = "sha256-n4zIn2WmFHaVaah2J0mz7Q6G4Ptb8Ms0dwQYbh0Ofcs="; }; # avoid circular dependency with xmlschema which directly depends on this diff --git a/pkgs/development/python-modules/elmax/default.nix b/pkgs/development/python-modules/elmax/default.nix index 7ec3b8d1c112..775050acb0c9 100644 --- a/pkgs/development/python-modules/elmax/default.nix +++ b/pkgs/development/python-modules/elmax/default.nix @@ -4,12 +4,15 @@ , httpx , poetry-core , pythonOlder +, pytest-asyncio +, pytest-httpx +, pytestCheckHook , yarl }: buildPythonPackage rec { pname = "elmax"; - version = "0.1.1"; + version = "0.1.2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +20,7 @@ buildPythonPackage rec { owner = "home-assistant-ecosystem"; repo = "python-elmax"; rev = version; - sha256 = "sha256-vDISJ/CVOjpM+GPF2TCm3/AMFTWTM0b/+ZPCpAEvNvY="; + sha256 = "sha256-Aq/OHxOmtUUmBNlFPu892C8AkTX+Ee0oca7D79InPXQ="; }; nativeBuildInputs = [ poetry-core ]; @@ -27,8 +30,12 @@ buildPythonPackage rec { yarl ]; - # Project has no tests - doCheck = false; + checkInputs = [ + pytest-asyncio + pytest-httpx + pytestCheckHook + ]; + pythonImportsCheck = [ "elmax" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/enaml/default.nix b/pkgs/development/python-modules/enaml/default.nix index 1102443884f7..8896c5c706a6 100644 --- a/pkgs/development/python-modules/enaml/default.nix +++ b/pkgs/development/python-modules/enaml/default.nix @@ -5,7 +5,7 @@ , ply , kiwisolver , qtpy -, sip +, sip_4 , cppy , bytecode }: @@ -44,7 +44,7 @@ buildPythonPackage rec { ply kiwisolver qtpy - sip + sip_4 cppy bytecode ]; diff --git a/pkgs/development/python-modules/eve/default.nix b/pkgs/development/python-modules/eve/default.nix index 32f531e4ff59..89db1ccad28d 100644 --- a/pkgs/development/python-modules/eve/default.nix +++ b/pkgs/development/python-modules/eve/default.nix @@ -27,6 +27,11 @@ buildPythonPackage rec { setuptools ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "events>=0.3,<0.4" "events>=0.3,<0.5" + ''; + pythonImportsCheck = [ "eve" ]; # tests call a running mongodb instance diff --git a/pkgs/development/python-modules/exchangelib/default.nix b/pkgs/development/python-modules/exchangelib/default.nix index 0cccedd54a91..bf9ae2284f7d 100644 --- a/pkgs/development/python-modules/exchangelib/default.nix +++ b/pkgs/development/python-modules/exchangelib/default.nix @@ -3,8 +3,8 @@ lxml, tzlocal, python-dateutil, pygments, requests-kerberos, defusedxml, cached-property, isodate, requests_ntlm, dnspython, psutil, requests-mock, pyyaml, - oauthlib, requests_oauthlib, - flake8, + oauthlib, requests_oauthlib, tzdata, + flake8, backports-zoneinfo }: buildPythonPackage rec { @@ -24,9 +24,11 @@ buildPythonPackage rec { flake8 ]; propagatedBuildInputs = [ - lxml tzlocal python-dateutil pygments requests-kerberos + lxml tzlocal tzdata python-dateutil pygments requests-kerberos defusedxml cached-property isodate requests_ntlm dnspython oauthlib requests_oauthlib + ] ++ lib.optionals (pythonOlder "3.9") [ + backports-zoneinfo ]; meta = with lib; { diff --git a/pkgs/development/python-modules/execnet/default.nix b/pkgs/development/python-modules/execnet/default.nix index b66c8a28128c..57a4af2fc0c6 100644 --- a/pkgs/development/python-modules/execnet/default.nix +++ b/pkgs/development/python-modules/execnet/default.nix @@ -37,7 +37,7 @@ buildPythonPackage rec { description = "Distributed Python deployment and communication"; license = licenses.mit; homepage = "https://execnet.readthedocs.io/"; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/fastapi/default.nix b/pkgs/development/python-modules/fastapi/default.nix index dadfc41c68bc..0f1c7ec6bdc3 100644 --- a/pkgs/development/python-modules/fastapi/default.nix +++ b/pkgs/development/python-modules/fastapi/default.nix @@ -17,19 +17,19 @@ buildPythonPackage rec { pname = "fastapi"; - version = "0.63.0"; + version = "0.65.0"; format = "flit"; src = fetchFromGitHub { owner = "tiangolo"; repo = "fastapi"; rev = version; - sha256 = "0l3imrcs42pqf9d6k8c1q15k5sqcnapl5zk71xl52mrxhz49lgpi"; + sha256 = "sha256-DPfijCGORF3ThZblqaYTKN0H8+wlhtdIS8lfKfJl/bY="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace "starlette ==0.13.6" "starlette" + --replace "starlette ==" "starlette >=" ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/fastpair/default.nix b/pkgs/development/python-modules/fastpair/default.nix index 9a3f8c53b1d3..eaf1a78520a2 100644 --- a/pkgs/development/python-modules/fastpair/default.nix +++ b/pkgs/development/python-modules/fastpair/default.nix @@ -1,35 +1,28 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pytestrunner, pytest, scipy }: +{ lib, buildPythonPackage, fetchFromGitHub, pytestrunner, pytest, scipy, pytestCheckHook }: buildPythonPackage { pname = "fastpair"; - version = "2016-07-05"; + version = "2021-05-19"; src = fetchFromGitHub { owner = "carsonfarmer"; repo = "fastpair"; - rev = "92364962f6b695661f35a117bf11f96584128a8d"; - sha256 = "1pv9sxycxdk567s5gs947rhlqngrb9nn9yh4dhdvg1ix1i8dca71"; + rev = "d3170fd7e4d6e95312e7e1cb02e84077a3f06379"; + sha256 = "1l8zgr8awg27lhlkpa2dsvghrb7b12jl1bkgpzg5q7pg8nizl9mx"; }; nativeBuildInputs = [ pytestrunner ]; - checkInputs = [ pytest ]; + checkInputs = [ pytest pytestCheckHook ]; propagatedBuildInputs = [ scipy ]; - # Does not support pytest 4 https://github.com/carsonfarmer/fastpair/issues/14 - doCheck = false; - - checkPhase = '' - pytest fastpair - ''; - meta = with lib; { homepage = "https://github.com/carsonfarmer/fastpair"; description = "Data-structure for the dynamic closest-pair problem"; license = licenses.mit; - maintainers = with maintainers; [ cmcdragonkai ]; + maintainers = with maintainers; [ cmcdragonkai rakesh4g ]; }; } diff --git a/pkgs/development/python-modules/flask-appbuilder/default.nix b/pkgs/development/python-modules/flask-appbuilder/default.nix index 6e98f6e80ac5..f39393ecff7a 100644 --- a/pkgs/development/python-modules/flask-appbuilder/default.nix +++ b/pkgs/development/python-modules/flask-appbuilder/default.nix @@ -1,11 +1,11 @@ { lib , buildPythonPackage , fetchPypi -, nose , apispec , colorama , click , email_validator +, fetchpatch , flask , flask-babel , flask_login @@ -20,21 +20,28 @@ , python-dateutil , prison , pyjwt +, pyyaml , sqlalchemy-utils }: buildPythonPackage rec { pname = "flask-appbuilder"; - version = "3.1.1"; + version = "3.3.0"; src = fetchPypi { pname = "Flask-AppBuilder"; inherit version; - sha256 = "076b020b0ba125339a2e710e74eab52648cde2b18599f7cb0fa1eada9bbb648c"; + sha256 = "00dsfv1apl6483wy20aj91f9h5ak2casbx5vcajv2nd3i7c7v8gx"; }; - checkInputs = [ - nose + patches = [ + # https://github.com/dpgaspar/Flask-AppBuilder/pull/1610 + (fetchpatch { + name = "flask_jwt_extended-and-pyjwt-patch"; + url = "https://github.com/dpgaspar/Flask-AppBuilder/commit/7097a7b133f27c78d2b54d2a46e4a4c24478a066.patch"; + sha256 = "sha256-ZpY8+2Hoz3z01GVtw2OIbQcsmAwa7iwilFWzgcGhY1w="; + includes = [ "flask_appbuilder/security/manager.py" "setup.py" ]; + }) ]; propagatedBuildInputs = [ @@ -56,22 +63,23 @@ buildPythonPackage rec { python-dateutil prison pyjwt + pyyaml sqlalchemy-utils ]; postPatch = '' substituteInPlace setup.py \ - --replace "apispec[yaml]>=3.3, <4" "apispec" \ - --replace "Flask-Login>=0.3, <0.5" "Flask-Login" \ - --replace "Flask-Babel>=1, <2" "Flask-Babel" \ - --replace "marshmallow-sqlalchemy>=0.22.0, <0.24.0" "marshmallow-sqlalchemy" \ - --replace "prison>=0.1.3, <1.0.0" "prison" + --replace "apispec[yaml]>=3.3, <4" "apispec[yaml] >=3.3, <5" \ + --replace "Flask-Login>=0.3, <0.5" "Flask-Login >=0.3, <0.6" \ + --replace "Flask-Babel>=1, <2" "Flask-Babel >=1, <3" \ + --replace "marshmallow-sqlalchemy>=0.22.0, <0.24.0" "marshmallow-sqlalchemy >=0.22.0, <0.25.0" ''; - - # majority of tests require network access or mongo + # Majority of tests require network access or mongo doCheck = false; + pythonImportsCheck = [ "flask_appbuilder" ]; + meta = with lib; { description = "Simple and rapid application development framework, built on top of Flask"; homepage = "https://github.com/dpgaspar/flask-appbuilder/"; diff --git a/pkgs/development/python-modules/flask-httpauth/default.nix b/pkgs/development/python-modules/flask-httpauth/default.nix index e5d55a2b9b5f..ba8e0d0f11e6 100644 --- a/pkgs/development/python-modules/flask-httpauth/default.nix +++ b/pkgs/development/python-modules/flask-httpauth/default.nix @@ -1,16 +1,22 @@ -{ lib, buildPythonPackage, fetchPypi, flask }: +{ lib, python, buildPythonPackage, fetchPypi, flask }: buildPythonPackage rec { pname = "Flask-HTTPAuth"; - version = "4.2.0"; + version = "4.3.0"; src = fetchPypi { inherit pname version; - sha256 = "8c7e49e53ce7dc14e66fe39b9334e4b7ceb8d0b99a6ba1c3562bb528ef9da84a"; + sha256 = "05j1mckwhgicrlj4j7ni2rhcf9w4i7phll06jbjjyvs3rj1l4q1f"; }; propagatedBuildInputs = [ flask ]; + pythonImportsCheck = [ "flask_httpauth" ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + meta = with lib; { description = "Extension that provides HTTP authentication for Flask routes"; homepage = "https://github.com/miguelgrinberg/Flask-HTTPAuth"; diff --git a/pkgs/development/python-modules/flask-restx/default.nix b/pkgs/development/python-modules/flask-restx/default.nix index f2b7222c3d06..e1de7bf0d3b3 100644 --- a/pkgs/development/python-modules/flask-restx/default.nix +++ b/pkgs/development/python-modules/flask-restx/default.nix @@ -20,14 +20,14 @@ buildPythonPackage rec { pname = "flask-restx"; - version = "0.2.0"; + version = "0.3.0"; # Tests not included in PyPI tarball src = fetchFromGitHub { owner = "python-restx"; repo = pname; rev = version; - sha256 = "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"; + sha256 = "0aj13nd3z71gb8c2kqiaz3f9k7jr0srlvrsx8hpz4nkpki8jiz2s"; }; propagatedBuildInputs = [ aniso8601 jsonschema flask werkzeug pytz six ] @@ -45,6 +45,7 @@ buildPythonPackage rec { meta = with lib; { homepage = "https://flask-restx.readthedocs.io/en/${version}/"; description = "Fully featured framework for fast, easy and documented API development with Flask"; + changelog = "https://github.com/python-restx/flask-restx/raw/${version}/CHANGELOG.rst"; license = licenses.bsd3; maintainers = [ maintainers.marsam ]; }; diff --git a/pkgs/development/python-modules/flufl/lock.nix b/pkgs/development/python-modules/flufl/lock.nix index b44a7f3cdfee..ce2ead246f95 100644 --- a/pkgs/development/python-modules/flufl/lock.nix +++ b/pkgs/development/python-modules/flufl/lock.nix @@ -14,6 +14,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ atpublic psutil ]; checkInputs = [ pytestCheckHook pytestcov sybil ]; + # disable code coverage checks for all OS. Upstream does not enforce these + # checks on Darwin, and code coverage cannot be improved downstream nor is it + # relevant to the user. + pytestFlagsArray = [ "--no-cov" ]; + meta = with lib; { homepage = "https://flufllock.readthedocs.io/"; description = "NFS-safe file locking with timeouts for POSIX and Windows"; diff --git a/pkgs/development/python-modules/fpyutils/default.nix b/pkgs/development/python-modules/fpyutils/default.nix new file mode 100644 index 000000000000..0120391aee1b --- /dev/null +++ b/pkgs/development/python-modules/fpyutils/default.nix @@ -0,0 +1,46 @@ +{ lib +, atomicwrites +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "fpyutils"; + version = "2.0.0"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "frnmst"; + repo = pname; + rev = version; + sha256 = "1n15fvd6191ixxsza49fdd8j43hs0agagg8k9v6rc7by1ffqnl2b"; + }; + + propagatedBuildInputs = [ + atomicwrites + requests + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "fpyutils/tests/*.py" ]; + + disabledTests = [ + # Don't run test which requires bash + "test_execute_command_live_output" + ]; + + pythonImportsCheck = [ "fpyutils" ]; + + meta = with lib; { + description = "Collection of useful non-standard Python functions"; + homepage = "https://github.com/frnmst/fpyutils"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/fritzconnection/default.nix b/pkgs/development/python-modules/fritzconnection/default.nix index 8e54cb6897cc..ad157fbda4c0 100644 --- a/pkgs/development/python-modules/fritzconnection/default.nix +++ b/pkgs/development/python-modules/fritzconnection/default.nix @@ -2,14 +2,14 @@ buildPythonPackage rec { pname = "fritzconnection"; - version = "1.4.2"; + version = "1.5.0"; # no tests on PyPI src = fetchFromGitHub { owner = "kbr"; repo = pname; rev = version; - sha256 = "02w1hwbfwbh5xlq433myzv6ms7jqxg8kn3d6znq4ic22zprzf5r2"; + sha256 = "sha256-Iw7R+39rpoCTrRD74kBihF7AMcJWxy2xdPhKLznWdlo="; }; disabled = pythonOlder "3.6"; diff --git a/pkgs/development/python-modules/gensim/default.nix b/pkgs/development/python-modules/gensim/default.nix index be6321f86ca7..b6b6f42b3c35 100644 --- a/pkgs/development/python-modules/gensim/default.nix +++ b/pkgs/development/python-modules/gensim/default.nix @@ -5,7 +5,7 @@ , six , scipy , smart_open -, scikitlearn, testfixtures, unittest2 +, scikit-learn, testfixtures, unittest2 , isPy3k }: @@ -21,7 +21,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ smart_open numpy six scipy ]; - checkInputs = [ scikitlearn testfixtures unittest2 ]; + checkInputs = [ scikit-learn testfixtures unittest2 ]; # Two tests fail. # diff --git a/pkgs/development/python-modules/glcontext/default.nix b/pkgs/development/python-modules/glcontext/default.nix new file mode 100644 index 000000000000..c5a06fb6499a --- /dev/null +++ b/pkgs/development/python-modules/glcontext/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, libGL +, libX11 +, pytestCheckHook +, psutil +}: + +buildPythonPackage rec { + pname = "glcontext"; + version = "2.3.3"; + + src = fetchFromGitHub { + owner = "moderngl"; + repo = pname; + rev = version; + sha256 = "16kwrfjijn9bnb48rk17wapmhxq6g9s59zczh65imyncb9k82wkc"; + }; + + disabled = !isPy3k; + + buildInputs = [ libGL libX11 ]; + + postPatch = '' + substituteInPlace glcontext/x11.cpp \ + --replace '"libGL.so"' '"${libGL}/lib/libGL.so"' \ + --replace '"libX11.so"' '"${libX11}/lib/libX11.so"' + substituteInPlace glcontext/egl.cpp \ + --replace '"libGL.so"' '"${libGL}/lib/libGL.so"' \ + --replace '"libEGL.so"' '"${libGL}/lib/libEGL.so"' + ''; + + # Tests fail because they try to open display. See + # https://github.com/NixOS/nixpkgs/pull/121439 + # for details. + doCheck = false; + + pythonImportsCheck = [ "glcontext" ]; + + meta = with lib; { + homepage = "https://github.com/moderngl/glcontext"; + description = "OpenGL implementation for ModernGL"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ friedelino ]; + }; +} diff --git a/pkgs/development/python-modules/globus-sdk/default.nix b/pkgs/development/python-modules/globus-sdk/default.nix index 0c2d74a90e11..d251ec75ff59 100644 --- a/pkgs/development/python-modules/globus-sdk/default.nix +++ b/pkgs/development/python-modules/globus-sdk/default.nix @@ -28,6 +28,11 @@ buildPythonPackage rec { responses ]; + postPatch = '' + substituteInPlace setup.py \ + --replace "pyjwt[crypto]>=1.5.3,<2.0.0" "pyjwt[crypto] >=1.5.3, <3.0.0" + ''; + pythonImportsCheck = [ "globus_sdk" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index 9a0b1b09db68..f14245865f59 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -2,10 +2,10 @@ , buildPythonPackage , fetchFromGitHub , numpy -, python , scikitimage , openjpeg , procps +, pytestCheckHook , contextlib2 , mock , importlib-resources @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "glymur"; - version = "0.8.18"; + version = "0.9.3"; src = fetchFromGitHub { owner = "quintusdias"; repo = pname; rev = "v${version}"; - sha256 = "1zbghzw1q4fljb019lsrhka9xrnn4425qnxrjbmbv7dssgkkywd7"; + sha256 = "1xlpax56qg5qqh0s19xidgvv2483sc684zj7rh6zw1m1z9m37drr"; }; propagatedBuildInputs = [ @@ -30,16 +30,21 @@ buildPythonPackage rec { checkInputs = [ scikitimage procps + pytestCheckHook ]; postConfigure = '' substituteInPlace glymur/config.py \ - --replace "path = read_config_file(libname)" "path = '${openjpeg}/lib' + libname + ${if stdenv.isDarwin then "'.dylib'" else "'.so'"}" + --replace "path = read_config_file(libname)" "path = '${openjpeg}/lib/lib' + libname + ${if stdenv.isDarwin then "'.dylib'" else "'.so'"}" ''; - checkPhase = '' - ${python.interpreter} -m unittest discover - ''; + disabledTestPaths = [ + # this test involves glymur's different ways of finding the openjpeg path on + # fsh systems by reading an .rc file and such, and is obviated by the patch + # in postConfigure + "tests/test_config.py" + ]; + meta = with lib; { description = "Tools for accessing JPEG2000 files"; diff --git a/pkgs/development/python-modules/gpapi/default.nix b/pkgs/development/python-modules/gpapi/default.nix index 6ed9f48dd61c..6c2454dbbfeb 100644 --- a/pkgs/development/python-modules/gpapi/default.nix +++ b/pkgs/development/python-modules/gpapi/default.nix @@ -1,7 +1,11 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder -, requests +{ buildPythonPackage +, cryptography +, fetchPypi +, lib +, pythonOlder , protobuf , pycryptodome +, requests }: buildPythonPackage rec { @@ -14,11 +18,17 @@ buildPythonPackage rec { sha256 = "0ampvsv97r3hy1cakif4kmyk1ynf3scbvh4fbk02x7xrxn4kl38w"; }; - propagatedBuildInputs = [ requests protobuf pycryptodome ]; + # package doesn't contain unit tests + # scripts in ./test require networking + doCheck = false; + + pythonImportsCheck = [ "gpapi.googleplay" ]; + + propagatedBuildInputs = [ cryptography protobuf pycryptodome requests ]; meta = with lib; { homepage = "https://github.com/NoMore201/googleplay-api"; - license = licenses.gpl3; + license = licenses.gpl3Only; description = "Google Play Unofficial Python API"; maintainers = with maintainers; [ ]; }; diff --git a/pkgs/development/python-modules/graphene/default.nix b/pkgs/development/python-modules/graphene/default.nix index 2839fc337cd8..be2cc808eb0d 100644 --- a/pkgs/development/python-modules/graphene/default.nix +++ b/pkgs/development/python-modules/graphene/default.nix @@ -11,6 +11,7 @@ , pytest-mock , pytz , snapshottest +, fetchpatch }: buildPythonPackage rec { @@ -24,6 +25,13 @@ buildPythonPackage rec { sha256 = "sha256-bVCCLPnV5F8PqLMg3GwcpwpGldrxsU+WryL6gj6y338="; }; + # Allow later aniso8601 releases + # https://github.com/graphql-python/graphene/pull/1331 + patches = [ (fetchpatch { + url = "https://github.com/graphql-python/graphene/commit/26b16f75b125e35eeb2274b7be503ec29f2e8a45.patch"; + sha256 = "qm96pNOoxPieEy1CFZpa2Mx010pY3QU/vRyuL0qO3Tk="; + }) ]; + propagatedBuildInputs = [ aniso8601 graphql-core diff --git a/pkgs/development/python-modules/graphite-web/default.nix b/pkgs/development/python-modules/graphite-web/default.nix index d2d6a78436ac..08125bfc71a3 100644 --- a/pkgs/development/python-modules/graphite-web/default.nix +++ b/pkgs/development/python-modules/graphite-web/default.nix @@ -28,6 +28,12 @@ buildPythonPackage rec { ./update-django-tagging.patch ]; + postPatch = '' + # https://github.com/graphite-project/graphite-web/pull/2701 + substituteInPlace setup.py \ + --replace "'scandir'" "'scandir; python_version < \"3.5\"'" + ''; + propagatedBuildInputs = [ django memcached diff --git a/pkgs/development/python-modules/graphql-core/default.nix b/pkgs/development/python-modules/graphql-core/default.nix index 5c29a1135a9b..85021d126a1b 100644 --- a/pkgs/development/python-modules/graphql-core/default.nix +++ b/pkgs/development/python-modules/graphql-core/default.nix @@ -1,27 +1,21 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub -, lib -, pythonOlder - -, coveralls -, promise -, pytestCheckHook , pytest-benchmark -, pytest-mock -, rx -, six +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "graphql-core"; - version = "3.1.3"; + version = "3.1.4"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "graphql-python"; repo = pname; rev = "v${version}"; - sha256 = "0qy1i6vffwad74ymdsh1qjf5b6ph4z0vyxzkkc6yppwczhzmi1ps"; + sha256 = "sha256-lamV5Rd37WvFBJ+zJUb+UhqxoNUrRhoMJx1NodbQUjs="; }; checkInputs = [ @@ -29,12 +23,12 @@ buildPythonPackage rec { pytestCheckHook ]; + pythonImportsCheck = [ "graphql" ]; + meta = with lib; { description = "Port of graphql-js to Python"; homepage = "https://github.com/graphql-python/graphql-core"; license = licenses.mit; - maintainers = with maintainers; [ - kamadorueda - ]; + maintainers = with maintainers; [ kamadorueda ]; }; } diff --git a/pkgs/development/python-modules/graspologic/default.nix b/pkgs/development/python-modules/graspologic/default.nix index b4e8803784b5..758f988a2395 100644 --- a/pkgs/development/python-modules/graspologic/default.nix +++ b/pkgs/development/python-modules/graspologic/default.nix @@ -8,7 +8,7 @@ , matplotlib , networkx , numpy -, scikitlearn +, scikit-learn , scipy , seaborn }: @@ -31,7 +31,7 @@ buildPythonPackage rec { matplotlib networkx numpy - scikitlearn + scikit-learn scipy seaborn ]; diff --git a/pkgs/development/python-modules/gremlinpython/default.nix b/pkgs/development/python-modules/gremlinpython/default.nix index 59da8f173d97..573f5a68ce67 100644 --- a/pkgs/development/python-modules/gremlinpython/default.nix +++ b/pkgs/development/python-modules/gremlinpython/default.nix @@ -1,6 +1,15 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, pytestCheckHook, pyhamcrest, pytestrunner -, six, isodate, tornado, aenum, radish-bdd, mock +{ lib +, buildPythonPackage +, fetchFromGitHub +, aenum +, importlib-metadata +, isodate +, six +, tornado +, pytestCheckHook +, mock +, pyhamcrest +, radish-bdd }: buildPythonPackage rec { @@ -22,13 +31,28 @@ buildPythonPackage rec { --replace 'PyHamcrest>=1.9.0,<2.0.0' 'PyHamcrest' \ --replace 'radish-bdd==0.8.6' 'radish-bdd' \ --replace 'mock>=3.0.5,<4.0.0' 'mock' \ - --replace 'pytest>=4.6.4,<5.0.0' 'pytest' + --replace 'pytest>=4.6.4,<5.0.0' 'pytest' \ + --replace 'importlib-metadata<3.0.0' 'importlib-metadata' \ + --replace 'pytest-runner==5.2' ' ' ''; - nativeBuildInputs = [ pytestrunner ]; # simply to placate requirements - propagatedBuildInputs = [ six isodate tornado aenum ]; + # setup-requires requirements + nativeBuildInputs = [ + importlib-metadata + ]; + propagatedBuildInputs = [ + aenum + isodate + six + tornado + ]; - checkInputs = [ pytestCheckHook pyhamcrest radish-bdd mock ]; + checkInputs = [ + pytestCheckHook + mock + pyhamcrest + radish-bdd + ]; # disable custom pytest report generation preCheck = '' @@ -36,12 +60,14 @@ buildPythonPackage rec { ''; # many tests expect a running tinkerpop server + disabledTestPaths = [ + "tests/driver/test_client.py" + "tests/driver/test_driver_remote_connection.py" + "tests/driver/test_driver_remote_connection_threaded.py" + "tests/process/test_dsl.py" + "tests/structure/io/test_functionalityio.py" + ]; pytestFlagsArray = [ - "--ignore=tests/driver/test_client.py" - "--ignore=tests/driver/test_driver_remote_connection.py" - "--ignore=tests/driver/test_driver_remote_connection_threaded.py" - "--ignore=tests/process/test_dsl.py" - "--ignore=tests/structure/io/test_functionalityio.py" # disabledTests doesn't quite allow us to be precise enough for this "-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'" ]; diff --git a/pkgs/development/python-modules/grpcio-tools/default.nix b/pkgs/development/python-modules/grpcio-tools/default.nix index 2f4ee5de8d28..52091cacc581 100644 --- a/pkgs/development/python-modules/grpcio-tools/default.nix +++ b/pkgs/development/python-modules/grpcio-tools/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "grpcio-tools"; - version = "1.37.0"; + version = "1.38.0"; src = fetchPypi { inherit pname version; - sha256 = "3ec510c1b6bfc32effc639acf9a055e72dab7a7b6757bf72f2132790d6a7cf1c"; + sha256 = "c609678cf6faf4b467259757f848de4fbc7baca3c1e3f7b0e55c701c50fd94ae"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index ea89f7214c63..a391d993cf0c 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "gst-python"; - version = "1.18.0"; + version = "1.18.4"; format = "other"; @@ -22,7 +22,7 @@ buildPythonPackage rec { src = fetchurl { url = "${meta.homepage}/src/gst-python/${pname}-${version}.tar.xz"; - sha256 = "0ifx2s2j24sj2w5jm7cxyg1kinnhbxiz4x0qp3gnsjlwbawfigvn"; + sha256 = "13h9qzfz8s1gyj2ar9q2gf5346sgdv6jv8hj7aw0hpl2gs5f0s6b"; }; # Python 2.x is not supported. diff --git a/pkgs/development/python-modules/gtimelog/default.nix b/pkgs/development/python-modules/gtimelog/default.nix index bb31baa78880..15a1ddbf0614 100644 --- a/pkgs/development/python-modules/gtimelog/default.nix +++ b/pkgs/development/python-modules/gtimelog/default.nix @@ -46,11 +46,11 @@ buildPythonPackage rec { To run gtimelog successfully on a system that does not have full GNOME 3 installed, the following NixOS options should be set: - programs.dconf.enable = true; - - services.gnome3.gnome-keyring.enable = true; + - services.gnome.gnome-keyring.enable = true; In addition, the following packages should be added to the environment: - - gnome3.adwaita-icon-theme - - gnome3.dconf + - gnome.adwaita-icon-theme + - gnome.dconf ''; homepage = "https://gtimelog.org/"; license = licenses.gpl2Plus; diff --git a/pkgs/development/python-modules/gym/default.nix b/pkgs/development/python-modules/gym/default.nix index 126606af73a9..a1cd76cd38e4 100644 --- a/pkgs/development/python-modules/gym/default.nix +++ b/pkgs/development/python-modules/gym/default.nix @@ -1,19 +1,32 @@ { lib -, buildPythonPackage, fetchPypi -, numpy, requests, six, pyglet, scipy, cloudpickle +, buildPythonPackage +, fetchFromGitHub +, numpy +, requests +, pyglet +, scipy +, pillow +, cloudpickle }: buildPythonPackage rec { pname = "gym"; - version = "0.18.0"; + version = "0.18.1"; - src = fetchPypi { - inherit pname version; - sha256 = "a0dcd25c1373f3938f4cb4565f74f434fba6faefb73a42d09c9dddd0c08af53e"; + src = fetchFromGitHub { + owner = "openai"; + repo = pname; + rev = version; + sha256 = "0mv4af2y9d1y97bsda94f21nis2jm1zkzv7c806vmvzh5s4r8nfn"; }; propagatedBuildInputs = [ - numpy requests six pyglet scipy cloudpickle + cloudpickle + numpy + pillow + pyglet + requests + scipy ]; # The test needs MuJoCo that is not free library. @@ -22,7 +35,7 @@ buildPythonPackage rec { pythonImportsCheck = [ "gym" ]; meta = with lib; { - description = "A toolkit by OpenAI for developing and comparing your reinforcement learning agents"; + description = "A toolkit for developing and comparing your reinforcement learning agents"; homepage = "https://gym.openai.com/"; license = licenses.mit; maintainers = with maintainers; [ hyphon81 ]; diff --git a/pkgs/development/python-modules/ha-ffmpeg/default.nix b/pkgs/development/python-modules/ha-ffmpeg/default.nix index 84810fd2b532..9fd1295733c4 100644 --- a/pkgs/development/python-modules/ha-ffmpeg/default.nix +++ b/pkgs/development/python-modules/ha-ffmpeg/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, isPy3k -, ffmpeg_3, async-timeout }: +, async-timeout }: buildPythonPackage rec { pname = "ha-ffmpeg"; @@ -12,17 +12,21 @@ buildPythonPackage rec { sha256 = "8d92f2f5790da038d828ac862673e0bb43e8e972e4c70b1714dd9a0fb776c8d1"; }; - buildInputs = [ ffmpeg_3 ]; - propagatedBuildInputs = [ async-timeout ]; # only manual tests doCheck = false; + pythonImportsCheck = [ + "haffmpeg.camera" + "haffmpeg.sensor" + "haffmpeg.tools" + ]; + meta = with lib; { homepage = "https://github.com/pvizeli/ha-ffmpeg"; description = "Library for home-assistant to handle ffmpeg"; license = licenses.bsd3; - maintainers = with maintainers; [ peterhoeg ]; + maintainers = teams.home-assistant.members; }; } diff --git a/pkgs/development/python-modules/ha-philipsjs/default.nix b/pkgs/development/python-modules/ha-philipsjs/default.nix new file mode 100644 index 000000000000..c6de997a1da7 --- /dev/null +++ b/pkgs/development/python-modules/ha-philipsjs/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, httpx +, pytest-aiohttp +, pytest-mock +, pytestCheckHook +, pythonOlder +, respx +}: + +buildPythonPackage rec { + pname = "ha-philipsjs"; + version = "2.7.4"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "danielperna84"; + repo = pname; + rev = version; + sha256 = "08fjdb1q02dwxq8s15ddd00gps64xplblkn8dx5yivldskiy8i1n"; + }; + + propagatedBuildInputs = [ + cryptography + httpx + ]; + + checkInputs = [ + pytest-aiohttp + pytest-mock + pytestCheckHook + respx + ]; + + pythonImportsCheck = [ "haphilipsjs" ]; + + meta = with lib; { + description = "Python library to interact with Philips TVs with jointSPACE API"; + homepage = "https://github.com/danielperna84/ha-philipsjs"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/hatasmota/default.nix b/pkgs/development/python-modules/hatasmota/default.nix index 9506dbb96de4..0164e84f8f77 100644 --- a/pkgs/development/python-modules/hatasmota/default.nix +++ b/pkgs/development/python-modules/hatasmota/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "hatasmota"; - version = "0.2.10"; + version = "0.2.13"; src = fetchFromGitHub { owner = "emontnemery"; repo = pname; rev = version; - sha256 = "sha256-f831DKQJII1/MeF1buFihi65y3l7Vp7reVEcyzbAw3o="; + sha256 = "sha256-RzBEiO8IfeMls7ssCZ2yhL78UVrpZykwDl1IUshqOu8="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hdate/default.nix b/pkgs/development/python-modules/hdate/default.nix new file mode 100644 index 000000000000..a034eddd5651 --- /dev/null +++ b/pkgs/development/python-modules/hdate/default.nix @@ -0,0 +1,63 @@ +{ lib +, astral +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, poetry-core +, pytestCheckHook +, pythonOlder +, pytz +}: + +buildPythonPackage rec { + pname = "hdate"; + version = "0.10.2"; + disabled = pythonOlder "3.6"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "py-libhdate"; + repo = "py-libhdate"; + rev = "v${version}"; + sha256 = "07b0c7q8w6flj4q72v58d3wymsxfp5qz8z97qhhc2977mjx5fsxd"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + astral + pytz + ]; + + checkInputs = [ + pytestCheckHook + ]; + + patches = [ + # Version was not updated for the release + (fetchpatch { + name = "update-version.patch"; + url = "https://github.com/py-libhdate/py-libhdate/commit/b8186a891b29fed99def5ce0985ee0ae1e0dd77e.patch"; + sha256 = "1pmhgh57x9390ff5gyisng0l6b79sd6dxmf172hpk1gr03c3hv98"; + }) + ]; + + postPatch = '' + substituteInPlace pyproject.toml --replace "^2020.5" ">=2020.5" + ''; + + pytestFlagsArray = [ + "tests" + ]; + + pythonImportsCheck = [ "hdate" ]; + + meta = with lib; { + description = "Python module for Jewish/Hebrew date and Zmanim"; + homepage = "https://github.com/py-libhdate/py-libhdate"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/hdbscan/default.nix b/pkgs/development/python-modules/hdbscan/default.nix index d2590d14955c..5264ff24890d 100644 --- a/pkgs/development/python-modules/hdbscan/default.nix +++ b/pkgs/development/python-modules/hdbscan/default.nix @@ -5,7 +5,7 @@ , numpy , pytestCheckHook , scipy -, scikitlearn +, scikit-learn , fetchPypi , joblib , six @@ -29,12 +29,18 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ cython ]; - propagatedBuildInputs = [ numpy scipy scikitlearn joblib six ]; + propagatedBuildInputs = [ numpy scipy scikit-learn joblib six ]; preCheck = '' cd hdbscan/tests rm __init__.py ''; checkInputs = [ pytestCheckHook ]; + disabledTests = [ + # known flaky tests: https://github.com/scikit-learn-contrib/hdbscan/issues/420 + "test_mem_vec_diff_clusters" + "test_all_points_mem_vec_diff_clusters" + "test_approx_predict_diff_clusters" + ]; meta = with lib; { description = "Hierarchical Density-Based Spatial Clustering of Applications with Noise, a clustering algorithm with a scikit-learn compatible API"; diff --git a/pkgs/development/python-modules/hg-evolve/default.nix b/pkgs/development/python-modules/hg-evolve/default.nix index b7bd002c3678..46db97a9aedd 100644 --- a/pkgs/development/python-modules/hg-evolve/default.nix +++ b/pkgs/development/python-modules/hg-evolve/default.nix @@ -6,11 +6,11 @@ buildPythonPackage rec { pname = "hg-evolve"; - version = "10.3.0"; + version = "10.3.1"; src = fetchPypi { inherit pname version; - sha256 = "5d7f73fc1c357134ae9b4a3ed2d844ab8e75a4ca1303679a9e150e87617e7bc7"; + sha256 = "03xwnadpvgna70n6pfxb7xdrszppdqrx5qmkbr1v0jzbh5rnzi6b"; }; doCheck = false; @@ -18,7 +18,7 @@ buildPythonPackage rec { meta = with lib; { description = "Enables the “changeset evolution” feature of Mercurial core"; homepage = "https://www.mercurial-scm.org/doc/evolution/"; - maintainers = with maintainers; [ xavierzwirtz ]; + maintainers = with maintainers; [ xavierzwirtz lukegb ]; license = licenses.gpl2Plus; }; } diff --git a/pkgs/development/python-modules/hickle/default.nix b/pkgs/development/python-modules/hickle/default.nix index 036122f702b4..1d6d6b39d043 100644 --- a/pkgs/development/python-modules/hickle/default.nix +++ b/pkgs/development/python-modules/hickle/default.nix @@ -42,6 +42,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "hickle" ]; meta = { + # incompatible with h5py>=3.0, see https://github.com/telegraphic/hickle/issues/143 + broken = true; description = "Serialize Python data to HDF5"; homepage = "https://github.com/telegraphic/hickle"; license = lib.licenses.mit; diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix index 790e7aa08fc2..2b9165dee24e 100644 --- a/pkgs/development/python-modules/hidapi/default.nix +++ b/pkgs/development/python-modules/hidapi/default.nix @@ -1,4 +1,13 @@ -{ lib, stdenv, libusb1, udev, darwin, fetchPypi, buildPythonPackage, cython }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, xcbuild +, cython +, libusb1 +, udev +, darwin +}: buildPythonPackage rec { pname = "hidapi"; @@ -9,18 +18,17 @@ buildPythonPackage rec { sha256 = "a1170b18050bc57fae3840a51084e8252fd319c0fc6043d68c8501deb0e25846"; }; - propagatedBuildInputs = - lib.optionals stdenv.isLinux [ libusb1 udev ] ++ - lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]) ++ - [ cython ]; + nativeBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ]; + + propagatedBuildInputs = [ cython ] + ++ lib.optionals stdenv.isLinux [ libusb1 udev ] + ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]); # Fix the USB backend library lookup postPatch = lib.optionalString stdenv.isLinux '' libusb=${libusb1.dev}/include/libusb-1.0 test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace setup.py --replace 'macos_sdk_path =' 'macos_sdk_path = "" #' ''; pythonImportsCheck = [ "hid" ]; @@ -30,7 +38,7 @@ buildPythonPackage rec { homepage = "https://github.com/trezor/cython-hidapi"; # license can actually be either bsd3 or gpl3 # see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt - license = licenses.bsd3; + license = with licenses; [ bsd3 gpl3Only ]; maintainers = with maintainers; [ np prusnak ]; }; } diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index 8d2afcf5e722..eb7e05afff7a 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildPythonPackage, numpy, scikitlearn, setuptools_scm, cython, pytest }: +{ lib, fetchurl, buildPythonPackage, numpy, scikit-learn, setuptools_scm, cython, pytest }: buildPythonPackage rec { pname = "hmmlearn"; @@ -10,7 +10,7 @@ buildPythonPackage rec { }; buildInputs = [ setuptools_scm cython ]; - propagatedBuildInputs = [ numpy scikitlearn ]; + propagatedBuildInputs = [ numpy scikit-learn ]; checkInputs = [ pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/hsluv/default.nix b/pkgs/development/python-modules/hsluv/default.nix new file mode 100644 index 000000000000..b6573db53268 --- /dev/null +++ b/pkgs/development/python-modules/hsluv/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "hsluv"; + version = "5.0.2"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "hsluv"; + repo = "hsluv-python"; + rev = "v${version}"; + sha256 = "0r0w8ycjwfg3pmzjghzrs0lkam93fzvgiqvrwh3nl9jnqlpw7v7j"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "hsluv" ]; + + meta = with lib; { + description = "Python implementation of HSLuv"; + homepage = "https://github.com/hsluv/hsluv-python"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/httpcore/default.nix b/pkgs/development/python-modules/httpcore/default.nix index dbbdf0bb38c0..079b5e71a10f 100644 --- a/pkgs/development/python-modules/httpcore/default.nix +++ b/pkgs/development/python-modules/httpcore/default.nix @@ -5,24 +5,25 @@ , h11 , h2 , pproxy +, pytest-asyncio +, pytest-trio , pytestCheckHook , pytestcov , sniffio -, uvicorn , trustme -, trio +, uvicorn }: buildPythonPackage rec { pname = "httpcore"; - version = "0.12.3"; + version = "0.13.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "encode"; repo = pname; rev = version; - sha256 = "09hbjc5wzhrnri5y3idxcq329d7jiaxljc7y6npwv9gh9saln109"; + sha256 = "sha256-KvqBVQUaF3p2oJz0tt3Bkn2JiKEHqrZ3b6I9f0JK5h8="; }; propagatedBuildInputs = [ @@ -33,18 +34,19 @@ buildPythonPackage rec { checkInputs = [ pproxy + pytest-asyncio + pytest-trio pytestCheckHook pytestcov - uvicorn trustme - trio + uvicorn ]; - pytestFlagsArray = [ + disabledTestPaths = [ # these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known - "--ignore=tests/test_threadsafety.py" - "--ignore=tests/sync_tests/test_interfaces.py" - "--ignore=tests/sync_tests/test_retries.py" + "tests/test_threadsafety.py" + "tests/sync_tests/test_interfaces.py" + "tests/sync_tests/test_retries.py" ]; pythonImportsCheck = [ "httpcore" ]; diff --git a/pkgs/development/python-modules/httpx/default.nix b/pkgs/development/python-modules/httpx/default.nix index 2aba203ea01f..b45c3e85f502 100644 --- a/pkgs/development/python-modules/httpx/default.nix +++ b/pkgs/development/python-modules/httpx/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "httpx"; - version = "0.17.1"; + version = "0.18.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "encode"; repo = pname; rev = version; - sha256 = "sha256-P4Uki+vlAgVECBUz9UGvv1ip49jmf0kYbyU2/mkWE3U="; + sha256 = "sha256-6EYBTRXaVHBgW/JzZvWLz55AqgocOyym2FVtu2Nkp/U="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/humblewx/default.nix b/pkgs/development/python-modules/humblewx/default.nix new file mode 100644 index 000000000000..7fd0b0e8dd90 --- /dev/null +++ b/pkgs/development/python-modules/humblewx/default.nix @@ -0,0 +1,42 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, wxPython_4_0 +, python3 +}: + +buildPythonPackage rec { + pname = "humblewx"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "thetimelineproj"; + repo = pname; + rev = version; + sha256 = "0fv8gwlbcj000qq34inbwgxf0xgibs590dsyqnw0mmyb7f1iq210"; + }; + + # timeline is not compatible with wxPython_4_1. reported upstream + propagatedBuildInputs = [ wxPython_4_0 ]; + + checkPhase = '' + runHook preCheck + for i in examples/*; do + ${python3.interpreter} $i + done + runHook postCheck + ''; + + # Unable to access the X Display, is $DISPLAY set properly? + # would have to use nixos module tests, but it is not worth it + doCheck = false; + + pythonImportsCheck = [ "humblewx" ]; + + meta = { + homepage = "https://github.com/thetimelineproj/humblewx"; + description = "Library that simplifies creating user interfaces with wxPython"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ davidak ]; + }; +} diff --git a/pkgs/development/python-modules/hyperlink/default.nix b/pkgs/development/python-modules/hyperlink/default.nix index ad56de86782b..21927683b18b 100644 --- a/pkgs/development/python-modules/hyperlink/default.nix +++ b/pkgs/development/python-modules/hyperlink/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27, idna, typing ? null }: +{ lib +, buildPythonPackage +, fetchPypi +, isPy27 +, idna +, typing ? null +}: buildPythonPackage rec { pname = "hyperlink"; @@ -6,7 +12,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b"; + sha256 = "0sx50lkivsfjxx9zr4yh7l9gll2l9kvl0v0w8w4wk2x5v9bzjyj2"; }; propagatedBuildInputs = [ idna ] @@ -14,6 +20,7 @@ buildPythonPackage rec { meta = with lib; { description = "A featureful, correct URL for Python"; + homepage = "https://github.com/python-hyper/hyperlink"; license = licenses.mit; platforms = platforms.all; maintainers = with maintainers; [ apeschar ]; diff --git a/pkgs/development/python-modules/hyppo/default.nix b/pkgs/development/python-modules/hyppo/default.nix index 86b43465fb64..9fdeca082b2f 100644 --- a/pkgs/development/python-modules/hyppo/default.nix +++ b/pkgs/development/python-modules/hyppo/default.nix @@ -4,8 +4,10 @@ , fetchFromGitHub , pytestCheckHook , pytestcov , numba , numpy -, scikitlearn +, scikit-learn , scipy +, matplotlib +, seaborn }: buildPythonPackage rec { @@ -24,12 +26,16 @@ buildPythonPackage rec { propagatedBuildInputs = [ numba numpy - scikitlearn + scikit-learn scipy ]; - checkInputs = [ pytestCheckHook pytestcov ]; - pytestFlagsArray = [ "--ignore=docs" ]; + checkInputs = [ pytestCheckHook pytestcov matplotlib seaborn ]; + disabledTestPaths = [ + "docs" + "benchmarks" + "examples" + ]; meta = with lib; { homepage = "https://github.com/neurodata/hyppo"; diff --git a/pkgs/development/python-modules/i2c-tools/default.nix b/pkgs/development/python-modules/i2c-tools/default.nix new file mode 100644 index 000000000000..60af11e24198 --- /dev/null +++ b/pkgs/development/python-modules/i2c-tools/default.nix @@ -0,0 +1,21 @@ +{ lib +, buildPythonPackage +, i2c-tools +}: + +buildPythonPackage rec { + inherit (i2c-tools) pname version src; + + buildInputs = [ i2c-tools ]; + + preConfigure = "cd py-smbus"; + + meta = with lib; { + inherit (i2c-tools.meta) homepage platforms; + + description = "wrapper for i2c-tools' smbus stuff"; + # from py-smbus/smbusmodule.c + license = [ licenses.gpl2Only ]; + maintainers = [ maintainers.evils ]; + }; +} diff --git a/pkgs/development/python-modules/ics/default.nix b/pkgs/development/python-modules/ics/default.nix index 011909d6b805..ed87f3678b15 100644 --- a/pkgs/development/python-modules/ics/default.nix +++ b/pkgs/development/python-modules/ics/default.nix @@ -1,6 +1,11 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder -, tatsu, arrow -, pytestCheckHook, pytest-flakes +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, tatsu +, arrow +, pytestCheckHook +, pytest-flakes }: buildPythonPackage rec { @@ -9,21 +14,35 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; src = fetchFromGitHub { - owner = "C4ptainCrunch"; - repo = "ics.py"; + owner = "ics-py"; + repo = "ics-py"; rev = "v${version}"; sha256 = "0rrdc9rcxc3ys6rml81b8m8qdlisk78a34bdib0wy65hlkmyyykn"; }; - propagatedBuildInputs = [ tatsu arrow ]; + propagatedBuildInputs = [ + arrow + tatsu + ]; + + checkInputs = [ + pytest-flakes + pytestCheckHook + ]; postPatch = '' + # 0.8 will move to python-dateutil substituteInPlace requirements.txt \ --replace "arrow>=0.11,<0.15" "arrow" substituteInPlace setup.cfg --replace "--pep8" "" ''; - checkInputs = [ pytestCheckHook pytest-flakes ]; + disabledTests = [ + # Failure seems to be related to arrow > 1.0 + "test_event" + ]; + + pythonImportsCheck = [ "ics" ]; meta = with lib; { description = "Pythonic and easy iCalendar library (RFC 5545)"; @@ -32,9 +51,8 @@ buildPythonPackage rec { write ics data in a developer friendly way. ''; homepage = "http://icspy.readthedocs.org/en/stable/"; - changelog = "https://github.com/C4ptainCrunch/ics.py/releases/tag/v${version}"; + changelog = "https://github.com/ics-py/ics-py/releases/tag/v${version}"; license = licenses.asl20; maintainers = with maintainers; [ primeos ]; }; - } diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 71bed73f9d7b..f745b735f342 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -8,7 +8,7 @@ , mock , pytorch , pynvml -, scikitlearn +, scikit-learn , tqdm }: @@ -24,7 +24,7 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook matplotlib mock pytest_xdist ]; - propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ]; + propagatedBuildInputs = [ pytorch scikit-learn tqdm pynvml ]; # runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite. doCheck = pythonOlder "3.9"; diff --git a/pkgs/development/python-modules/imageio-ffmpeg/default.nix b/pkgs/development/python-modules/imageio-ffmpeg/default.nix index db59ba70bb26..bb186d6594c0 100644 --- a/pkgs/development/python-modules/imageio-ffmpeg/default.nix +++ b/pkgs/development/python-modules/imageio-ffmpeg/default.nix @@ -1,29 +1,42 @@ { lib , buildPythonPackage -, fetchPypi -, fetchpatch , isPy3k +, fetchPypi +, substituteAll +, ffmpeg +, python }: buildPythonPackage rec { pname = "imageio-ffmpeg"; - version = "0.4.2"; + version = "0.4.3"; + + disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "13b05b17a941a9f4a90b16910b1ffac159448cff051a153da8ba4b4343ffa195"; + sha256 = "f826260a3207b872f1a4ba87ec0c8e02c00afba4fd03348a59049bdd8215841e"; }; - patches = [ (fetchpatch { - # Fixes compatibility with python3.9 - # Should be included in the next release after 0.4.2 - url = "https://github.com/imageio/imageio-ffmpeg/pull/43/commits/b90c39fe3d29418d67d953588ed9fdf4d848f811.patch"; - sha256 = "0d9kf4w6ldwag3s2dr9zjin6wrj66fnl4fn8379ci4q4qfsqgx3f"; - })]; - disabled = !isPy3k; + patches = [ + (substituteAll { + src = ./ffmpeg-path.patch; + ffmpeg = "${ffmpeg}/bin/ffmpeg"; + }) + ]; + + checkPhase = '' + runHook preCheck + + ${python.interpreter} << EOF + from imageio_ffmpeg import get_ffmpeg_version + assert get_ffmpeg_version() == '${ffmpeg.version}' + EOF + + runHook postCheck + ''; - # No test infrastructure in repository. - doCheck = false; + pythonImportsCheck = [ "imageio_ffmpeg" ]; meta = with lib; { description = "FFMPEG wrapper for Python"; diff --git a/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch b/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch new file mode 100644 index 000000000000..d193ec199f9b --- /dev/null +++ b/pkgs/development/python-modules/imageio-ffmpeg/ffmpeg-path.patch @@ -0,0 +1,39 @@ +diff --git a/imageio_ffmpeg/_utils.py b/imageio_ffmpeg/_utils.py +index 1399cfd..c0eb9be 100644 +--- a/imageio_ffmpeg/_utils.py ++++ b/imageio_ffmpeg/_utils.py +@@ -23,33 +23,7 @@ def get_ffmpeg_exe(): + if exe: + return exe + +- plat = get_platform() +- +- # 2. Try from here +- bin_dir = resource_filename("imageio_ffmpeg", "binaries") +- exe = os.path.join(bin_dir, FNAME_PER_PLATFORM.get(plat, "")) +- if exe and os.path.isfile(exe) and _is_valid_exe(exe): +- return exe +- +- # 3. Try binary from conda package +- # (installed e.g. via `conda install ffmpeg -c conda-forge`) +- if plat.startswith("win"): +- exe = os.path.join(sys.prefix, "Library", "bin", "ffmpeg.exe") +- else: +- exe = os.path.join(sys.prefix, "bin", "ffmpeg") +- if exe and os.path.isfile(exe) and _is_valid_exe(exe): +- return exe +- +- # 4. Try system ffmpeg command +- exe = "ffmpeg" +- if _is_valid_exe(exe): +- return exe +- +- # Nothing was found +- raise RuntimeError( +- "No ffmpeg exe could be found. Install ffmpeg on your system, " +- "or set the IMAGEIO_FFMPEG_EXE environment variable." +- ) ++ return '@ffmpeg@' + + + def _popen_kwargs(prevent_sigint=False): diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index 2b334fd121ce..1672e798f304 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -1,17 +1,12 @@ { lib , buildPythonPackage , isPy27 -, pathlib , fetchPypi -, pillow -, psutil , imageio-ffmpeg -, pytest , numpy -, isPy3k -, ffmpeg_3 -, futures ? null -, enum34 +, pillow +, psutil +, pytestCheckHook }: buildPythonPackage rec { @@ -24,26 +19,21 @@ buildPythonPackage rec { inherit pname version; }; - checkInputs = [ pytest psutil ] ++ lib.optionals isPy3k [ - imageio-ffmpeg ffmpeg_3 - ]; - propagatedBuildInputs = [ numpy pillow ]; + propagatedBuildInputs = [ + imageio-ffmpeg + numpy + pillow + ]; + + checkInputs = [ + psutil + pytestCheckHook + ]; - checkPhase = '' + preCheck = '' export IMAGEIO_USERDIR="$TMP" export IMAGEIO_NO_INTERNET="true" export HOME="$(mktemp -d)" - py.test - ''; - - # For some reason, importing imageio also imports xml on Nix, see - # https://github.com/imageio/imageio/issues/395 - - # Also, there are tests that test the downloading of ffmpeg if it's not installed. - # "Uncomment" those by renaming. - postPatch = '' - substituteInPlace tests/test_meta.py --replace '"urllib",' "\"urllib\",\"xml\"," - substituteInPlace tests/test_ffmpeg.py --replace 'test_get_exe_installed' 'get_exe_installed' ''; meta = with lib; { @@ -51,5 +41,4 @@ buildPythonPackage rec { homepage = "http://imageio.github.io/"; license = licenses.bsd2; }; - } diff --git a/pkgs/development/python-modules/imap-tools/default.nix b/pkgs/development/python-modules/imap-tools/default.nix index 700c23827faa..75de29b233db 100644 --- a/pkgs/development/python-modules/imap-tools/default.nix +++ b/pkgs/development/python-modules/imap-tools/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "imap-tools"; - version = "0.40.0"; + version = "0.41.0"; disabled = isPy27; @@ -15,7 +15,7 @@ buildPythonPackage rec { owner = "ikvk"; repo = "imap_tools"; rev = "v${version}"; - sha256 = "sha256-7qLiVN3pBkbZQlA12ZOkgpiV/JybrPTmEIeJjy4ZS3A="; + sha256 = "sha256-gtfVZTHeiYamKkcu9n/CJ4O4X1YneY2QB3XZnvtNL3U="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/imapclient/default.nix b/pkgs/development/python-modules/imapclient/default.nix index 27667f860ff1..ea4f388b6c7e 100644 --- a/pkgs/development/python-modules/imapclient/default.nix +++ b/pkgs/development/python-modules/imapclient/default.nix @@ -1,35 +1,30 @@ { lib , buildPythonPackage , fetchFromGitHub -, mock , six +, pytestCheckHook +, mock }: buildPythonPackage rec { pname = "IMAPClient"; - version = "2.1.0"; + version = "2.2.0"; src = fetchFromGitHub { owner = "mjs"; repo = "imapclient"; rev = version; - sha256 = "1zc8qj8ify2zygbz255b6fcg7jhprswf008ccwjmbrnj08kh9l4x"; + sha256 = "sha256-q/8LFKHgrY3pQV7Coz+5pZAw696uABMTEkYoli6C2KA="; }; - # fix test failing in python 36 - postPatch = '' - substituteInPlace tests/test_imapclient.py \ - --replace "if sys.version_info >= (3, 7):" "if sys.version_info >= (3, 6, 4):" - ''; - propagatedBuildInputs = [ six ]; - checkInputs = [ mock ]; + checkInputs = [ pytestCheckHook mock ]; meta = with lib; { homepage = "https://imapclient.readthedocs.io"; description = "Easy-to-use, Pythonic and complete IMAP client library"; license = licenses.bsd3; - maintainers = [ maintainers.almac ]; + maintainers = with maintainers; [ almac dotlambda ]; }; } diff --git a/pkgs/development/python-modules/imbalanced-learn/0.4.nix b/pkgs/development/python-modules/imbalanced-learn/0.4.nix index 96ba16b1cd1a..6709092ca955 100644 --- a/pkgs/development/python-modules/imbalanced-learn/0.4.nix +++ b/pkgs/development/python-modules/imbalanced-learn/0.4.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }: +{ lib, buildPythonPackage, fetchPypi, scikit-learn, pandas, nose, pytest }: buildPythonPackage rec { pname = "imbalanced-learn"; @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "5bd9e86e40ce4001a57426541d7c79b18143cbd181e3330c1a3e5c5c43287083"; }; - propagatedBuildInputs = [ scikitlearn ]; + propagatedBuildInputs = [ scikit-learn ]; checkInputs = [ nose pytest pandas ]; checkPhase = '' export HOME=$PWD diff --git a/pkgs/development/python-modules/imbalanced-learn/default.nix b/pkgs/development/python-modules/imbalanced-learn/default.nix index cf3fca9aa03c..aad2e3e07a45 100644 --- a/pkgs/development/python-modules/imbalanced-learn/default.nix +++ b/pkgs/development/python-modules/imbalanced-learn/default.nix @@ -4,7 +4,7 @@ , isPy27 , pandas , pytestCheckHook -, scikitlearn +, scikit-learn }: buildPythonPackage rec { @@ -17,7 +17,7 @@ buildPythonPackage rec { sha256 = "0a9xrw4qsh95g85pg2611hvj6xcfncw646si2icaz22haw1x410w"; }; - propagatedBuildInputs = [ scikitlearn ]; + propagatedBuildInputs = [ scikit-learn ]; checkInputs = [ pytestCheckHook pandas ]; preCheck = '' export HOME=$TMPDIR diff --git a/pkgs/development/python-modules/img2pdf/default.nix b/pkgs/development/python-modules/img2pdf/default.nix index eb8605c45ddc..204e3e93b8d3 100644 --- a/pkgs/development/python-modules/img2pdf/default.nix +++ b/pkgs/development/python-modules/img2pdf/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "img2pdf"; - version = "0.4.0"; + version = "0.4.1"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "eaee690ab8403dd1a9cb4db10afee41dd3e6c7ed63bdace02a0121f9feadb0c9"; + sha256 = "sha256-OKEinKhLIR13gtHWWtclGpeBvyT29kl8c4x1X8/tVVI="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/importlib-resources/2.nix b/pkgs/development/python-modules/importlib-resources/2.nix new file mode 100644 index 000000000000..1034c3111306 --- /dev/null +++ b/pkgs/development/python-modules/importlib-resources/2.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +, importlib-metadata +, typing +, singledispatch +, python +}: + +buildPythonPackage rec { + pname = "importlib-resources"; + version = "3.3.1"; + + src = fetchPypi { + pname = "importlib_resources"; + inherit version; + sha256 = "0ed250dbd291947d1a298e89f39afcc477d5a6624770503034b72588601bcc05"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + propagatedBuildInputs = [ + importlib-metadata + singledispatch + typing + ]; + + checkPhase = '' + ${python.interpreter} -m unittest discover + ''; + + meta = with lib; { + description = "Read resources from Python packages"; + homepage = "https://importlib-resources.readthedocs.io/"; + license = licenses.asl20; + maintainers = [ ]; + }; +} diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index cd8fec1e54e0..2388fb1b26df 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -1,8 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, setuptools_scm -, toml +, setuptools-scm , importlib-metadata , typing ? null , singledispatch ? null @@ -11,15 +10,16 @@ }: buildPythonPackage rec { - pname = "importlib_resources"; + pname = "importlib-resources"; version = "5.1.2"; src = fetchPypi { - inherit pname version; + pname = "importlib_resources"; + inherit version; sha256 = "642586fc4740bd1cad7690f836b3321309402b20b332529f25617ff18e8e1370"; }; - nativeBuildInputs = [ setuptools_scm toml ]; + nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ importlib-metadata ] ++ lib.optional (pythonOlder "3.4") singledispatch @@ -34,5 +34,6 @@ buildPythonPackage rec { description = "Read resources from Python packages"; homepage = "https://importlib-resources.readthedocs.io/"; license = licenses.asl20; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/incremental/default.nix b/pkgs/development/python-modules/incremental/default.nix index 6cbed7221a8f..b79ba4b7db2e 100644 --- a/pkgs/development/python-modules/incremental/default.nix +++ b/pkgs/development/python-modules/incremental/default.nix @@ -13,6 +13,6 @@ buildPythonPackage rec { homepage = "https://github.com/twisted/treq"; description = "Incremental is a small library that versions your Python projects"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/infoqscraper/default.nix b/pkgs/development/python-modules/infoqscraper/default.nix deleted file mode 100644 index b250dfc6c7f6..000000000000 --- a/pkgs/development/python-modules/infoqscraper/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib -, buildPythonPackage -, html5lib -, six -, beautifulsoup4 -, pkgs -}: - -buildPythonPackage rec { - version = "0.1.0"; - pname = "infoqscraper"; - - src = pkgs.fetchFromGitHub { - owner = "cykl"; - repo = pname; - rev = "v${version}"; - sha256 = "07mxp4mla7fwfc032f3mxrhjarnhkjqdxxibf9ba87c93z3dq8jj"; - }; - - # requires network - doCheck = false; - - buildInputs = [ html5lib ]; - propagatedBuildInputs = [ six beautifulsoup4 pkgs.ffmpeg_3 pkgs.swftools pkgs.rtmpdump ]; - - meta = with lib; { - description = "Discover presentations and/or create a movie consisting of slides and audio track from an infoq url"; - homepage = "https://github.com/cykl/infoqscraper/wiki"; - license = licenses.mit; - maintainers = with maintainers; [ edwtjo ]; - }; - -} diff --git a/pkgs/development/python-modules/internetarchive/default.nix b/pkgs/development/python-modules/internetarchive/default.nix index 0d1fb08e2a4e..20e7986188c5 100644 --- a/pkgs/development/python-modules/internetarchive/default.nix +++ b/pkgs/development/python-modules/internetarchive/default.nix @@ -19,11 +19,11 @@ buildPythonPackage rec { pname = "internetarchive"; - version = "2.0.2"; + version = "2.0.3"; src = fetchPypi { inherit pname version; - sha256 = "515e6646a2b917c15f2241670d21f14a014b9c67dc509aef4d4aca5a59cdda65"; + sha256 = "2ce0ab89fea37e5b2311bc7d163955e84f73f6beeac3942e17e9d51ad7cc9ffa"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/ipydatawidgets/default.nix b/pkgs/development/python-modules/ipydatawidgets/default.nix index a0efa9b575db..e6e1e605cca5 100644 --- a/pkgs/development/python-modules/ipydatawidgets/default.nix +++ b/pkgs/development/python-modules/ipydatawidgets/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "ipydatawidgets"; - version = "4.2.0"; + version = "4.1.0"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "d0e4b58b59b508165e8562b8f5d1dbfcd739855847ec0477bd9185a5e9b7c5bc"; + sha256 = "d9f94828c11e3b40350fb14a02e027f42670a7c372bcb30db18d552dcfab7c01"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/ipympl/default.nix b/pkgs/development/python-modules/ipympl/default.nix index 44c8c7bfd061..2d25eb645bad 100644 --- a/pkgs/development/python-modules/ipympl/default.nix +++ b/pkgs/development/python-modules/ipympl/default.nix @@ -1,4 +1,10 @@ -{ lib, buildPythonPackage, fetchPypi, ipywidgets, matplotlib }: +{ lib +, buildPythonPackage +, fetchPypi +, ipywidgets +, matplotlib +, jupyter-packaging +}: buildPythonPackage rec { pname = "ipympl"; @@ -9,7 +15,7 @@ buildPythonPackage rec { sha256 = "f0f1f356d8cb9d4fb51bb86dbbf837c190145316cb72f66081872ebc4d6db0a1"; }; - propagatedBuildInputs = [ ipywidgets matplotlib ]; + propagatedBuildInputs = [ ipywidgets matplotlib jupyter-packaging ]; # There are no unit tests in repository doCheck = false; diff --git a/pkgs/development/python-modules/isbnlib/default.nix b/pkgs/development/python-modules/isbnlib/default.nix index db05436d04e6..746cd3ab8adf 100644 --- a/pkgs/development/python-modules/isbnlib/default.nix +++ b/pkgs/development/python-modules/isbnlib/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "isbnlib"; - version = "3.10.7"; + version = "3.10.8"; src = fetchPypi { inherit pname version; - sha256 = "sha256-gbMxV9qOLCpIH3rUceG1ds9ZUpjwOv1gyYL3GLkS3Ik="; + sha256 = "sha256-6kBu8uFDiKs5ZJXw9gTS08lstaJWuWvAVW3Ycc19x7Q="; }; checkInputs = [ @@ -22,7 +22,13 @@ buildPythonPackage rec { # requires network connection doCheck = false; - pythonImportsCheck = [ "isbnlib" ]; + pythonImportsCheck = [ + "isbnlib" + "isbnlib.config" + "isbnlib.dev" + "isbnlib.dev.helpers" + "isbnlib.registry" + ]; meta = with lib; { description = "Extract, clean, transform, hyphenate and metadata for ISBNs"; diff --git a/pkgs/development/python-modules/iso8601/default.nix b/pkgs/development/python-modules/iso8601/default.nix index 783f6f1eb305..d0a74f400bba 100644 --- a/pkgs/development/python-modules/iso8601/default.nix +++ b/pkgs/development/python-modules/iso8601/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchPypi -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -13,15 +13,18 @@ buildPythonPackage rec { sha256 = "8aafd56fa0290496c5edbb13c311f78fa3a241f0853540da09d9363eae3ebd79"; }; - checkInputs = [ pytest ]; + checkInputs = [ + pytestCheckHook + ]; - checkPhase = '' - py.test iso8601 - ''; + pytestFlagsArray = [ "iso8601" ]; - meta = { - homepage = "https://bitbucket.org/micktwomey/pyiso8601/"; + pythonImportsCheck = [ "iso8601" ]; + + meta = with lib; { description = "Simple module to parse ISO 8601 dates"; - maintainers = with lib.maintainers; [ phreedom ]; + homepage = "https://pyiso8601.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; }; } diff --git a/pkgs/development/python-modules/isort/4.nix b/pkgs/development/python-modules/isort/4.nix index b2ef4e66f361..5da9a5c6b306 100644 --- a/pkgs/development/python-modules/isort/4.nix +++ b/pkgs/development/python-modules/isort/4.nix @@ -38,6 +38,6 @@ in buildPythonPackage rec { description = "A Python utility / library to sort Python imports"; homepage = "https://github.com/timothycrosley/isort"; license = licenses.mit; - maintainers = with maintainers; [ couchemar nand0p ]; + maintainers = with maintainers; [ couchemar ]; }; } diff --git a/pkgs/development/python-modules/isort/default.nix b/pkgs/development/python-modules/isort/default.nix index bc11697339e8..1195f0f6b097 100644 --- a/pkgs/development/python-modules/isort/default.nix +++ b/pkgs/development/python-modules/isort/default.nix @@ -72,6 +72,6 @@ in buildPythonPackage rec { description = "A Python utility / library to sort Python imports"; homepage = "https://github.com/PyCQA/isort"; license = licenses.mit; - maintainers = with maintainers; [ couchemar nand0p ]; + maintainers = with maintainers; [ couchemar ]; }; } diff --git a/pkgs/development/python-modules/itypes/default.nix b/pkgs/development/python-modules/itypes/default.nix index 1b6845472404..36581bf2db50 100644 --- a/pkgs/development/python-modules/itypes/default.nix +++ b/pkgs/development/python-modules/itypes/default.nix @@ -26,6 +26,6 @@ buildPythonPackage rec { description = "Simple immutable types for python"; homepage = "https://github.com/tomchristie/itypes"; license = licenses.bsd3; - maintainers = with maintainers; [ ivegotasthma ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix index 460b0cddf616..d2d4719dab4b 100644 --- a/pkgs/development/python-modules/johnnycanencrypt/default.nix +++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix @@ -39,7 +39,7 @@ buildPythonPackage rec { cargoSha256 = "0ifvpdizcdp2c5x2x2j1bhhy5a75q0pk7a63dmh52mlpmh45fy6r"; - LIBCLANG_PATH = llvmPackages.libclang + "/lib"; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; propagatedBuildInputs = [ requests diff --git a/pkgs/development/python-modules/jq/default.nix b/pkgs/development/python-modules/jq/default.nix index efc1152678f3..f9f71a587ab9 100644 --- a/pkgs/development/python-modules/jq/default.nix +++ b/pkgs/development/python-modules/jq/default.nix @@ -2,14 +2,17 @@ buildPythonPackage rec { pname = "jq"; - version = "1.1.2"; + version = "1.1.3"; src = fetchPypi { inherit pname version; - sha256 = "77e747c6ad10ce65479f5f9064ab036483bf307bf71fdd7d6235ef895fcc506e"; + sha256 = "1ryxcll7601ki9rwlnryhhxpmwwnxs2qxq7kjm2b0xcqgzx1vv7r"; }; - patches = [ ./jq-py-setup.patch ]; + patches = [ + # Removes vendoring + ./jq-py-setup.patch + ]; buildInputs = [ jq ]; diff --git a/pkgs/development/python-modules/jq/jq-py-setup.patch b/pkgs/development/python-modules/jq/jq-py-setup.patch index df5245a0c3b5..cf8713796751 100644 --- a/pkgs/development/python-modules/jq/jq-py-setup.patch +++ b/pkgs/development/python-modules/jq/jq-py-setup.patch @@ -1,17 +1,17 @@ -From 968ddf2bd773e800e46737fced743bd00af9aa0d Mon Sep 17 00:00:00 2001 -From: William Kral <william.kral@gmail.com> -Date: Tue, 8 Sep 2020 22:04:24 -0700 -Subject: [PATCH] Vastly simplify setup.py for distro compatibility +From bef841b73ba7c9a79211146798ac888fce9bb55a Mon Sep 17 00:00:00 2001 +From: "Robert T. McGibbon" <rmcgibbo@gmail.com> +Date: Fri, 7 May 2021 19:14:20 -0400 +Subject: [PATCH 1/1] Vastly simplify setup.py for distro compatibility --- - setup.py | 101 ++----------------------------------------------------- - 1 file changed, 2 insertions(+), 99 deletions(-) + setup.py | 98 +------------------------------------------------------- + 1 file changed, 1 insertion(+), 97 deletions(-) diff --git a/setup.py b/setup.py -index cb63f60..87380ed 100644 +index 663792c..3ebcabe 100644 --- a/setup.py +++ b/setup.py -@@ -1,114 +1,19 @@ +@@ -1,113 +1,19 @@ #!/usr/bin/env python import os @@ -79,8 +79,7 @@ index cb63f60..87380ed 100644 - tarball_path=jq_lib_tarball_path, - lib_dir=jq_lib_dir, - commands=[ -- ["autoreconf", "-i"], -- ["./configure", "CFLAGS=-fPIC", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir], +- ["./configure", "CFLAGS=-fPIC -pthread", "--disable-maintainer-mode", "--with-oniguruma=" + oniguruma_lib_install_dir], - ["make"], - ]) - @@ -93,7 +92,7 @@ index cb63f60..87380ed 100644 - - macosx_deployment_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET") - if macosx_deployment_target: -- os.environ['MACOSX_DEPLOYMENT_TARGET'] = macosx_deployment_target +- os.environ['MACOSX_DEPLOYMENT_TARGET'] = str(macosx_deployment_target) - - def run_command(args): - print("Executing: %s" % ' '.join(args)) @@ -127,21 +126,19 @@ index cb63f60..87380ed 100644 ) setup( -@@ -120,8 +25,7 @@ setup( - url='http://github.com/mwilliamson/jq.py', +@@ -120,7 +26,6 @@ setup( python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', license='BSD 2-Clause', -- ext_modules = [jq_extension], + ext_modules = [jq_extension], - cmdclass={"build_ext": jq_build_ext}, -+ ext_modules=[jq_extension], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', -@@ -137,4 +41,3 @@ setup( - 'Programming Language :: Python :: 3.8', +@@ -137,4 +42,3 @@ setup( + 'Programming Language :: Python :: 3.9', ], ) - -- -2.28.0 +2.29.3 diff --git a/pkgs/development/python-modules/json-logging/default.nix b/pkgs/development/python-modules/json-logging/default.nix new file mode 100644 index 000000000000..1f4425a3e112 --- /dev/null +++ b/pkgs/development/python-modules/json-logging/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, pytestCheckHook +, wheel +, flask +, sanic +, fastapi +, uvicorn +, requests +}: + +buildPythonPackage rec { + pname = "json-logging"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "bobbui"; + repo = "json-logging-python"; + rev = version; + hash = "sha256-0eIhOi30r3ApyVkiBdTQps5tNj7rI+q8TjNWxTnhtMQ="; + }; + patches = [ + # Fix tests picking up test modules instead of real packages. + (fetchpatch { + url = "https://github.com/bobbui/json-logging-python/commit/6fdb64deb42fe48b0b12bda0442fd5ac5f03107f.patch"; + sha256 = "sha256-BLfARsw2FdvY22NCaFfdFgL9wTmEZyVIi3CQpB5qU0Y="; + }) + ]; + + # - Quart is not packaged for Nixpkgs. + checkInputs = [ wheel flask /*quart*/ sanic fastapi uvicorn requests pytestCheckHook ]; + disabledTests = [ "quart" ]; + # Tests spawn servers and try to connect to them. + __darwinAllowLocalNetworking = true; + + meta = with lib; { + description = "Python library to emit logs in JSON format"; + longDescription = '' + Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver. + ''; + homepage = "https://github.com/bobbui/json-logging-python"; + license = licenses.asl20; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/jsonref/default.nix b/pkgs/development/python-modules/jsonref/default.nix index 3154f63f3181..2ab8ec45a701 100644 --- a/pkgs/development/python-modules/jsonref/default.nix +++ b/pkgs/development/python-modules/jsonref/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { description = "An implementation of JSON Reference for Python"; homepage = "https://github.com/gazpachoking/jsonref"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/jupyter_server/default.nix b/pkgs/development/python-modules/jupyter_server/default.nix index 50f193c2058c..e444b2ea3c0d 100644 --- a/pkgs/development/python-modules/jupyter_server/default.nix +++ b/pkgs/development/python-modules/jupyter_server/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , pythonOlder @@ -71,6 +72,9 @@ buildPythonPackage rec { "test_list_formats" "test_base_url" "test_culling" + ] ++ lib.optionals stdenv.isDarwin [ + # attempts to use trashcan, build env doesn't allow this + "test_delete" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/jupytext/default.nix b/pkgs/development/python-modules/jupytext/default.nix index eedfcfbcb6e9..0b893f7776a2 100644 --- a/pkgs/development/python-modules/jupytext/default.nix +++ b/pkgs/development/python-modules/jupytext/default.nix @@ -1,39 +1,54 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27 +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, GitPython +, jupyter-packaging +, jupyter_client +, jupyterlab , markdown-it-py +, mdit-py-plugins , nbformat -, pytest +, notebook +, pytestCheckHook , pyyaml , toml }: buildPythonPackage rec { pname = "jupytext"; - version = "1.11.0"; + version = "1.11.2"; + format = "pyproject"; - disabled = isPy27; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "9062d001baaa32430fbb94a2c9394ac906db0a58da94e7aa4e414b73fd7d51bc"; + src = fetchFromGitHub { + owner = "mwouts"; + repo = pname; + rev = "v${version}"; + hash = "sha256-S2SKAC2oT4VIVMMDbu/Puo87noAgnQs1hh88JphutA8="; }; + buildInputs = [ jupyter-packaging jupyterlab ]; propagatedBuildInputs = [ markdown-it-py + mdit-py-plugins nbformat pyyaml toml ]; checkInputs = [ - pytest + pytestCheckHook + GitPython + jupyter_client + notebook ]; - - # requires test notebooks which are not shipped with the pypi release - # also, pypi no longer includes tests - doCheck = false; - checkPhase = '' - pytest - ''; + # Tests that use a Jupyter notebook require $HOME to be writable. + HOME = "$TMPDIR"; + # Pre-commit tests expect the source directory to be a Git repository. + pytestFlagsArray = [ "--ignore-glob='tests/test_pre_commit_*.py'" ]; + pythonImportsCheck = [ "jupytext" "jupytext.cli" ]; meta = with lib; { description = "Jupyter notebooks as Markdown documents, Julia, Python or R scripts"; diff --git a/pkgs/development/python-modules/jxmlease/default.nix b/pkgs/development/python-modules/jxmlease/default.nix new file mode 100644 index 000000000000..727548f21d50 --- /dev/null +++ b/pkgs/development/python-modules/jxmlease/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, lxml +, python +}: + +buildPythonPackage rec { + pname = "jxmlease"; + version = "1.0.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "17l3w3ak07p72s8kv8hg0ilxs0kkxjn7bfwnl3g2cw58v1siab31"; + }; + + propagatedBuildInputs = [ + lxml + ]; + + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover -v + runHook postCheck + ''; + + meta = with lib; { + description = "Converts between XML and intelligent Python data structures"; + homepage = "https://github.com/Juniper/jxmlease"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/karton-asciimagic/default.nix b/pkgs/development/python-modules/karton-asciimagic/default.nix index f62e602896b3..6edafea1d560 100644 --- a/pkgs/development/python-modules/karton-asciimagic/default.nix +++ b/pkgs/development/python-modules/karton-asciimagic/default.nix @@ -7,24 +7,19 @@ buildPythonPackage rec { pname = "karton-asciimagic"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "0yvd0plpwy5qkd2jljpd6wm6dlj2g8csvj1q2md23vsgx7h7v2vm"; + sha256 = "0vj4b8man81g99g4c53zyvp1gc47c2imj5ha9r4z4bf8gs3aqsv6"; }; propagatedBuildInputs = [ karton-core ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "karton.core==4.0.5" "karton-core" - ''; - checkPhase = '' runHook preCheck ${python.interpreter} -m unittest discover diff --git a/pkgs/development/python-modules/karton-autoit-ripper/default.nix b/pkgs/development/python-modules/karton-autoit-ripper/default.nix new file mode 100644 index 000000000000..e675c055d786 --- /dev/null +++ b/pkgs/development/python-modules/karton-autoit-ripper/default.nix @@ -0,0 +1,45 @@ +{ lib +, autoit-ripper +, buildPythonPackage +, fetchFromGitHub +, karton-core +, malduck +, regex +}: + +buildPythonPackage rec { + pname = "karton-autoit-ripper"; + version = "1.0.1"; + + src = fetchFromGitHub { + owner = "CERT-Polska"; + repo = pname; + rev = "v${version}"; + sha256 = "1bsqpf9w6d9fjysmnafaglg2w41gsafs2xz4dzcgc7n92shpcs8w"; + }; + + propagatedBuildInputs = [ + autoit-ripper + karton-core + malduck + regex + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "autoit-ripper==1.0.0" "autoit-ripper" \ + --replace "malduck==3.1.0" "malduck>=3.1.0" \ + --replace "regex==2020.2.20" "regex>=2020.2.20" + ''; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "karton.autoit_ripper" ]; + + meta = with lib; { + description = "AutoIt script ripper for Karton framework"; + homepage = "https://github.com/CERT-Polska/karton-autoit-ripper"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/karton-classifier/default.nix b/pkgs/development/python-modules/karton-classifier/default.nix index a623486f03cf..ea9710ecd311 100644 --- a/pkgs/development/python-modules/karton-classifier/default.nix +++ b/pkgs/development/python-modules/karton-classifier/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "karton-classifier"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "05pxv0smrzgmljykc6yx0rx8b85ck7fa09xjkjw0dd7lb6bb19a6"; + sha256 = "0s09mzsw546klnvm59wzj9vdwd2hyzgxvapi20k86q3prs9ncds6"; }; propagatedBuildInputs = [ @@ -27,7 +27,6 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ --replace "chardet==3.0.4" "chardet" \ - --replace "karton-core==4.0.4" "karton-core" \ --replace "python-magic==0.4.18" "python-magic" ''; diff --git a/pkgs/development/python-modules/karton-config-extractor/default.nix b/pkgs/development/python-modules/karton-config-extractor/default.nix index bb2b9d4903b9..71170ac5342e 100644 --- a/pkgs/development/python-modules/karton-config-extractor/default.nix +++ b/pkgs/development/python-modules/karton-config-extractor/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "karton-config-extractor"; - version = "1.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "1v0zqa81yjz6hm17x9hp0iwkllymqzn84dd6r2yrhillbwnjg9bb"; + sha256 = "1kq0gbfz9y0n0bcblyrmwv4la3lcf86lf80794sdvyvn49g0brny"; }; propagatedBuildInputs = [ @@ -23,7 +23,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "karton.core==4.0.5" "karton-core" + --replace "malduck==4.1.0" "malduck" ''; # Project has no tests diff --git a/pkgs/development/python-modules/karton-dashboard/default.nix b/pkgs/development/python-modules/karton-dashboard/default.nix index c82cb8957826..3ec455a8aceb 100644 --- a/pkgs/development/python-modules/karton-dashboard/default.nix +++ b/pkgs/development/python-modules/karton-dashboard/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "karton-dashboard"; - version = "1.1.0"; + version = "1.2.0"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "101qmx6nmiim0vrz2ldk973ns498hnxla1xy7nys9kh9wijg4msk"; + sha256 = "0qygv9lkd1jad5b4l0zz6hsi7m8q0fmpwaa6hpp7p9x6ql7gnyl8"; }; propagatedBuildInputs = [ @@ -27,8 +27,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "Flask==1.1.1" "Flask" \ - --replace "karton-core==4.1.0" "karton-core" + --replace "Flask==1.1.1" "Flask" ''; # Project has no tests. pythonImportsCheck requires MinIO configuration diff --git a/pkgs/development/python-modules/karton-mwdb-reporter/default.nix b/pkgs/development/python-modules/karton-mwdb-reporter/default.nix index 68b28bffe6fa..65bb683be2b8 100644 --- a/pkgs/development/python-modules/karton-mwdb-reporter/default.nix +++ b/pkgs/development/python-modules/karton-mwdb-reporter/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "karton-mwdb-reporter"; - version = "1.0.0"; + version = "1.0.1"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "0ks8jrc4v87q6zhwqg40w6xv2wfkzslmnfmsmmkfjj8mak8nk70f"; + sha256 = "0jrn5c83nhcjny4bc879wrsgcr7mbazm51jzdkxmxyqf543cc841"; }; propagatedBuildInputs = [ @@ -23,8 +23,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "karton-core==4.0.4" "karton-core" \ - --replace "mwdblib==3.3.1" "mwdblib" + --replace "mwdblib==3.4.0" "mwdblib" ''; # Project has no tests diff --git a/pkgs/development/python-modules/karton-yaramatcher/default.nix b/pkgs/development/python-modules/karton-yaramatcher/default.nix index afe6f2aaa443..6183e9500059 100644 --- a/pkgs/development/python-modules/karton-yaramatcher/default.nix +++ b/pkgs/development/python-modules/karton-yaramatcher/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "karton-yaramatcher"; - version = "1.0.0"; + version = "1.1.1"; src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; rev = "v${version}"; - sha256 = "093h5hbx2ss4ly523gvf10a5ky3vvin6wipigvhx13y1rdxl6c9n"; + sha256 = "0mv8v1gk6p21pw9kx6cxr76l6c5fxd3p6dk85cwfzz100h8mdvar"; }; propagatedBuildInputs = [ @@ -22,12 +22,6 @@ buildPythonPackage rec { yara-python ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace "karton-core==4.0.5" "karton-core" \ - --replace "yara-python==4.0.2" "yara-python" \ - ''; - checkPhase = '' runHook preCheck ${python.interpreter} -m unittest discover diff --git a/pkgs/development/python-modules/keyrings-cryptfile/default.nix b/pkgs/development/python-modules/keyrings-cryptfile/default.nix new file mode 100644 index 000000000000..7f2cacea6294 --- /dev/null +++ b/pkgs/development/python-modules/keyrings-cryptfile/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, argon2_cffi +, keyring +, pycryptodome +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "keyrings.cryptfile"; + # NOTE: newer releases are bugged/incompatible + # https://github.com/frispete/keyrings.cryptfile/issues/15 + version = "1.3.4"; + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-jW+cKMm+xef8C+fl0CGe+6SEkYBHDjFX2/kLCZ62j6c="; + }; + + patches = [ + # upstream setup.cfg has an option that is not supported + ./fix-testsuite.patch + # change of API in keyrings.testing + (fetchpatch { + url = "https://github.com/frispete/keyrings.cryptfile/commit/6fb9e45f559b8b69f7a0a519c0bece6324471d79.patch"; + sha256 = "sha256-1878pMO9Ed1zs1pl+7gMjwx77HbDHdE1CryN8TPfPdU="; + }) + ]; + + propagatedBuildInputs = [ + argon2_cffi + keyring + pycryptodome + ]; + + pythonImportsCheck = [ + "keyrings.cryptfile" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + "test_set_properties" + "UncryptedFileKeyringTestCase" + ]; + + meta = with lib; { + description = "Encrypted file keyring backend"; + homepage = "https://github.com/frispete/keyrings.cryptfile"; + license = licenses.mit; + maintainers = teams.chia.members; + }; +} diff --git a/pkgs/development/python-modules/keyrings-cryptfile/fix-testsuite.patch b/pkgs/development/python-modules/keyrings-cryptfile/fix-testsuite.patch new file mode 100644 index 000000000000..8e32a64e5292 --- /dev/null +++ b/pkgs/development/python-modules/keyrings-cryptfile/fix-testsuite.patch @@ -0,0 +1,14 @@ +diff --git a/setup.cfg b/setup.cfg +index ec7eb30..7ffd831 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -5,9 +5,6 @@ dists = clean --all sdist bdist_wheel + [wheel] + universal = 1 + +-[tool:pytest] +-addopts = -s --cov=keyrings/cryptfile +- + [egg_info] + tag_build = + tag_date = 0 diff --git a/pkgs/development/python-modules/kiwisolver/1_1.nix b/pkgs/development/python-modules/kiwisolver/1_1.nix index e5f2dd158c66..5e5c9ae05ab6 100644 --- a/pkgs/development/python-modules/kiwisolver/1_1.nix +++ b/pkgs/development/python-modules/kiwisolver/1_1.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { sha256 = "53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75"; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; # Does not include tests doCheck = false; diff --git a/pkgs/development/python-modules/kiwisolver/default.nix b/pkgs/development/python-modules/kiwisolver/default.nix index 8146ac3f5b61..192d4d353261 100644 --- a/pkgs/development/python-modules/kiwisolver/default.nix +++ b/pkgs/development/python-modules/kiwisolver/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248"; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; nativeBuildInputs = [ cppy diff --git a/pkgs/development/python-modules/kmapper/default.nix b/pkgs/development/python-modules/kmapper/default.nix index 6c173661084c..87f22172c495 100644 --- a/pkgs/development/python-modules/kmapper/default.nix +++ b/pkgs/development/python-modules/kmapper/default.nix @@ -1,11 +1,11 @@ { lib , buildPythonPackage -, fetchPypi -, scikitlearn +, fetchFromGitHub +, scikit-learn , numpy , scipy , jinja2 -, pytest +, pytestCheckHook , networkx , matplotlib , python-igraph @@ -17,20 +17,22 @@ buildPythonPackage rec { pname = "kmapper"; version = "2.0.0"; - src = fetchPypi { - inherit pname version; - sha256 = "3708d889f96f6bbe89c52000dd9378ca4c35638180ff894b64ebbdfcfe62aab2"; + src = fetchFromGitHub { + owner = "scikit-tda"; + repo = "kepler-mapper"; + rev = "v${version}"; + sha256 = "0djm27si2bn18khrbb7rwhflc5ma6g9smhikhk5i1apwn5avm6l4"; }; propagatedBuildInputs = [ - scikitlearn + scikit-learn numpy scipy jinja2 ]; checkInputs = [ - pytest + pytestCheckHook networkx matplotlib python-igraph @@ -38,10 +40,6 @@ buildPythonPackage rec { ipywidgets ]; - checkPhase = '' - pytest test --ignore test/test_drawing.py - ''; - meta = with lib; { description = "Python implementation of Mapper algorithm for Topological Data Analysis"; homepage = "https://kepler-mapper.scikit-tda.org/"; diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index ce7cff4d79b8..957b8ad5fd1f 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -1,38 +1,67 @@ { lib +, backoff +, backports-datetime-fromisoformat , buildPythonPackage -, fetchPypi -, requests +, dataclasses +, fetchFromGitHub +, google-api-core , jinja2 +, ndjson , pillow +, pydantic +, pytest-cases +, pytestCheckHook +, pythonOlder , rasterio +, requests , shapely -, ndjson -, backoff -, google-api-core -, backports-datetime-fromisoformat }: buildPythonPackage rec { pname = "labelbox"; - version = "2.5.1"; + version = "2.5.4"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "7f2cbc5d4869d8acde865ad519fc1cc85338247cd7cf534334f988a040679219"; + src = fetchFromGitHub { + owner = "Labelbox"; + repo = "labelbox-python"; + rev = "v${version}"; + sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68"; }; propagatedBuildInputs = [ - jinja2 requests pillow rasterio shapely ndjson backoff - google-api-core backports-datetime-fromisoformat + backoff + backports-datetime-fromisoformat + dataclasses + google-api-core + jinja2 + ndjson + pillow + pydantic + rasterio + requests + shapely + ]; + + postPatch = '' + substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8" + ''; + + checkInputs = [ + pytest-cases + pytestCheckHook + ]; + + disabledTestPaths = [ + # Requires network access + "tests/integration" ]; - # Test cases are not running on pypi or GitHub - doCheck = false; pythonImportsCheck = [ "labelbox" ]; meta = with lib; { - homepage = "https://github.com/Labelbox/Labelbox"; description = "Platform API for LabelBox"; + homepage = "https://github.com/Labelbox/labelbox-python"; license = licenses.asl20; maintainers = with maintainers; [ rakesh4g ]; }; diff --git a/pkgs/development/python-modules/lark-parser/default.nix b/pkgs/development/python-modules/lark-parser/default.nix index d8996a153e64..9f787563e5a4 100644 --- a/pkgs/development/python-modules/lark-parser/default.nix +++ b/pkgs/development/python-modules/lark-parser/default.nix @@ -1,35 +1,38 @@ { lib , buildPythonPackage , fetchFromGitHub +, python , regex - # Test inputs -, pytestCheckHook }: buildPythonPackage rec { pname = "lark-parser"; - version = "0.11.2"; + version = "0.11.3"; src = fetchFromGitHub { owner = "lark-parser"; repo = "lark"; rev = version; - sha256 = "1v1piaxpz4780km2z5i6sr9ygi9wpn09yyh999b3f4y0dcz20pbd"; + sha256 = "1ggvlzpdzlrxl46fgi8cfq2rzlwn21shpdkm4pknnhfjlsinv913"; }; + # Optional import, but fixes some re known bugs & allows advanced regex features propagatedBuildInputs = [ regex ]; - checkInputs = [ pytestCheckHook ]; - disabledTestPaths = [ - "tests/test_nearley" # requires Js2Py package (not in nixpkgs) - ]; - disabledTests = [ - "test_override_rule" # has issue with file access paths - ]; + checkPhase = '' + runHook preCheck + + # Official way to run the tests. Runs unittest internally. + # pytest produces issues with some test resource paths (relies on __main__) + ${python.interpreter} -m tests + + runHook postCheck + ''; meta = with lib; { description = "A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface"; - homepage = "https://github.com/lark-parser/lark"; + homepage = "https://lark-parser.readthedocs.io/"; + changelog = "https://github.com/lark-parser/lark/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fridh drewrisinger ]; }; diff --git a/pkgs/development/python-modules/ldaptor/19.nix b/pkgs/development/python-modules/ldaptor/19.nix new file mode 100644 index 000000000000..cca696f1dff0 --- /dev/null +++ b/pkgs/development/python-modules/ldaptor/19.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, twisted +, passlib +, pyopenssl +, pyparsing +, service-identity +, zope_interface +, isPy3k +, python +}: + +buildPythonPackage rec { + pname = "ldaptor"; + version = "19.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "64c7b870c77e34e4f5f9cfdf330b9702e89b4dd0f64275704f86c1468312c755"; + }; + + propagatedBuildInputs = [ + twisted passlib pyopenssl pyparsing service-identity zope_interface + ]; + + disabled = isPy3k; + + doCheck = false; + + meta = { + description = "A Pure-Python Twisted library for LDAP"; + homepage = "https://github.com/twisted/ldaptor"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/libarcus/default.nix b/pkgs/development/python-modules/libarcus/default.nix index edea85876a84..a48d70c544c3 100644 --- a/pkgs/development/python-modules/libarcus/default.nix +++ b/pkgs/development/python-modules/libarcus/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, python, fetchFromGitHub -, cmake, sip, protobuf, pythonOlder }: +, cmake, sip_4, protobuf, pythonOlder }: buildPythonPackage rec { pname = "libarcus"; @@ -15,7 +15,7 @@ buildPythonPackage rec { disabled = pythonOlder "3.4.0"; - propagatedBuildInputs = [ sip ]; + propagatedBuildInputs = [ sip_4 ]; nativeBuildInputs = [ cmake ]; buildInputs = [ protobuf ]; diff --git a/pkgs/development/python-modules/liblarch/default.nix b/pkgs/development/python-modules/liblarch/default.nix index 5ff8d25d54b5..957d37f2176a 100644 --- a/pkgs/development/python-modules/liblarch/default.nix +++ b/pkgs/development/python-modules/liblarch/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , python , pygobject3 -, xvfb_run +, xvfb-run , gobject-introspection , gtk3 , pythonOlder @@ -32,7 +32,7 @@ buildPythonPackage rec { checkPhase = '' runHook preCheck - ${xvfb_run}/bin/xvfb-run -s '-screen 0 800x600x24' \ + ${xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' \ ${python.interpreter} nix_run_setup test runHook postCheck ''; diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix index ce8f2a73fa7f..45f6bffd661c 100644 --- a/pkgs/development/python-modules/librosa/default.nix +++ b/pkgs/development/python-modules/librosa/default.nix @@ -4,7 +4,7 @@ , joblib , matplotlib , six -, scikitlearn +, scikit-learn , decorator , audioread , resampy @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "af0b9f2ed4bbf6aecbc448a4cd27c16453c397cb6bef0f0cfba0e63afea2b839"; }; - propagatedBuildInputs = [ joblib matplotlib six scikitlearn decorator audioread resampy soundfile pooch ]; + propagatedBuildInputs = [ joblib matplotlib six scikit-learn decorator audioread resampy soundfile pooch ]; # No tests # 1. Internet connection is required diff --git a/pkgs/development/python-modules/libsavitar/default.nix b/pkgs/development/python-modules/libsavitar/default.nix index f6aa1b378f58..7ecd09160fff 100644 --- a/pkgs/development/python-modules/libsavitar/default.nix +++ b/pkgs/development/python-modules/libsavitar/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, python, pythonOlder, fetchFromGitHub, cmake, sip }: +{ lib, buildPythonPackage, python, pythonOlder, fetchFromGitHub, cmake, sip_4 }: buildPythonPackage rec { pname = "libsavitar"; @@ -18,7 +18,7 @@ buildPythonPackage rec { nativeBuildInputs = [ cmake ]; - propagatedBuildInputs = [ sip ]; + propagatedBuildInputs = [ sip_4 ]; disabled = pythonOlder "3.4.0"; diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 1018ceaec4b2..a887c3ec8af2 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -4,7 +4,7 @@ , cmake , numpy , scipy -, scikitlearn +, scikit-learn , llvmPackages ? null }: @@ -39,7 +39,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn ]; postConfigure = '' diff --git a/pkgs/development/python-modules/linkify-it-py/default.nix b/pkgs/development/python-modules/linkify-it-py/default.nix new file mode 100644 index 000000000000..b9511bd5f35b --- /dev/null +++ b/pkgs/development/python-modules/linkify-it-py/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, uc-micro-py +}: + +buildPythonPackage rec { + pname = "linkify-it-py"; + version = "1.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "tsutsu3"; + repo = pname; + rev = "v${version}"; + hash = "sha256-gd51no6VqvIiW9fbCdp30zHG/us6by7FLHV2ul/XJAM="; + }; + + propagatedBuildInputs = [ uc-micro-py ]; + + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "linkify_it" ]; + + meta = with lib; { + description = "Links recognition library with full unicode support"; + homepage = "https://github.com/tsutsu3/linkify-it-py"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/liquidctl/default.nix b/pkgs/development/python-modules/liquidctl/default.nix index ecf5990e74bc..4b2decb9550c 100644 --- a/pkgs/development/python-modules/liquidctl/default.nix +++ b/pkgs/development/python-modules/liquidctl/default.nix @@ -2,40 +2,61 @@ , buildPythonPackage , fetchFromGitHub , pythonOlder +, installShellFiles , docopt , hidapi , pyusb , smbus-cffi +, i2c-tools +, pytestCheckHook }: buildPythonPackage rec { pname = "liquidctl"; - version = "1.5.1"; + version = "1.6.1"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "1l6cvm8vs2gkmg4qwg5m5vqjql1gah2vd9vs7pcj2v5hf0cm5v9x"; + sha256 = "sha256-FYpr1mYzPc0rOE75fUNjxe/57EWl+zcbIbkqFseDhzI="; }; + nativeBuildInputs = [ installShellFiles ]; + propagatedBuildInputs = [ docopt hidapi pyusb smbus-cffi + i2c-tools ]; - # does not contain tests - doCheck = false; + outputs = [ "out" "man" ]; + + postInstall = '' + installManPage liquidctl.8 + installShellCompletion extra/completions/liquidctl.bash + + mkdir -p $out/lib/udev/rules.d + cp extra/linux/71-liquidctl.rules $out/lib/udev/rules.d/. + ''; + + checkInputs = [ pytestCheckHook ]; + + postBuild = '' + # needed for pythonImportsCheck + export XDG_RUNTIME_DIR=$TMPDIR + ''; + pythonImportsCheck = [ "liquidctl" ]; meta = with lib; { description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices"; homepage = "https://github.com/liquidctl/liquidctl"; changelog = "https://github.com/liquidctl/liquidctl/blob/master/CHANGELOG.md"; - license = licenses.gpl3; - maintainers = with maintainers; [ arturcygan ]; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ arturcygan evils ]; }; } diff --git a/pkgs/development/python-modules/llvmlite/default.nix b/pkgs/development/python-modules/llvmlite/default.nix index b5e6847a9f0c..c7d2221a22e2 100644 --- a/pkgs/development/python-modules/llvmlite/default.nix +++ b/pkgs/development/python-modules/llvmlite/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { ''; # Set directory containing llvm-config binary preConfigure = '' - export LLVM_CONFIG=${llvm}/bin/llvm-config + export LLVM_CONFIG=${llvm.dev}/bin/llvm-config ''; checkPhase = '' ${python.executable} runtests.py diff --git a/pkgs/development/python-modules/lmdb/default.nix b/pkgs/development/python-modules/lmdb/default.nix index fc7748765f31..3e78626238a7 100644 --- a/pkgs/development/python-modules/lmdb/default.nix +++ b/pkgs/development/python-modules/lmdb/default.nix @@ -4,22 +4,19 @@ , pytestCheckHook , cffi , lmdb -, ludios_wpull }: buildPythonPackage rec { pname = "lmdb"; - version = "1.1.1"; + version = "1.2.1"; src = fetchPypi { inherit pname version; - sha256 = "165cd1669b29b16c2d5cc8902b90fede15a7ee475c54d466f1444877a3f511ac"; + sha256 = "5f76a90ebd08922acca11948779b5055f7a262687178e9e94f4e804b9f8465bc"; }; buildInputs = [ lmdb ]; - propogatedBuildInputs = [ ludios_wpull ]; - checkInputs = [ cffi pytestCheckHook ]; LMDB_FORCE_SYSTEM=1; diff --git a/pkgs/development/python-modules/localzone/default.nix b/pkgs/development/python-modules/localzone/default.nix index 0960a824817a..0fcf15fe9474 100644 --- a/pkgs/development/python-modules/localzone/default.nix +++ b/pkgs/development/python-modules/localzone/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "localzone"; - version = "0.9.7"; + version = "0.9.8"; src = fetchFromGitHub { owner = "ags-slc"; repo = pname; rev = "v${version}"; - sha256 = "1vzn1vm3zf86l7qncbmghjrwyvla9dc2v8abn8jajbl47gm7r5f7"; + sha256 = "1cbiv21yryjqy46av9hbjccks95sxznrx8nypd3yzihf1vkjiq5a"; }; propagatedBuildInputs = [ dnspython sphinx ]; diff --git a/pkgs/development/python-modules/locationsharinglib/default.nix b/pkgs/development/python-modules/locationsharinglib/default.nix new file mode 100644 index 000000000000..4baf8600ac76 --- /dev/null +++ b/pkgs/development/python-modules/locationsharinglib/default.nix @@ -0,0 +1,59 @@ +{ lib +, betamax +, buildPythonPackage +, cachetools +, coloredlogs +, emoji +, fetchPypi +, nose +, python +, pythonOlder +, pytz +, requests +}: + +buildPythonPackage rec { + pname = "locationsharinglib"; + version = "4.1.6"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "092j8z01nwjqh5zr7aj8mxl1zjd3j2irhrs39dhn47bd6db2a6ij"; + }; + + propagatedBuildInputs = [ + coloredlogs + requests + cachetools + pytz + ]; + + checkInputs = [ + betamax + emoji + nose + ]; + + postPatch = '' + # Tests requirements want to pull in multiple modules which we don't need + substituteInPlace setup.py \ + --replace "tests_require=test_requirements" "tests_require=[]" + ''; + + checkPhase = '' + runHook preCheck + # Only coverage no real unit tests + ${python.interpreter} setup.py nosetests + runHook postCheck + ''; + + pythonImportsCheck = [ "locationsharinglib" ]; + + meta = with lib; { + description = "Python package to retrieve coordinates from a Google account"; + homepage = "https://locationsharinglib.readthedocs.io/"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/mail-parser/default.nix b/pkgs/development/python-modules/mail-parser/default.nix index 219a9066dc74..a2e7898f049d 100644 --- a/pkgs/development/python-modules/mail-parser/default.nix +++ b/pkgs/development/python-modules/mail-parser/default.nix @@ -14,16 +14,6 @@ buildPythonPackage rec { LC_ALL = "en_US.utf-8"; - # remove version bounds - prePatch = '' - sed -i -e 's/==.*//g' requirements.txt - '' - # ipaddress is part of the standard library of Python 3.3+ - + lib.optionalString (!pythonOlder "3.3") '' - substituteInPlace requirements.txt \ - --replace "ipaddress" "" - ''; - nativeBuildInputs = [ glibcLocales ]; propagatedBuildInputs = [ simplejson six ] ++ lib.optional (pythonOlder "3.3") ipaddress; diff --git a/pkgs/development/python-modules/markdown-it-py/default.nix b/pkgs/development/python-modules/markdown-it-py/default.nix index c7a8a3e17f3e..322c4ac533d2 100644 --- a/pkgs/development/python-modules/markdown-it-py/default.nix +++ b/pkgs/development/python-modules/markdown-it-py/default.nix @@ -1,41 +1,36 @@ { lib, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder , attrs -, coverage +, linkify-it-py , psutil , pytest-benchmark +, pytest-regressions +, typing-extensions }: buildPythonPackage rec { pname = "markdown-it-py"; - version = "0.6.2"; + version = "1.0.0"; + format = "pyproject"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "executablebooks"; - repo = "markdown-it-py"; + repo = pname; rev = "v${version}"; - sha256 = "1g9p8pdnvjya436lii63r5gjajhmbhmyh9ngbjqf9dqny05nagz1"; + hash = "sha256-GA7P2I8N+i2ISsVgx58zyhrfKMcZ7pL4X9T/trbsr1Y="; }; - propagatedBuildInputs = [ attrs ]; + propagatedBuildInputs = [ attrs linkify-it-py ] + ++ lib.optional (pythonOlder "3.8") typing-extensions; checkInputs = [ - coverage - pytest-benchmark psutil + pytest-benchmark + pytest-regressions pytestCheckHook ]; - - disabledTests = [ - # Requires the unpackaged pytest-regressions fixture plugin - "test_amsmath" - "test_container" - "test_deflist" - "test_dollarmath" - "test_spec" - "test_texmath" - ]; + pytestImportsCheck = [ "markdown_it" ]; meta = with lib; { description = "Markdown parser done right"; diff --git a/pkgs/development/python-modules/matplotlib/2.nix b/pkgs/development/python-modules/matplotlib/2.nix index 2c929d9a694e..a6ee1a3bade7 100644 --- a/pkgs/development/python-modules/matplotlib/2.nix +++ b/pkgs/development/python-modules/matplotlib/2.nix @@ -1,24 +1,16 @@ -{ lib, stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache +{ lib, stdenv, fetchPypi, writeText, python, buildPythonPackage, pycairo, backports_functools_lru_cache , which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver , freetype, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection, functools32, subprocess32 , fetchpatch -, enableGhostscript ? false, ghostscript ? null, gtk3 +, enableGhostscript ? false, ghostscript, gtk3 , enableGtk3 ? false, cairo # darwin has its own "MacOSX" backend -, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null +, enableTk ? !stdenv.isDarwin, tcl, tk, tkinter, libX11 , enableQt ? false, pyqt4 , Cocoa , pythonOlder }: -assert enableGhostscript -> ghostscript != null; -assert enableTk -> (tcl != null) - && (tk != null) - && (tkinter != null) - && (libX11 != null) - ; -assert enableQt -> pyqt4 != null; - buildPythonPackage rec { version = "2.2.3"; pname = "matplotlib"; @@ -54,7 +46,10 @@ buildPythonPackage rec { ++ lib.optionals enableQt [ pyqt4 ] ++ lib.optionals python.isPy2 [ functools32 subprocess32 ]; - setup_cfg = ./setup.cfg; + passthru.config = { + directories = { basedirlist = "."; }; + }; + setup_cfg = writeText "setup.cfg" (lib.generators.toINI {} passthru.config); preBuild = '' cp "$setup_cfg" ./setup.cfg ''; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 4be4189f8c7a..7364920cba22 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -1,33 +1,25 @@ -{ lib, stdenv, fetchPypi, python, buildPythonPackage, isPy3k, pycairo, backports_functools_lru_cache +{ lib, stdenv, fetchPypi, writeText, python, buildPythonPackage, isPy3k, pycairo, backports_functools_lru_cache , which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver -, freetype, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection +, freetype, qhull, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection , certifi, pillow -, enableGhostscript ? true, ghostscript ? null, gtk3 +, enableGhostscript ? true, ghostscript, gtk3 , enableGtk3 ? false, cairo # darwin has its own "MacOSX" backend -, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null -, enableQt ? false, pyqt5 ? null +, enableTk ? !stdenv.isDarwin, tcl, tk, tkinter, libX11 +, enableQt ? false, pyqt5 , Cocoa , pythonOlder }: -assert enableGhostscript -> ghostscript != null; -assert enableTk -> (tcl != null) - && (tk != null) - && (tkinter != null) - && (libX11 != null) - ; -assert enableQt -> pyqt5 != null; - buildPythonPackage rec { - version = "3.3.4"; + version = "3.4.1"; pname = "matplotlib"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "3e477db76c22929e4c6876c44f88d790aacdf3c3f8f3a90cb1975c0bf37825b0"; + sha256 = "84d4c4f650f356678a5d658a43ca21a41fca13f9b8b00169c0b76e6a6a948908"; }; XDG_RUNTIME_DIR = "/tmp"; @@ -39,13 +31,23 @@ buildPythonPackage rec { ++ lib.optional stdenv.isDarwin [ Cocoa ]; propagatedBuildInputs = - [ cycler dateutil numpy pyparsing tornado freetype kiwisolver - certifi libpng mock pytz pillow ] + [ cycler dateutil numpy pyparsing tornado freetype qhull + kiwisolver certifi libpng mock pytz pillow ] ++ lib.optionals enableGtk3 [ cairo pycairo gtk3 gobject-introspection pygobject3 ] ++ lib.optionals enableTk [ tcl tk tkinter libX11 ] ++ lib.optionals enableQt [ pyqt5 ]; - setup_cfg = if stdenv.isDarwin then ./setup-darwin.cfg else ./setup.cfg; + passthru.config = { + directories = { basedirlist = "."; }; + libs = { + system_freetype = true; + system_qhull = true; + } // lib.optionalAttrs stdenv.isDarwin { + # LTO not working in darwin stdenv, see #19312 + enable_lto = false; + }; + }; + setup_cfg = writeText "setup.cfg" (lib.generators.toINI {} passthru.config); preBuild = '' cp "$setup_cfg" ./setup.cfg ''; diff --git a/pkgs/development/python-modules/matplotlib/setup-darwin.cfg b/pkgs/development/python-modules/matplotlib/setup-darwin.cfg deleted file mode 100644 index f6463d9c574a..000000000000 --- a/pkgs/development/python-modules/matplotlib/setup-darwin.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[directories] -basedirlist = . - -[libs] -system_freetype = true -# LTO not working in darwin stdenv, see #19312 -enable_lto = false diff --git a/pkgs/development/python-modules/matplotlib/setup.cfg b/pkgs/development/python-modules/matplotlib/setup.cfg deleted file mode 100644 index 6a7738627651..000000000000 --- a/pkgs/development/python-modules/matplotlib/setup.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[directories] -basedirlist = . - -[libs] -system_freetype = true diff --git a/pkgs/development/python-modules/matrix-nio/default.nix b/pkgs/development/python-modules/matrix-nio/default.nix index 69774b58eb69..3e613fd89a50 100644 --- a/pkgs/development/python-modules/matrix-nio/default.nix +++ b/pkgs/development/python-modules/matrix-nio/default.nix @@ -2,9 +2,11 @@ , buildPythonPackage , fetchFromGitHub , git +, poetry-core , attrs , future , aiohttp +, aiohttp-socks , aiofiles , h11 , h2 @@ -16,27 +18,37 @@ , peewee , cachetools , atomicwrites +, pytestCheckHook +, faker +, aioresponses +, hypothesis +, pytest-aiohttp +, pytest-benchmark }: buildPythonPackage rec { pname = "matrix-nio"; - version = "0.15.2"; + version = "0.18.1"; + format = "pyproject"; src = fetchFromGitHub { owner = "poljar"; repo = "matrix-nio"; rev = version; - sha256 = "190xw3cvk4amr9pl8ip2i7k3xdjd0231kn2zl6chny5axx22p1dv"; + sha256 = "QHNirglqSxGMmbST96LUp9MHoGj0yAwLoTRlsbMqwaM="; }; nativeBuildInputs = [ git + poetry-core + pytestCheckHook ]; propagatedBuildInputs = [ attrs future aiohttp + aiohttp-socks aiofiles h11 h2 @@ -50,7 +62,20 @@ buildPythonPackage rec { atomicwrites ]; - doCheck = false; + checkInputs = [ + faker + aioresponses + hypothesis + pytest-aiohttp + pytest-benchmark + ]; + + disabledTests = [ + # touches network + "test_connect_wrapper" + # time dependent and flaky + "test_transfer_monitor_callbacks" + ]; meta = with lib; { description = "A Python Matrix client library, designed according to sans I/O principles"; diff --git a/pkgs/development/python-modules/mcstatus/default.nix b/pkgs/development/python-modules/mcstatus/default.nix index 1ea14c35510c..cf61eb2fa386 100644 --- a/pkgs/development/python-modules/mcstatus/default.nix +++ b/pkgs/development/python-modules/mcstatus/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "mcstatus"; - version = "5.1.4"; + version = "5.2.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "Dinnerbone"; repo = pname; rev = "v${version}"; - sha256 = "1k8hjv965svbm95m7jaawlhdbxqpkjchlwvjwn1n7z90dfgn5kih"; + sha256 = "sha256-RlqzeixaHgyIl/7mMRkZAEsqJEP79Bz1bDGAU8PIetU="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/md-toc/default.nix b/pkgs/development/python-modules/md-toc/default.nix new file mode 100644 index 000000000000..aaec77a9ace8 --- /dev/null +++ b/pkgs/development/python-modules/md-toc/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, fpyutils +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "md-toc"; + version = "7.2.0"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "frnmst"; + repo = pname; + rev = version; + sha256 = "1v74iddfk5d6170frg89vzrkz9xrycl1f50g59imc7x7g50i6c2x"; + }; + + propagatedBuildInputs = [ + fpyutils + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py --replace "fpyutils>=1.2,<1.3" "fpyutils>=1.2" + ''; + + pytestFlagsArray = [ "md_toc/tests/*.py" ]; + + pythonImportsCheck = [ "md_toc" ]; + + meta = with lib; { + description = "Table of contents generator for Markdown"; + homepage = "https://docs.franco.net.eu.org/md-toc/"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/mdformat/default.nix b/pkgs/development/python-modules/mdformat/default.nix new file mode 100644 index 000000000000..159310035b8f --- /dev/null +++ b/pkgs/development/python-modules/mdformat/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, importlib-metadata +, markdown-it-py +, poetry-core +, pytestCheckHook +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "mdformat"; + version = "0.7.6"; + format = "pyproject"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "executablebooks"; + repo = pname; + rev = version; + sha256 = "0mnbi3vp7zgllpcpf6vrjw9y6jas95shphn99ayr8b8wgxsaqkif"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + markdown-it-py + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata + ] ++ lib.optionals (pythonOlder "3.7") [ + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "mdformat" ]; + + meta = with lib; { + description = "CommonMark compliant Markdown formatter"; + homepage = "https://mdformat.rtfd.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/mdit-py-plugins/default.nix b/pkgs/development/python-modules/mdit-py-plugins/default.nix new file mode 100644 index 000000000000..9c5705dbc408 --- /dev/null +++ b/pkgs/development/python-modules/mdit-py-plugins/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, markdown-it-py +, pytest-regressions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "mdit-py-plugins"; + version = "0.2.8"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "executablebooks"; + repo = pname; + rev = "v${version}"; + hash = "sha256-MXQjaVDuguGbmby6BQnrTdpq6Mih3HabXuyFxf9jB18="; + }; + + propagatedBuildInputs = [ markdown-it-py ]; + + checkInputs = [ pytestCheckHook pytest-regressions ]; + pythonImportsCheck = [ "mdit_py_plugins" ]; + + meta = with lib; { + description = "Collection of core plugins for markdown-it-py"; + homepage = "https://github.com/executablebooks/mdit-py-plugins"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/meshtastic/default.nix b/pkgs/development/python-modules/meshtastic/default.nix new file mode 100644 index 000000000000..c8a9d78e7c1b --- /dev/null +++ b/pkgs/development/python-modules/meshtastic/default.nix @@ -0,0 +1,57 @@ +{ lib +, buildPythonPackage +, dotmap +, fetchPypi +, pexpect +, protobuf +, pygatt +, pypubsub +, pyqrcode +, pyserial +, pythonOlder +, tabulate +, timeago +}: + +buildPythonPackage rec { + pname = "meshtastic"; + version = "1.2.30"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1kjflc2jwnsgxyr2zx1gyykhak9fsgy6hxaxlggsz5sw9b8rdrby"; + }; + + propagatedBuildInputs = [ + dotmap + pexpect + protobuf + pygatt + pypubsub + pyqrcode + pyserial + tabulate + timeago + ]; + + postPatch = '' + # https://github.com/meshtastic/Meshtastic-python/pull/87 + substituteInPlace setup.py \ + --replace 'with open("README.md", "r") as fh:' "" \ + --replace "long_description = fh.read()" "" \ + --replace "long_description=long_description," 'long_description="",' + ''; + + # Project only provides PyPI releases which don't contain the tests + # https://github.com/meshtastic/Meshtastic-python/issues/86 + doCheck = false; + pythonImportsCheck = [ "meshtastic" ]; + + meta = with lib; { + description = "Python API for talking to Meshtastic devices"; + homepage = "https://meshtastic.github.io/Meshtastic-python/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/midiutil/default.nix b/pkgs/development/python-modules/midiutil/default.nix index d1cae8c78041..a3527bc6e1cf 100644 --- a/pkgs/development/python-modules/midiutil/default.nix +++ b/pkgs/development/python-modules/midiutil/default.nix @@ -13,6 +13,6 @@ buildPythonPackage rec { homepage = "https://github.com/MarkCWirt/MIDIUtil"; description = "A pure python library for creating multi-track MIDI files"; license = licenses.mit; - maintainers = [ maintainers.gnidorah ]; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/mlrose/default.nix b/pkgs/development/python-modules/mlrose/default.nix index 40e3b6ce0953..2187f2726801 100644 --- a/pkgs/development/python-modules/mlrose/default.nix +++ b/pkgs/development/python-modules/mlrose/default.nix @@ -1,21 +1,45 @@ -{ lib, isPy27, buildPythonPackage, fetchPypi, scikitlearn }: +{ lib +, isPy27 +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, scikit-learn +, pytestCheckHook +, pytest-randomly +}: buildPythonPackage rec { pname = "mlrose"; version = "1.3.0"; disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "cec83253bf6da67a7fb32b2c9ae13e9dbc6cfbcaae2aa3107993e69e9788f15e"; + src = fetchFromGitHub { + owner = "gkhayes"; + repo = "mlrose"; + rev = "v${version}"; + sha256 = "1dn43k3rcypj58ymcj849b37w66jz7fphw8842v6mlbij3x0rxfl"; }; - propagatedBuildInputs = [ scikitlearn ]; + patches = [ + # Fixes compatibility with scikit-learn 0.24.1 + (fetchpatch { + url = "https://github.com/gkhayes/mlrose/pull/55/commits/19caf8616fc194402678aa67917db334ad02852a.patch"; + sha256 = "1nivz3bn21nd21bxbcl16a6jmy7y5j8ilz90cjmd0xq4v7flsahf"; + }) + ]; + + propagatedBuildInputs = [ scikit-learn ]; + checkInputs = [ pytest-randomly pytestCheckHook ]; postPatch = '' - sed -i 's,sklearn,scikit-learn,g' setup.py + substituteInPlace setup.py --replace sklearn scikit-learn ''; + pythonImportsCheck = [ "mlrose" ]; + + # Fix random seed during tests + pytestFlagsArray = [ "--randomly-seed 0" ]; + meta = with lib; { description = "Machine Learning, Randomized Optimization and SEarch"; homepage = "https://github.com/gkhayes/mlrose"; diff --git a/pkgs/development/python-modules/mlxtend/default.nix b/pkgs/development/python-modules/mlxtend/default.nix index 44402b36ec08..4692dc61c229 100644 --- a/pkgs/development/python-modules/mlxtend/default.nix +++ b/pkgs/development/python-modules/mlxtend/default.nix @@ -5,7 +5,7 @@ , pytestCheckHook , scipy , numpy -, scikitlearn +, scikit-learn , pandas , matplotlib , joblib @@ -33,7 +33,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ scipy numpy - scikitlearn + scikit-learn pandas matplotlib joblib @@ -45,7 +45,7 @@ buildPythonPackage rec { license= licenses.bsd3; maintainers = with maintainers; [ evax ]; platforms = platforms.unix; - # incompatible with nixpkgs scikitlearn version + # incompatible with nixpkgs scikit-learn version broken = true; }; } diff --git a/pkgs/development/python-modules/mne-python/default.nix b/pkgs/development/python-modules/mne-python/default.nix index bed191c39e32..d8add2608b6a 100644 --- a/pkgs/development/python-modules/mne-python/default.nix +++ b/pkgs/development/python-modules/mne-python/default.nix @@ -11,7 +11,7 @@ , matplotlib , nibabel , pandas -, scikitlearn +, scikit-learn }: buildPythonPackage rec { @@ -40,7 +40,7 @@ buildPythonPackage rec { matplotlib nibabel pandas - scikitlearn + scikit-learn ]; preCheck = '' export HOME=$TMP diff --git a/pkgs/development/python-modules/moderngl/default.nix b/pkgs/development/python-modules/moderngl/default.nix index f32f541573eb..447d2b00b019 100644 --- a/pkgs/development/python-modules/moderngl/default.nix +++ b/pkgs/development/python-modules/moderngl/default.nix @@ -4,6 +4,7 @@ , isPy3k , libGL , libX11 +, glcontext }: buildPythonPackage rec { @@ -17,7 +18,7 @@ buildPythonPackage rec { disabled = !isPy3k; - buildInputs = [ libGL libX11 ]; + buildInputs = [ libGL libX11 glcontext ]; # Tests need a display to run. doCheck = false; diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix index 7f6d9893c969..e06d5aa3780b 100644 --- a/pkgs/development/python-modules/moderngl_window/default.nix +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -7,6 +7,7 @@ , pyglet , pillow , pyrr +, glcontext }: buildPythonPackage rec { @@ -20,7 +21,7 @@ buildPythonPackage rec { sha256 = "1p03j91pk2bwycd13p0qi8kns1sf357180hd2mkaip8mfaf33x3q"; }; - propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr ]; + propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr glcontext ]; disabled = !isPy3k; diff --git a/pkgs/development/python-modules/monty/default.nix b/pkgs/development/python-modules/monty/default.nix index a2398ce750dd..4690f9f8820f 100644 --- a/pkgs/development/python-modules/monty/default.nix +++ b/pkgs/development/python-modules/monty/default.nix @@ -1,22 +1,20 @@ { lib , buildPythonPackage , fetchFromGitHub -, isPy27 -, nose -, numpy -, six -, ruamel_yaml +, pythonOlder , msgpack -, coverage -, coveralls +, pytestCheckHook +, numpy +, pydantic , pymongo -, lsof +, ruamel_yaml +, tqdm }: buildPythonPackage rec { pname = "monty"; version = "2021.3.3"; - disabled = isPy27; # uses type annotations + disabled = pythonOlder "3.5"; # uses type annotations # No tests in Pypi src = fetchFromGitHub { @@ -26,15 +24,18 @@ buildPythonPackage rec { sha256 = "1nbv0ys0fv70rgzskkk8gsfr9dsmm7ykim5wv36li840zsj83b1l"; }; - checkInputs = [ lsof nose numpy msgpack coverage coveralls pymongo]; - propagatedBuildInputs = [ six ruamel_yaml ]; + propagatedBuildInputs = [ + ruamel_yaml + tqdm + msgpack + ]; - # test suite tries to decode bytes, but msgpack now returns a str - # https://github.com/materialsvirtuallab/monty/pull/121 - postPatch = '' - substituteInPlace tests/test_serialization.py \ - --replace ".decode('utf-8')" "" - ''; + checkInputs = [ + pytestCheckHook + numpy + pydantic + pymongo + ]; preCheck = '' substituteInPlace tests/test_os.py \ diff --git a/pkgs/development/python-modules/motioneye-client/default.nix b/pkgs/development/python-modules/motioneye-client/default.nix new file mode 100644 index 000000000000..19bb9a39c29c --- /dev/null +++ b/pkgs/development/python-modules/motioneye-client/default.nix @@ -0,0 +1,52 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-timeout +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "motioneye-client"; + version = "0.3.6"; + format = "pyproject"; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "dermotduffy"; + repo = pname; + rev = "v${version}"; + sha256 = "0j28rn7059km7q6z1kalp0pjcrd42wcm5mnbi94j93bvfld97w70"; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-aiohttp + pytest-timeout + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov-report=term-missing --cov=motioneye_client --cov-fail-under=100" "" + ''; + + pythonImportsCheck = [ "motioneye_client" ]; + + meta = with lib; { + description = "Python library for motionEye"; + homepage = "https://github.com/dermotduffy/motioneye-client"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/moviepy/default.nix b/pkgs/development/python-modules/moviepy/default.nix index 4cd1fec3d8b2..c3acdbe71ec2 100644 --- a/pkgs/development/python-modules/moviepy/default.nix +++ b/pkgs/development/python-modules/moviepy/default.nix @@ -13,14 +13,14 @@ , advancedProcessing ? false , opencv3 ? null , scikitimage ? null -, scikitlearn ? null +, scikit-learn ? null , scipy ? null , matplotlib ? null , youtube-dl ? null }: assert advancedProcessing -> ( - opencv3 != null && scikitimage != null && scikitlearn != null + opencv3 != null && scikitimage != null && scikit-learn != null && scipy != null && matplotlib != null && youtube-dl != null); buildPythonPackage rec { @@ -40,7 +40,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy decorator imageio imageio-ffmpeg tqdm requests proglog ] ++ (lib.optionals advancedProcessing [ - opencv3 scikitimage scikitlearn scipy matplotlib youtube-dl + opencv3 scikitimage scikit-learn scipy matplotlib youtube-dl ]); meta = with lib; { diff --git a/pkgs/development/python-modules/mox3/default.nix b/pkgs/development/python-modules/mox3/default.nix index 1883c9c8c011..593d845ad866 100644 --- a/pkgs/development/python-modules/mox3/default.nix +++ b/pkgs/development/python-modules/mox3/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { buildInputs = [ subunit testrepository testtools six ]; propagatedBuildInputs = [ pbr fixtures ]; - # Disabling as several tests depdencies are missing: + # Disabling as several tests dependencies are missing: # https://opendev.org/openstack/mox3/src/branch/master/test-requirements.txt doCheck = false; diff --git a/pkgs/development/python-modules/msal/default.nix b/pkgs/development/python-modules/msal/default.nix index 3df0527589a1..735d74b5237b 100644 --- a/pkgs/development/python-modules/msal/default.nix +++ b/pkgs/development/python-modules/msal/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "msal"; - version = "1.10.0"; + version = "1.11.0"; src = fetchPypi { inherit pname version; - sha256 = "582e92e3b9fa68084dca6ecfd8db866ddc75cd9043de267c79d6b6277dd27f55"; + sha256 = "sha256-RnrwK7lKh6G2lbUb+GdmfoKKzA3Twd5fpUP2kALbSfo="; }; propagatedBuildInputs = [ @@ -22,15 +22,15 @@ buildPythonPackage rec { ]; # Tests assume Network Connectivity: - # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73 + # https://github.com/AzureAD/microsoft-authentication-library-for-python/blob/e2958961e8ec16d0af4199f60c36c3f913497e48/tests/test_authority.py#L73 doCheck = false; + pythonImportsCheck = [ "msal" ]; + meta = with lib; { description = "The Microsoft Authentication Library (MSAL) for Python library enables your app to access the Microsoft Cloud by supporting authentication of users with Microsoft Azure Active Directory accounts (AAD) and Microsoft Accounts (MSA) using industry standard OAuth2 and OpenID Connect"; homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python"; license = licenses.mit; - maintainers = with maintainers; [ - kamadorueda - ]; + maintainers = with maintainers; [ kamadorueda ]; }; } diff --git a/pkgs/development/python-modules/mutesync/default.nix b/pkgs/development/python-modules/mutesync/default.nix new file mode 100644 index 000000000000..98bf6ce07458 --- /dev/null +++ b/pkgs/development/python-modules/mutesync/default.nix @@ -0,0 +1,42 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchpatch +, fetchPypi +}: + +buildPythonPackage rec { + pname = "mutesync"; + version = "0.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "05r8maq59glwgysg98y1vrysfb1mkh9jpbag3ixl13n8jw8clp85"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + patches = [ + # Don't parse requirements.txt, https://github.com/currentoor/pymutesync/pull/1 + (fetchpatch { + name = "add-requirements.patch"; + url = "https://github.com/currentoor/pymutesync/commit/d66910fc83b1ae3060cdb3fe22a6f91fb70a67f0.patch"; + sha256 = "0axhgriyyv31b1r1yidxcrv0nyrqbb63xw5qrmv2iy2h0v96ijsk"; + }) + ]; + + # Project has not published tests yet + doCheck = false; + pythonImportsCheck = [ "mutesync" ]; + + meta = with lib; { + description = "Python module for interacting with mutesync buttons"; + homepage = "https://github.com/currentoor/pymutesync"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/mwoauth/default.nix b/pkgs/development/python-modules/mwoauth/default.nix index 0a73e99391e2..8743329917e7 100644 --- a/pkgs/development/python-modules/mwoauth/default.nix +++ b/pkgs/development/python-modules/mwoauth/default.nix @@ -17,14 +17,28 @@ buildPythonPackage rec { sha256 = "9e0d70a1fa6f452584de1cb853ae6c11f41233549f7839cfb879f99410f6ad46"; }; - # package has no tests + propagatedBuildInputs = [ + oauthlib + pyjwt + requests + requests_oauthlib + six + ]; + + postPatch = '' + # https://github.com/mediawiki-utilities/python-mwoauth/pull/43 + substituteInPlace setup.py --replace "PyJWT>=1.0.1,<2.0.0" "PyJWT>=1.0.1" + ''; + + # PyPI source has no tests included + # https://github.com/mediawiki-utilities/python-mwoauth/issues/44 doCheck = false; - propagatedBuildInputs = [ six pyjwt requests oauthlib requests_oauthlib ]; + pythonImportsCheck = [ "mwoauth" ]; meta = with lib; { - description = "A library designed to provide a simple means to performing an OAuth handshake with a MediaWiki installation with the OAuth Extension installed."; - homepage = "https://github.com/mediawiki-utilities/python-mwoauth"; + description = "Python library to perform OAuth handshakes with a MediaWiki installation"; + homepage = "https://github.com/mediawiki-utilities/python-mwoauth"; license = licenses.mit; maintainers = with maintainers; [ ixxie ]; }; diff --git a/pkgs/development/python-modules/myjwt/default.nix b/pkgs/development/python-modules/myjwt/default.nix index d80e66e07bf0..0fecd439e3f5 100644 --- a/pkgs/development/python-modules/myjwt/default.nix +++ b/pkgs/development/python-modules/myjwt/default.nix @@ -1,33 +1,31 @@ { lib , stdenv , buildPythonPackage -, fetchFromGitHub , click , colorama , cryptography , exrex +, fetchFromGitHub , pyopenssl , pyperclip +, pytest-mock +, pytestCheckHook , questionary , requests -, pytestCheckHook -, pytest-mock , requests-mock }: buildPythonPackage rec { pname = "myjwt"; - version = "1.4.0"; + version = "1.5.0"; src = fetchFromGitHub { owner = "mBouamama"; repo = "MyJWT"; rev = version; - sha256 = "1n3lvdrzp6wbbcygjwa7xar2jnhjnrz7a9khmn2phhkkngxm5rc4"; + sha256 = "sha256-kZkqFeaQPd56BVaYmCWAbVu1xwbPAIlQC3u5/x3dh7A="; }; - patches = [ ./pinning.patch ]; - propagatedBuildInputs = [ click colorama @@ -40,15 +38,20 @@ buildPythonPackage rec { ]; checkInputs = [ - pytestCheckHook pytest-mock + pytestCheckHook requests-mock ]; + postPatch = '' + # Remove all version pinning (E.g., tornado==5.1.1 -> tornado) + sed -i -e "s/==[0-9.]*//" requirements.txt + ''; + pythonImportsCheck = [ "myjwt" ]; meta = with lib; { - description = "CLI tool for testing vulnerabilities on Json Web Token(JWT)"; + description = "CLI tool for testing vulnerabilities of JSON Web Tokens (JWT)"; homepage = "https://github.com/mBouamama/MyJWT"; license = with licenses; [ mit ]; maintainers = with maintainers; [ fab ]; diff --git a/pkgs/development/python-modules/myjwt/pinning.patch b/pkgs/development/python-modules/myjwt/pinning.patch deleted file mode 100644 index abae9d0e2ecb..000000000000 --- a/pkgs/development/python-modules/myjwt/pinning.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/requirements.txt b/requirements.txt -index 3017e02..2b465db 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,8 +1,8 @@ --click==7.1.2 --colorama==0.4.4 --cryptography==3.3.1 --exrex==0.10.5 --pyOpenSSL==20.0.1 --pyperclip==1.8.1 --questionary==1.9.0 --requests==2.25.1 -+click -+colorama -+cryptography -+exrex -+pyOpenSSL -+pyperclip -+questionary -+requests diff --git a/pkgs/development/python-modules/mypy-boto3-builder/default.nix b/pkgs/development/python-modules/mypy-boto3-builder/default.nix new file mode 100644 index 000000000000..860646af9c65 --- /dev/null +++ b/pkgs/development/python-modules/mypy-boto3-builder/default.nix @@ -0,0 +1,49 @@ +{ lib +, black +, boto3 +, buildPythonPackage +, fetchFromGitHub +, jinja2 +, md-toc +, isort +, mdformat +, pyparsing +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "mypy-boto3-builder"; + version = "4.12.0"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "vemel"; + repo = "mypy_boto3_builder"; + rev = version; + sha256 = "09kbmrpnph5kbxlqqavpxg3l85dmk3vzmwawa4s09y9gknxxkcv9"; + }; + + propagatedBuildInputs = [ + black + boto3 + isort + jinja2 + md-toc + mdformat + pyparsing + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "mypy_boto3_builder" ]; + + meta = with lib; { + description = "Type annotations builder for boto3"; + homepage = "https://vemel.github.io/mypy_boto3_builder/"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/mypy-boto3-s3/default.nix b/pkgs/development/python-modules/mypy-boto3-s3/default.nix new file mode 100644 index 000000000000..af97c5e103f2 --- /dev/null +++ b/pkgs/development/python-modules/mypy-boto3-s3/default.nix @@ -0,0 +1,35 @@ +{ lib +, boto3 +, buildPythonPackage +, fetchPypi +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "mypy-boto3-s3"; + version = "1.17.71"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "0zgx3f41j80xy203jwms7j72svxy10ry5v9w3ql817ai4lcrspnn"; + }; + + propagatedBuildInputs = [ + boto3 + ] ++ lib.optionals (pythonOlder "3.8") [ + typing-extensions + ]; + + # Project has no tests + doCheck = false; + pythonImportsCheck = [ "mypy_boto3_s3" ]; + + meta = with lib; { + description = "Type annotations for boto3"; + homepage = "https://vemel.github.io/boto3_stubs_docs/mypy_boto3_s3/"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/nassl/default.nix b/pkgs/development/python-modules/nassl/default.nix index 908ecff8c177..97033224c14a 100644 --- a/pkgs/development/python-modules/nassl/default.nix +++ b/pkgs/development/python-modules/nassl/default.nix @@ -8,12 +8,15 @@ , tls-parser , cacert , pytestCheckHook +, pythonOlder }: let - zlibStatic = pkgsStatic.zlib.override { + zlibStatic = (pkgsStatic.zlib.override { splitStaticOutput = false; - }; + }).overrideAttrs (oldAttrs: { + NIX_CFLAGS_COMPILE = "${oldAttrs.NIX_CFLAGS_COMPILE} -fPIC"; + }); nasslOpensslArgs = { static = true; enableSSL2 = true; @@ -67,13 +70,14 @@ let in buildPythonPackage rec { pname = "nassl"; - version = "3.1.0"; + version = "4.0.0"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nabla-c0d3"; repo = pname; rev = version; - sha256 = "1x1v0fpb6gcc2r0k2rsy0mc3v25s3qbva78apvi46n08c2l309ci"; + hash = "sha256-6lk2YfI9km10YbJAn38fvo9qa4iXcByL+udCsDe+kvU="; }; postPatch = let @@ -108,18 +112,21 @@ buildPythonPackage rec { invoke package.wheel ''; + doCheck = true; + + pythonImportsCheck = [ "nassl" ]; + checkInputs = [ pytestCheckHook ]; - checkPhase = '' - # Skip online tests - pytest -k 'not Online' - ''; + disabledTests = [ + "Online" + ]; meta = with lib; { homepage = "https://github.com/nabla-c0d3/nassl"; description = "Low-level OpenSSL wrapper for Python 3.7+"; platforms = with platforms; linux ++ darwin; - license = licenses.agpl3; + license = licenses.agpl3Only; maintainers = with maintainers; [ veehaitch ]; }; } diff --git a/pkgs/development/python-modules/nbval/default.nix b/pkgs/development/python-modules/nbval/default.nix index 704bc21d7e1a..b9a336f7fbe9 100644 --- a/pkgs/development/python-modules/nbval/default.nix +++ b/pkgs/development/python-modules/nbval/default.nix @@ -5,6 +5,7 @@ , ipykernel , jupyter_client , nbformat +, pytestCheckHook , pytest , six , glibcLocales @@ -23,7 +24,7 @@ buildPythonPackage rec { }; checkInputs = [ - pytest + pytestCheckHook matplotlib sympy pytestcov @@ -40,14 +41,15 @@ buildPythonPackage rec { six ]; - # Set HOME so that matplotlib doesn't try to use - # /homeless-shelter/.config/matplotlib, otherwise some of the tests fail for - # having an unexpected warning on stderr produced by matplotlib. - # Ignore impure tests. - checkPhase = '' - export HOME=$(mktemp -d) - pytest tests --ignore tests/test_timeouts.py - ''; + pytestFlagsArray = [ + "tests" + # These are the main tests but they're fragile so skip them. They error + # whenever matplotlib outputs any unexpected warnings, e.g. deprecation + # warnings. + "--ignore=tests/test_unit_tests_in_notebooks.py" + # Impure + "--ignore=tests/test_timeouts.py" + ]; # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; diff --git a/pkgs/development/python-modules/nbxmpp/default.nix b/pkgs/development/python-modules/nbxmpp/default.nix index 531232bf8e6e..c145b9d888f4 100644 --- a/pkgs/development/python-modules/nbxmpp/default.nix +++ b/pkgs/development/python-modules/nbxmpp/default.nix @@ -1,26 +1,31 @@ -{ lib, buildPythonPackage, fetchzip, gobject-introspection, idna, libsoup, precis-i18n, pygobject3, pyopenssl }: +{ lib, buildPythonPackage, pythonOlder, fetchFromGitLab +, gobject-introspection, idna, libsoup, precis-i18n, pygobject3, pyopenssl +}: -let +buildPythonPackage rec { pname = "nbxmpp"; - version = "1.0.2"; - name = "${pname}-${version}"; -in buildPythonPackage { - inherit pname version; + version = "2.0.2"; + + disabled = pythonOlder "3.7"; + # Tests aren't included in PyPI tarball. - src = fetchzip { - name = "${name}.tar.bz2"; - url = "https://dev.gajim.org/gajim/python-nbxmpp/repository/archive.tar.bz2?" - + "ref=${name}"; - sha256 = "1rhzsakqrybzq5j5b9400wjd14pncph47c1ggn5a6f3di03lk4az"; + src = fetchFromGitLab { + domain = "dev.gajim.org"; + owner = "gajim"; + repo = "python-nbxmpp"; + rev = "nbxmpp-${version}"; + sha256 = "0z27mxgfk7hvpx0xdrd8g9441rywv74yk7s83zjnc2mc7xvpwhf4"; }; buildInputs = [ precis-i18n ]; propagatedBuildInputs = [ gobject-introspection idna libsoup pygobject3 pyopenssl ]; + pythonImportsCheck = [ "nbxmpp" ]; + meta = with lib; { homepage = "https://dev.gajim.org/gajim/python-nbxmpp"; description = "Non-blocking Jabber/XMPP module"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = with maintainers; [ abbradar ]; }; } diff --git a/pkgs/development/python-modules/netdisco/default.nix b/pkgs/development/python-modules/netdisco/default.nix index 489b6bddf562..dd17a3f6c10f 100644 --- a/pkgs/development/python-modules/netdisco/default.nix +++ b/pkgs/development/python-modules/netdisco/default.nix @@ -1,23 +1,24 @@ -{ lib, buildPythonPackage, isPy3k, fetchPypi, requests, zeroconf, netifaces, pytest }: +{ lib, buildPythonPackage, isPy3k, fetchPypi, requests, zeroconf, pytestCheckHook }: buildPythonPackage rec { pname = "netdisco"; - version = "2.8.2"; + version = "2.8.3"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "dcaabf83b204282aacfb213b18799eb7af2d5a6defe529487bbd0548036392fe"; + sha256 = "sha256-4WS9PiErB6U7QuejTvbrOmnHetbE5S4zaUyhLCbyihM="; }; - propagatedBuildInputs = [ requests zeroconf netifaces ]; + propagatedBuildInputs = [ requests zeroconf ]; - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; - checkPhase = '' - py.test - ''; + pythonImportsCheck = [ + "netdisco" + "netdisco.discovery" + ]; meta = with lib; { description = "Python library to scan local network for services and devices"; diff --git a/pkgs/development/python-modules/nilearn/default.nix b/pkgs/development/python-modules/nilearn/default.nix index e3ce770398e4..39edd7e34da2 100644 --- a/pkgs/development/python-modules/nilearn/default.nix +++ b/pkgs/development/python-modules/nilearn/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, pytestCheckHook, matplotlib -, nibabel, numpy, pandas, scikitlearn, scipy, joblib, requests }: +, nibabel, numpy, pandas, scikit-learn, scipy, joblib, requests }: buildPythonPackage rec { pname = "nilearn"; @@ -20,7 +20,7 @@ buildPythonPackage rec { numpy pandas requests - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/nmigen/default.nix b/pkgs/development/python-modules/nmigen/default.nix index 1e38a087bce4..d42e27a29329 100644 --- a/pkgs/development/python-modules/nmigen/default.nix +++ b/pkgs/development/python-modules/nmigen/default.nix @@ -3,11 +3,12 @@ , pythonOlder , fetchFromGitHub , setuptools -, setuptools_scm +, setuptools-scm , pyvcd , jinja2 , importlib-resources , importlib-metadata +, git # for tests , pytestCheckHook @@ -30,7 +31,7 @@ buildPythonPackage rec { sha256 = "0cjs9wgmxa76xqmjhsw4fsb2mhgvd85jgs2mrjxqp6fwp8rlgnl1"; }; - nativeBuildInputs = [ setuptools_scm ]; + nativeBuildInputs = [ setuptools-scm git ]; propagatedBuildInputs = [ setuptools diff --git a/pkgs/development/python-modules/nuitka/default.nix b/pkgs/development/python-modules/nuitka/default.nix index 44ee4597dbe4..548565ff1d35 100644 --- a/pkgs/development/python-modules/nuitka/default.nix +++ b/pkgs/development/python-modules/nuitka/default.nix @@ -1,28 +1,29 @@ { lib, stdenv , buildPythonPackage -, fetchurl +, fetchFromGitHub , vmprof , pyqt4 , isPyPy , pkgs +, scons +, chrpath }: -let - # scons is needed but using it requires Python 2.7 - # Therefore we create a separate env for it. - scons = pkgs.python27.withPackages(ps: [ pkgs.scons ]); -in buildPythonPackage rec { - version = "0.6.8.4"; +buildPythonPackage rec { + version = "0.6.14.5"; pname = "Nuitka"; # Latest version is not yet on PyPi - src = fetchurl { - url = "https://github.com/kayhayen/Nuitka/archive/${version}.tar.gz"; - sha256 = "0awhwksnmqmbciimqmd11wygp7bnq57khcg4n9r4ld53s147rmqm"; + src = fetchFromGitHub { + owner = "kayhayen"; + repo = "Nuitka"; + rev = version; + sha256 = "08kcp22zdgp25kk4bp56z196mn6bdi3z4x0q2y9vyz0ywfzp9zap"; }; checkInputs = [ vmprof pyqt4 ]; nativeBuildInputs = [ scons ]; + propagatedBuildInputs = [ chrpath ]; postPatch = '' patchShebangs tests/run-tests diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index 3c0ff1a1eb09..b18cb5e64cf2 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { sha256 = "55c11d7edbba2ba715f2b56f5294cad55cfd87bff98e2627c3047c2d5cc52d16"; }; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; propagatedBuildInputs = [ numpy llvmlite setuptools ]; pythonImportsCheck = [ "numba" ]; diff --git a/pkgs/development/python-modules/oauthenticator/default.nix b/pkgs/development/python-modules/oauthenticator/default.nix index 839582e87f0d..25e81c89c255 100644 --- a/pkgs/development/python-modules/oauthenticator/default.nix +++ b/pkgs/development/python-modules/oauthenticator/default.nix @@ -14,20 +14,18 @@ buildPythonPackage rec { pname = "oauthenticator"; - version = "0.13.0"; + version = "14.0.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "5202adcd96ddbbccbc267da02f2d14e977300c81291aaa77be4fd9f2e27cfa37"; + sha256 = "1zfcl3dq9ladqg7fnpx6kgxf1ckjzlc8v3j6wa8w6iwglm40ax4r"; }; propagatedBuildInputs = [ jupyterhub ]; - pytestFlagsArray = [ "oauthenticator/tests" ]; - checkInputs = [ google-api-python-client google-auth-oauthlib @@ -38,6 +36,20 @@ buildPythonPackage rec { requests-mock ]; + postPatch = '' + # The constraint was removed. No longer needed for > 14.0.0 + # https://github.com/jupyterhub/oauthenticator/pull/431 + substituteInPlace test-requirements.txt --replace "pyjwt>=1.7,<2.0" "pyjwt" + ''; + + disabledTests = [ + # Test are outdated, https://github.com/jupyterhub/oauthenticator/issues/432 + "test_azuread" + "test_mediawiki" + ]; + + pythonImportsCheck = [ "oauthenticator" ]; + meta = with lib; { description = "Authenticate JupyterHub users with common OAuth providers, including GitHub, Bitbucket, and more."; homepage = "https://github.com/jupyterhub/oauthenticator"; diff --git a/pkgs/development/python-modules/ofxparse/default.nix b/pkgs/development/python-modules/ofxparse/default.nix index d018a924d898..33d027f1beed 100644 --- a/pkgs/development/python-modules/ofxparse/default.nix +++ b/pkgs/development/python-modules/ofxparse/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , six , beautifulsoup4 , lxml @@ -8,11 +8,15 @@ buildPythonPackage rec { pname = "ofxparse"; - version = "0.20"; + version = "unstable-2020-02-05"; - src = fetchPypi { - inherit pname version; - sha256 = "0zn3grc6xhgzcc81qc3dxkkwk731cjjqqhb46smw12lk09cdnigb"; + # The newer changes haven't been released yet and ledger-autosync + # depends on them: + src = fetchFromGitHub { + owner = "jseutter"; + repo = "ofxparse"; + rev = "3236cfd96434feb6bc79a8b66f3400f18e2ad3c4"; + sha256 = "1rkp174102q7hwjrg3na0qnfd612xb3r360b9blkbprjhzxy7gr7"; }; propagatedBuildInputs = [ six beautifulsoup4 lxml ]; diff --git a/pkgs/development/python-modules/ondilo/default.nix b/pkgs/development/python-modules/ondilo/default.nix index 7010bd473aba..271243ab791e 100644 --- a/pkgs/development/python-modules/ondilo/default.nix +++ b/pkgs/development/python-modules/ondilo/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "ondilo"; - version = "0.2.0"; + version = "0.3.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "JeromeHXP"; repo = pname; rev = version; - sha256 = "0k7c9nacf7pxvfik3hkv9vvvda2sx5jrf6zwq7r077x7fw5l8d2b"; + sha256 = "sha256-MI6K+41I/IVi+GRBdmRIHbljULDFLAwpo3W8tdxCOBM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/openrazer/common.nix b/pkgs/development/python-modules/openrazer/common.nix index 35655b207a59..985d4e199e18 100644 --- a/pkgs/development/python-modules/openrazer/common.nix +++ b/pkgs/development/python-modules/openrazer/common.nix @@ -1,16 +1,16 @@ { lib , fetchFromGitHub }: rec { - version = "3.0.0"; + version = "3.0.1"; src = fetchFromGitHub { owner = "openrazer"; repo = "openrazer"; rev = "v${version}"; - sha256 = "sha256-gw6Qt9BntPcF3zw19PXftDbhoCeBr8hwrujy51rb5Fc="; + sha256 = "sha256-ptB0jP0kp1Liynkfz0B0OMw6xNQG1s8IvxhgNAdEytM="; }; meta = with lib; { homepage = "https://openrazer.github.io/"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = with maintainers; [ roelvandijk evanjs ]; platforms = platforms.linux; }; diff --git a/pkgs/development/python-modules/osmnx/default.nix b/pkgs/development/python-modules/osmnx/default.nix index 3cd420c7491f..a55d26d83c28 100755 --- a/pkgs/development/python-modules/osmnx/default.nix +++ b/pkgs/development/python-modules/osmnx/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, geopandas, descartes, matplotlib, networkx, numpy -, pandas, requests, Rtree, shapely, folium, scikitlearn, scipy}: +, pandas, requests, Rtree, shapely, folium, scikit-learn, scipy}: buildPythonPackage rec { pname = "osmnx"; @@ -12,7 +12,7 @@ buildPythonPackage rec { sha256 = "1k3y5kl4k93vxaxyanc040x44s2fyyc3m1ndy2j3kg0037z8ad4z"; }; - propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikitlearn scipy ]; + propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikit-learn scipy ]; # requires network doCheck = false; diff --git a/pkgs/development/python-modules/ovoenergy/default.nix b/pkgs/development/python-modules/ovoenergy/default.nix new file mode 100644 index 000000000000..42615fa664dd --- /dev/null +++ b/pkgs/development/python-modules/ovoenergy/default.nix @@ -0,0 +1,37 @@ +{ lib +, aiohttp +, buildPythonPackage +, click +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "ovoenergy"; + version = "1.1.12"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "timmo001"; + repo = pname; + rev = "v${version}"; + sha256 = "1430k699gblxwspsbgxnha8afk6npqharhz2jyjw5gir9pi6g9cz"; + }; + + propagatedBuildInputs = [ + aiohttp + click + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "ovoenergy" ]; + + meta = with lib; { + description = "Python client for getting data from OVO's API"; + homepage = "https://github.com/timmo001/ovoenergy"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pandas/2.nix b/pkgs/development/python-modules/pandas/2.nix index 936a3db296ec..8af4094b0cfb 100644 --- a/pkgs/development/python-modules/pandas/2.nix +++ b/pkgs/development/python-modules/pandas/2.nix @@ -59,7 +59,7 @@ buildPythonPackage rec { # For OSX, we need to add a dependency on libcxx, which provides # `complex.h` and other libraries that pandas depends on to build. postPatch = lib.optionalString stdenv.isDarwin '' - cpp_sdk="${libcxx}/include/c++/v1"; + cpp_sdk="${lib.getDev libcxx}/include/c++/v1"; echo "Adding $cpp_sdk to the setup.py common_include variable" substituteInPlace setup.py \ --replace "['pandas/src/klib', 'pandas/src']" \ diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 7fd551e192c9..f3505e3c9a6a 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -77,7 +77,7 @@ buildPythonPackage rec { # For OSX, we need to add a dependency on libcxx, which provides # `complex.h` and other libraries that pandas depends on to build. postPatch = lib.optionalString stdenv.isDarwin '' - cpp_sdk="${libcxx}/include/c++/v1"; + cpp_sdk="${lib.getDev libcxx}/include/c++/v1"; echo "Adding $cpp_sdk to the setup.py common_include variable" substituteInPlace setup.py \ --replace "['pandas/src/klib', 'pandas/src']" \ diff --git a/pkgs/development/python-modules/pathy/default.nix b/pkgs/development/python-modules/pathy/default.nix new file mode 100644 index 000000000000..714e6945df5f --- /dev/null +++ b/pkgs/development/python-modules/pathy/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, typer +, dataclasses +, smart_open +, pytest +, mock +, google-cloud-storage +}: + +buildPythonPackage rec { + pname = "pathy"; + version = "0.5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-nb8my/5rkc7thuHnXZHe1Hg8j+sLBlYyJcLHWrrKZ5M="; + }; + + propagatedBuildInputs = [ smart_open typer google-cloud-storage ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "smart-open>=2.2.0,<4.0.0" "smart-open>=2.2.0" + ''; + + checkInputs = [ pytestCheckHook mock ]; + + # Exclude tests that require provider credentials + pytestFlagsArray = [ + "--ignore=pathy/_tests/test_clients.py" + "--ignore=pathy/_tests/test_gcs.py" + "--ignore=pathy/_tests/test_s3.py" + ]; + + meta = with lib; { + description = "A Path interface for local and cloud bucket storage"; + homepage = "https://github.com/justindujardin/pathy"; + license = licenses.asl20; + maintainers = with maintainers; [ melling ]; + }; +} diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix index 6f5d8e262279..fd057d24d31e 100644 --- a/pkgs/development/python-modules/peewee/default.nix +++ b/pkgs/development/python-modules/peewee/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "peewee"; - version = "3.13.3"; + version = "3.14.4"; # pypi release does not provide tests src = fetchFromGitHub { owner = "coleifer"; repo = pname; rev = version; - sha256 = "1r67hxb9m6v0xbnbqfnsw6dahmdr94pf81b4x51jfw6x9sa4izi4"; + sha256 = "0x85swpaffysc05kka0mab87cnilzw1lpacfhcx5ayabh0i2qsh6"; }; diff --git a/pkgs/development/python-modules/persim/default.nix b/pkgs/development/python-modules/persim/default.nix index 65f3529e60c6..2868cea4aea7 100644 --- a/pkgs/development/python-modules/persim/default.nix +++ b/pkgs/development/python-modules/persim/default.nix @@ -6,7 +6,7 @@ , joblib , matplotlib , numpy -, scikitlearn +, scikit-learn , scipy , pytestCheckHook }: @@ -26,7 +26,7 @@ buildPythonPackage rec { joblib matplotlib numpy - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/pg8000/default.nix b/pkgs/development/python-modules/pg8000/default.nix index a03452d78628..958d3b765592 100644 --- a/pkgs/development/python-modules/pg8000/default.nix +++ b/pkgs/development/python-modules/pg8000/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "pg8000"; - version = "1.19.2"; + version = "1.19.4"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-RMu008kS8toWfKAr+YoAQPfpMmDk7xFMKNXWFSAS6gc="; + sha256 = "sha256-fJxtV1QbDyFT4jqNdZzrPXy5MIkY+6atnpL44OWpC8g="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pgpy/default.nix b/pkgs/development/python-modules/pgpy/default.nix index b3fde72baec3..a79c65f4059a 100644 --- a/pkgs/development/python-modules/pgpy/default.nix +++ b/pkgs/development/python-modules/pgpy/default.nix @@ -1,31 +1,31 @@ -{ lib, isPy3k, fetchFromGitHub, buildPythonPackage +{ lib, pythonOlder, fetchFromGitHub, buildPythonPackage , six, enum34, pyasn1, cryptography, singledispatch ? null -, fetchPypi, pytestCheckHook }: +, pytestCheckHook }: buildPythonPackage rec { pname = "pgpy"; - version = "0.5.2"; + version = "0.5.4"; src = fetchFromGitHub { owner = "SecurityInnovation"; repo = "PGPy"; - rev = version; - sha256 = "1v2b1dyq1sl48d2gw7vn4hv6sasd9ihpzzcq8yvxj9dgfak2y663"; + rev = "v${version}"; + sha256 = "03pch39y3hi4ici6y6lvz0j0zram8dw2wvnmq1zyjy3vyvm1ms4a"; }; propagatedBuildInputs = [ six pyasn1 cryptography + ] ++ lib.optionals (pythonOlder "3.4") [ singledispatch - ] ++ lib.optional (!isPy3k) enum34; + enum34 + ]; checkInputs = [ pytestCheckHook ]; - disabledTests = [ "test_sign_string" "test_verify_string" ]; - meta = with lib; { homepage = "https://github.com/SecurityInnovation/PGPy"; description = "Pretty Good Privacy for Python 2 and 3"; @@ -35,6 +35,6 @@ buildPythonPackage rec { 4880. ''; license = licenses.bsd3; - maintainers = with maintainers; [ eadwu ]; + maintainers = with maintainers; [ eadwu dotlambda ]; }; } diff --git a/pkgs/development/python-modules/pgspecial/default.nix b/pkgs/development/python-modules/pgspecial/default.nix index d0cbf5bafe41..c49d6bae313c 100644 --- a/pkgs/development/python-modules/pgspecial/default.nix +++ b/pkgs/development/python-modules/pgspecial/default.nix @@ -1,4 +1,12 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, psycopg2, click, sqlparse }: +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, psycopg2 +, click +, configobj +, sqlparse +}: buildPythonPackage rec { pname = "pgspecial"; @@ -9,13 +17,16 @@ buildPythonPackage rec { sha256 = "b68feb0005f57861573d3fbb82c5c777950decfbb2d1624af57aec825db02c02"; }; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ click sqlparse psycopg2 ]; + propagatedBuildInputs = [ + click + sqlparse + psycopg2 + ]; - checkPhase = '' - find tests -name \*.pyc -delete - py.test tests - ''; + checkInputs = [ + configobj + pytestCheckHook + ]; meta = with lib; { description = "Meta-commands handler for Postgres Database"; diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix index 43ce5f1e766d..8eab09046dc2 100644 --- a/pkgs/development/python-modules/phonemizer/default.nix +++ b/pkgs/development/python-modules/phonemizer/default.nix @@ -65,6 +65,6 @@ buildPythonApplication rec { homepage = "https://github.com/bootphon/phonemizer"; description = "Simple text to phones converter for multiple languages"; license = licenses.gpl3; - maintainers = with maintainers; [ hexa ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pika/default.nix b/pkgs/development/python-modules/pika/default.nix index ef3250732164..1c8cae9f041c 100644 --- a/pkgs/development/python-modules/pika/default.nix +++ b/pkgs/development/python-modules/pika/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, gevent , nose , mock , twisted @@ -11,12 +12,34 @@ buildPythonPackage rec { pname = "pika"; version = "1.2.0"; - src = fetchPypi { - inherit pname version; - sha256 = "f023d6ac581086b124190cb3dc81dd581a149d216fa4540ac34f9be1e3970b89"; + src = fetchFromGitHub { + owner = "pika"; + repo = "pika"; + rev = version; + sha256 = "sha256-Wog6Wxa8V/zv/bBrFOigZi6KE5qRf82bf1GK2XwvpDI="; }; - checkInputs = [ nose mock twisted tornado ]; + propagatedBuildInputs = [ gevent tornado twisted ]; + + checkInputs = [ nose mock ]; + + postPatch = '' + # don't stop at first test failure + # don't run acceptance tests because they access the network + # don't report test coverage + substituteInPlace setup.cfg \ + --replace "stop = 1" "stop = 0" \ + --replace "tests=tests/unit,tests/acceptance" "tests=tests/unit" \ + --replace "with-coverage = 1" "with-coverage = 0" + ''; + + checkPhase = '' + runHook preCheck + + PIKA_TEST_TLS=true nosetests + + runHook postCheck + ''; meta = with lib; { description = "Pure-Python implementation of the AMQP 0-9-1 protocol"; diff --git a/pkgs/development/python-modules/pillow-simd/default.nix b/pkgs/development/python-modules/pillow-simd/default.nix index 3aed634dfb1a..d7b2ff8d6b36 100644 --- a/pkgs/development/python-modules/pillow-simd/default.nix +++ b/pkgs/development/python-modules/pillow-simd/default.nix @@ -1,19 +1,20 @@ { lib, stdenv, buildPythonPackage, fetchFromGitHub, isPyPy, isPy3k , olefile, freetype, libjpeg, zlib, libtiff, libwebp, tcl, lcms2 -, tk, libX11, openjpeg, libimagequant, pyroma, numpy, pytestCheckHook +, libxcb, tk, libX11, openjpeg, libimagequant, pyroma, numpy +, pytestCheckHook }@args: import ../pillow/generic.nix (rec { pname = "Pillow-SIMD"; - version = "7.0.0.post3"; + version = "8.1.2"; disabled = !isPy3k; src = fetchFromGitHub { owner = "uploadcare"; repo = "pillow-simd"; - rev = "v${version}"; - sha256 = "1h832xp1bzf951hr4dmjmxqfsv28sx9lr2cq96qdz1c72k40zj1h"; + rev = version; + sha256 = "1z0c1qpx7l1bhj71ww7za7kl29j5wdraqr2pdhv4dp1q74kgrr0m"; }; meta = with lib; { diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index 48f15181ce00..51da889621f7 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -1,45 +1,36 @@ -{ lib, fetchPypi, buildPythonPackage, pip, pytest, click, six -, setuptools_scm, git, glibcLocales, mock }: +{ lib +, fetchPypi +, pythonOlder +, buildPythonPackage +, pip +, pytest +, pytest-xdist +, click +, setuptools-scm +, git +, glibcLocales +, mock +, pep517 +}: buildPythonPackage rec { pname = "pip-tools"; - version = "6.0.1"; + version = "6.1.0"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "3b0c7b95e8d3dfb011bb42cb38f356fcf5d0630480462b59c4d0a112b8d90281"; + sha256 = "sha256-QAv3finMpIwxq8IQBCkyu1LcwTjvTqTVLF20KaqK5u4="; }; LC_ALL = "en_US.UTF-8"; - checkInputs = [ pytest git glibcLocales mock ]; - propagatedBuildInputs = [ pip click six setuptools_scm ]; - - disabledTests = lib.concatMapStringsSep " and " (s: "not " + s) [ - # Depend on network tests: - "test_allow_unsafe_option" #paramaterized, but all fail - "test_annotate_option" #paramaterized, but all fail - "test_editable_package_vcs" - "test_editable_top_level_deps_preserved" # can't figure out how to select only one parameter to ignore - "test_filter_pip_markers" - "test_filter_pip_markes" - "test_generate_hashes_all_platforms" - "test_generate_hashes_verbose" - "test_generate_hashes_with_editable" - "test_generate_hashes_with_url" - "test_generate_hashes_without_interfering_with_each_other" - "test_get_file_hash_without_interfering_with_each_other" - "test_get_hashes_local_repository_cache_miss" - "test_realistic_complex_sub_dependencies" - "test_stdin" - "test_upgrade_packages_option" - "test_url_package" - "test_editable_package" - "test_locally_available_editable_package_is_not_archived_in_cache_dir" - ]; + checkInputs = [ pytest git glibcLocales mock pytest-xdist ]; + propagatedBuildInputs = [ pip click setuptools-scm pep517 ]; checkPhase = '' export HOME=$(mktemp -d) VIRTUAL_ENV=1 - py.test -k "${disabledTests}" + py.test -m "not network" ''; meta = with lib; { diff --git a/pkgs/development/python-modules/pipx/default.nix b/pkgs/development/python-modules/pipx/default.nix index 34a7bc6b31a1..e6f9242dde6d 100644 --- a/pkgs/development/python-modules/pipx/default.nix +++ b/pkgs/development/python-modules/pipx/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pipx"; - version = "0.16.1.0"; + version = "0.16.2.1"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "pipxproject"; repo = pname; rev = version; - sha256 = "081raqsaq7i2x4yxhxppv930jhajdwmngin5wazy7vqhiy3xc669"; + sha256 = "1agdp8j4lw6z0lk2vv1m8d49r5vwfkpal3hdgq67vnjyp9904pf6"; }; propagatedBuildInputs = [ @@ -54,6 +54,7 @@ buildPythonPackage rec { "suffix" "legacy_venv" "determination" + "json" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/plexapi/default.nix b/pkgs/development/python-modules/plexapi/default.nix index 52c371154111..dc832809c28f 100644 --- a/pkgs/development/python-modules/plexapi/default.nix +++ b/pkgs/development/python-modules/plexapi/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "PlexAPI"; - version = "4.5.1"; + version = "4.5.2"; disabled = isPy27; src = fetchFromGitHub { owner = "pkkid"; repo = "python-plexapi"; rev = version; - sha256 = "sha256-WrjIN6+7ybprnjCv57BdKaQYoQ+HgGVr/XytXcbAmwg="; + sha256 = "sha256-9rdpisEuLUO7oO7+7SQb4fXqRG30rf4R7bSFY+QpMhM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/plugwise/default.nix b/pkgs/development/python-modules/plugwise/default.nix index 289f1871f338..d62c2e8bb72b 100644 --- a/pkgs/development/python-modules/plugwise/default.nix +++ b/pkgs/development/python-modules/plugwise/default.nix @@ -1,31 +1,31 @@ { lib -, buildPythonPackage -, fetchFromGitHub , aiohttp , async-timeout +, buildPythonPackage , crcmod , defusedxml -, pyserial -, pytz -, python-dateutil -, semver +, fetchFromGitHub , jsonpickle +, munch , mypy +, pyserial , pytest-aiohttp , pytest-asyncio -, pytest-cov , pytestCheckHook +, python-dateutil +, pytz +, semver }: buildPythonPackage rec { pname = "plugwise"; - version = "0.9.3"; + version = "0.9.4"; src = fetchFromGitHub { owner = pname; repo = "python-plugwise"; rev = version; - sha256 = "sha256-MZ4R55vGUyWmR0Md83eNerzsgtYMch1vfQ3sqbm12bM="; + sha256 = "sha256-5r+Xe3EKLjuR7mPGEPOKzhE7G6OzNEClf847Px9VdWU="; }; propagatedBuildInputs = [ @@ -33,9 +33,10 @@ buildPythonPackage rec { async-timeout crcmod defusedxml + munch pyserial - pytz python-dateutil + pytz semver ]; @@ -44,8 +45,6 @@ buildPythonPackage rec { mypy pytest-aiohttp pytest-asyncio - pytest-cov - pytest-asyncio pytestCheckHook ]; diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix index 51e95efbee50..ad043e9f59e0 100644 --- a/pkgs/development/python-modules/poetry/default.nix +++ b/pkgs/development/python-modules/poetry/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ --replace 'importlib-metadata = {version = "^1.6.0", python = "<3.8"}' \ - 'importlib-metadata = {version = ">=1.6,<2", python = "<3.8"}' \ + 'importlib-metadata = {version = ">=1.6", python = "<3.8"}' \ --replace 'version = "^21.2.0"' 'version = ">=21.2"' ''; diff --git a/pkgs/development/python-modules/pomegranate/default.nix b/pkgs/development/python-modules/pomegranate/default.nix index 8f260ad8ccb9..518840d415a9 100644 --- a/pkgs/development/python-modules/pomegranate/default.nix +++ b/pkgs/development/python-modules/pomegranate/default.nix @@ -1,19 +1,41 @@ -{ lib, buildPythonPackage, fetchFromGitHub, numpy, scipy, cython, networkx, joblib, nose, pyyaml }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, numpy +, scipy +, cython +, networkx +, joblib +, pandas +, nose +, pyyaml +}: + buildPythonPackage rec { pname = "pomegranate"; - version = "0.11.2"; + version = "0.13.5"; src = fetchFromGitHub { repo = pname; owner = "jmschrei"; rev = "v${version}"; - sha256 = "070ciwww1lhjmfwd5n1kcwgxwbgdfvmhjs4l156bnf08z9dlrafl"; + sha256 = "1hbxchp3daykkf1fa79a9mh34p78bygqcf1nv4qwkql3gw0pd6l7"; }; + patches = lib.optionals (lib.versionOlder version "13.6") [ + # Fix compatibility with recent joblib release, will be part of the next + # pomegranate release after 0.13.5 + (fetchpatch { + url = "https://github.com/jmschrei/pomegranate/commit/42d14bebc44ffd4a778b2a6430aa845591b7c3b7.patch"; + sha256 = "0f9cx0fj9xkr3hch7jyrn76zjypilh5bqw734caaw6g2m49lvbff"; + }) + ]; + propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ]; - checkInputs = [ nose ]; + checkInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest. meta = with lib; { description = "Probabilistic and graphical models for Python, implemented in cython for speed"; diff --git a/pkgs/development/python-modules/poppler-qt5/default.nix b/pkgs/development/python-modules/poppler-qt5/default.nix index 345f092a80fa..4a9fdfa42620 100644 --- a/pkgs/development/python-modules/poppler-qt5/default.nix +++ b/pkgs/development/python-modules/poppler-qt5/default.nix @@ -1,44 +1,64 @@ -{ buildPythonPackage, fetchPypi, lib, sip, qtbase, pyqt5, poppler, pkg-config, fetchpatch -, substituteAll +{ stdenv +, lib +, buildPythonPackage +, isPy3k +, fetchPypi +, pythonPackages +, sip +, qtbase +, qmake +, pyqt5 +, pyqt-builder +, poppler +, pkg-config +, fetchpatch }: buildPythonPackage rec { pname = "python-poppler-qt5"; - version = "0.24.2"; + version = "21.1.0"; + + disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"; + sha256 = "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"; }; patches = [ - (substituteAll { - src = ./poppler-include-dir.patch; - poppler_include_dir = "${poppler.dev}/include/poppler"; - }) + # Fix for https://github.com/frescobaldi/python-poppler-qt5/issues/43 (from PR #45) (fetchpatch { - url = "https://github.com/wbsoft/python-poppler-qt5/commit/faf4d1308f89560b0d849671226e3080dfc72e79.patch"; - sha256 = "18krhh6wzsnpxzlzv02nginb1vralla8ai24zqk10nc4mj6fkj86"; + url = "https://github.com/frescobaldi/python-poppler-qt5/commit/40e71ad88173d02648bceb2438bc0567e60dacd5.patch"; + sha256 = "0c93d0k7b1n2s2njl8g92x6vw3z96da1fczah9qx07x08iw8dzi5"; }) ]; - setupPyBuildFlags = [ - "--pyqt-sip-dir ${pyqt5}/share/sip/PyQt5" - "--qt-include-dir ${qtbase.dev}/include" - ]; + buildInputs = [ qtbase.dev poppler pyqt-builder ]; + nativeBuildInputs = [ pkg-config qmake sip ]; + propagatedBuildInputs = [ pyqt5.dev ]; + + format = "pyproject"; + dontConfigure = true; + + postPatch = '' + cat <<EOF >> pyproject.toml + sip-include-dirs = ["${pyqt5}/share/sip/PyQt5"] - buildInputs = [ qtbase.dev poppler ]; - nativeBuildInputs = [ pkg-config ]; - propagatedBuildInputs = [ sip pyqt5.dev ]; + [tool.sip.bindings.Poppler-Qt5] + include-dirs = ["${poppler.dev}/include/poppler"] + tags = ["${sip.platform_tag}"] + EOF + ''; # no tests, just bindings for `poppler_qt5` doCheck = false; + pythonImportsCheck = [ "popplerqt5" ]; dontWrapQtApps = true; meta = with lib; { - homepage = "https://github.com/wbsoft/python-poppler-qt5"; - license = licenses.gpl2; - maintainers = with maintainers; [ ]; + homepage = "https://github.com/frescobaldi/python-poppler-qt5"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ eduardosm ]; }; } diff --git a/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch b/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch deleted file mode 100644 index 7106c1d6352c..000000000000 --- a/pkgs/development/python-modules/poppler-qt5/poppler-include-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index 59a75b0..0a73268 100644 ---- a/setup.py -+++ b/setup.py -@@ -169,6 +169,7 @@ class build_ext(build_ext_base): - 'Please specify via --pyqt-sip-flags=') - - self.include_dirs += (self.qt_include_dir, -+ '@poppler_include_dir@', - os.path.join(self.qt_include_dir, 'QtCore'), - os.path.join(self.qt_include_dir, 'QtGui'), - os.path.join(self.qt_include_dir, 'QtXml')) diff --git a/pkgs/development/python-modules/ppscore/default.nix b/pkgs/development/python-modules/ppscore/default.nix index ad3a393a00d1..43dd1f249ed8 100644 --- a/pkgs/development/python-modules/ppscore/default.nix +++ b/pkgs/development/python-modules/ppscore/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , isPy27 , pandas -, scikitlearn +, scikit-learn , pytestCheckHook }: @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pandas - scikitlearn + scikit-learn ]; meta = with lib; { diff --git a/pkgs/development/python-modules/prayer-times-calculator/default.nix b/pkgs/development/python-modules/prayer-times-calculator/default.nix new file mode 100644 index 000000000000..758c52f1d4b5 --- /dev/null +++ b/pkgs/development/python-modules/prayer-times-calculator/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "prayer-times-calculator"; + version = "0.0.4"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "uchagani"; + repo = pname; + rev = version; + sha256 = "053wa0zzfflaxlllh6sxgnrqqx8qyv4jcj85fsiv6n608kw202d5"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "prayer_times_calculator" ]; + + meta = with lib; { + description = "Python client for the Prayer Times API"; + homepage = "https://github.com/uchagani/prayer-times-calculator"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/prettytable/default.nix b/pkgs/development/python-modules/prettytable/default.nix index d349a58960a1..50b9eb57630e 100644 --- a/pkgs/development/python-modules/prettytable/default.nix +++ b/pkgs/development/python-modules/prettytable/default.nix @@ -4,6 +4,8 @@ , glibcLocales , setuptools_scm , wcwidth +, importlib-metadata +, pythonOlder }: buildPythonPackage rec { @@ -18,7 +20,11 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm ]; buildInputs = [ glibcLocales ]; - propagatedBuildInputs = [ wcwidth ]; + propagatedBuildInputs = [ + wcwidth + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; preCheck = '' export LANG="en_US.UTF-8" diff --git a/pkgs/development/python-modules/prison/default.nix b/pkgs/development/python-modules/prison/default.nix index 941da2bf9afd..95a79ea1896b 100644 --- a/pkgs/development/python-modules/prison/default.nix +++ b/pkgs/development/python-modules/prison/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "prison"; - version = "0.1.2"; + version = "0.1.3"; src = fetchFromGitHub { owner = "betodealmeida"; repo = "python-rison"; rev = version; - sha256 = "14vb468iznf9416z993bbqihywp9ibyslw5vp67wfr200zyxjwak"; + sha256 = "sha256-qor40vUQeTdlO3vwug3GGNX5vkNaF0H7EWlRdsY4bvc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/privacyidea/default.nix b/pkgs/development/python-modules/privacyidea/default.nix index c28a00901682..11ff6f71af63 100644 --- a/pkgs/development/python-modules/privacyidea/default.nix +++ b/pkgs/development/python-modules/privacyidea/default.nix @@ -1,10 +1,10 @@ { lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python, nixosTests , cryptography, pyrad, pymysql, python-dateutil, flask-versioned, flask_script -, defusedxml, croniter, flask_migrate, pyjwt, configobj, sqlsoup, pillow +, 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 +, pydash, ecdsa , mock, pytestCheckHook, responses, testfixtures }: @@ -29,10 +29,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ cryptography pyrad pymysql python-dateutil flask-versioned flask_script - defusedxml croniter flask_migrate pyjwt configobj sqlsoup pillow + 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 + pydash ecdsa ]; passthru.tests = { inherit (nixosTests) privacyidea; }; diff --git a/pkgs/development/python-modules/pulsectl/default.nix b/pkgs/development/python-modules/pulsectl/default.nix index 6b05f383ec6f..8af58a2565eb 100644 --- a/pkgs/development/python-modules/pulsectl/default.nix +++ b/pkgs/development/python-modules/pulsectl/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "pulsectl"; - version = "21.3.4"; + version = "21.5.17"; src = fetchPypi { inherit pname version; - sha256 = "sha256-+qi5M2I3VlmQKY8ghw4T3RZ4pFhoR8paf/Kr8QdS81Y="; + sha256 = "1826wz4d7qnlwl5csnjds1xh9ainicj2s004hlwv54bdvwx2ny1z"; }; patches = [ @@ -17,9 +17,15 @@ buildPythonPackage rec { }) ]; + pythonImportsCheck = [ + "pulsectl" + ]; + checkInputs = [ pulseaudio ]; + checkPhase = '' - ${python.interpreter} -m unittest pulsectl.tests.all + export HOME=$TMPDIR + ${python.interpreter} -m unittest discover ''; meta = with lib; { diff --git a/pkgs/development/python-modules/pushbullet/default.nix b/pkgs/development/python-modules/pushbullet/default.nix index 68c9d9180dc8..43cab7db6756 100644 --- a/pkgs/development/python-modules/pushbullet/default.nix +++ b/pkgs/development/python-modules/pushbullet/default.nix @@ -1,6 +1,12 @@ -{ lib, buildPythonPackage, fetchPypi -, requests, websocket_client, python_magic -, pytest, mock }: +{ lib +, buildPythonPackage +, fetchPypi +, requests +, websocket_client +, python_magic +, cryptography +, pytestCheckHook +}: buildPythonPackage rec { pname = "pushbullet.py"; @@ -11,13 +17,17 @@ buildPythonPackage rec { sha256 = "917883e1af4a0c979ce46076b391e0243eb8fe0a81c086544bcfa10f53e5ae64"; }; - propagatedBuildInputs = [ requests websocket_client python_magic ]; + propagatedBuildInputs = [ cryptography requests websocket_client python_magic ]; - checkInputs = [ pytest mock ]; - - checkPhase = '' - PUSHBULLET_API_KEY="" py.test -k "not test_e2e and not test_auth" + preCheck = '' + export PUSHBULLET_API_KEY="" ''; + checkInputs = [ pytestCheckHook ]; + disabledTests = [ + "test_auth_fail" + "test_auth_success" + "test_decryption" + ]; meta = with lib; { description = "A simple python client for pushbullet.com"; diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index a24e1d5db13e..b9f71de8e94f 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -2,14 +2,13 @@ , buildPythonPackage , debugger , fetchPypi -, isPy3k , Mako -, makeWrapper , packaging , pysocks , pygments , ROPGadget , capstone +, colored-traceback , paramiko , pip , psutil @@ -17,28 +16,40 @@ , pyserial , dateutil , requests +, rpyc , tox , unicorn , intervaltree -, fetchpatch +, installShellFiles }: +let + debuggerName = lib.strings.getName debugger; +in buildPythonPackage rec { - version = "4.3.1"; + version = "4.5.0"; pname = "pwntools"; src = fetchPypi { inherit pname version; - sha256 = "12ja913kz8wl4afrmpzxh9fx6j7rcwc2vqzkvfr1fxn42gkqhqf4"; + sha256 = "sha256-IWHMorSASG/po8ib1whS3xPuoUUlD0tbbWI35DI2SIY="; }; - # Upstream has set an upper bound on unicorn because of https://github.com/Gallopsled/pwntools/issues/1538, - # but since that is a niche use case and it requires extra work to get unicorn 1.0.2rc3 to work we relax - # the bound here. Check if this is still necessary when updating! postPatch = '' + # Upstream has set an upper bound on unicorn because of https://github.com/Gallopsled/pwntools/issues/1538, + # but since that is a niche use case and it requires extra work to get unicorn 1.0.2rc3 to work we relax + # the bound here. Check if this is still necessary when updating! sed -i 's/unicorn>=1.0.2rc1,<1.0.2rc4/unicorn>=1.0.2rc1/' setup.py + + # Upstream hardcoded the check for the command `gdb-multiarch`; + # Forcefully use the provided debugger, as `gdb` (hence `pwndbg`) is built with multiarch in `nixpkgs`. + sed -i 's/gdb-multiarch/${debuggerName}/' pwnlib/gdb.py ''; + nativeBuildInputs = [ + installShellFiles + ]; + propagatedBuildInputs = [ Mako packaging @@ -46,6 +57,7 @@ buildPythonPackage rec { pygments ROPGadget capstone + colored-traceback paramiko pip psutil @@ -53,6 +65,7 @@ buildPythonPackage rec { pyserial dateutil requests + rpyc tox unicorn intervaltree @@ -60,9 +73,13 @@ buildPythonPackage rec { doCheck = false; # no setuptools tests for the package + postInstall = '' + installShellCompletion --bash extra/bash_completion.d/shellcraft + ''; + postFixup = '' mkdir -p "$out/bin" - makeWrapper "${debugger}/bin/${lib.strings.getName debugger}" "$out/bin/pwntools-gdb" + makeWrapper "${debugger}/bin/${debuggerName}" "$out/bin/pwntools-gdb" ''; meta = with lib; { diff --git a/pkgs/development/python-modules/py-canary/default.nix b/pkgs/development/python-modules/py-canary/default.nix new file mode 100644 index 000000000000..531624781b40 --- /dev/null +++ b/pkgs/development/python-modules/py-canary/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +}: + +buildPythonPackage rec { + pname = "py-canary"; + version = "0.5.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "snjoetw"; + repo = pname; + rev = version; + sha256 = "0j743cc0wv7im3anx1vvdm79zyvw67swhc3zwwc1r8626dgnmxjr"; + }; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + mock + pytestCheckHook + requests-mock + ]; + + pythonImportsCheck = [ "canary" ]; + + meta = with lib; { + description = "Python package for Canary Security Camera"; + homepage = "https://github.com/snjoetw/py-canary"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/py-cpuinfo/default.nix b/pkgs/development/python-modules/py-cpuinfo/default.nix index f9e276b3bb5f..12b9668f1edd 100644 --- a/pkgs/development/python-modules/py-cpuinfo/default.nix +++ b/pkgs/development/python-modules/py-cpuinfo/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , buildPythonPackage , pytestCheckHook , sysctl @@ -9,28 +8,15 @@ buildPythonPackage rec { pname = "py-cpuinfo"; - version = "7.0.0"; + version = "8.0.0"; src = fetchFromGitHub { owner = "workhorsy"; repo = pname; rev = "v${version}"; - sha256 = "10qfaibyb2syiwiyv74l7d97vnmlk079qirgnw3ncklqjs0s3gbi"; + sha256 = "sha256-Mgzj1HTasUNHeHMVwV6d+TeyVqnBNUwCJ1EC3kfovf8="; }; - patches = [ - # Make it detect Apple Silicon, remove after https://github.com/workhorsy/py-cpuinfo/pull/161 is merged. - (fetchpatch { - url = "https://github.com/workhorsy/py-cpuinfo/commit/54c32da6678f9d75ec5acf4534056cdc85c2a04d.patch"; - sha256 = "sha256-3R46KrpACAQ1V0CQtz48V5mQXxvplUQrXnACtiE8WqY="; - }) - # Continuation of the patch above - (fetchpatch { - url = "https://github.com/workhorsy/py-cpuinfo/commit/0d00f4b99750f292c85ff23e1039ea9489cb7ec8.patch"; - sha256 = "sha256-mHoXoCAEG2v3xpQppRFWzSvhYCp5i9CZkbEgtiLVzMs="; - }) - ]; - checkInputs = [ pytestCheckHook ]; @@ -42,17 +28,19 @@ buildPythonPackage rec { --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'" ''; - meta = { - description = "Get CPU info with pure Python 2 & 3"; + pythonImportsCheck = [ "cpuinfo" ]; + + meta = with lib; { + description = "Get CPU info with pure Python"; longDescription = '' Py-cpuinfo gets CPU info with pure Python and should work without any extra programs or libraries, beyond what your OS provides. It does not require any compilation (C/C++, assembly, etc.) to use and works with - Python 2 and 3. + Python. ''; - inherit (src.meta) homepage; + homepage = "https://github.com/workhorsy/py-cpuinfo"; changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ costrouc ]; + license = licenses.mit; + maintainers = with maintainers; [ costrouc ]; }; } diff --git a/pkgs/development/python-modules/py-dmidecode/default.nix b/pkgs/development/python-modules/py-dmidecode/default.nix new file mode 100644 index 000000000000..e74a8d7ac297 --- /dev/null +++ b/pkgs/development/python-modules/py-dmidecode/default.nix @@ -0,0 +1,25 @@ +{ lib, buildPythonPackage, fetchPypi, dmidecode }: + +buildPythonPackage rec { + pname = "py-dmidecode"; + version = "0.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1bv1vmhj8h520kj6slwpz16xfmgp117yjjkfyihkl5ix6mn5zkpa"; + }; + + propagatedBuildInputs = [ dmidecode ]; + + # Project has no tests. + doCheck = false; + pythonImportsCheck = [ "dmidecode" ]; + + meta = with lib; { + homepage = "https://github.com/zaibon/py-dmidecode/"; + description = "Python library that parses the output of dmidecode"; + license = licenses.asl20; + maintainers = with maintainers; [ davidtwco ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/python-modules/py-ubjson/default.nix b/pkgs/development/python-modules/py-ubjson/default.nix new file mode 100644 index 000000000000..4efa2b8b6fdb --- /dev/null +++ b/pkgs/development/python-modules/py-ubjson/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "py-ubjson"; + version = "0.16.1"; + + src = fetchFromGitHub { + owner = "Iotic-Labs"; + repo = pname; + rev = "v${version}"; + sha256 = "1frn97xfa88zrfmpnvdk1pc03yihlchhph99bhjayvzlfcrhm5v3"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "test/test.py" ]; + + pythonImportsCheck = [ "ubjson" ]; + + meta = with lib; { + description = "Universal Binary JSON draft-12 serializer for Python"; + homepage = "https://github.com/Iotic-Labs/py-ubjson"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index a79885d64afc..6ef204fe5257 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { buildInputs = [ exiv2 boost ]; # work around python distutils compiling C++ with $CC (see issue #26709) - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; meta = with lib; { homepage = "https://launchpad.net/py3exiv2"; diff --git a/pkgs/development/python-modules/pyGithub/default.nix b/pkgs/development/python-modules/pyGithub/default.nix index c214b375ff38..02656968d682 100644 --- a/pkgs/development/python-modules/pyGithub/default.nix +++ b/pkgs/development/python-modules/pyGithub/default.nix @@ -3,36 +3,41 @@ , cryptography , deprecated , fetchFromGitHub -, httpretty -, isPy3k -, parameterized +, pynacl , pyjwt -, pytestCheckHook -, requests }: +, pythonOlder +, requests +}: buildPythonPackage rec { pname = "PyGithub"; - version = "1.54.1"; - disabled = !isPy3k; + version = "1.55"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "PyGithub"; repo = "PyGithub"; rev = "v${version}"; - sha256 = "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"; + sha256 = "sha256-PuGCBFSbM91NtSzuyf0EQUr3LiuHDq90OwkSf53rSyA="; }; - checkInputs = [ httpretty parameterized pytestCheckHook ]; - propagatedBuildInputs = [ cryptography deprecated pyjwt requests ]; + propagatedBuildInputs = [ + cryptography + deprecated + pynacl + pyjwt + requests + ]; # Test suite makes REST calls against github.com doCheck = false; + pythonImportsCheck = [ "github" ]; meta = with lib; { + description = "Python library to access the GitHub API v3"; homepage = "https://github.com/PyGithub/PyGithub"; - description = "A Python (2 and 3) library to access the GitHub API v3"; platforms = platforms.all; - license = licenses.gpl3; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ jhhuh ]; }; } diff --git a/pkgs/development/python-modules/pyaftership/default.nix b/pkgs/development/python-modules/pyaftership/default.nix index e65812cb3133..6253d9511183 100644 --- a/pkgs/development/python-modules/pyaftership/default.nix +++ b/pkgs/development/python-modules/pyaftership/default.nix @@ -1,4 +1,13 @@ -{ aiohttp, async-timeout, buildPythonPackage, fetchPypi, isPy3k, lib }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, aiohttp +, async-timeout +, aresponses +, pytest-asyncio +, pytestCheckHook +}: buildPythonPackage rec { pname = "pyaftership"; @@ -6,16 +15,17 @@ buildPythonPackage rec { disabled = !isPy3k; - src = fetchPypi { - inherit pname version; - sha256 = "28b62c323d06492399b60d8135a58d6feaa1d60837eddc14e57ea2b69d356c0a"; + src = fetchFromGitHub { + owner = "ludeeus"; + repo = pname; + rev = version; + sha256 = "0jyzgwaijkp80whi58a0hgjzmnlczmd9vwn11z2m0j01kbdwznn5"; }; propagatedBuildInputs = [ aiohttp async-timeout ]; - # No tests - doCheck = false; - pythonImportsCheck = [ "pyaftership.tracker" ]; + checkInputs = [ pytestCheckHook aresponses pytest-asyncio ]; + pythonImportsCheck = [ "pyaftership" ]; meta = with lib; { description = "Python wrapper package for the AfterShip API"; diff --git a/pkgs/development/python-modules/pyairvisual/default.nix b/pkgs/development/python-modules/pyairvisual/default.nix index bcbb672f5c80..65f70efb7c5b 100644 --- a/pkgs/development/python-modules/pyairvisual/default.nix +++ b/pkgs/development/python-modules/pyairvisual/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "pyairvisual"; - version = "5.0.7"; + version = "5.0.8"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "bachya"; repo = pname; rev = version; - sha256 = "sha256-r/AJl36dv6+C92tc3kpX4/VzG69qdh4ERCyQxDOHdVU="; + sha256 = "sha256-QgMc0O5jk5LgKQg9ZMCZd3dNLv1typm1Rp2u8kSsqYk="; }; nativeBuildInputs = [ poetry-core ]; @@ -43,8 +43,8 @@ buildPythonPackage rec { pytestCheckHook ]; - # Ignore the examples as they are prefixed with test_ - pytestFlagsArray = [ "--ignore examples/" ]; + disabledTestPaths = [ "examples/" ]; + pythonImportsCheck = [ "pyairvisual" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pyarrow/default.nix b/pkgs/development/python-modules/pyarrow/default.nix index a38d5df50ddf..dabe85b90432 100644 --- a/pkgs/development/python-modules/pyarrow/default.nix +++ b/pkgs/development/python-modules/pyarrow/default.nix @@ -34,12 +34,17 @@ buildPythonPackage rec { export PYARROW_PARALLEL=$NIX_BUILD_CORES ''; - # Deselect a single test because pyarrow prints a 2-line error message where - # only a single line is expected. The additional line of output comes from - # the glog library which is an optional dependency of arrow-cpp that is - # enabled in nixpkgs. - # Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11393 - pytestFlagsArray = [ "--deselect=pyarrow/tests/test_memory.py::test_env_var" ]; + pytestFlagsArray = [ + # Deselect a single test because pyarrow prints a 2-line error message where + # only a single line is expected. The additional line of output comes from + # the glog library which is an optional dependency of arrow-cpp that is + # enabled in nixpkgs. + # Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11393 + "--deselect=pyarrow/tests/test_memory.py::test_env_var" + # Deselect the parquet dataset write test because it erroneously fails to find the + # pyarrow._dataset module. + "--deselect=pyarrow/tests/parquet/test_dataset.py::test_write_to_dataset_filesystem" + ]; dontUseSetuptoolsCheck = true; preCheck = '' diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix index 6bea15df386f..ea6e85221776 100644 --- a/pkgs/development/python-modules/pyatmo/default.nix +++ b/pkgs/development/python-modules/pyatmo/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pyatmo"; - version = "4.2.2"; + version = "4.2.3"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "jabesq"; repo = "pyatmo"; rev = "v${version}"; - sha256 = "sha256-3IxDDLa8KMHVkHAeTmdNVRPc5aKzF3VwL2kKnG8Fp7I="; + sha256 = "sha256-hbs+1x/pwv00dhm+1Yj1effddJZHDjs2K3oeBmdCY+k="; }; postPatch = '' diff --git a/pkgs/development/python-modules/pyatspi/default.nix b/pkgs/development/python-modules/pyatspi/default.nix index 5ae00417b6c0..b566edef64d1 100644 --- a/pkgs/development/python-modules/pyatspi/default.nix +++ b/pkgs/development/python-modules/pyatspi/default.nix @@ -1,13 +1,13 @@ -{ lib, fetchurl, pkg-config, buildPythonPackage, isPy3k, at-spi2-core, pygobject3, gnome3 }: +{ lib, fetchurl, pkg-config, buildPythonPackage, isPy3k, at-spi2-core, pygobject3, gnome }: buildPythonPackage rec { pname = "pyatspi"; - version = "2.38.0"; + version = "2.38.1"; format = "other"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "/4CTEv0ML2HhkcGBoaY4owtXm5G2gs+1oFU1pVJltD0="; + sha256 = "0lc1p6p296c9q3lffi03v902jlsj34i7yyl3rcyaq94wwbljg7z4"; }; nativeBuildInputs = [ pkg-config ]; @@ -20,9 +20,10 @@ buildPythonPackage rec { disabled = !isPy3k; passthru = { - updateScript = gnome3.updateScript { + updateScript = gnome.updateScript { packageName = pname; attrPath = "python3.pkgs.${pname}"; + versionPolicy = "odd-unstable"; }; }; diff --git a/pkgs/development/python-modules/pybids/default.nix b/pkgs/development/python-modules/pybids/default.nix index 034bdb6363a0..143f578b08d5 100644 --- a/pkgs/development/python-modules/pybids/default.nix +++ b/pkgs/development/python-modules/pybids/default.nix @@ -14,12 +14,12 @@ }: buildPythonPackage rec { - version = "0.12.4"; + version = "0.13"; pname = "pybids"; src = fetchPypi { inherit pname version; - sha256 = "830f3f518ab0d2e058e9ba6d6ff9a942792909c874433b3ad58a3339a23f46bf"; + sha256 = "sha256-zVFaGAKgTP9UiUdmO4+Tut8Qc64xuGyB26cQLRHOqYw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pybrowserid/default.nix b/pkgs/development/python-modules/pybrowserid/default.nix index 7517de597544..391be3c17bd4 100644 --- a/pkgs/development/python-modules/pybrowserid/default.nix +++ b/pkgs/development/python-modules/pybrowserid/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { description = "Python library for the BrowserID Protocol"; homepage = "https://github.com/mozilla/PyBrowserID"; license = licenses.mpl20; - maintainers = with maintainers; [ worldofpeace ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pycflow2dot/default.nix b/pkgs/development/python-modules/pycflow2dot/default.nix new file mode 100644 index 000000000000..db1ac8fabb2f --- /dev/null +++ b/pkgs/development/python-modules/pycflow2dot/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cflow +, graphviz +, pydot +, networkx +, which +}: + +buildPythonPackage rec { + pname = "pycflow2dot"; + version = "0.2.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1zm8x2pd0q6zza0fw7hg9g1qvybfnjq6ql9b8mh2fc45l7l25655"; + }; + + propagatedBuildInputs = [ + cflow + graphviz + pydot + networkx + which + ]; + + pythonImportsCheck = [ "pycflow2dot" ]; + checkPhase = '' + cd tests + export PATH=$out/bin:$PATH + make all + ''; + + meta = with lib; { + description = "Layout C call graphs from cflow using GraphViz dot"; + homepage = "https://github.com/johnyf/pycflow2dot"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ evils ]; + }; +} diff --git a/pkgs/development/python-modules/pychannels/default.nix b/pkgs/development/python-modules/pychannels/default.nix index 0c5e290334da..8923e5c9c69e 100644 --- a/pkgs/development/python-modules/pychannels/default.nix +++ b/pkgs/development/python-modules/pychannels/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "pychannels"; - version = "1.2.2"; + version = "1.2.3"; src = fetchFromGitHub { owner = "fancybits"; repo = pname; rev = version; - sha256 = "0dqc0vhf6c5r3g7nfbpa668x6z2zxrznk6h907s6sxkq4sbqnhqf"; + sha256 = "sha256-E+VL4mJ2KxS5bJZc3Va+wvyVjT55LJz+1wHkxDRa85s="; }; propagatedBuildInputs = [ requests ]; diff --git a/pkgs/development/python-modules/pyclimacell/default.nix b/pkgs/development/python-modules/pyclimacell/default.nix index c9eb0f0353f6..7f5703585c43 100644 --- a/pkgs/development/python-modules/pyclimacell/default.nix +++ b/pkgs/development/python-modules/pyclimacell/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pyclimacell"; - version = "0.18.0"; + version = "0.18.2"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "raman325"; repo = pname; rev = "v${version}"; - sha256 = "0pxlh3lwd1az6v7vbaz9kv6ngqxf34iddp7vr0d0p8apbvinwrha"; + sha256 = "sha256-jWHjnebg4Aar48gid7bB7XYXOQtSqbmVmASsZd0YoPc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pycm/default.nix b/pkgs/development/python-modules/pycm/default.nix index b750bd30b0a4..614393cf2d59 100644 --- a/pkgs/development/python-modules/pycm/default.nix +++ b/pkgs/development/python-modules/pycm/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, numpy, pytest }: +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, matplotlib, numpy, pytest, seaborn }: buildPythonPackage rec { pname = "pycm"; @@ -20,7 +20,7 @@ buildPythonPackage rec { ''; checkInputs = [ pytest ]; - propagatedBuildInputs = [ numpy ]; + propagatedBuildInputs = [ matplotlib numpy seaborn ]; checkPhase = '' pytest Test/ diff --git a/pkgs/development/python-modules/pycurl/default.nix b/pkgs/development/python-modules/pycurl/default.nix index fe62d1be1ea1..e202d1928f21 100644 --- a/pkgs/development/python-modules/pycurl/default.nix +++ b/pkgs/development/python-modules/pycurl/default.nix @@ -1,11 +1,12 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , isPyPy , fetchPypi , pythonOlder , curl , openssl , bottle -, pytest +, pytestCheckHook , nose , flaky }: @@ -20,6 +21,11 @@ buildPythonPackage rec { sha256 = "8301518689daefa53726b59ded6b48f33751c383cf987b0ccfbbc4ed40281325"; }; + preConfigure = '' + substituteInPlace setup.py --replace '--static-libs' '--libs' + export PYCURL_SSL_LIBRARY=openssl + ''; + buildInputs = [ curl openssl.out @@ -31,34 +37,48 @@ buildPythonPackage rec { checkInputs = [ bottle - pytest + pytestCheckHook nose flaky ]; - # skip impure or flakey tests - # See also: - # * https://github.com/NixOS/nixpkgs/issues/77304 - checkPhase = '' - HOME=$TMPDIR pytest tests -k "not test_ssl_in_static_libs \ - and not test_keyfunction \ - and not test_keyfunction_bogus_return \ - and not test_libcurl_ssl_gnutls \ - and not test_libcurl_ssl_nss \ - and not test_libcurl_ssl_openssl" \ - --ignore=tests/getinfo_test.py \ - --ignore=tests/memory_mgmt_test.py \ - --ignore=tests/multi_memory_mgmt_test.py \ - --ignore=tests/multi_timer_test.py - ''; + pytestFlagsArray = [ + # don't pick up the tests directory below examples/ + "tests" + ]; - preConfigure = '' - substituteInPlace setup.py --replace '--static-libs' '--libs' - export PYCURL_SSL_LIBRARY=openssl + preCheck = '' + export HOME=$TMPDIR ''; - meta = { + disabledTests = [ + # libcurl stopped passing the reason phrase from the HTTP status line + # https://github.com/pycurl/pycurl/issues/679 + "test_failonerror" + "test_failonerror_status_line_invalid_utf8_python3" + # bottle>=0.12.17 escapes utf8 properly, so these test don't work anymore + # https://github.com/pycurl/pycurl/issues/669 + "test_getinfo_content_type_invalid_utf8_python3" + "test_getinfo_cookie_invalid_utf8_python3" + "test_getinfo_raw_content_type_invalid_utf8" + "test_getinfo_raw_cookie_invalid_utf8" + # tests that require network access + "test_keyfunction" + "test_keyfunction_bogus_return" + # OSError: tests/fake-curl/libcurl/with_openssl.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_openssl" + # OSError: tests/fake-curl/libcurl/with_nss.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_nss" + # OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_gnutls" + # AssertionError: assert 'crypto' in ['curl'] + "test_ssl_in_static_libs" + ]; + + meta = with lib; { homepage = "http://pycurl.sourceforge.net/"; description = "Python wrapper for libcurl"; + license = licenses.lgpl2Only; + maintainers = with maintainers; []; }; } diff --git a/pkgs/development/python-modules/pydbus/default.nix b/pkgs/development/python-modules/pydbus/default.nix index 09f777b01813..aa3a41e2f8c5 100644 --- a/pkgs/development/python-modules/pydbus/default.nix +++ b/pkgs/development/python-modules/pydbus/default.nix @@ -15,6 +15,6 @@ buildPythonPackage rec { homepage = "https://github.com/LEW21/pydbus"; description = "Pythonic DBus library"; license = lib.licenses.lgpl2Plus; - maintainers = with lib.maintainers; [ gnidorah ]; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pydeconz/default.nix b/pkgs/development/python-modules/pydeconz/default.nix index 73d989468c55..c202e5df19b5 100644 --- a/pkgs/development/python-modules/pydeconz/default.nix +++ b/pkgs/development/python-modules/pydeconz/default.nix @@ -3,21 +3,21 @@ , aioresponses , buildPythonPackage , fetchFromGitHub -, pytest-asyncio +, pytest-aiohttp , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "pydeconz"; - version = "78"; + version = "79"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Kane610"; repo = "deconz"; rev = "v${version}"; - sha256 = "sha256-uIRuLNGFX7gq59/ntfks9pECiGkX7jjKh2jmjxFRcv4="; + sha256 = "sha256-I29UIyHjsIymZxcE084hQoyaEMTXIIQPFcB8lsxY+UI="; }; propagatedBuildInputs = [ @@ -26,7 +26,7 @@ buildPythonPackage rec { checkInputs = [ aioresponses - pytest-asyncio + pytest-aiohttp pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pydelijn/default.nix b/pkgs/development/python-modules/pydelijn/default.nix new file mode 100644 index 000000000000..08a3bf823611 --- /dev/null +++ b/pkgs/development/python-modules/pydelijn/default.nix @@ -0,0 +1,37 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchPypi +, pythonOlder +, pytz +}: + +buildPythonPackage rec { + pname = "pydelijn"; + version = "0.6.1"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1lwd2f043hy7gf1ly9zpaq1yg947bqw2af8vhwssf48zpisfgc81"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + pytz + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pydelijn" ]; + + meta = with lib; { + description = "Python package to retrieve realtime data of passages at stops of De Lijn"; + homepage = "https://github.com/bollewolle/pydelijn"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pydicom/default.nix b/pkgs/development/python-modules/pydicom/default.nix index be3cddc7c14a..a0924fa7f633 100644 --- a/pkgs/development/python-modules/pydicom/default.nix +++ b/pkgs/development/python-modules/pydicom/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , isPy27 @@ -49,6 +50,12 @@ buildPythonPackage { # This test try to remove a dicom inside $HOME/.pydicom/data/ and download it again. disabledTests = [ "test_fetch_data_files" + ] ++ lib.optionals stdenv.isAarch64 [ + # https://github.com/pydicom/pydicom/issues/1386 + "test_array" + ] ++ lib.optionals stdenv.isDarwin [ + # flaky, hard to reproduce failure outside hydra + "test_time_check" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pyexcel-xls/default.nix b/pkgs/development/python-modules/pyexcel-xls/default.nix index 7e09a21e3627..29d6df409a60 100644 --- a/pkgs/development/python-modules/pyexcel-xls/default.nix +++ b/pkgs/development/python-modules/pyexcel-xls/default.nix @@ -30,7 +30,11 @@ buildPythonPackage rec { mock ]; - checkPhase = "nosetests"; + postPatch = '' + substituteInPlace setup.py --replace "xlrd<2" "xlrd<3" + ''; + + checkPhase = "nosetests --exclude test_issue_151"; meta = { description = "A wrapper library to read, manipulate and write data in xls using xlrd and xlwt"; diff --git a/pkgs/development/python-modules/pyface/default.nix b/pkgs/development/python-modules/pyface/default.nix index 7ad1fb41526d..3a29fd79f779 100644 --- a/pkgs/development/python-modules/pyface/default.nix +++ b/pkgs/development/python-modules/pyface/default.nix @@ -1,5 +1,5 @@ { lib, fetchPypi, buildPythonPackage -, setuptools, six, traits +, importlib-metadata, importlib-resources, six, traits }: buildPythonPackage rec { @@ -11,10 +11,12 @@ buildPythonPackage rec { sha256 = "a7031ec4cfff034affc822e47ff5e6c1a0272e576d79465cdbbe25f721740322"; }; - propagatedBuildInputs = [ setuptools six traits ]; + propagatedBuildInputs = [ importlib-metadata importlib-resources six traits ]; doCheck = false; # Needs X server + pythonImportsCheck = [ "pyface" ]; + meta = with lib; { description = "Traits-capable windowing framework"; homepage = "https://github.com/enthought/pyface"; diff --git a/pkgs/development/python-modules/pyflume/default.nix b/pkgs/development/python-modules/pyflume/default.nix index 36980ddbadfe..075297794b21 100644 --- a/pkgs/development/python-modules/pyflume/default.nix +++ b/pkgs/development/python-modules/pyflume/default.nix @@ -12,16 +12,23 @@ buildPythonPackage rec { pname = "pyflume"; - version = "0.6.4"; + version = "0.7.0"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "ChrisMandich"; repo = "PyFlume"; rev = "v${version}"; - sha256 = "1dm560hh6fl1waiwsq8m31apmvvwhc3y95bfdb7449bs8k96dmxq"; + sha256 = "129sz33a270v120bzl9l98nmvdzn7ns4cf9w2v18lmzlldbyz2vn"; }; + prePatch = '' + substituteInPlace setup.py --replace 'pyjwt==2.0.1' 'pyjwt>=2.0.1' + substituteInPlace setup.py --replace 'ratelimit==2.2.1' 'ratelimit>=2.2.1' + substituteInPlace setup.py --replace 'pytz==2019.2' 'pytz>=2019.2' + substituteInPlace setup.py --replace 'requests==2.24.0' 'requests>=2.24.0' + ''; + propagatedBuildInputs = [ pyjwt ratelimit @@ -34,6 +41,15 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + # https://github.com/ChrisMandich/PyFlume/issues/18 + substituteInPlace setup.py \ + --replace "pyjwt==2.0.1" "pyjwt>=2.0.1" \ + --replace "ratelimit==2.2.1" "ratelimit>=2.2.1" \ + --replace "pytz==2019.2" "pytz>=2019.2" \ + --replace "requests==2.24.0" "requests>=2.24.0" + ''; + pythonImportsCheck = [ "pyflume" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pyfuse3/default.nix b/pkgs/development/python-modules/pyfuse3/default.nix index 33479cc66e40..180f5902faca 100644 --- a/pkgs/development/python-modules/pyfuse3/default.nix +++ b/pkgs/development/python-modules/pyfuse3/default.nix @@ -1,22 +1,14 @@ -{ lib, buildPythonPackage, fetchPypi, fetchpatch, pkg-config, fuse3, trio, pytestCheckHook, pytest-trio, which }: +{ lib, buildPythonPackage, fetchPypi, pkg-config, fuse3, trio, pytestCheckHook, pytest-trio, which }: buildPythonPackage rec { pname = "pyfuse3"; - version = "3.1.1"; + version = "3.2.0"; src = fetchPypi { inherit pname version; - sha256 = "9feb42a8639dc4815522ee6af6f7221552cfd2df1c7a7e9df96767be65e18667"; + sha256 = "45f0053ad601b03a36e2c283a5271403674245a66a0daf50e3deaab0ea4fa82f"; }; - patches = [ - # Fixes tests with pytest 6, to be removed in next stable version - (fetchpatch { - url = "https://github.com/libfuse/pyfuse3/commit/0070eddfc33fc2fba8eb4fe9353a2d2fa1ae575b.patch"; - sha256 = "0lb4x1j31ihs3qkn61x41k2vqwcjl2fp1c2qx2jg9br6yqhjmg3b"; - }) - ]; - nativeBuildInputs = [ pkg-config ]; buildInputs = [ fuse3 ]; @@ -36,7 +28,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python 3 bindings for libfuse 3 with async I/O support"; homepage = "https://github.com/libfuse/pyfuse3"; - license = licenses.gpl2; + license = licenses.lgpl2Plus; maintainers = with maintainers; [ nyanloutre ]; }; } diff --git a/pkgs/development/python-modules/pygatt/default.nix b/pkgs/development/python-modules/pygatt/default.nix new file mode 100644 index 000000000000..9d596e17236e --- /dev/null +++ b/pkgs/development/python-modules/pygatt/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, nose +, pexpect +, pyserial +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pygatt"; + version = "4.0.5"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "peplin"; + repo = pname; + rev = "v${version}"; + sha256 = "1zdfxidiw0l8n498sy0l33n90lz49n25x889cx6jamjr7frlcihd"; + }; + + propagatedBuildInputs = [ + pexpect + pyserial + ]; + + checkInputs = [ + mock + nose + pytestCheckHook + ]; + + postPatch = '' + # Not support for Python < 3.4 + substituteInPlace setup.py --replace "'enum-compat'" "" + ''; + + pythonImportsCheck = [ "pygatt" ]; + + meta = with lib; { + description = "Python wrapper the BGAPI for accessing Bluetooth LE Devices"; + homepage = "https://github.com/peplin/pygatt"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pygbm/default.nix b/pkgs/development/python-modules/pygbm/default.nix index 0d2747c1cb46..5367f622e9b8 100644 --- a/pkgs/development/python-modules/pygbm/default.nix +++ b/pkgs/development/python-modules/pygbm/default.nix @@ -4,7 +4,7 @@ , scipy , numpy , numba -, scikitlearn +, scikit-learn , pytest , pythonOlder }: @@ -25,7 +25,7 @@ buildPythonPackage rec { scipy numpy numba - scikitlearn + scikit-learn ]; checkInputs = [ diff --git a/pkgs/development/python-modules/pygmt/default.nix b/pkgs/development/python-modules/pygmt/default.nix index 130be6d44c36..804b33c2f791 100644 --- a/pkgs/development/python-modules/pygmt/default.nix +++ b/pkgs/development/python-modules/pygmt/default.nix @@ -2,12 +2,17 @@ , pythonOlder , buildPythonPackage , fetchFromGitHub +, setuptools-scm , gmt , numpy , netcdf4 , pandas , packaging , xarray +, pytest-mpl +, ipython +, ghostscript +, pytestCheckHook }: buildPythonPackage rec { @@ -28,12 +33,14 @@ buildPythonPackage rec { --replace "env.get(\"GMT_LIBRARY_PATH\", \"\")" "env.get(\"GMT_LIBRARY_PATH\", \"${gmt}/lib\")" ''; + nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ numpy netcdf4 pandas packaging xarray ]; - doCheck = false; # requires network access - - postBuild = "export HOME=$TMP"; - + doCheck = false; # the *entire* test suite requires network access + checkInputs = [ pytestCheckHook pytest-mpl ghostscript ipython ]; + postBuild = '' + export HOME=$TMP + ''; pythonImportsCheck = [ "pygmt" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pygobject/3.36.nix b/pkgs/development/python-modules/pygobject/3.36.nix index ccad57eba1ed..ce9410eaf8b5 100644 --- a/pkgs/development/python-modules/pygobject/3.36.nix +++ b/pkgs/development/python-modules/pygobject/3.36.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, buildPythonPackage, pkg-config, glib, gobject-introspection, -pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome3 }: +pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome }: buildPythonPackage rec { pname = "pygobject"; @@ -23,13 +23,6 @@ buildPythonPackage rec { ++ lib.optionals stdenv.isDarwin [ which ncurses ]; propagatedBuildInputs = [ pycairo cairo ]; - passthru = { - updateScript = gnome3.updateScript { - packageName = pname; - attrPath = "python3.pkgs.${pname}3"; - }; - }; - meta = with lib; { homepage = "https://pygobject.readthedocs.io/"; description = "Python bindings for Glib"; diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index 8c26ec6174b2..373577dc4675 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -1,37 +1,66 @@ -{ lib, stdenv, fetchurl, buildPythonPackage, pkg-config, glib, gobject-introspection, -pycairo, cairo, which, ncurses, meson, ninja, isPy3k, gnome3 }: +{ lib +, stdenv +, fetchurl +, buildPythonPackage +, pkg-config +, glib +, gobject-introspection +, pycairo +, cairo +, which +, ncurses +, meson +, ninja +, isPy3k +, gnome +}: buildPythonPackage rec { pname = "pygobject"; - version = "3.38.0"; + version = "3.40.1"; - disabled = ! isPy3k; + outputs = [ "out" "dev" ]; + + disabled = !isPy3k; format = "other"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "A3LRu5Ei/Bn1AKJJsfOMK7Z0hQAPWIdJe0sgWz5whNU="; + sha256 = "0d80g5kgf2i9cginyhalvb7ibfk9g30yilqzmcsw6h6byj8xbih0"; }; - outputs = [ "out" "dev" ]; + nativeBuildInputs = [ + pkg-config + meson + ninja + gobject-introspection + ]; + + buildInputs = [ + glib + gobject-introspection + ] ++ lib.optionals stdenv.isDarwin [ + ncurses + ]; - nativeBuildInputs = [ pkg-config meson ninja gobject-introspection ]; - buildInputs = [ glib gobject-introspection ] - ++ lib.optionals stdenv.isDarwin [ which ncurses ]; - propagatedBuildInputs = [ pycairo cairo ]; + propagatedBuildInputs = [ + pycairo + cairo + ]; passthru = { - updateScript = gnome3.updateScript { + updateScript = gnome.updateScript { packageName = pname; attrPath = "python3.pkgs.${pname}3"; + versionPolicy = "odd-unstable"; }; }; meta = with lib; { homepage = "https://pygobject.readthedocs.io/"; description = "Python bindings for Glib"; - license = licenses.gpl2; + license = licenses.lgpl21Plus; maintainers = with maintainers; [ jtojnar ]; platforms = platforms.unix; }; diff --git a/pkgs/development/python-modules/pyhaversion/default.nix b/pkgs/development/python-modules/pyhaversion/default.nix index ade4c01833c3..efc06ad0c963 100644 --- a/pkgs/development/python-modules/pyhaversion/default.nix +++ b/pkgs/development/python-modules/pyhaversion/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pyhaversion"; - version = "21.3.0"; + version = "21.5.0"; # Only 3.8.0 and beyond are supported disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "ludeeus"; repo = pname; rev = version; - sha256 = "sha256-2vW4BN5qwJZYQ8FU3bpSA2v1dX6TOhcHDbHRMDPoRAs="; + sha256 = "sha256-/F4UMFUs60o3QazfFYEWgTGHg4z5knzNWolUpk5SIeM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyialarm/default.nix b/pkgs/development/python-modules/pyialarm/default.nix new file mode 100644 index 000000000000..6a35445fca16 --- /dev/null +++ b/pkgs/development/python-modules/pyialarm/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, dicttoxml +, fetchFromGitHub +, pythonOlder +, xmltodict +}: + +buildPythonPackage rec { + pname = "pyialarm"; + version = "1.5"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "RyuzakiKK"; + repo = pname; + rev = "v${version}"; + sha256 = "0vpscc2h13mmwscvjpm0bfd80x94mzh4d204v6n421mdz3ddhjqp"; + }; + + propagatedBuildInputs = [ + dicttoxml + xmltodict + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pyialarm" ]; + + meta = with lib; { + description = "Python library to interface with Antifurto365 iAlarm systems"; + homepage = "https://github.com/RyuzakiKK/pyialarm"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pyicu/default.nix b/pkgs/development/python-modules/pyicu/default.nix index efb7467e485e..1b01f1904e08 100644 --- a/pkgs/development/python-modules/pyicu/default.nix +++ b/pkgs/development/python-modules/pyicu/default.nix @@ -3,20 +3,20 @@ , fetchPypi , pytestCheckHook , six -, icu +, icu68 }: buildPythonPackage rec { pname = "PyICU"; - version = "2.6"; + version = "2.7.3"; src = fetchPypi { inherit pname version; - sha256 = "0wb3v421i2fnnxdywam4ay8hqvnxlz0r2nrpx5lqy3rn6dlbz9d9"; + sha256 = "1jv1pds94agvn3zs33a8p8f0mk7f5pjwmczmg1s05ri5p0kzk4h8"; }; - nativeBuildInputs = [ icu ]; # for icu-config - buildInputs = [ icu ]; + nativeBuildInputs = [ icu68 ]; # for icu-config, but should be replaced with pkg-config + buildInputs = [ icu68 ]; checkInputs = [ pytestCheckHook six ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pyinsteon/default.nix b/pkgs/development/python-modules/pyinsteon/default.nix index cfe5112ab221..be746ae27937 100644 --- a/pkgs/development/python-modules/pyinsteon/default.nix +++ b/pkgs/development/python-modules/pyinsteon/default.nix @@ -17,14 +17,14 @@ buildPythonPackage rec { pname = "pyinsteon"; - version = "1.0.10"; + version = "1.0.11"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "sha256-8b/PvMFHvYGVWw6ycLnL8n972cn+1QW/VTMiblMPam4="; + sha256 = "sha256-dT01nKXDjkFSIf2BmrIcC8a9n00hlyd59oPwXn1CBaw="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyjwt/1.nix b/pkgs/development/python-modules/pyjwt/1.nix new file mode 100644 index 000000000000..285e5e2e7600 --- /dev/null +++ b/pkgs/development/python-modules/pyjwt/1.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cryptography +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "PyJWT"; + version = "1.7.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"; + }; + + postPatch = '' + substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest" + + # drop coverage + sed -i '/pytest-cov/d' setup.py + sed -i '/--cov/d' setup.cfg + ''; + + propagatedBuildInputs = [ + cryptography + ]; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "JSON Web Token implementation in Python"; + homepage = "https://github.com/jpadilla/pyjwt"; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/pyjwt/default.nix b/pkgs/development/python-modules/pyjwt/default.nix index c33f2b068087..4617869988f6 100644 --- a/pkgs/development/python-modules/pyjwt/default.nix +++ b/pkgs/development/python-modules/pyjwt/default.nix @@ -1,28 +1,35 @@ -{ lib, buildPythonPackage, fetchPypi -, cryptography, ecdsa -, pytestrunner, pytestcov, pytest }: +{ lib +, buildPythonPackage +, fetchPypi +, cryptography +, ecdsa +, pytest-cov +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - pname = "PyJWT"; - version = "2.0.1"; + pname = "pyjwt"; + version = "2.1.0"; + disabled = pythonOlder "3.6"; src = fetchPypi { - inherit pname version; - sha256 = "a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7"; + pname = "PyJWT"; + inherit version; + sha256 = "sha256-+6ROeJi7yhYKKytQH0koJPyDgkhdOm8Rul0MGTfOYTA="; }; - propagatedBuildInputs = [ cryptography ecdsa ]; + propagatedBuildInputs = [ + cryptography + ecdsa + ]; - checkInputs = [ pytestrunner pytestcov pytest ]; + checkInputs = [ + pytest-cov + pytestCheckHook + ]; - postPatch = '' - substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest" - ''; - - # ecdsa changed internal behavior - checkPhase = '' - pytest tests -k 'not ec_verify_should_return_false_if_signature_invalid' - ''; + pythonImportsCheck = [ "jwt" ]; meta = with lib; { description = "JSON Web Token implementation in Python"; diff --git a/pkgs/development/python-modules/pykdl/default.nix b/pkgs/development/python-modules/pykdl/default.nix index 674a43f5f3e0..9a0431b2b859 100644 --- a/pkgs/development/python-modules/pykdl/default.nix +++ b/pkgs/development/python-modules/pykdl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, toPythonModule, fetchpatch, cmake, orocos-kdl, python, sip }: +{ lib, stdenv, toPythonModule, fetchpatch, cmake, orocos-kdl, python, sip_4 }: toPythonModule (stdenv.mkDerivation { pname = "pykdl"; @@ -18,7 +18,7 @@ toPythonModule (stdenv.mkDerivation { nativeBuildInputs = [ cmake ]; buildInputs = [ orocos-kdl ]; - propagatedBuildInputs = [ python sip ]; + propagatedBuildInputs = [ python sip_4 ]; meta = with lib; { description = "Kinematics and Dynamics Library (Python bindings)"; diff --git a/pkgs/development/python-modules/pykeepass/default.nix b/pkgs/development/python-modules/pykeepass/default.nix index 294e47872fc1..6e73501bfb0b 100644 --- a/pkgs/development/python-modules/pykeepass/default.nix +++ b/pkgs/development/python-modules/pykeepass/default.nix @@ -1,15 +1,18 @@ -{ lib, fetchPypi, buildPythonPackage +{ lib, fetchFromGitHub, buildPythonPackage , lxml, pycryptodomex, construct , argon2_cffi, dateutil, future +, python }: buildPythonPackage rec { pname = "pykeepass"; version = "4.0.0"; - src = fetchPypi { - inherit pname version; - sha256 = "1b41b3277ea4e044556e1c5a21866ea4dfd36e69a4c0f14272488f098063178f"; + src = fetchFromGitHub { + owner = "libkeepass"; + repo = "pykeepass"; + rev = version; + sha256 = "1zw5hjk90zfxpgq2fz4h5qzw3kmvdnlfbd32gw57l034hmz2i08v"; }; postPatch = '' @@ -21,13 +24,15 @@ buildPythonPackage rec { argon2_cffi dateutil future ]; - # no tests in PyPI tarball - doCheck = false; + checkPhase = '' + ${python.interpreter} -m unittest tests.tests + ''; - meta = { - homepage = "https://github.com/pschmitt/pykeepass"; + meta = with lib; { + homepage = "https://github.com/libkeepass/pykeepass"; + changelog = "https://github.com/libkeepass/pykeepass/blob/${version}/CHANGELOG.rst"; description = "Python library to interact with keepass databases (supports KDBX3 and KDBX4)"; - license = lib.licenses.gpl3; + license = licenses.gpl3Only; + maintainers = with maintainers; [ dotlambda ]; }; - } diff --git a/pkgs/development/python-modules/pykerberos/default.nix b/pkgs/development/python-modules/pykerberos/default.nix index 13d7a4fd2483..fd4c0088b08c 100644 --- a/pkgs/development/python-modules/pykerberos/default.nix +++ b/pkgs/development/python-modules/pykerberos/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "pykerberos"; - version = "1.2.1"; + version = "1.2.3.dev0"; src = fetchPypi { inherit pname version; - sha256 = "0v47p840myqgc7hr4lir72xshcfpa0w8j9n077h3njpqyn6wlbag"; + sha256 = "17zjiw6rqgfic32px86qls1i3z7anp15dgb3sprbdvywy98alryn"; }; nativeBuildInputs = [ krb5 ]; # for krb5-config @@ -15,6 +15,7 @@ buildPythonPackage rec { # there are no tests doCheck = false; + pythonImportsCheck = [ "kerberos" ]; meta = with lib; { description = "High-level interface to Kerberos"; diff --git a/pkgs/development/python-modules/pykmtronic/default.nix b/pkgs/development/python-modules/pykmtronic/default.nix index 7a055c1ed3fe..29a3f04e32cb 100644 --- a/pkgs/development/python-modules/pykmtronic/default.nix +++ b/pkgs/development/python-modules/pykmtronic/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "pykmtronic"; - version = "0.2.0"; + version = "0.3.0"; src = fetchPypi { inherit pname version; - sha256 = "9d0301882f06a0c4865c89bb6c2a381c4a1ba6fe2a7a07d56351bdf5f96c9fa5"; + sha256 = "sha256-8qLyBJp7C93x0PWbgDAtNEDJ5VLNfwZ3DRZfudRCBgo="; }; propagatedBuildInputs = [ aiohttp lxml ]; diff --git a/pkgs/development/python-modules/pykoplenti/default.nix b/pkgs/development/python-modules/pykoplenti/default.nix new file mode 100644 index 000000000000..98182ddf68c7 --- /dev/null +++ b/pkgs/development/python-modules/pykoplenti/default.nix @@ -0,0 +1,41 @@ +{ lib +, aiohttp +, buildPythonPackage +, click +, fetchFromGitHub +, prompt_toolkit +, pycryptodome +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pykoplenti"; + version = "1.0.0"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "stegm"; + repo = pname; + rev = "v${version}"; + sha256 = "12nsyz8a49vhby1jp991vaky82fm93jrgcsjzwa2rixwg1zql4sw"; + }; + + propagatedBuildInputs = [ + aiohttp + click + prompt_toolkit + pycryptodome + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pykoplenti" ]; + + meta = with lib; { + description = "Python REST client API for Kostal Plenticore Inverters"; + homepage = "https://github.com/stegm/pykoplenti/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pylast/default.nix b/pkgs/development/python-modules/pylast/default.nix index b16ea62717a5..5a0a53005bb1 100644 --- a/pkgs/development/python-modules/pylast/default.nix +++ b/pkgs/development/python-modules/pylast/default.nix @@ -11,12 +11,12 @@ buildPythonPackage rec { pname = "pylast"; - version = "4.2.0"; + version = "4.2.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-w/mkAUUgj7L7Xv+nz1pI1TYKfihH3S3MbxaNQ4VtoH0="; + sha256 = "sha256-R1enQk6luuBiobMPDn5x1SXx7zUI/5c8dPtyWkmG/18="; }; nativeBuildInputs = [ setuptools-scm ]; diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix index 54b2f65ad975..9d8b36c5ef81 100644 --- a/pkgs/development/python-modules/pylint-django/default.nix +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "pylint-django"; - version = "2.4.2"; + version = "2.4.3"; disabled = !isPy3k; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = "v${version}"; - sha256 = "0535y4sdi521a9s7di8ld0i8aav0afbxmx0956v6sjpyqmqdm6hr"; + sha256 = "1mybq9jynypxbaxj921s3sx8dph8n3hmipmv4nla1g9h07g9g02z"; }; propagatedBuildInputs = [ @@ -42,9 +42,7 @@ buildPythonPackage rec { meta = with lib; { description = "A Pylint plugin to analyze Django applications"; homepage = "https://github.com/PyCQA/pylint-django"; - license = licenses.gpl2; - maintainers = with maintainers; [ - kamadorueda - ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ kamadorueda ]; }; } diff --git a/pkgs/development/python-modules/pylint/1.9.nix b/pkgs/development/python-modules/pylint/1.9.nix index e283cc10d16a..64573a1a5282 100644 --- a/pkgs/development/python-modules/pylint/1.9.nix +++ b/pkgs/development/python-modules/pylint/1.9.nix @@ -46,6 +46,6 @@ buildPythonPackage rec { description = "A bug and style checker for Python"; platforms = platforms.all; license = licenses.gpl1Plus; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pylint/default.nix b/pkgs/development/python-modules/pylint/default.nix index 10935d2d8880..6c2702ef3dbe 100644 --- a/pkgs/development/python-modules/pylint/default.nix +++ b/pkgs/development/python-modules/pylint/default.nix @@ -67,6 +67,6 @@ buildPythonPackage rec { homepage = "https://pylint.pycqa.org/"; description = "A bug and style checker for Python"; license = licenses.gpl1Plus; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pymavlink/default.nix b/pkgs/development/python-modules/pymavlink/default.nix index 2f39be79821c..894e5c128e9e 100644 --- a/pkgs/development/python-modules/pymavlink/default.nix +++ b/pkgs/development/python-modules/pymavlink/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python MAVLink interface and utilities"; homepage = "https://github.com/ArduPilot/pymavlink"; - license = with licenses; [ lgpl3Only mit ]; + license = with licenses; [ lgpl3Plus mit ]; maintainers = with maintainers; [ lopsided98 ]; }; } diff --git a/pkgs/development/python-modules/pymeteireann/default.nix b/pkgs/development/python-modules/pymeteireann/default.nix new file mode 100644 index 000000000000..7e48a4089a12 --- /dev/null +++ b/pkgs/development/python-modules/pymeteireann/default.nix @@ -0,0 +1,39 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, pytz +, xmltodict +}: + +buildPythonPackage rec { + pname = "pymeteireann"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "DylanGore"; + repo = "PyMetEireann"; + rev = version; + sha256 = "1904f8mvv4ghzbniswmdwyj5v71m6y3yn1b4grjvfds05skalm67"; + }; + + propagatedBuildInputs = [ + aiohttp + async-timeout + pytz + xmltodict + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "meteireann" ]; + + meta = with lib; { + description = "Python module to communicate with the Met Éireann Public Weather Forecast API"; + homepage = "https://github.com/DylanGore/PyMetEireann/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pymodbus/default.nix b/pkgs/development/python-modules/pymodbus/default.nix index 9d524bfe946f..46b60419ad8c 100644 --- a/pkgs/development/python-modules/pymodbus/default.nix +++ b/pkgs/development/python-modules/pymodbus/default.nix @@ -18,13 +18,13 @@ buildPythonPackage rec { pname = "pymodbus"; - version = "2.5.1"; + version = "2.5.2"; src = fetchFromGitHub { owner = "riptideio"; repo = pname; rev = "v${version}"; - sha256 = "sha256-b85jfBZfMZtqtmID+tGBgOe9o0BbmBH83UV71lYAI5c="; + sha256 = "sha256-jqVfBAjIdRBB5AYd0ZkMi7qAUR6vSYeBI4OYEv+mKwE="; }; # Twisted asynchronous version is not supported due to a missing dependency diff --git a/pkgs/development/python-modules/pymorphy2/default.nix b/pkgs/development/python-modules/pymorphy2/default.nix new file mode 100644 index 000000000000..8c00975d08bf --- /dev/null +++ b/pkgs/development/python-modules/pymorphy2/default.nix @@ -0,0 +1,35 @@ +{ lib +, fetchPypi +, buildPythonPackage +, isPy3k +, dawg-python +, docopt +, pymorphy2-dicts-ru +}: + +buildPythonPackage rec { + pname = "pymorphy2"; + version = "0.9.1"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + hash = "sha256-hsRHFX3uLrI0HvvkU44SgadUdWuhqjLad6iWFMWLVgw="; + }; + + propagatedBuildInputs = [ + dawg-python + docopt + pymorphy2-dicts-ru + ]; + + pythonImportsCheck = [ "pymorphy2" ]; + + meta = with lib; { + description = "Morphological analyzer/inflection engine for Russian and Ukrainian"; + homepage = "https://github.com/kmike/pymorphy2"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/pymorphy2/dicts-ru.nix b/pkgs/development/python-modules/pymorphy2/dicts-ru.nix new file mode 100644 index 000000000000..bee9dd492479 --- /dev/null +++ b/pkgs/development/python-modules/pymorphy2/dicts-ru.nix @@ -0,0 +1,23 @@ +{ lib +, fetchPypi +, buildPythonPackage +}: + +buildPythonPackage rec { + pname = "pymorphy2-dicts-ru"; + version = "2.4.417127.4579844"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-eMrQOtymBQIavTh6Oy61FchRuG6UaCoe8jVKLHT8wZY="; + }; + + pythonImportsCheck = [ "pymorphy2_dicts_ru" ]; + + meta = with lib; { + description = "Russian dictionaries for pymorphy2"; + homepage = "https://github.com/kmike/pymorphy2-dicts/"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/pynest2d/default.nix b/pkgs/development/python-modules/pynest2d/default.nix index 2d72dad07a43..847a5fb674a5 100644 --- a/pkgs/development/python-modules/pynest2d/default.nix +++ b/pkgs/development/python-modules/pynest2d/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, python3, cmake -, pythonOlder, libnest2d, sip, clipper }: +, pythonOlder, libnest2d, sip_4, clipper }: buildPythonPackage rec { version = "4.8.0"; @@ -13,7 +13,7 @@ buildPythonPackage rec { sha256 = "18dn92vgr4gvf9scfh93yg9bwrhdjvq62di08rpi7pqjrrvq2nvp"; }; - propagatedBuildInputs = [ libnest2d sip clipper ]; + propagatedBuildInputs = [ libnest2d sip_4 clipper ]; nativeBuildInputs = [ cmake ]; env.CLIPPER_PATH = "${clipper.out}"; diff --git a/pkgs/development/python-modules/pynetbox/default.nix b/pkgs/development/python-modules/pynetbox/default.nix new file mode 100644 index 000000000000..e81a4b8dd666 --- /dev/null +++ b/pkgs/development/python-modules/pynetbox/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools-scm +, requests +, six +, pytestCheckHook +, pyyaml +}: + +buildPythonPackage rec { + pname = "pynetbox"; + version = "6.1.2"; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = pname; + rev = "v${version}"; + sha256 = "0di07rny3gqdfb0rf7hm3x03rpn7rydpv3lrl7cak2ccpqm0wzhl"; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + requests + six + ]; + + checkInputs = [ + pytestCheckHook + pyyaml + ]; + + disabledTestPaths = [ + # requires docker for integration test + "tests/integration" + ]; + + meta = with lib; { + description = "API client library for Netbox"; + homepage = "https://github.com/netbox-community/pynetbox"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/pynmea2/default.nix b/pkgs/development/python-modules/pynmea2/default.nix index 8bb82fa330a5..4a4fbfd4dc6b 100644 --- a/pkgs/development/python-modules/pynmea2/default.nix +++ b/pkgs/development/python-modules/pynmea2/default.nix @@ -2,15 +2,17 @@ buildPythonPackage rec { pname = "pynmea2"; - version = "1.17.0"; + version = "1.18.0"; src = fetchPypi { inherit pname version; - sha256 = "0x5xrk51dpzsvky1ncikadm80a44a82j3mjjykmhmx7jddc5qh9d"; + sha256 = "1b94lhpbgvnknb563dlwvs5vkk7w3ma54sj614ynh2dzgqrd6h73"; }; checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "pynmea2" ]; + meta = { homepage = "https://github.com/Knio/pynmea2"; description = "Python library for the NMEA 0183 protcol"; diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix index 8cddeb8873fa..fa9db26b5e39 100644 --- a/pkgs/development/python-modules/pynndescent/default.nix +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , nose -, scikitlearn +, scikit-learn , scipy , numba , llvmlite @@ -19,7 +19,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - scikitlearn + scikit-learn scipy numba llvmlite diff --git a/pkgs/development/python-modules/pynvim/default.nix b/pkgs/development/python-modules/pynvim/default.nix index 0910f601dc22..244b366081c0 100644 --- a/pkgs/development/python-modules/pynvim/default.nix +++ b/pkgs/development/python-modules/pynvim/default.nix @@ -4,7 +4,6 @@ , nose , msgpack , greenlet -, trollius ? null , pythonOlder , isPyPy , pytestrunner @@ -13,6 +12,7 @@ buildPythonPackage rec { pname = "pynvim"; version = "0.4.3"; + disabled = pythonOlder "3.4"; src = fetchPypi { inherit pname version; @@ -28,8 +28,7 @@ buildPythonPackage rec { doCheck = false; propagatedBuildInputs = [ msgpack ] - ++ lib.optional (!isPyPy) greenlet - ++ lib.optional (pythonOlder "3.4") trollius; + ++ lib.optional (!isPyPy) greenlet; meta = { description = "Python client for Neovim"; diff --git a/pkgs/development/python-modules/pyobihai/default.nix b/pkgs/development/python-modules/pyobihai/default.nix new file mode 100644 index 000000000000..79d8363372be --- /dev/null +++ b/pkgs/development/python-modules/pyobihai/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, requests +}: + +buildPythonPackage rec { + pname = "pyobihai"; + version = "1.3.1"; + disabled = pythonOlder "3.6"; + + # GitHub release, https://github.com/dshokouhi/pyobihai/issues/10 + src = fetchPypi { + inherit pname version; + sha256 = "1vvf5if57dfd091a7fb5rvx63hvf0isrx28j72nj2aav1as460qp"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pyobihai" ]; + + meta = with lib; { + description = "Python package to interact with Obihai devices"; + homepage = "https://github.com/dshokouhi/pyobihai"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pyopencl/default.nix b/pkgs/development/python-modules/pyopencl/default.nix index b1e81140a906..d983e2bc14cc 100644 --- a/pkgs/development/python-modules/pyopencl/default.nix +++ b/pkgs/development/python-modules/pyopencl/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , fetchPypi , buildPythonPackage , Mako @@ -12,14 +13,18 @@ , opencl-headers , ocl-icd , pybind11 +, mesa_drivers }: -buildPythonPackage rec { +let + os-specific-buildInputs = + if stdenv.isDarwin then [ mesa_drivers.dev ] else [ ocl-icd ]; +in buildPythonPackage rec { pname = "pyopencl"; version = "2021.1.4"; checkInputs = [ pytest ]; - buildInputs = [ opencl-headers ocl-icd pybind11 ]; + buildInputs = [ opencl-headers pybind11 ] ++ os-specific-buildInputs; propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ]; diff --git a/pkgs/development/python-modules/pyotgw/default.nix b/pkgs/development/python-modules/pyotgw/default.nix new file mode 100644 index 000000000000..b48c190ca1ed --- /dev/null +++ b/pkgs/development/python-modules/pyotgw/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pyserial-asyncio +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyotgw"; + version = "unstable-2021-03-25"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mvn23"; + repo = pname; + rev = "1854ef4ffb907524ff457ba558e4979ba7fabd02"; + sha256 = "0zckd85dmzpz0drcgx16ly6kzh1f1slcxb9lrcf81wh1p4q9bcaa"; + }; + + propagatedBuildInputs = [ + pyserial-asyncio + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pytestFlagsArray = [ "tests" ]; + + pythonImportsCheck = [ "pyotgw" ]; + + meta = with lib; { + description = "Python module to interact the OpenTherm Gateway"; + homepage = "https://github.com/mvn23/pyotgw"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pypiserver/default.nix b/pkgs/development/python-modules/pypiserver/default.nix new file mode 100644 index 000000000000..d1c6fee942ce --- /dev/null +++ b/pkgs/development/python-modules/pypiserver/default.nix @@ -0,0 +1,40 @@ +{ buildPythonPackage, fetchFromGitHub, lib, passlib, pytestCheckHook, setuptools +, setuptools-git, twine, webtest }: + +buildPythonPackage rec { + pname = "pypiserver"; + version = "1.4.2"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1z5rsmqgin98m6ihy1ww42fxxr6jb4hzldn8vlc9ssv7sawdz8vz"; + }; + + nativeBuildInputs = [ setuptools-git ]; + + propagatedBuildInputs = [ setuptools ]; + + preCheck = '' + export HOME=$TMPDIR + ''; + + checkInputs = [ passlib pytestCheckHook twine webtest ]; + + # These tests try to use the network + disabledTests = [ + "test_pipInstall_openOk" + "test_pipInstall_authedOk" + "test_hash_algos" + ]; + + pythonImportsCheck = [ "pypiserver" ]; + + meta = with lib; { + homepage = "https://github.com/pypiserver/pypiserver"; + description = "Minimal PyPI server for use with pip/easy_install"; + license = with licenses; [ mit zlib ]; + maintainers = [ maintainers.austinbutler ]; + }; +} diff --git a/pkgs/development/python-modules/pyqt-builder/default.nix b/pkgs/development/python-modules/pyqt-builder/default.nix index d7f15d966b37..d371fd7bcee7 100644 --- a/pkgs/development/python-modules/pyqt-builder/default.nix +++ b/pkgs/development/python-modules/pyqt-builder/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchPypi, buildPythonPackage, packaging, sip_5 }: +{ lib, fetchPypi, buildPythonPackage, packaging, sip }: buildPythonPackage rec { pname = "pyqt-builder"; @@ -10,7 +10,7 @@ buildPythonPackage rec { sha256 = "0g51yak53zzjs4gpq65i01cmpz7w8cjny9wfyxlgr2vi0wag107v"; }; - propagatedBuildInputs = [ packaging sip_5 ]; + propagatedBuildInputs = [ packaging sip ]; pythonImportsCheck = [ "pyqtbuild" ]; diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index 3427438b8a26..2652b5eb00b3 100644 --- a/pkgs/development/python-modules/pyqt/4.x.nix +++ b/pkgs/development/python-modules/pyqt/4.x.nix @@ -1,13 +1,13 @@ -{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip, qt4, pkg-config, lndir, dbus, makeWrapper }: +{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip_4, qt4, pkg-config, lndir, dbus, makeWrapper }: buildPythonPackage rec { pname = "PyQt-x11-gpl"; - version = "4.12"; + version = "4.12.3"; format = "other"; src = fetchurl { url = "mirror://sourceforge/pyqt/PyQt4_gpl_x11-${version}.tar.gz"; - sha256 = "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"; + sha256 = "0wnlasg62rm5d39nq1yw4namcx2ivxgzl93r5f2vb9s0yaz5l3x0"; }; postPatch = '' @@ -45,7 +45,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config lndir makeWrapper qt4 ]; buildInputs = [ qt4 dbus ]; - propagatedBuildInputs = [ sip ]; + propagatedBuildInputs = [ sip_4 ]; postInstall = '' for i in $out/bin/*; do diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index 6e4b4d37f289..2671b27a6307 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -16,9 +16,9 @@ let inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34; sip = if isPy3k then - pythonPackages.sip_5 + pythonPackages.sip else - (pythonPackages.sip.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: { + (pythonPackages.sip_4.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: { # If we install sip in another folder, then we need to create a __init__.py as well # if we want to be able to import it with Python 2. # Python 3 could rely on it being an implicit namespace package, however, diff --git a/pkgs/development/python-modules/pyside/shiboken.nix b/pkgs/development/python-modules/pyside/shiboken.nix index 21c79c6e9e1c..9bad569806a6 100644 --- a/pkgs/development/python-modules/pyside/shiboken.nix +++ b/pkgs/development/python-modules/pyside/shiboken.nix @@ -1,8 +1,6 @@ { lib, fetchFromGitHub, buildPythonPackage , cmake -, isPy35 -, isPy36 -, isPy37 +, fetchurl , isPy3k , libxml2 , libxslt @@ -10,6 +8,7 @@ , pysideApiextractor , pysideGeneratorrunner , python +, pythonAtLeast , qt4 , sphinx }: @@ -39,8 +38,17 @@ buildPythonPackage rec { \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/ ''; - # gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86 - patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch); + patches = [ + # gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86 + ./gcc6.patch + (lib.optional (pythonAtLeast "3.5") ./shiboken_py35.patch) + (fetchurl { + # https://github.com/pyside/Shiboken/pull/90 + name = "fix-build-with-python-3.9.patch"; + url = "https://github.com/pyside/Shiboken/commit/d1c901d4c0af581003553865360ba964cda041e8.patch"; + sha256 = "1f7slz8n8rps5r67hz3hi4rr82igc3l166shfy6647ivsb2fnxwy"; + }) + ]; cmakeFlags = lib.optionals isPy3k [ "-DUSE_PYTHON3=TRUE" diff --git a/pkgs/development/python-modules/pysma/default.nix b/pkgs/development/python-modules/pysma/default.nix index 39941242f1d9..55b6b7278450 100644 --- a/pkgs/development/python-modules/pysma/default.nix +++ b/pkgs/development/python-modules/pysma/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "pysma"; - version = "0.4.1"; + version = "0.4.3"; src = fetchPypi { inherit pname version; - sha256 = "da4bed38aba52fa097694bda15c7fd80ca698d9352e71a63bc29092d635de54d"; + sha256 = "sha256-vriMnJFS7yfTyDT1f4sx1xEBTQjqc4ZHmkdHp1vcd+Q="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pysmappee/default.nix b/pkgs/development/python-modules/pysmappee/default.nix index a3517ea87ec0..c053e5592282 100644 --- a/pkgs/development/python-modules/pysmappee/default.nix +++ b/pkgs/development/python-modules/pysmappee/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "pysmappee"; - version = "0.2.23"; + version = "0.2.25"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "smappee"; repo = pname; rev = version; - sha256 = "sha256-vxCZzkngYnc+hD3gT1x7qAQTFjpmmgRU5F6cusNDNgk="; + sha256 = "0ld3pb86dq61fcvr6zigdz1vjjcwf7izzkajyg82nmb508a570d7"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pysmf/default.nix b/pkgs/development/python-modules/pysmf/default.nix index 25f5fc6a20ca..3b350954eae3 100644 --- a/pkgs/development/python-modules/pysmf/default.nix +++ b/pkgs/development/python-modules/pysmf/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, pkg-config, libsmf, glib, pytest }: +{ lib, buildPythonPackage, fetchPypi, pkg-config, libsmf, glib, pytest, cython }: buildPythonPackage rec { pname = "pysmf"; @@ -9,13 +9,17 @@ buildPythonPackage rec { sha256 = "10i7vvvdx6c3gl4afsgnpdanwgzzag087zs0fxvfipnqknazj806"; }; - nativeBuildInputs = [ pkg-config pytest ]; + postUnpack = '' + rm $sourceRoot/src/smf.c + ''; + + nativeBuildInputs = [ pkg-config pytest cython ]; buildInputs = [ libsmf glib ]; meta = with lib; { homepage = "http://das.nasophon.de/pysmf/"; description = "Python extension module for reading and writing Standard MIDI Files, based on libsmf."; license = licenses.bsd2; - maintainers = [ maintainers.gnidorah ]; + maintainers = [ ]; }; } diff --git a/pkgs/development/python-modules/pysonos/default.nix b/pkgs/development/python-modules/pysonos/default.nix index 308dd4e7f25b..05411e0d7fb7 100644 --- a/pkgs/development/python-modules/pysonos/default.nix +++ b/pkgs/development/python-modules/pysonos/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pysonos"; - version = "0.0.43"; + version = "0.0.49"; disabled = !isPy3k; @@ -23,10 +23,14 @@ buildPythonPackage rec { owner = "amelchio"; repo = pname; rev = "v${version}"; - sha256 = "sha256-OobKlAymXXvQH6m77Uqn2eoTlWgs8EBxYIDFJ5wwMKA="; + sha256 = "sha256-f8MBf2E7kHzvdt7oBwdJZ91jlU6I5np1FhOmxgxbqYw="; }; - propagatedBuildInputs = [ ifaddr requests xmltodict ]; + propagatedBuildInputs = [ + ifaddr + requests + xmltodict + ]; checkInputs = [ pytestCheckHook @@ -38,10 +42,10 @@ buildPythonPackage rec { "test_desc_from_uri" # test requires network access ]; - meta = { - homepage = "https://github.com/amelchio/pysonos"; + meta = with lib; { description = "A SoCo fork with fixes for Home Assistant"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ juaningan ]; + homepage = "https://github.com/amelchio/pysonos"; + license = licenses.mit; + maintainers = with maintainers; [ juaningan ]; }; } diff --git a/pkgs/development/python-modules/pystray/default.nix b/pkgs/development/python-modules/pystray/default.nix index 9b778f9e216c..45bc2a55e599 100644 --- a/pkgs/development/python-modules/pystray/default.nix +++ b/pkgs/development/python-modules/pystray/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub -, pillow, xlib, six, xvfb_run, sphinx }: +, pillow, xlib, six, xvfb-run, sphinx }: buildPythonPackage rec { pname = "pystray"; @@ -14,7 +14,7 @@ buildPythonPackage rec { nativeBuildInputs = [ sphinx ]; propagatedBuildInputs = [ pillow xlib six ]; - checkInputs = [ xvfb_run ]; + checkInputs = [ xvfb-run ]; checkPhase = '' rm tests/icon_tests.py # test needs user input diff --git a/pkgs/development/python-modules/pysvg-py3/default.nix b/pkgs/development/python-modules/pysvg-py3/default.nix new file mode 100644 index 000000000000..6f9ba796132e --- /dev/null +++ b/pkgs/development/python-modules/pysvg-py3/default.nix @@ -0,0 +1,33 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, python +}: + +buildPythonPackage rec { + pname = "pysvg-py3"; + version = "0.2.2-post3"; + + src = fetchFromGitHub { + owner = "alorence"; + repo = pname; + rev = version; + sha256 = "1slync0knpcjgl4xpym8w4249iy6vmrwbarpnbjzn9xca8g1h2f0"; + }; + + checkPhase = '' + runHook preCheck + mkdir testoutput + ${python.interpreter} sample/tutorial.py + runHook postCheck + ''; + + pythonImportsCheck = [ "pysvg" ]; + + meta = { + homepage = "https://github.com/alorence/pysvg-py3"; + description = "Creating SVG with Python"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ davidak ]; + }; +} diff --git a/pkgs/development/python-modules/pytaglib/default.nix b/pkgs/development/python-modules/pytaglib/default.nix index 9155151950a8..bf17988e758c 100644 --- a/pkgs/development/python-modules/pytaglib/default.nix +++ b/pkgs/development/python-modules/pytaglib/default.nix @@ -3,56 +3,35 @@ , fetchFromGitHub , taglib , cython -, pytest -, glibcLocales -, fetchpatch +, pytestCheckHook }: buildPythonPackage rec { - pname = "pytaglib"; - version = "1.4.5"; + pname = "pytaglib"; + version = "1.4.6"; src = fetchFromGitHub { owner = "supermihi"; repo = pname; rev = "v${version}"; - sha256 = "1gvvadlgk8ny8bg76gwvvfcwp1nfgrjphi60h5f9ha7h5ff1g2wb"; + sha256 = "sha256-UAWXR1MCxEB48n7oQE+L545F+emlU3HErzLX6YTRteg="; }; - patches = [ - # fix tests on python 2.7 - (fetchpatch { - url = "https://github.com/supermihi/pytaglib/commit/0c4ae750fcd5b18d2553975c7e3e183e9dca5bf1.patch"; - sha256 = "1kv3c68vimx5dc8aacvzphiaq916avmprxddi38wji8p2ql6vngj"; - }) - - # properly install pyprinttags - (fetchpatch { - url = "https://github.com/supermihi/pytaglib/commit/ba7a1406ddf35ddc41ed57f1c8d1f2bc2ed2c93a.patch"; - sha256 = "0pi0dcq7db5fd3jnbwnfsfsgxvlhnm07z5yhpp93shk0s7ci2bwp"; - }) - (fetchpatch { - url = "https://github.com/supermihi/pytaglib/commit/28772f6f94d37f05728071381a0fa04c6a14783a.patch"; - sha256 = "0h259vzj1l0gpibdf322yclyd10x5rh1anzhsjj2ghm6rj6q0r0m"; - }) + buildInputs = [ + cython + taglib ]; - postPatch = '' - substituteInPlace setup.py --replace "'pytest-runner', " "" - ''; - - buildInputs = [ taglib cython ]; - - checkInputs = [ pytest glibcLocales ]; + checkInputs = [ + pytestCheckHook + ]; - checkPhase = '' - LC_ALL=en_US.utf-8 pytest . - ''; + pythonImportsCheck = [ "taglib" ]; - meta = { + meta = with lib; { + description = "Python bindings for the Taglib audio metadata library"; homepage = "https://github.com/supermihi/pytaglib"; - description = "Python 2.x/3.x bindings for the Taglib audio metadata library"; - license = lib.licenses.gpl3; - maintainers = [ lib.maintainers.mrkkrp ]; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ mrkkrp ]; }; } diff --git a/pkgs/development/python-modules/pytest-annotate/default.nix b/pkgs/development/python-modules/pytest-annotate/default.nix index 68b67f061bb1..22b57f9e7706 100644 --- a/pkgs/development/python-modules/pytest-annotate/default.nix +++ b/pkgs/development/python-modules/pytest-annotate/default.nix @@ -31,6 +31,7 @@ buildPythonPackage rec { doCheck = false; meta = with lib; { + broken = true; # unmaintained and incompatible with pytest>=6.0 homepage = "https://github.com/kensho-technologies/pytest-annotate"; description = "Generate PyAnnotate annotations from your pytest tests"; license = licenses.asl20; diff --git a/pkgs/development/python-modules/pytest-bdd/default.nix b/pkgs/development/python-modules/pytest-bdd/default.nix index e71b3e7350a7..b087cd6f4598 100644 --- a/pkgs/development/python-modules/pytest-bdd/default.nix +++ b/pkgs/development/python-modules/pytest-bdd/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch , execnet , glob2 , Mako @@ -7,29 +7,38 @@ , parse-type , py , pytest +, pytestCheckHook , six }: buildPythonPackage rec { pname = "pytest-bdd"; - version = "4.0.1"; + version = "4.0.2"; # tests are not included in pypi tarball src = fetchFromGitHub { owner = "pytest-dev"; repo = pname; rev = version; - sha256 = "1yqzz44as4pxffmg4hk9lijvnvlc2chg1maq1fbj5i4k4jpagvjz"; + sha256 = "0pxx4c8lm68rw0jshbr09fnadg8zz8j73q0qi49yw9s7yw86bg5l"; }; + patches = [ + # Fixed compatibility with pytest > 6.1 + (fetchpatch { + url = "https://github.com/pytest-dev/pytest-bdd/commit/e1dc0cad9a1c1ba563ccfbc24f9993d83ac59293.patch"; + sha256 = "1p3gavh6nir2a8crd5wdf0prfrg0hmgar9slvn8a21ils3k5pm5y"; + }) + ]; + + buildInputs = [ pytest ]; propagatedBuildInputs = [ glob2 Mako parse parse-type py six ]; - # Tests require extra dependencies - checkInputs = [ execnet mock pytest ]; - checkPhase = '' - PATH=$PATH:$out/bin pytest + checkInputs = [ pytestCheckHook execnet mock ]; + preCheck = '' + export PATH=$PATH:$out/bin ''; meta = with lib; { diff --git a/pkgs/development/python-modules/pytest-cases/default.nix b/pkgs/development/python-modules/pytest-cases/default.nix new file mode 100644 index 000000000000..2914b3cf9aac --- /dev/null +++ b/pkgs/development/python-modules/pytest-cases/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, makefun +, decopatch +, pythonOlder +, pytest +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pytest-cases"; + version = "3.4.6"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "17w4s6622i97q81g15zamqm536ib00grgdfk2f4kk9bw2k7sdlq6"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + decopatch + makefun + ]; + + postPatch = '' + substituteInPlace setup.cfg --replace "pytest-runner" "" + ''; + + # Tests have dependencies (pytest-harvest, pytest-steps) which + # are not available in Nixpkgs. Most of the packages (decopatch, + # makefun, pytest-*) have circular dependecies. + doCheck = false; + + pythonImportsCheck = [ "pytest_cases" ]; + + meta = with lib; { + description = "Separate test code from test cases in pytest"; + homepage = "https://github.com/smarie/python-pytest-cases"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pytest-console-scripts/default.nix b/pkgs/development/python-modules/pytest-console-scripts/default.nix new file mode 100644 index 000000000000..aaecd191e93a --- /dev/null +++ b/pkgs/development/python-modules/pytest-console-scripts/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, python +, mock +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pytest-console-scripts"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "4a2138d7d567bc581fe081b6a5975849a2a36b3925cb0f066d2380103e13741c"; + }; + postPatch = '' + # setuptools-scm is pinned to <6 because it dropped Python 3.5 + # support. That's not something that affects us. + substituteInPlace setup.py --replace "'setuptools_scm<6'" "'setuptools_scm'" + # Patch the shebang of a script generated during test. + substituteInPlace tests/test_run_scripts.py --replace "#!/usr/bin/env python" "#!${python.interpreter}" + ''; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + nativeBuildInputs = [ setuptools-scm ]; + + checkInputs = [ mock pytestCheckHook ]; + + meta = with lib; { + description = "Pytest plugin for testing console scripts"; + longDescription = '' + Pytest-console-scripts is a pytest plugin for running python scripts from within tests. + It's quite similar to subprocess.run(), but it also has an in-process mode, where the scripts are executed by the interpreter that's running pytest (using some amount of sandboxing). + ''; + homepage = "https://github.com/kvas-it/pytest-console-scripts"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/pytest-doctestplus/default.nix b/pkgs/development/python-modules/pytest-doctestplus/default.nix index 335846fc3425..2b1ab664a139 100644 --- a/pkgs/development/python-modules/pytest-doctestplus/default.nix +++ b/pkgs/development/python-modules/pytest-doctestplus/default.nix @@ -4,7 +4,9 @@ , isPy27 , six , pytest +, pytestCheckHook , numpy +, setuptools_scm }: buildPythonPackage rec { @@ -17,7 +19,12 @@ buildPythonPackage rec { sha256 = "6fe747418461d7b202824a3486ba8f4fa17a9bd0b1eddc743ba1d6d87f03391a"; }; - buildInputs = [ pytest ]; + nativeBuildInputs = [ + setuptools_scm + ]; + buildInputs = [ + pytest + ]; propagatedBuildInputs = [ six @@ -25,14 +32,9 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook ]; - # check_distribution incorrectly pulls pytest version - checkPhase = '' - pytest -k 'not check_distribution' - ''; - meta = with lib; { description = "Pytest plugin with advanced doctest features"; homepage = "https://astropy.org"; diff --git a/pkgs/development/python-modules/pytest-helpers-namespace/default.nix b/pkgs/development/python-modules/pytest-helpers-namespace/default.nix index 43ef2a1339f7..b405afea2154 100644 --- a/pkgs/development/python-modules/pytest-helpers-namespace/default.nix +++ b/pkgs/development/python-modules/pytest-helpers-namespace/default.nix @@ -1,30 +1,28 @@ { buildPythonPackage -, fetchFromGitHub -, pytest +, fetchPypi +, pytestCheckHook +, isPy27 , lib +, setuptools +, setuptools-declarative-requirements +, setuptools-scm }: buildPythonPackage rec { pname = "pytest-helpers-namespace"; version = "2021.3.24"; + disabled = isPy27; - src = fetchFromGitHub { - owner = "saltstack"; - repo = pname; - rev = version; - sha256 = "0ikwiwp9ycgg7px78nxdkqvg7j97krb6vzqlb8fq8fvbwrj4q4v2"; + src = fetchPypi { + inherit pname version; + sha256 = "0pyj2d45zagmzlajzqdnkw5yz8k49pkihbydsqkzm413qnkzb38q"; }; - buildInputs = [ pytest ]; + nativeBuildInputs = [ setuptools setuptools-declarative-requirements setuptools-scm ]; - checkInputs = [ pytest ]; + checkInputs = [ pytestCheckHook ]; - checkPhase = '' - pytest - ''; - - # The tests fail with newest pytest. They passed with pytest_3, which no longer exists - doCheck = false; + pythonImportsCheck = [ "pytest_helpers_namespace" ]; meta = with lib; { homepage = "https://github.com/saltstack/pytest-helpers-namespace"; diff --git a/pkgs/development/python-modules/pytest-httpx/default.nix b/pkgs/development/python-modules/pytest-httpx/default.nix index d6f30486f9b2..1773a4b57928 100644 --- a/pkgs/development/python-modules/pytest-httpx/default.nix +++ b/pkgs/development/python-modules/pytest-httpx/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "pytest-httpx"; - version = "0.11.0"; + version = "0.12.0"; src = fetchFromGitHub { owner = "Colin-b"; repo = "pytest_httpx"; rev = "v${version}"; - sha256 = "08idd3y6khxjqkn46diqvkjvsl4w4pxhl6z1hspbkrj0pqwf9isi"; + sha256 = "sha256-Awhsm8jmoCZTBnfrrauLxAEKtpxTzjPMXmx7HR0f/g4="; }; buildInputs = [ pytest ]; diff --git a/pkgs/development/python-modules/pytest-mock/2.nix b/pkgs/development/python-modules/pytest-mock/2.nix index 3764a05af057..d474d281a686 100644 --- a/pkgs/development/python-modules/pytest-mock/2.nix +++ b/pkgs/development/python-modules/pytest-mock/2.nix @@ -35,6 +35,6 @@ buildPythonPackage rec { description = "Thin-wrapper around the mock package for easier use with py.test."; homepage = "https://github.com/pytest-dev/pytest-mock"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix index 3e044b4fe596..a39e2e716ea4 100644 --- a/pkgs/development/python-modules/pytest-mock/default.nix +++ b/pkgs/development/python-modules/pytest-mock/default.nix @@ -28,6 +28,6 @@ buildPythonPackage rec { description = "Thin-wrapper around the mock package for easier use with pytest"; homepage = "https://github.com/pytest-dev/pytest-mock"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/pytest-ordering/default.nix b/pkgs/development/python-modules/pytest-ordering/default.nix index 6cd1ed227976..c5e8a786b5ef 100644 --- a/pkgs/development/python-modules/pytest-ordering/default.nix +++ b/pkgs/development/python-modules/pytest-ordering/default.nix @@ -26,6 +26,7 @@ buildPythonPackage rec { homepage = "https://github.com/ftobia/pytest-ordering"; description = "Pytest plugin to run your tests in a specific order"; license = licenses.mit; + broken = true; # See https://github.com/NixOS/nixpkgs/pull/122264 maintainers = with maintainers; [ eadwu ]; }; } diff --git a/pkgs/development/python-modules/pytest-regressions/default.nix b/pkgs/development/python-modules/pytest-regressions/default.nix new file mode 100644 index 000000000000..90b72c886eac --- /dev/null +++ b/pkgs/development/python-modules/pytest-regressions/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchpatch +, fetchPypi +, pythonOlder +, matplotlib +, numpy +, pandas +, pillow +, pytest +, pytest-datadir +, pytestCheckHook +, pyyaml +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pytest-regressions"; + version = "2.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "15a71f77cb266dd4ca94331abe4c339ad056b2b2175e47442711c98cf6d65716"; + }; + + patches = [ + # Make pytest-regressions compatible with NumPy 1.20. + # Should be part of the next release. + (fetchpatch { + url = "https://github.com/ESSS/pytest-regressions/commit/ffad2c7fd1d110f420f4e3ca3d39d90cae18a972.patch"; + sha256 = "sha256-bUna7MnMV6u9oEaZMsFnr4gE28rz/c0O2+Hyk291+l0="; + }) + ]; + + nativeBuildInputs = [ setuptools-scm ]; + buildInputs = [ pytest ]; + propagatedBuildInputs = [ numpy pandas pillow pytest-datadir pyyaml ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + checkInputs = [ pytestCheckHook matplotlib ]; + pythonImportsCheck = [ "pytest_regressions" "pytest_regressions.plugin" ]; + + meta = with lib; { + description = "Pytest fixtures to write regression tests"; + longDescription = '' + pytest-regressions makes it simple to test general data, images, + files, and numeric tables by saving expected data in a data + directory (courtesy of pytest-datadir) that can be used to verify + that future runs produce the same data. + ''; + homepage = "https://github.com/ESSS/pytest-regressions"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/pytest-sanic/default.nix b/pkgs/development/python-modules/pytest-sanic/default.nix index 84330cfd62e5..ae1c56f95b75 100644 --- a/pkgs/development/python-modules/pytest-sanic/default.nix +++ b/pkgs/development/python-modules/pytest-sanic/default.nix @@ -46,5 +46,9 @@ buildPythonPackage rec { homepage = "https://github.com/yunstanford/pytest-sanic/"; license = licenses.asl20; maintainers = [ maintainers.costrouc ]; + # pytest-sanic is incompatible with Sanic 21.3, see + # https://github.com/sanic-org/sanic/issues/2095 and + # https://github.com/yunstanford/pytest-sanic/issues/50. + broken = lib.versionAtLeast sanic.version "21.3.0"; }; } diff --git a/pkgs/development/python-modules/pytest-server-fixtures/default.nix b/pkgs/development/python-modules/pytest-server-fixtures/default.nix index ca3c9a37c1a9..7de68cadbb1e 100644 --- a/pkgs/development/python-modules/pytest-server-fixtures/default.nix +++ b/pkgs/development/python-modules/pytest-server-fixtures/default.nix @@ -21,6 +21,6 @@ buildPythonPackage rec { description = "Extensible server fixures for py.test"; homepage = "https://github.com/manahl/pytest-plugins"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/python-binance/default.nix b/pkgs/development/python-modules/python-binance/default.nix index aea47c7b9e72..cd1e09557ecb 100644 --- a/pkgs/development/python-modules/python-binance/default.nix +++ b/pkgs/development/python-modules/python-binance/default.nix @@ -1,25 +1,55 @@ -{ lib, buildPythonPackage, fetchPypi -, pytest, requests-mock, tox -, autobahn, certifi, chardet, cryptography, dateparser, pyopenssl, requests, service-identity, twisted }: +{ lib +, aiohttp +, buildPythonPackage +, dateparser +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +, six +, ujson +, websockets +}: buildPythonPackage rec { - version = "0.7.9"; pname = "python-binance"; + version = "1.0.10"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "476459d91f6cfe0a37ccac38911643ea6cca632499ad8682e0957a075f73d239"; + src = fetchFromGitHub { + owner = "sammchardy"; + repo = pname; + rev = "v${version}"; + sha256 = "09pq2blvky1ah4k8yc6zkp2g5nkn3awc52ad3lxvj6m33akfzxiv"; }; - doCheck = false; # Tries to test multiple interpreters with tox - checkInputs = [ pytest requests-mock tox ]; + propagatedBuildInputs = [ + aiohttp + dateparser + requests + six + ujson + websockets + ]; - propagatedBuildInputs = [ autobahn certifi chardet cryptography dateparser pyopenssl requests service-identity twisted ]; + checkInputs = [ + pytestCheckHook + requests-mock + ]; - meta = { + disabledTestPaths = [ + # Tests require network access + "tests/test_api_request.py" + "tests/test_historical_klines.py" + ]; + + pythonImportsCheck = [ "binance" ]; + + meta = with lib; { description = "Binance Exchange API python implementation for automated trading"; homepage = "https://github.com/sammchardy/python-binance"; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.bhipple ]; + license = licenses.mit; + maintainers = with maintainers; [ bhipple ]; }; } diff --git a/pkgs/development/python-modules/python-engineio/3.nix b/pkgs/development/python-modules/python-engineio/3.nix index e4c71782f990..5deeec0bb573 100644 --- a/pkgs/development/python-modules/python-engineio/3.nix +++ b/pkgs/development/python-modules/python-engineio/3.nix @@ -13,6 +13,7 @@ , websocket_client , websockets , pytestCheckHook +, pythonAtLeast }: buildPythonPackage rec { @@ -63,5 +64,6 @@ buildPythonPackage rec { homepage = "https://github.com/miguelgrinberg/python-engineio/"; license = with licenses; [ mit ]; maintainers = with maintainers; [ graham33 ]; + broken = stdenv.isDarwin && (pythonAtLeast "3.9"); # See https://github.com/miguelgrinberg/python-socketio/issues/567 }; } diff --git a/pkgs/development/python-modules/python-fontconfig/default.nix b/pkgs/development/python-modules/python-fontconfig/default.nix index 88778ff794ea..4aabb208a90c 100644 --- a/pkgs/development/python-modules/python-fontconfig/default.nix +++ b/pkgs/development/python-modules/python-fontconfig/default.nix @@ -29,6 +29,6 @@ in buildPythonPackage rec { homepage = "https://github.com/Vayn/python-fontconfig"; description = "Python binding for Fontconfig"; license = lib.licenses.gpl3; - maintainers = with lib.maintainers; [ gnidorah ]; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/python-gitlab/default.nix b/pkgs/development/python-modules/python-gitlab/default.nix index 4dc3cfb5693f..b3cb9aaff633 100644 --- a/pkgs/development/python-modules/python-gitlab/default.nix +++ b/pkgs/development/python-modules/python-gitlab/default.nix @@ -1,19 +1,36 @@ -{ lib, buildPythonPackage, fetchPypi, requests, mock, httmock, pythonOlder, pytest, responses }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, argcomplete +, requests +, requests-toolbelt +, pyyaml +}: buildPythonPackage rec { pname = "python-gitlab"; - version = "2.6.0"; + version = "2.7.1"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "a862c6874524ab585b725a17b2cd2950fc09d6d74205f40a11be2a4e8f2dcaa1"; + sha256 = "0z4amj5xhx5zc3h2m0zrkardm3z5ba9qpjx5n6dczyz77r527yg1"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + argcomplete + pyyaml + requests + requests-toolbelt + ]; - checkInputs = [ mock httmock pytest responses ]; + # tests rely on a gitlab instance on a local docker setup + doCheck = false; - disabled = pythonOlder "3.6"; + pythonImportsCheck = [ + "gitlab" + ]; meta = with lib; { description = "Interact with GitLab API"; diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index b776a784c8e3..daab437c9797 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27 +{ lib, buildPythonPackage, fetchFromGitHub, pythonAtLeast, pythonOlder, isPy27 , backports_functools_lru_cache ? null, configparser ? null, futures ? null, future, jedi, pluggy, python-jsonrpc-server, flake8 , pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson, flaky , # Allow building a limited set of providers, e.g. ["pycodestyle"]. @@ -22,6 +22,8 @@ in buildPythonPackage rec { pname = "python-language-server"; version = "0.36.2"; + # https://github.com/palantir/python-language-server/issues/896#issuecomment-752790868 + disabled = pythonAtLeast "3.9"; src = fetchFromGitHub { owner = "palantir"; diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix index 36c297358e87..b1b0c70d8602 100644 --- a/pkgs/development/python-modules/python-mapnik/default.nix +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -35,10 +35,16 @@ in buildPythonPackage rec { export BOOST_PYTHON_LIB="boost_python${pythonVersion}" export BOOST_THREAD_LIB="boost_thread" export BOOST_SYSTEM_LIB="boost_system" + export PYCAIRO=true ''; nativeBuildInputs = [ mapnik # for mapnik_config + pkgs.pkgconfig + ]; + + patches = [ + ./find-pycairo-with-pkg-config.patch ]; buildInputs = [ diff --git a/pkgs/development/python-modules/python-mapnik/find-pycairo-with-pkg-config.patch b/pkgs/development/python-modules/python-mapnik/find-pycairo-with-pkg-config.patch new file mode 100644 index 000000000000..1f35af36ee82 --- /dev/null +++ b/pkgs/development/python-modules/python-mapnik/find-pycairo-with-pkg-config.patch @@ -0,0 +1,18 @@ +diff --git a/setup.py b/setup.py +index 82a31d733..1c876a553 100755 +--- a/setup.py ++++ b/setup.py +@@ -228,10 +228,9 @@ extra_comp_args = list(filter(lambda arg: arg != "-fvisibility=hidden", extra_co + if os.environ.get("PYCAIRO", "false") == "true": + try: + extra_comp_args.append('-DHAVE_PYCAIRO') +- print("-I%s/include/pycairo".format(sys.exec_prefix)) +- extra_comp_args.append("-I{0}/include/pycairo".format(sys.exec_prefix)) +- #extra_comp_args.extend(check_output(["pkg-config", '--cflags', 'pycairo']).strip().split(' ')) +- #linkflags.extend(check_output(["pkg-config", '--libs', 'pycairo']).strip().split(' ')) ++ pycairo_name = 'py3cairo' if PYTHON3 else 'pycairo' ++ extra_comp_args.extend(check_output(["pkg-config", '--cflags', pycairo_name]).strip().split(' ')) ++ linkflags.extend(check_output(["pkg-config", '--libs', pycairo_name]).strip().split(' ')) + except: + raise Exception("Failed to find compiler options for pycairo") + diff --git a/pkgs/development/python-modules/python-miio/default.nix b/pkgs/development/python-modules/python-miio/default.nix index 1d9025a035f2..2374c6797f2e 100644 --- a/pkgs/development/python-modules/python-miio/default.nix +++ b/pkgs/development/python-modules/python-miio/default.nix @@ -24,20 +24,19 @@ buildPythonPackage rec { pname = "python-miio"; - version = "0.5.5.2"; + version = "0.5.6"; disabled = pythonOlder "3.6"; format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-lk7egCyj+vSsaXmxuWxlQuom8n3JEs/RIWwCuwTOXeI="; + sha256 = "sha256-tmGt50xBDV++/pqyXsuxHdrwv+XbkjvtrzsYBzQh7zE="; }; postPatch = '' substituteInPlace pyproject.toml \ --replace 'croniter = "^0"' 'croniter = "*"' \ - --replace 'defusedxml = "^0.6"' 'defusedxml = "*"' \ - --replace 'zeroconf = "^0.28"' 'zeroconf = "*"' + --replace 'defusedxml = "^0.6"' 'defusedxml = "*"' ''; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/python-redis-lock/default.nix b/pkgs/development/python-modules/python-redis-lock/default.nix index 7a53e73b2b88..49113dfad5ef 100644 --- a/pkgs/development/python-modules/python-redis-lock/default.nix +++ b/pkgs/development/python-modules/python-redis-lock/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , redis -, pytest +, pytestCheckHook , process-tests , pkgs , withDjango ? false, django_redis @@ -17,15 +17,20 @@ buildPythonPackage rec { sha256 = "4265a476e39d476a8acf5c2766485c44c75f3a1bd6cf73bb195f3079153b8374"; }; - checkInputs = [ pytest process-tests pkgs.redis ]; + propagatedBuildInputs = [ + redis + ] ++ lib.optional withDjango django_redis; - checkPhase = '' - pytest tests/ - ''; - - propagatedBuildInputs = [ redis ] - ++ lib.optional withDjango django_redis; + checkInputs = [ + pytestCheckHook + process-tests + pkgs.redis + ]; + disabledTests = [ + # https://github.com/ionelmc/python-redis-lock/issues/86 + "test_no_overlap2" + ]; meta = with lib; { homepage = "https://github.com/ionelmc/python-redis-lock"; diff --git a/pkgs/development/python-modules/python-simple-hipchat/default.nix b/pkgs/development/python-modules/python-simple-hipchat/default.nix index 904437bdcf66..1a7974ecd267 100644 --- a/pkgs/development/python-modules/python-simple-hipchat/default.nix +++ b/pkgs/development/python-modules/python-simple-hipchat/default.nix @@ -1,5 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi -, unzip }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "python-simple-hipchat"; @@ -10,8 +9,6 @@ buildPythonPackage rec { sha256 = "0zy6prrj85jjc4xmxgfg8h94j81k6zhfxfffcbvq9b10jis1rgav"; }; - nativeBuildInputs = [ unzip ]; - meta = with lib; { description = "Easy peasy wrapper for HipChat's v1 API"; homepage = "https://github.com/kurttheviking/simple-hipchat-py"; diff --git a/pkgs/development/python-modules/python-smarttub/default.nix b/pkgs/development/python-modules/python-smarttub/default.nix index d9d1d446d1ef..380b1738964b 100644 --- a/pkgs/development/python-modules/python-smarttub/default.nix +++ b/pkgs/development/python-modules/python-smarttub/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "python-smarttub"; - version = "0.0.23"; + version = "0.0.24"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "mdz"; repo = pname; rev = "v${version}"; - sha256 = "0maqbmk50xjhv9f0zm62ayzyf99kic3c0g5714cqkw3pfp8k75cx"; + sha256 = "sha256-XWZbfPNZ1cPsDwtJRuOwIPTHmNBMzFSYHDDcbBrXjtk="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-snap7/default.nix b/pkgs/development/python-modules/python-snap7/default.nix index 05d804bc6770..b494d2e442e6 100644 --- a/pkgs/development/python-modules/python-snap7/default.nix +++ b/pkgs/development/python-modules/python-snap7/default.nix @@ -24,7 +24,6 @@ buildPythonPackage rec { pythonImportsCheck = [ "snap7" - "snap7.six" "snap7.util" ]; diff --git a/pkgs/development/python-modules/python-socks/default.nix b/pkgs/development/python-modules/python-socks/default.nix new file mode 100644 index 000000000000..dcf268808275 --- /dev/null +++ b/pkgs/development/python-modules/python-socks/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, trio, curio, async-timeout, fetchPypi, pythonOlder }: + +buildPythonPackage rec { + pname = "python-socks"; + version = "1.2.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "1n6xb18jy41ybgkmamakg6psp3qididd45qknxiggngaiibz43kx"; + }; + + disabled = pythonOlder "3.6.1"; + + propagatedBuildInputs = [ trio curio async-timeout ]; + + meta = with lib; { + description = "Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python"; + homepage = "https://github.com/romis2012/python-socks"; + license = licenses.asl20; + maintainers = with maintainers; [ mjlbach ]; + }; +} diff --git a/pkgs/development/python-modules/python-telegram-bot/default.nix b/pkgs/development/python-modules/python-telegram-bot/default.nix index b5155fd4bb65..7fc92a2236b1 100644 --- a/pkgs/development/python-modules/python-telegram-bot/default.nix +++ b/pkgs/development/python-modules/python-telegram-bot/default.nix @@ -12,12 +12,12 @@ buildPythonPackage rec { pname = "python-telegram-bot"; - version = "13.4.1"; + version = "13.5"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "141w3701jjl460702xddqvi3hswp24jnkl6cakvz2aqrmcyxq7sc"; + sha256 = "sha256-g9v0zUYyf9gYu2ZV8lCAJKCt5o69s1RNo1xGmtwjvds="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/python-toolbox/default.nix b/pkgs/development/python-modules/python-toolbox/default.nix index bdf09fdf2c79..a310736c7492 100644 --- a/pkgs/development/python-modules/python-toolbox/default.nix +++ b/pkgs/development/python-modules/python-toolbox/default.nix @@ -3,8 +3,7 @@ , docutils , fetchFromGitHub , isPy27 -, nose -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -21,7 +20,13 @@ buildPythonPackage rec { checkInputs = [ docutils - pytest + pytestCheckHook + ]; + + disabledTestPaths = [ + # file imports 'dummy_threading', which was deprecated since py37 + # and removed in py39 + "test_python_toolbox/test_cute_profile/test_cute_profile.py" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/python-vlc/default.nix b/pkgs/development/python-modules/python-vlc/default.nix index 6f83f587f588..2690f8ea7ebe 100644 --- a/pkgs/development/python-modules/python-vlc/default.nix +++ b/pkgs/development/python-modules/python-vlc/default.nix @@ -8,30 +8,33 @@ buildPythonPackage rec { pname = "python-vlc"; - version = "3.0.11115"; + version = "3.0.12118"; src = fetchPypi { inherit pname version; - sha256 = "a4d3bdddfce84a8fb1b2d5447193a0239c55c16ca246e5194d48efd59c4e236b"; + hash = "sha256-Vm8vfDA/aACFHKzAFt8cbu7AlK1j4KSdh9udaYCU8fs="; }; - propagatedBuildInputs = [ - setuptools - ]; - patches = [ + # Patch path for VLC (substituteAll { src = ./vlc-paths.patch; libvlcPath="${libvlc}/lib/libvlc.so.5"; }) ]; + propagatedBuildInputs = [ + setuptools + ]; + doCheck = false; # no tests + pythonImportsCheck = [ "vlc" ]; + meta = with lib; { - homepage = "https://wiki.videolan.org/PythonBinding"; - maintainers = with maintainers; [ tbenst ]; description = "Python bindings for VLC, the cross-platform multimedia player and framework"; + homepage = "https://wiki.videolan.org/PythonBinding"; license = licenses.lgpl21Plus; + maintainers = with maintainers; [ tbenst ]; }; } diff --git a/pkgs/development/python-modules/pythonnet/default.nix b/pkgs/development/python-modules/pythonnet/default.nix index d0054f7076a1..7387d387dbec 100644 --- a/pkgs/development/python-modules/pythonnet/default.nix +++ b/pkgs/development/python-modules/pythonnet/default.nix @@ -2,8 +2,7 @@ , fetchPypi , fetchNuGet , buildPythonPackage -, python -, pytest +, pytestCheckHook , pycparser , psutil , pkg-config @@ -15,29 +14,36 @@ let - UnmanagedExports127 = fetchNuGet { - baseName = "UnmanagedExports"; - version = "1.2.7"; - sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf"; - outputFiles = [ "*" ]; - }; - - NUnit371 = fetchNuGet { - baseName = "NUnit"; - version = "3.7.1"; - sha256 = "1yc6dwaam4w2ss1193v735nnl79id78yswmpvmjr1w4bgcbdza4l"; - outputFiles = [ "*" ]; - }; + dotnetPkgs = [ + (fetchNuGet { + baseName = "UnmanagedExports"; + version = "1.2.7"; + sha256 = "0bfrhpmq556p0swd9ssapw4f2aafmgp930jgf00sy89hzg2bfijf"; + outputFiles = [ "*" ]; + }) + (fetchNuGet { + baseName = "NUnit"; + version = "3.12.0"; + sha256 = "1880j2xwavi8f28vxan3hyvdnph4nlh5sbmh285s4lc9l0b7bdk2"; + outputFiles = [ "*" ]; + }) + (fetchNuGet { + baseName = "System.ValueTuple"; + version = "4.5.0"; + sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; + outputFiles = [ "*" ]; + }) + ]; in buildPythonPackage rec { pname = "pythonnet"; - version = "2.4.0"; + version = "2.5.2"; src = fetchPypi { inherit pname version; - sha256 = "1ach9jic7a9rd3vmc4bphkr9fq01a0qk81f8a7gr9npwzmkqx8x3"; + sha256 = "1qzdc6jd7i9j7p6bcihnr98y005gv1358xqdr1plpbpnl6078a5p"; }; postPatch = '' @@ -50,7 +56,6 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - pytest pycparser pkg-config @@ -59,13 +64,15 @@ buildPythonPackage rec { mono - NUnit371 - UnmanagedExports127 - ]; + ] ++ dotnetPkgs; buildInputs = [ glib mono + ]; + + checkInputs = [ + pytestCheckHook psutil # needed for memory leak tests ]; @@ -73,22 +80,21 @@ buildPythonPackage rec { rm -rf packages mkdir packages - ln -s ${NUnit371}/lib/dotnet/NUnit/ packages/NUnit.3.7.1 - ln -s ${UnmanagedExports127}/lib/dotnet/NUnit/ packages/UnmanagedExports.1.2.7 + ${builtins.concatStringsSep "\n" ( + builtins.map ( + x: ''ln -s ${x}/lib/dotnet/${x.baseName} ./packages/${x.baseName}.${x.version}'' + ) dotnetPkgs)} # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542 export TERM=xterm ''; - checkPhase = '' - ${python.interpreter} -m pytest - ''; - meta = with lib; { description = ".Net and Mono integration for Python"; homepage = "https://pythonnet.github.io"; license = licenses.mit; + # <https://github.com/pythonnet/pythonnet/issues/898> + badPlatforms = [ "aarch64-linux" ]; maintainers = with maintainers; [ jraygauthier ]; - broken = true; }; } diff --git a/pkgs/development/python-modules/pytmx/default.nix b/pkgs/development/python-modules/pytmx/default.nix index 17c18a96c736..6d88f4b636b1 100644 --- a/pkgs/development/python-modules/pytmx/default.nix +++ b/pkgs/development/python-modules/pytmx/default.nix @@ -5,20 +5,26 @@ buildPythonPackage rec { pname = "pytmx"; - version = "3.24.0"; + version = "3.25"; disabled = isPy27; src = fetchFromGitHub { - # The release was not git tagged. owner = "bitcraft"; repo = "PyTMX"; - rev = "eb96efea30d57b731654b2a167d86b8b553b147d"; - sha256 = "1g1j4w75zw76p5f8m5v0hdigdlva2flf0ngyk8nvqcwzcl5vq5wc"; + rev = version; + sha256 = "0v07zhvzvl2qcqhjzgfzm8hgayq38gaqcxxkyhlq9n0hlk93nm97"; }; propagatedBuildInputs = [ pygame pyglet pysdl2 six ]; + pythonImportsCheck = [ + "pytmx.pytmx" + "pytmx.util_pygame" + "pytmx.util_pyglet" + "pytmx.util_pysdl2" + ]; + checkPhase = '' # Change into the test directory due to a relative resource path. cd tests/pytmx @@ -28,7 +34,7 @@ buildPythonPackage rec { meta = with lib; { homepage = "https://github.com/bitcraft/PyTMX"; description = "Python library to read Tiled Map Editor's TMX maps"; - license = licenses.lgpl3; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ oxzi ]; }; } diff --git a/pkgs/development/python-modules/pytomlpp/default.nix b/pkgs/development/python-modules/pytomlpp/default.nix new file mode 100644 index 000000000000..19edd7057eb4 --- /dev/null +++ b/pkgs/development/python-modules/pytomlpp/default.nix @@ -0,0 +1,53 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pybind11 +, pytestCheckHook +, dateutil +, doxygen +, python +, pelican +, matplotlib +}: + +buildPythonPackage rec { + pname = "pytomlpp"; + version = "0.3.5"; + + src = fetchFromGitHub { + owner = "bobfang1992"; + repo = pname; + rev = version; + fetchSubmodules = true; + sha256 = "1h06a2r0f5q4mml485113mn7a7585zmhqsk2p1apcybyydllcqda"; + }; + + buildInputs = [ pybind11 ]; + + checkInputs = [ + pytestCheckHook + + dateutil + doxygen + python + pelican + matplotlib + ]; + + # pelican requires > 2.7 + doCheck = !pythonOlder "3.6"; + + preCheck = '' + cd tests + ''; + + pythonImportsCheck = [ "pytomlpp" ]; + + meta = with lib; { + description = "A python wrapper for tomlplusplus"; + homepage = "https://github.com/bobfang1992/pytomlpp"; + license = licenses.mit; + maintainers = with maintainers; [ evils ]; + }; +} diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix index 285602bce4a8..e340d5eefada 100644 --- a/pkgs/development/python-modules/pytorch-metric-learning/default.nix +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , isPy27 , numpy -, scikitlearn +, scikit-learn , pytestCheckHook , pytorch , torchvision @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy pytorch - scikitlearn + scikit-learn torchvision tqdm ]; @@ -41,10 +41,16 @@ buildPythonPackage rec { disabledTests = [ # requires FAISS (not in Nixpkgs) "test_accuracy_calculator_and_faiss" + "test_global_embedding_space_tester" + "test_with_same_parent_label_tester" # require network access: "test_get_nearest_neighbors" "test_tuplestoweights_sampler" "test_untrained_indexer" + "test_metric_loss_only" + "test_pca" + # flaky + "test_distributed_classifier_loss_and_miner" ]; meta = { diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/pytorch/bin.nix index 1880a0e2bf93..41af9502c0c9 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/pytorch/bin.nix @@ -18,7 +18,7 @@ let pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; srcs = import ./binary-hashes.nix version; unsupported = throw "Unsupported system"; - version = "1.8.0"; + version = "1.8.1"; in buildPythonPackage { inherit version; @@ -64,6 +64,7 @@ in buildPythonPackage { meta = with lib; { description = "Open source, prototype-to-production deep learning platform"; homepage = "https://pytorch.org/"; + changelog = "https://github.com/pytorch/pytorch/releases/tag/v${version}"; license = licenses.unfree; # Includes CUDA and Intel MKL. platforms = platforms.linux; maintainers = with maintainers; [ danieldk ]; diff --git a/pkgs/development/python-modules/pytorch/binary-hashes.nix b/pkgs/development/python-modules/pytorch/binary-hashes.nix index bc838597038d..4855d1357106 100644 --- a/pkgs/development/python-modules/pytorch/binary-hashes.nix +++ b/pkgs/development/python-modules/pytorch/binary-hashes.nix @@ -1,14 +1,17 @@ version: { x86_64-linux-37 = { - url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp37-cp37m-linux_x86_64.whl"; - hash = "sha256-bs29RJS0vy0xok3fvf8yvZlTibyGYqRUvUDT6M4gKQc="; + name = "torch-${version}-cp37-cp37m-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torch-${version}%2Bcu111-cp37-cp37m-linux_x86_64.whl"; + hash = "sha256-lxj066PiB+S88GqQnXKgd9RCiKkMk3mctx/eBieZjAk="; }; x86_64-linux-38 = { - url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp38-cp38-linux_x86_64.whl"; - hash = "sha256-+h45HMo5N9Xeox8xoagKAb1KgGLAOUSMJUu/WljrB4c="; + name = "torch-${version}-cp38-cp38-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torch-${version}%2Bcu111-cp38-cp38-linux_x86_64.whl"; + hash = "sha256-qvTQMLz4CQPgalzUyYwz6rm+ExyWlIzI+FSMQhxM4eM="; }; x86_64-linux-39 = { - url = "https://download.pytorch.org/whl/cu102/torch-${version}-cp39-cp39-linux_x86_64.whl"; - hash = "sha256-Ixj6yGCuc9xkhsDeIiNnTZ72E5/HXxV68r+Nzk/KVSQ="; + name = "torch-${version}-cp39-cp39-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torch-${version}%2Bcu111-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-z0pzEiljU+E2x2SuOEAg86dmVY1iFZSDOCfoOAFhLQo="; }; } diff --git a/pkgs/development/python-modules/pytube/default.nix b/pkgs/development/python-modules/pytube/default.nix index 8bcfa8b6c7d9..a557c623a07c 100644 --- a/pkgs/development/python-modules/pytube/default.nix +++ b/pkgs/development/python-modules/pytube/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pytube"; - version = "10.7.2"; + version = "10.8.2"; disabled = pythonOlder "3.6"; @@ -15,7 +15,7 @@ buildPythonPackage rec { owner = "pytube"; repo = "pytube"; rev = "v${version}"; - sha256 = "sha256-85pHzfQYyqwX8mQ5msIojM/0FSfeaC12KJw4mXmji3g="; + sha256 = "sha256-LY1aDFzF0vHwEa3pfAoxZ3KM1l39PDo6S6F3xtqqspU="; }; checkInputs = [ diff --git a/pkgs/development/python-modules/pyturbojpeg/default.nix b/pkgs/development/python-modules/pyturbojpeg/default.nix index abfc34e6481b..0011bc69bc56 100644 --- a/pkgs/development/python-modules/pyturbojpeg/default.nix +++ b/pkgs/development/python-modules/pyturbojpeg/default.nix @@ -10,12 +10,12 @@ buildPythonPackage rec { pname = "pyturbojpeg"; - version = "1.4.3"; + version = "1.5.0"; src = fetchPypi { pname = "PyTurboJPEG"; inherit version; - sha256 = "sha256-Q7KVfR9kA32QPQFWgSSCVB5sNOmSF8y5J4dmBc14jvg="; + sha256 = "sha256-juy8gVqOXKSGGq+gOBO2BuJEL2RHjjCWJDrwRCvrZIE="; }; patches = [ diff --git a/pkgs/development/python-modules/pyupgrade/default.nix b/pkgs/development/python-modules/pyupgrade/default.nix index 8cd250f6e014..93fd8403be7e 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.12.0"; + version = "2.16.0"; disabled = isPy27; src = fetchFromGitHub { owner = "asottile"; repo = pname; rev = "v${version}"; - sha256 = "sha256-pAZszyv7jXEwtQYzEk5Zq2ULP0K2vX0y6IvR6wYsJ9c="; + sha256 = "sha256-U1Ak0oGy0FxBMqRM2A3N7VuNDz2aUW4FFW+hKKhjfdk="; }; checkInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/pyvesync/default.nix b/pkgs/development/python-modules/pyvesync/default.nix index 393170cfb9f0..1146fe892f59 100644 --- a/pkgs/development/python-modules/pyvesync/default.nix +++ b/pkgs/development/python-modules/pyvesync/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "pyvesync"; - version = "1.3.1"; + version = "1.4.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "02fpbyg46mlpc2c1j4zylw9a1h6bacxvigrl3cndsf6fxlhfx15z"; + sha256 = "sha256-xvHvZx22orJR94cRMyyXey27Ksh2/ULHRvv7xxXv11k="; }; propagatedBuildInputs = [ requests ]; diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index fa3d2119ae87..618dfef4171c 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "pyvex"; - version = "9.0.6852"; + version = "9.0.6885"; src = fetchPypi { inherit pname version; - sha256 = "sha256-O84QErqHIRYQZh9mR71opm+j7kb9a4s5f1yj0WNiJAM="; + sha256 = "sha256-cWQdrGKJyGieBow3TiMj/uB2crIF32Kvl5tVUKg/z+E="; }; propagatedBuildInputs = [ @@ -28,6 +28,7 @@ buildPythonPackage rec { preBuild = '' export CC=${stdenv.cc.targetPrefix}cc + substituteInPlace pyvex_c/Makefile --replace 'AR=ar' 'AR=${stdenv.cc.targetPrefix}ar' ''; # No tests are available on PyPI, GitHub release has tests diff --git a/pkgs/development/python-modules/pyvisa-py/default.nix b/pkgs/development/python-modules/pyvisa-py/default.nix new file mode 100644 index 000000000000..0c87af03ecce --- /dev/null +++ b/pkgs/development/python-modules/pyvisa-py/default.nix @@ -0,0 +1,48 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, setuptools-scm +, pyserial +, pyusb +, pyvisa +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyvisa-py"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "pyvisa"; + repo = "pyvisa-py"; + rev = version; + hash = "sha256-V1BS+BvHVI8h/rynLnOHvQdIR6RwQrNa2p2S6GQug98="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + pyserial + pyusb + pyvisa + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + postConfigure = '' + export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}" + ''; + + meta = with lib; { + description = "PyVISA backend that implements a large part of the Virtual Instrument Software Architecture in pure Python"; + homepage = "https://github.com/pyvisa/pyvisa-py"; + license = licenses.mit; + maintainers = with maintainers; [ mvnetbiz ]; + }; +} diff --git a/pkgs/development/python-modules/pyvisa/default.nix b/pkgs/development/python-modules/pyvisa/default.nix new file mode 100644 index 000000000000..389adfbbb48c --- /dev/null +++ b/pkgs/development/python-modules/pyvisa/default.nix @@ -0,0 +1,49 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, setuptools-scm +, setuptools +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyvisa"; + version = "1.11.3"; + + src = fetchFromGitHub { + owner = "pyvisa"; + repo = "pyvisa"; + rev = version; + hash = "sha256-Qe7W1zPI1aedLDnhkLTDPTa/lsNnCGik5Hu+jLn+meA="; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + typing-extensions + setuptools + ]; + + checkInputs = [ + pytestCheckHook + ]; + + # Test can't find cli tool bin path correctly + disabledTests = [ + "test_visa_info" + ]; + + postConfigure = '' + export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}" + ''; + + meta = with lib; { + description = "Python package for support of the Virtual Instrument Software Architecture (VISA)"; + homepage = "https://github.com/pyvisa/pyvisa"; + license = licenses.mit; + maintainers = with maintainers; [ mvnetbiz ]; + }; +} diff --git a/pkgs/development/python-modules/pywebview/default.nix b/pkgs/development/python-modules/pywebview/default.nix index a020517dcce2..e750f234faf5 100644 --- a/pkgs/development/python-modules/pywebview/default.nix +++ b/pkgs/development/python-modules/pywebview/default.nix @@ -6,7 +6,7 @@ , pytest , pythonOlder , qt5 -, xvfb_run +, xvfb-run }: buildPythonPackage rec { @@ -31,7 +31,7 @@ buildPythonPackage rec { checkInputs = [ pytest - xvfb_run + xvfb-run ]; checkPhase = '' diff --git a/pkgs/development/python-modules/pywizlight/default.nix b/pkgs/development/python-modules/pywizlight/default.nix index ba41712c236d..1461a7053022 100644 --- a/pkgs/development/python-modules/pywizlight/default.nix +++ b/pkgs/development/python-modules/pywizlight/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "pywizlight"; - version = "0.4.6"; + version = "0.4.7"; src = fetchFromGitHub { owner = "sbidy"; repo = pname; - rev = "v${version}"; - sha256 = "sha256-BCHLd1SbdHWrl7dcLD69t2K5Sa1WtGpMxTmMyDWl9u4="; + rev = version; + sha256 = "0zagdb90bxmf06fzpljhqgsgzg36zc1yhdibacfrx8bmnx3l657h"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/pyxb/default.nix b/pkgs/development/python-modules/pyxb/default.nix new file mode 100644 index 000000000000..3be79736e555 --- /dev/null +++ b/pkgs/development/python-modules/pyxb/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +, python +}: + +buildPythonPackage rec { + pname = "PyXB"; + version = "1.2.6"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"; + }; + + pythonImportsCheck = [ + "pyxb" + ]; + + # tests don't complete + # https://github.com/pabigot/pyxb/issues/130 + doCheck = false; + + meta = with lib; { + description = "Python XML Schema Bindings"; + homepage = "https://github.com/pabigot/pyxb"; + license = licenses.asl20; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/pyxnat/default.nix b/pkgs/development/python-modules/pyxnat/default.nix index 87f6b9756ed3..a72b46037753 100644 --- a/pkgs/development/python-modules/pyxnat/default.nix +++ b/pkgs/development/python-modules/pyxnat/default.nix @@ -5,6 +5,7 @@ , nose , lxml , requests +, six }: buildPythonPackage rec { @@ -17,7 +18,11 @@ buildPythonPackage rec { sha256 = "22524120d744b50d25ef6bfc7052637e4ead9e2afac92563231ec89848f5adf5"; }; - propagatedBuildInputs = [ lxml requests ]; + propagatedBuildInputs = [ + lxml + requests + six + ]; # future is not used, and pathlib is installed part of python38+ # w/o an external package diff --git a/pkgs/development/python-modules/qiskit-aqua/default.nix b/pkgs/development/python-modules/qiskit-aqua/default.nix index b1cdd7f523cd..3233e435f071 100644 --- a/pkgs/development/python-modules/qiskit-aqua/default.nix +++ b/pkgs/development/python-modules/qiskit-aqua/default.nix @@ -14,7 +14,7 @@ , qiskit-ignis , qiskit-terra , quandl -, scikitlearn +, scikit-learn , yfinance # Optional inputs , withTorch ? false @@ -59,7 +59,7 @@ buildPythonPackage rec { qiskit-terra qiskit-ignis quandl - scikitlearn + scikit-learn yfinance ] ++ lib.optionals (withTorch) [ pytorch ] ++ lib.optionals (withPyscf) [ pyscf ] diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index 403fa0f05a9c..996259f683b4 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -5,7 +5,7 @@ , python , numpy , qiskit-terra -, scikitlearn +, scikit-learn , scipy # Optional package inputs , withVisualization ? false @@ -44,7 +44,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy qiskit-terra - scikitlearn + scikit-learn scipy ] ++ lib.optionals (withCvx) [ cvxpy ] ++ lib.optionals (withVisualization) [ matplotlib ] diff --git a/pkgs/development/python-modules/qscintilla-qt5/default.nix b/pkgs/development/python-modules/qscintilla-qt5/default.nix index dcbe213966f9..05c12c1c62af 100644 --- a/pkgs/development/python-modules/qscintilla-qt5/default.nix +++ b/pkgs/development/python-modules/qscintilla-qt5/default.nix @@ -10,7 +10,7 @@ buildPythonPackage { src = qscintilla.src; format = "other"; - nativeBuildInputs = [ sip qtbase ]; + nativeBuildInputs = [ sip_4 qtbase ]; buildInputs = [ qscintilla ]; propagatedBuildInputs = [ pyqt5 ]; @@ -40,7 +40,7 @@ buildPythonPackage { --qsci-libdir=${qscintilla}/lib \ --pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \ --qsci-sipdir=$out/share/sip/PyQt5 \ - --sip-incdir=${sip}/include + --sip-incdir=${sip_4}/include ''; meta = with lib; { diff --git a/pkgs/development/python-modules/radio_beam/default.nix b/pkgs/development/python-modules/radio_beam/default.nix index f1f3200bb7b0..58137e3adbdb 100644 --- a/pkgs/development/python-modules/radio_beam/default.nix +++ b/pkgs/development/python-modules/radio_beam/default.nix @@ -2,9 +2,8 @@ , fetchPypi , buildPythonPackage , astropy -, pytest -, pytest-astropy -, astropy-helpers +, pytestCheckHook +, pytest-doctestplus , scipy }: @@ -13,25 +12,18 @@ buildPythonPackage rec { version = "0.3.3"; src = fetchPypi { - inherit pname version; + inherit version; + pname = "radio-beam"; sha256 = "e34902d91713ccab9f450b9d3e82317e292cf46a30bd42f9ad3c9a0519fcddcd"; }; propagatedBuildInputs = [ astropy ]; - nativeBuildInputs = [ astropy-helpers ]; - - # Disable automatic update of the astropy-helper module - postPatch = '' - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" - ''; - - checkInputs = [ pytest pytest-astropy scipy ]; + checkInputs = [ pytestCheckHook pytest-doctestplus scipy ]; # Tests must be run in the build directory - checkPhase = '' + preCheck = '' cd build/lib - pytest ''; meta = { diff --git a/pkgs/development/python-modules/ramlfications/default.nix b/pkgs/development/python-modules/ramlfications/default.nix index c3ae88d1775c..081a3a285718 100644 --- a/pkgs/development/python-modules/ramlfications/default.nix +++ b/pkgs/development/python-modules/ramlfications/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { description = "A Python RAML parser."; homepage = "https://ramlfications.readthedocs.org"; license = licenses.asl20; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; platforms = platforms.all; }; diff --git a/pkgs/development/python-modules/random2/default.nix b/pkgs/development/python-modules/random2/default.nix index 6845a5707da7..cb84d32ef414 100644 --- a/pkgs/development/python-modules/random2/default.nix +++ b/pkgs/development/python-modules/random2/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , isPyPy +, fetchpatch }: buildPythonPackage rec { @@ -15,6 +16,14 @@ buildPythonPackage rec { sha256 = "34ad30aac341039872401595df9ab2c9dc36d0b7c077db1cea9ade430ed1c007"; }; + patches = [ + # Patch test suite for python >= 3.9 + (fetchpatch { + url = "https://github.com/strichter/random2/pull/3/commits/1bac6355d9c65de847cc445d782c466778b94fbd.patch"; + sha256 = "064137pg1ilv3f9r10123lqbqz45070jca8pjjyp6gpfd0yk74pi"; + }) + ]; + meta = with lib; { homepage = "http://pypi.python.org/pypi/random2"; description = "Python 3 compatible Python 2 `random` Module"; diff --git a/pkgs/development/python-modules/requests-http-signature/default.nix b/pkgs/development/python-modules/requests-http-signature/default.nix index 225a8f149e47..7a27055aba2a 100644 --- a/pkgs/development/python-modules/requests-http-signature/default.nix +++ b/pkgs/development/python-modules/requests-http-signature/default.nix @@ -1,27 +1,40 @@ { lib , buildPythonPackage , fetchFromGitHub +, cryptography , requests -, python +, pytestCheckHook }: buildPythonPackage rec { pname = "requests-http-signature"; - version = "0.1.0"; + version = "0.2.0"; # .pem files for tests aren't present on PyPI src = fetchFromGitHub { owner = "pyauth"; repo = pname; rev = "v${version}"; - sha256 = "0y96wsbci296m1rcxx0ybx8r44rdvyb59p1jl27p7rgz7isr3kx1"; + sha256 = "1jsplqrxadjsc86f0kb6dgpblgwplxrpi0ql1a714w8pbbz4z3h7"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + cryptography + requests + ]; - checkPhase = '' - ${python.interpreter} test/test.py - ''; + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "test/test.py" ]; + + disabledTests = [ + # Test require network access + "test_readme_example" + ]; + + pythonImportsCheck = [ "requests_http_signature" ]; meta = with lib; { description = "A Requests auth module for HTTP Signature"; diff --git a/pkgs/development/python-modules/respx/default.nix b/pkgs/development/python-modules/respx/default.nix index 68da058194bf..0a3fa27a8086 100644 --- a/pkgs/development/python-modules/respx/default.nix +++ b/pkgs/development/python-modules/respx/default.nix @@ -11,13 +11,13 @@ buildPythonPackage rec { pname = "respx"; - version = "0.16.3"; + version = "0.17.0"; src = fetchFromGitHub { owner = "lundberg"; repo = pname; rev = version; - sha256 = "0if9sg83rznl37hsjw6pfk78jpxi421g9p21wd92jcd6073g4nbd"; + sha256 = "sha256-unGAIsslGXOUHXr0FKzC9bX6+Q3mNGZ9Z/dtjz0gkj4="; }; # Coverage is under 100 % due to the excluded tests diff --git a/pkgs/development/python-modules/rfc3339-validator/default.nix b/pkgs/development/python-modules/rfc3339-validator/default.nix index f51a232550ba..6294eee7f346 100644 --- a/pkgs/development/python-modules/rfc3339-validator/default.nix +++ b/pkgs/development/python-modules/rfc3339-validator/default.nix @@ -1,5 +1,6 @@ { lib , buildPythonPackage +, fetchpatch , fetchPypi , pytestCheckHook , hypothesis @@ -9,12 +10,12 @@ buildPythonPackage rec { pname = "rfc3339-validator"; - version = "0.1.3"; + version = "0.1.4"; src = fetchPypi { pname = "rfc3339_validator"; inherit version; - sha256 = "7a578aa0740e9ee2b48356fe1f347139190c4c72e27f303b3617054efd15df32"; + sha256 = "0srg0b89aikzinw72s433994k5gv5lfyarq1adhas11kz6yjm2hk"; }; propagatedBuildInputs = [ six ]; diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 52bef42f270f..d292eaa52231 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -6,7 +6,7 @@ , colorama , dataclasses , ipywidgets -, poetry +, poetry-core , pygments , typing-extensions , pytestCheckHook @@ -14,27 +14,33 @@ buildPythonPackage rec { pname = "rich"; - version = "9.13.0"; + version = "10.1.0"; + format = "pyproject"; + disabled = pythonOlder "3.6"; - # tests not included in pypi tarball src = fetchFromGitHub { owner = "willmcgugan"; repo = pname; rev = "v${version}"; - sha256 = "0si3rzhg8wfxw4aakkp8sr6nbzfa54rl0w92macd1338q90ha4ly"; + sha256 = "sha256-HH+k9uiK34yoqu83rknCIe2DpoqJRHkcqABuj8zjzqs="; }; - format = "pyproject"; - nativeBuildInputs = [ poetry ]; + nativeBuildInputs = [ poetry-core ]; + propagatedBuildInputs = [ CommonMark colorama ipywidgets pygments typing-extensions - ] ++ lib.optional (pythonOlder "3.7") dataclasses; + ] ++ lib.optional (pythonOlder "3.7") [ + dataclasses + ]; + + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "rich" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/ripser/default.nix b/pkgs/development/python-modules/ripser/default.nix index acd017a7a2e8..7bc7df0b8fd5 100644 --- a/pkgs/development/python-modules/ripser/default.nix +++ b/pkgs/development/python-modules/ripser/default.nix @@ -5,7 +5,7 @@ , cython , numpy , scipy -, scikitlearn +, scikit-learn , persim , pytest }: @@ -28,7 +28,7 @@ buildPythonPackage rec { cython numpy scipy - scikitlearn + scikit-learn persim ]; diff --git a/pkgs/development/python-modules/roombapy/default.nix b/pkgs/development/python-modules/roombapy/default.nix index 9c438bde7562..459037d6191e 100644 --- a/pkgs/development/python-modules/roombapy/default.nix +++ b/pkgs/development/python-modules/roombapy/default.nix @@ -1,31 +1,42 @@ -{ buildPythonPackage +{ lib +, amqtt +, buildPythonPackage , fetchFromGitHub -, hbmqtt -, lib , paho-mqtt -, poetry +, poetry-core , pytest-asyncio , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "roombapy"; - version = "1.6.2-1"; + version = "1.6.3"; + format = "pyproject"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "pschmitt"; repo = "roombapy"; rev = version; - sha256 = "14k7bys479xwpa4alpdwphzmxm3x8kc48nfqnshn1wj94vyxc425"; + sha256 = "sha256-GkDfIC2jx4Mpguk/Wu45pZw0czhabJwTz58WYSLCOV8="; }; - format = "pyproject"; + nativeBuildInputs = [ poetry-core ]; - nativeBuildInputs = [ poetry ]; propagatedBuildInputs = [ paho-mqtt ]; - checkInputs = [ hbmqtt pytest-asyncio pytestCheckHook ]; - pytestFlagsArray = [ "tests/" "--ignore=tests/test_discovery.py" ]; + checkInputs = [ + amqtt + pytest-asyncio + pytestCheckHook + ]; + + disabledTestPaths = [ + # Requires network access + "tests/test_discovery.py" + ]; + pythonImportsCheck = [ "roombapy" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/rst2ansi/default.nix b/pkgs/development/python-modules/rst2ansi/default.nix new file mode 100644 index 000000000000..e161f56d3177 --- /dev/null +++ b/pkgs/development/python-modules/rst2ansi/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchPypi, docutils, }: + +buildPythonPackage rec { + pname = "rst2ansi"; + version = "0.1.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-Gxf7mmKNQPV5M60aOqlSNGREvgaUaVCOc+lQYNoz/m8="; + }; + + propagatedBuildInputs = [ docutils ]; + + meta = with lib; { + description = "A rst converter to ansi-decorated console output"; + homepage = "https://github.com/Snaipe/python-rst-to-ansi"; + license = licenses.mit; + maintainers = with maintainers; [ vojta001 ]; + }; +} diff --git a/pkgs/development/python-modules/rtoml/default.nix b/pkgs/development/python-modules/rtoml/default.nix new file mode 100644 index 000000000000..f50ad558176e --- /dev/null +++ b/pkgs/development/python-modules/rtoml/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools-rust +, rustPlatform +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "rtoml"; + version = "0.6.1"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "samuelcolvin"; + repo = pname; + rev = "v${version}"; + sha256 = "07bf30if1wmbqjp5n4ib43n6frx8ybyxc9fndxncq7aylkrhd7hy"; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + sha256 = "1q082sdac5vm4l3b45rfjp4vppp9y9qhagdjqqfdz8gdhm1k8yyy"; + }; + + nativeBuildInputs = with rustPlatform; [ + setuptools-rust + rust.rustc + rust.cargo + cargoSetupHook + ]; + + pythonImportsCheck = [ "rtoml" ]; + + checkInputs = [ pytestCheckHook ]; + preCheck = '' + cd tests + ''; + + meta = with lib; { + description = "Rust based TOML library for python"; + homepage = "https://github.com/samuelcolvin/rtoml"; + license = licenses.mit; + maintainers = with maintainers; [ evils ]; + }; +} diff --git a/pkgs/development/python-modules/runway-python/default.nix b/pkgs/development/python-modules/runway-python/default.nix index 69b928aad089..9244a94d2357 100644 --- a/pkgs/development/python-modules/runway-python/default.nix +++ b/pkgs/development/python-modules/runway-python/default.nix @@ -1,33 +1,43 @@ { lib , buildPythonPackage -, fetchPypi +, pythonAtLeast +, fetchFromGitHub +, colorcet +, cryptography , flask , flask-compress , flask-cors , flask-sockets +, gevent , imageio , numpy -, scipy , pillow -, gevent -, wget +, pyopenssl +, scipy , six -, colorcet , unidecode , urllib3 +, wget +, deepdiff +, pytestCheckHook +, pytestcov +, websocket_client }: buildPythonPackage rec { pname = "runway-python"; version = "0.6.1"; - src = fetchPypi { - inherit pname version; - sha256 = "66cf1517dd817bf6db3792608920274f964dd0ced8dabecd925b8bc17aa95740"; + src = fetchFromGitHub { + owner = "runwayml"; + repo = "model-sdk"; + rev = version; + sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2"; }; propagatedBuildInputs = [ colorcet + cryptography flask flask-compress flask-cors @@ -36,6 +46,7 @@ buildPythonPackage rec { imageio numpy pillow + pyopenssl scipy six unidecode @@ -43,13 +54,30 @@ buildPythonPackage rec { wget ]; - # tests are not packaged in the released tarball - doCheck = false; - pythonImportsCheck = [ "runway" ]; + checkInputs = [ + deepdiff + pytestCheckHook + pytestcov + websocket_client + ]; + + disabledTests = [ + # these tests require network + "test_file_deserialization_remote" + "test_file_deserialization_absolute_directory" + "test_file_deserialization_remote_directory" + ] ++ lib.optionals (pythonAtLeast "3.9") [ + # AttributeError: module 'base64' has no attribute 'decodestring + # https://github.com/runwayml/model-sdk/issues/99 + "test_image_serialize_and_deserialize" + "test_segmentation_serialize_and_deserialize_colormap" + "test_segmentation_serialize_and_deserialize_labelmap" + ]; + meta = { description = "Helper library for creating Runway models"; homepage = "https://github.com/runwayml/model-sdk"; diff --git a/pkgs/development/python-modules/sanic-auth/default.nix b/pkgs/development/python-modules/sanic-auth/default.nix index c78b6f13d152..38d73d461c2d 100644 --- a/pkgs/development/python-modules/sanic-auth/default.nix +++ b/pkgs/development/python-modules/sanic-auth/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, sanic, pytestCheckHook }: +{ lib, buildPythonPackage, fetchPypi, sanic, sanic-testing, pytestCheckHook }: buildPythonPackage rec { pname = "Sanic-Auth"; @@ -11,7 +11,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ sanic ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ pytestCheckHook sanic-testing ]; pythonImportsCheck = [ "sanic_auth" ]; diff --git a/pkgs/development/python-modules/sanic-routing/default.nix b/pkgs/development/python-modules/sanic-routing/default.nix new file mode 100644 index 000000000000..76eb72dc7086 --- /dev/null +++ b/pkgs/development/python-modules/sanic-routing/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "sanic-routing"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "sanic-org"; + repo = "sanic-routing"; + rev = "v${version}"; + hash = "sha256-ZMl8PB9E401pUfUJ4tW7nBx1TgPQQtx9erVni3zP+lo="; + }; + + checkInputs = [ pytestCheckHook pytest-asyncio ]; + pythonImportsCheck = [ "sanic_routing" ]; + + meta = with lib; { + description = "Core routing component for the Sanic web framework"; + homepage = "https://github.com/sanic-org/sanic-routing"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/sanic-testing/default.nix b/pkgs/development/python-modules/sanic-testing/default.nix new file mode 100644 index 000000000000..e5194e36bd23 --- /dev/null +++ b/pkgs/development/python-modules/sanic-testing/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, httpcore +, httpx +, pytest-asyncio +, sanic +, websockets +}: + +buildPythonPackage rec { + pname = "sanic-testing"; + version = "0.3.1"; + + src = fetchFromGitHub { + owner = "sanic-org"; + repo = "sanic-testing"; + rev = "v${version}"; + hash = "sha256-hBAq+/BKs0a01M89Nb8HaClqxB+W5PTfjVzef/m9SWs="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'httpx>=0.16, <0.18' 'httpx' \ + --replace 'httpcore==0.12.*' 'httpcore' + ''; + + propagatedBuildInputs = [ httpx sanic websockets httpcore ]; + + # `sanic` is explicitly set to null when building `sanic` itself + # to prevent infinite recursion. In that case we skip running + # the package at all. + doCheck = sanic != null; + dontUsePythonImportsCheck = sanic == null; + + checkInputs = [ pytestCheckHook pytest-asyncio ]; + pythonImportsCheck = [ "sanic_testing" ]; + + meta = with lib; { + description = "Core testing clients for the Sanic web framework"; + homepage = "https://github.com/sanic-org/sanic-testing"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index e5995ed0b1e8..8c18380c3bad 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -1,42 +1,48 @@ { lib, buildPythonPackage, fetchPypi, doCheck ? true -, aiofiles, httptools, httpx, multidict, ujson, uvloop, websockets -, pytestCheckHook, beautifulsoup4, gunicorn, httpcore, uvicorn -, pytest-asyncio, pytest-benchmark, pytest-dependency, pytest-sanic, pytest-sugar, pytestcov +, aiofiles, httptools, multidict, sanic-routing, ujson, uvloop, websockets +, pytestCheckHook, beautifulsoup4, gunicorn, uvicorn, sanic-testing +, pytest-benchmark, pytest-sanic, pytest-sugar, pytestcov }: buildPythonPackage rec { pname = "sanic"; - version = "21.3.2"; + version = "21.3.4"; src = fetchPypi { inherit pname version; - sha256 = "84a04c5f12bf321bed3942597787f1854d15c18f157aebd7ced8c851ccc49e08"; + sha256 = "1cbd12b9138b3ca69656286b0be91fff02b826e8cb72dd76a2ca8c5eb1288d8e"; }; postPatch = '' + # Loosen dependency requirements. substituteInPlace setup.py \ - --replace '"multidict==5.0.0"' '"multidict"' \ - --replace '"httpx==0.15.4"' '"httpx"' \ - --replace '"httpcore==0.3.0"' '"httpcore"' \ - --replace '"pytest==5.2.1"' '"pytest"' + --replace '"pytest==5.2.1"' '"pytest"' \ + --replace '"gunicorn==20.0.4"' '"gunicorn"' \ + --replace '"pytest-sanic",' "" + # Patch a request headers test to allow brotli encoding + # (we build httpx with brotli support, upstream doesn't). + substituteInPlace tests/test_headers.py \ + --replace "deflate\r\n" "deflate, br\r\n" ''; propagatedBuildInputs = [ - aiofiles httptools httpx multidict ujson uvloop websockets + sanic-routing httptools uvloop ujson aiofiles websockets multidict ]; checkInputs = [ - pytestCheckHook beautifulsoup4 gunicorn httpcore uvicorn - pytest-asyncio pytest-benchmark pytest-dependency pytest-sanic pytest-sugar pytestcov + sanic-testing gunicorn pytestcov beautifulsoup4 pytest-sanic pytest-sugar + pytest-benchmark pytestCheckHook uvicorn ]; inherit doCheck; disabledTests = [ - "test_gunicorn" # No "examples" directory in pypi distribution. - "test_logo" # Fails to filter out "DEBUG asyncio:selector_events.py:59 Using selector: EpollSelector" - "test_zero_downtime" # No "examples.delayed_response.app" module in pypi distribution. - "test_reloader_live" # OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 42104) + # No "examples" directory in pypi distribution + "test_gunicorn" + "test_zero_downtime" + # flaky + "test_keep_alive_client_timeout" + "test_reloader_live" ]; __darwinAllowLocalNetworking = true; @@ -45,8 +51,8 @@ buildPythonPackage rec { meta = with lib; { description = "A microframework based on uvloop, httptools, and learnings of flask"; - homepage = "https://github.com/channelcat/sanic/"; + homepage = "https://github.com/sanic-org/sanic/"; license = licenses.mit; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc AluisioASG ]; }; } diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index f13fecc08551..fe4cd4ea48dd 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -12,7 +12,7 @@ , pandas , scipy , hdmedians -, scikitlearn +, scikit-learn , coverage , python , isPy3k @@ -30,7 +30,7 @@ buildPythonPackage rec { buildInputs = [ cython ]; checkInputs = [ coverage ]; - propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy hdmedians scikitlearn ]; + propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy hdmedians scikit-learn ]; # cython package not included for tests doCheck = false; diff --git a/pkgs/development/python-modules/scikitlearn/0.20.nix b/pkgs/development/python-modules/scikit-learn/0.20.nix index 81915e83d2dc..81915e83d2dc 100644 --- a/pkgs/development/python-modules/scikitlearn/0.20.nix +++ b/pkgs/development/python-modules/scikit-learn/0.20.nix diff --git a/pkgs/development/python-modules/scikitlearn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix index 7e9e37831e0d..dfce61df6c6e 100644 --- a/pkgs/development/python-modules/scikitlearn/default.nix +++ b/pkgs/development/python-modules/scikit-learn/default.nix @@ -7,7 +7,8 @@ , glibcLocales , numpy , scipy -, pytest +, pytestCheckHook +, pytest-xdist , pillow , cython , joblib @@ -54,17 +55,30 @@ buildPythonPackage rec { joblib threadpoolctl ]; - checkInputs = [ pytest ]; + + checkInputs = [ pytestCheckHook pytest-xdist ]; LC_ALL="en_US.UTF-8"; + preBuild = '' + export SKLEARN_BUILD_PARALLEL=$NIX_BUILD_CORES + ''; + doCheck = !stdenv.isAarch64; + # Skip test_feature_importance_regression - does web fetch - checkPhase = '' + disabledTests = [ "test_feature_importance_regression" ]; + + pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" "--pyargs" "sklearn" ]; + + preCheck = '' cd $TMPDIR - HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn + export HOME=$TMPDIR + export OMP_NUM_THREADS=1 ''; + pythonImportsCheck = [ "sklearn" ]; + meta = with lib; { description = "A set of python modules for machine learning and data mining"; changelog = let diff --git a/pkgs/development/python-modules/scikit-optimize/default.nix b/pkgs/development/python-modules/scikit-optimize/default.nix index 0a5171f22fbf..3b7106ac4f2b 100644 --- a/pkgs/development/python-modules/scikit-optimize/default.nix +++ b/pkgs/development/python-modules/scikit-optimize/default.nix @@ -5,7 +5,7 @@ , matplotlib , numpy , scipy -, scikitlearn +, scikit-learn , pyaml , pytestCheckHook }: @@ -26,7 +26,7 @@ buildPythonPackage rec { matplotlib numpy scipy - scikitlearn + scikit-learn pyaml ]; diff --git a/pkgs/development/python-modules/scikit-tda/default.nix b/pkgs/development/python-modules/scikit-tda/default.nix index f6d573573b9c..bf3e1d1ef469 100644 --- a/pkgs/development/python-modules/scikit-tda/default.nix +++ b/pkgs/development/python-modules/scikit-tda/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , numpy , scipy -, scikitlearn +, scikit-learn , matplotlib , numba , umap-learn @@ -32,7 +32,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn matplotlib numba umap-learn diff --git a/pkgs/development/python-modules/screenlogicpy/default.nix b/pkgs/development/python-modules/screenlogicpy/default.nix index 100c487acee6..1713e4c2521f 100644 --- a/pkgs/development/python-modules/screenlogicpy/default.nix +++ b/pkgs/development/python-modules/screenlogicpy/default.nix @@ -1,22 +1,32 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder +, pytestCheckHook }: buildPythonPackage rec { pname = "screenlogicpy"; - version = "0.3.0"; + version = "0.4.1"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "0gn2mf2n2g1ffdbijrydgb7dgd60lkvckblx6s86kxlkrp1wqgrq"; + src = fetchFromGitHub { + owner = "dieselrabbit"; + repo = pname; + rev = "v${version}"; + sha256 = "1rmjxqqbkfcv2xz8ilml799bzffls678fvq784fab2xdv595fndd"; }; - # Project doesn't publish tests - # https://github.com/dieselrabbit/screenlogicpy/issues/8 - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Tests require network access + "test_gateway_discovery" + "test_asyncio_gateway_discovery" + ]; + pythonImportsCheck = [ "screenlogicpy" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/seabreeze/default.nix b/pkgs/development/python-modules/seabreeze/default.nix index 7580647f5a12..06802a8a2ce1 100644 --- a/pkgs/development/python-modules/seabreeze/default.nix +++ b/pkgs/development/python-modules/seabreeze/default.nix @@ -1,8 +1,17 @@ { lib , fetchFromGitHub , buildPythonPackage -, pyusb +, cython +, git +, pkgconfig +, pytest-runner +, setuptools-scm +, future , numpy +, pyusb +, mock +, pytestCheckHook +, zipp }: ## Usage @@ -18,19 +27,35 @@ buildPythonPackage rec { owner = "ap--"; repo = "python-seabreeze"; rev = "v${version}"; - sha256 = "1lna3w1vsci35dhyi7qjvbb99gxvzk23k195c7by7kkrps844q1j"; + sha256 = "1hm9aalpb9sdp8s7ckn75xvyiacp5678pv9maybm5nz0z2h29ibq"; + leaveDotGit = true; }; + nativeBuildInputs = [ + cython + git + pkgconfig + pytest-runner + setuptools-scm + ]; + + propagatedBuildInputs = [ + future + numpy + pyusb + ]; + postInstall = '' mkdir -p $out/etc/udev/rules.d - cp misc/10-oceanoptics.rules $out/etc/udev/rules.d/10-oceanoptics.rules + cp os_support/10-oceanoptics.rules $out/etc/udev/rules.d/10-oceanoptics.rules ''; - # underlying c libraries are tested and fail - # (c libs are used with anaconda, which we don't care about as we use the alternative path, being that of pyusb). - doCheck = false; - - propagatedBuildInputs = [ pyusb numpy ]; + # few backends enabled, but still some tests + checkInputs = [ + pytestCheckHook + mock + zipp + ]; setupPyBuildFlags = [ "--without-cseabreeze" ]; diff --git a/pkgs/development/python-modules/segments/default.nix b/pkgs/development/python-modules/segments/default.nix index 00953a8e9090..f1c0ad3bf0ef 100644 --- a/pkgs/development/python-modules/segments/default.nix +++ b/pkgs/development/python-modules/segments/default.nix @@ -42,6 +42,6 @@ buildPythonPackage rec { description = "Unicode Standard tokenization routines and orthography profile segmentation"; homepage = "https://github.com/cldf/segments"; license = licenses.asl20; - maintainers = with maintainers; [ hexa ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index 664f84933ed7..370d25489809 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -6,6 +6,7 @@ , geckodriver , urllib3 , xorg +, nixosTests }: @@ -47,6 +48,10 @@ buildPythonPackage rec { cp -v x_ignore_nofocus.so selenium/webdriver/firefox/${if stdenv.is64bit then "amd64" else "x86"}/ ''; + passthru.tests = { + testing-bitwarden = nixosTests.bitwarden; + }; + meta = with lib; { description = "The selenium package is used to automate web browser interaction from Python"; homepage = "http://www.seleniumhq.org"; diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index ba5b37c8d9c7..9526c27eb175 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -29,11 +29,11 @@ buildPythonPackage rec { pname = "sentry-sdk"; - version = "1.0.0"; + version = "1.1.0"; src = fetchPypi { inherit pname version; - sha256 = "71de00c9711926816f750bc0f57ef2abbcb1bfbdf5378c601df7ec978f44857a"; + sha256 = "sha256-wSJ9ONyjFbo1GCNz8SnD4nIujtmZ5SWE5qyn0oeHBzk="; }; checkInputs = [ blinker botocore chalice django flask tornado bottle rq falcon sqlalchemy werkzeug trytond diff --git a/pkgs/development/python-modules/seqeval/default.nix b/pkgs/development/python-modules/seqeval/default.nix index 15322632ad7d..9ed516e4d5c3 100644 --- a/pkgs/development/python-modules/seqeval/default.nix +++ b/pkgs/development/python-modules/seqeval/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , numpy -, scikitlearn +, scikit-learn , perl , pytestCheckHook }: @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn ]; checkInputs = [ diff --git a/pkgs/development/python-modules/setuptools-declarative-requirements/default.nix b/pkgs/development/python-modules/setuptools-declarative-requirements/default.nix new file mode 100644 index 000000000000..ba6ff1649e62 --- /dev/null +++ b/pkgs/development/python-modules/setuptools-declarative-requirements/default.nix @@ -0,0 +1,28 @@ +{ buildPythonPackage, fetchPypi, lib, pypiserver, pytestCheckHook +, setuptools-scm, virtualenv }: + +buildPythonPackage rec { + pname = "setuptools-declarative-requirements"; + version = "1.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"; + }; + + buildInputs = [ setuptools-scm ]; + + checkInputs = [ pypiserver pytestCheckHook virtualenv ]; + + # Tests use network + doCheck = false; + + pythonImportsCheck = [ "declarative_requirements" ]; + + meta = with lib; { + homepage = "https://github.com/s0undt3ch/setuptools-declarative-requirements"; + description = "Declarative setuptools Config Requirements Files Support"; + license = licenses.asl20; + maintainers = [ maintainers.austinbutler ]; + }; +} diff --git a/pkgs/development/python-modules/setuptoolstrial/default.nix b/pkgs/development/python-modules/setuptoolstrial/default.nix index bef492e5dbcb..26b8d732be1d 100644 --- a/pkgs/development/python-modules/setuptoolstrial/default.nix +++ b/pkgs/development/python-modules/setuptoolstrial/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { description = "Setuptools plugin that makes unit tests execute with trial instead of pyunit."; homepage = "https://github.com/rutsky/setuptools-trial"; license = licenses.bsd2; - maintainers = with maintainers; [ ryansydnor nand0p ]; + maintainers = with maintainers; [ ryansydnor ]; }; } diff --git a/pkgs/development/python-modules/shap/default.nix b/pkgs/development/python-modules/shap/default.nix index 5600f4a6aa0f..128dacfd55a8 100644 --- a/pkgs/development/python-modules/shap/default.nix +++ b/pkgs/development/python-modules/shap/default.nix @@ -5,7 +5,7 @@ , pytestCheckHook , numpy , scipy -, scikitlearn +, scikit-learn , pandas , tqdm , slicer @@ -30,7 +30,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn pandas tqdm slicer diff --git a/pkgs/development/python-modules/simple-salesforce/default.nix b/pkgs/development/python-modules/simple-salesforce/default.nix index cd89c1c8aae8..af92f345950b 100644 --- a/pkgs/development/python-modules/simple-salesforce/default.nix +++ b/pkgs/development/python-modules/simple-salesforce/default.nix @@ -1,10 +1,8 @@ { lib , fetchFromGitHub , buildPythonPackage +, authlib , requests -, pyopenssl -, cryptography -, idna , mock , isPy27 , nose @@ -24,21 +22,20 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ + authlib requests - pyopenssl - cryptography - idna ]; checkInputs = [ nose pytz responses - ] ++ lib.optionals isPy27 [ mock ]; + ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "mock==1.0.1" "mock" + checkPhase = '' + runHook preCheck + nosetests -v + runHook postCheck ''; meta = with lib; { diff --git a/pkgs/development/python-modules/simplisafe-python/default.nix b/pkgs/development/python-modules/simplisafe-python/default.nix index 5b8925b0a4c6..9592d37fed0a 100644 --- a/pkgs/development/python-modules/simplisafe-python/default.nix +++ b/pkgs/development/python-modules/simplisafe-python/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "simplisafe-python"; - version = "9.6.9"; + version = "9.6.10"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "bachya"; repo = pname; rev = version; - sha256 = "1q5w5pvrgj94bzd5wig79l4hipkfrcdah54rvwyi7b8q46gw77sg"; + sha256 = "0cc5kxxishxhkg1nqmgbh36yxs8yjfynmimzjnaqkqfrs9iq46mr"; }; nativeBuildInputs = [ poetry-core ]; diff --git a/pkgs/development/python-modules/sip/4.x.nix b/pkgs/development/python-modules/sip/4.x.nix new file mode 100644 index 000000000000..5334d1196344 --- /dev/null +++ b/pkgs/development/python-modules/sip/4.x.nix @@ -0,0 +1,44 @@ +{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }: + +buildPythonPackage rec { + pname = sip-module; + version = "4.19.25"; + format = "other"; + + disabled = isPyPy; + + src = fetchurl { + url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz"; + sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"; + }; + + configurePhase = '' + ${python.executable} ./configure.py \ + --sip-module ${sip-module} \ + -d $out/${python.sitePackages} \ + -b $out/bin -e $out/include + ''; + + enableParallelBuilding = true; + + installCheckPhase = let + modules = [ + sip-module + "sipconfig" + ]; + imports = lib.concatMapStrings (module: "import ${module};") modules; + in '' + echo "Checking whether modules can be imported..." + PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -c "${imports}" + ''; + + doCheck = true; + + meta = with lib; { + description = "Creates C++ bindings for Python modules"; + homepage = "http://www.riverbankcomputing.co.uk/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ lovek323 sander ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/python-modules/sip/5.x.nix b/pkgs/development/python-modules/sip/5.x.nix deleted file mode 100644 index cebffd5765bd..000000000000 --- a/pkgs/development/python-modules/sip/5.x.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, fetchPypi, buildPythonPackage, packaging, toml }: - -buildPythonPackage rec { - pname = "sip"; - version = "5.5.0"; - - src = fetchPypi { - pname = "sip"; - inherit version; - sha256 = "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"; - }; - - propagatedBuildInputs = [ packaging toml ]; - - # There aren't tests - doCheck = false; - - pythonImportsCheck = [ "sipbuild" ]; - - meta = with lib; { - description = "Creates C++ bindings for Python modules"; - homepage = "http://www.riverbankcomputing.co.uk/"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ eduardosm ]; - }; -} diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix index 0027c1c0ba5f..c15589b77bc8 100644 --- a/pkgs/development/python-modules/sip/default.nix +++ b/pkgs/development/python-modules/sip/default.nix @@ -1,44 +1,40 @@ -{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }: +{ lib, stdenv, fetchPypi, buildPythonPackage, packaging, toml }: buildPythonPackage rec { - pname = sip-module; - version = "4.19.24"; - format = "other"; + pname = "sip"; + version = "5.5.0"; - disabled = isPyPy; - - src = fetchurl { - url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz"; - sha256 = "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd"; + src = fetchPypi { + pname = "sip"; + inherit version; + sha256 = "1idaivamp1jvbbai9yzv471c62xbqxhaawccvskaizihkd0lq0jx"; }; - configurePhase = '' - ${python.executable} ./configure.py \ - --sip-module ${sip-module} \ - -d $out/${python.sitePackages} \ - -b $out/bin -e $out/include - ''; + propagatedBuildInputs = [ packaging toml ]; - enableParallelBuilding = true; + # There aren't tests + doCheck = false; - installCheckPhase = let - modules = [ - sip-module - "sipconfig" - ]; - imports = lib.concatMapStrings (module: "import ${module};") modules; - in '' - echo "Checking whether modules can be imported..." - PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -c "${imports}" - ''; + pythonImportsCheck = [ "sipbuild" ]; - doCheck = true; + # FIXME: Why isn't this detected automatically? + # Needs to be specified in pyproject.toml, e.g.: + # [tool.sip.bindings.MODULE] + # tags = [PLATFORM_TAG] + platform_tag = + if stdenv.targetPlatform.isLinux then + "WS_X11" + else if stdenv.targetPlatform.isDarwin then + "WS_MACX" + else if stdenv.targetPlatform.isWindows then + "WS_WIN" + else + throw "unsupported platform"; meta = with lib; { description = "Creates C++ bindings for Python modules"; homepage = "http://www.riverbankcomputing.co.uk/"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ lovek323 sander ]; - platforms = platforms.all; + license = licenses.gpl3Only; + maintainers = with maintainers; [ eduardosm ]; }; } diff --git a/pkgs/development/python-modules/sklearn-deap/default.nix b/pkgs/development/python-modules/sklearn-deap/default.nix index d973bc70bcdb..2530b9652032 100644 --- a/pkgs/development/python-modules/sklearn-deap/default.nix +++ b/pkgs/development/python-modules/sklearn-deap/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikitlearn, python }: +{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikit-learn, python }: buildPythonPackage rec { pname = "sklearn-deap"; @@ -20,7 +20,7 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ numpy scipy deap scikitlearn ]; + propagatedBuildInputs = [ numpy scipy deap scikit-learn ]; checkPhase = '' ${python.interpreter} test.py diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index 3504557b5027..db3b8ed4312c 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -8,7 +8,7 @@ , numpy , pandas , pytorch -, scikitlearn +, scikit-learn , scipy , tabulate , tqdm @@ -23,7 +23,7 @@ buildPythonPackage rec { sha256 = "9910f97339e654c8d38e0075d87b735e69e5eb11db59c527fb36705b30c8d0a4"; }; - propagatedBuildInputs = [ numpy pytorch scikitlearn scipy tabulate tqdm ]; + propagatedBuildInputs = [ numpy pytorch scikit-learn scipy tabulate tqdm ]; checkInputs = [ pytest pytestcov flaky pandas pytestCheckHook ]; disabledTests = [ diff --git a/pkgs/development/python-modules/slimit/default.nix b/pkgs/development/python-modules/slimit/default.nix deleted file mode 100644 index 30654bd03f61..000000000000 --- a/pkgs/development/python-modules/slimit/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, fetchpatch, python, ply }: - -buildPythonPackage rec { - pname = "slimit"; - version = "0.8.1"; - - src = fetchPypi { - inherit pname version; - extension = "zip"; - sha256 = "f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b"; - }; - - # Some patches from https://github.com/rspivak/slimit/pull/65 - patches = lib.optionals isPy3k [ - (fetchpatch { - url = "https://github.com/lelit/slimit/commit/a61e12d88cc123c4b7af2abef21d06fd182e561a.patch"; - sha256 = "0lbhvkgn4l8g9fwvb81rfwjx7hsaq2pid8a5gczdk1ba65wfvdq5"; - }) - (fetchpatch { - url = "https://github.com/lelit/slimit/commit/e8331659fb89e8a4613c5e4e338c877fead9c551.patch"; - sha256 = "1hv4ysn09c9bfd5bxhhrp51hsi81hdidmx0y7zcrjjiich9ayrni"; - }) - ]; - - propagatedBuildInputs = [ ply ]; - - checkPhase = '' - ${python.interpreter} -m unittest discover -s src/slimit - ''; - - meta = with lib; { - description = "JavaScript minifier"; - homepage = "https://slimit.readthedocs.org/"; - license = licenses.mit; - }; -} diff --git a/pkgs/development/python-modules/slixmpp/default.nix b/pkgs/development/python-modules/slixmpp/default.nix index f648905251e2..f28708bdf03b 100644 --- a/pkgs/development/python-modules/slixmpp/default.nix +++ b/pkgs/development/python-modules/slixmpp/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "slixmpp"; - version = "1.7.0"; + version = "1.7.1"; disabled = !isPy3k; src = fetchPypi { inherit pname version; - sha256 = "sha256-fy7sRKS7ih4JmjOW/noL8qJ1xWVpQLbBbObHnMwT3Bc="; + sha256 = "sha256-mvg23FdHJZeIZRcm8GLWmm9DDTBt29jmsUHB/smVSec="; }; patches = [ diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index fdf984563ea0..237f36e201b6 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -1,5 +1,6 @@ -{ buildPythonPackage -, isPy27 +{ lib +, buildPythonPackage +, pythonOlder , asn1crypto , azure-storage-blob , boto3 @@ -10,7 +11,6 @@ , idna , ijson , isPy3k -, lib , oscrypto , pyarrow , pyasn1-modules @@ -25,20 +25,14 @@ buildPythonPackage rec { pname = "snowflake-connector-python"; - version = "2.4.1"; - disabled = isPy27; + version = "2.4.3"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "5c9180e61202a7beb1df83231688423091ca0a04ee559d2a78ff77f9c727baae"; + sha256 = "sha256-+jAfUwaofWM5Ef1kk4AEAbBM/UES8/ZzLd4QJfkEQsM="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "'pyOpenSSL>=16.2.0,<20.0.0'," "'pyOpenSSL'," \ - --replace 'pytz<2021.0' 'pytz' - ''; - propagatedBuildInputs = [ azure-storage-blob asn1crypto @@ -55,16 +49,26 @@ buildPythonPackage rec { pytz requests six - ] ++ lib.optionals (!isPy3k) [ pyarrow pyasn1-modules urllib3 ]; - # tests require encrypted secrets, see + postPatch = '' + # https://github.com/snowflakedb/snowflake-connector-python/issues/705 + substituteInPlace setup.py \ + --replace "idna>=2.5,<3" "idna" \ + --replace "chardet>=3.0.2,<4" "chardet" + ''; + + # Tests require encrypted secrets, see # https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters doCheck = false; - pythonImportsCheck = [ "snowflake" "snowflake.connector" ]; + + pythonImportsCheck = [ + "snowflake" + "snowflake.connector" + ]; meta = with lib; { description = "Snowflake Connector for Python"; diff --git a/pkgs/development/python-modules/spacy-alignments/default.nix b/pkgs/development/python-modules/spacy-alignments/default.nix new file mode 100644 index 000000000000..0ac1edfd5034 --- /dev/null +++ b/pkgs/development/python-modules/spacy-alignments/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, fetchPypi +, fetchpatch +, buildPythonPackage +, isPy3k +, rustPlatform +, setuptools-rust +, libiconv +}: + +buildPythonPackage rec { + pname = "spacy-alignments"; + version = "0.8.3"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + hash = "sha256-zrqBjaIjtF6bJMbmw7Zo+BeApN6sxxfLkrzsDjdvC78="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit patches src; + name = "${pname}-${version}"; + hash = "sha256-YRyG2yflEXKklNqXiDD9oK3J1lq4o704+Eeu2hyY3xI="; + }; + + patches = [ + # Add Cargo.lock, from upstream PR: + # https://github.com/explosion/spacy-alignments/pull/3 + (fetchpatch { + url = "https://github.com/explosion/spacy-alignments/commit/7b0ba13ff0d245bfbbe344a36fb7bbd311dd4906.diff"; + sha256 = "sha256-jx97SSC+3z+ByInNs8Uq58H50eCo4fDCwEi6VKxRs2k="; + excludes = [ ".gitignore" ]; + }) + ]; + + nativeBuildInputs = [ + setuptools-rust + ] ++ (with rustPlatform; [ + cargoSetupHook + rust.cargo + rust.rustc + ]); + + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; + + # Fails because spacy_alignments module cannot be loaded correctly. + doCheck = false; + + pythonImportsCheck = [ "spacy_alignments" ]; + + meta = with lib; { + description = "Align tokenizations for spaCy and transformers"; + homepage = "https://github.com/explosion/spacy-alignments"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/spacy-pkuseg/default.nix b/pkgs/development/python-modules/spacy-pkuseg/default.nix new file mode 100644 index 000000000000..670174a057e9 --- /dev/null +++ b/pkgs/development/python-modules/spacy-pkuseg/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPy3k +, cython +, numpy +, srsly +}: + +buildPythonPackage rec { + pname = "spacy-pkuseg"; + version = "0.0.28"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit version; + pname = "spacy_pkuseg"; + hash = "sha256-mmA/baY9ohvrM41ak5L+G8CUrSQeZCrzmMAoND4X/NI="; + }; + + # Does not seem to have actual tests, but unittest discover + # recognizes some non-tests as tests and fails. + doCheck = false; + + nativeBuildInputs = [ cython ]; + + propagatedBuildInputs = [ numpy srsly ]; + + pythonImportsCheck = [ "spacy_pkuseg" ]; + + meta = with lib; { + description = "Toolkit for multi-domain Chinese word segmentation (spaCy fork)"; + homepage = "https://github.com/explosion/spacy-pkuseg"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/spacy-transformers/annotation-test/annotate.py b/pkgs/development/python-modules/spacy-transformers/annotation-test/annotate.py new file mode 100644 index 000000000000..d0be2d1c335a --- /dev/null +++ b/pkgs/development/python-modules/spacy-transformers/annotation-test/annotate.py @@ -0,0 +1,68 @@ +import pytest +import spacy + +en_text = ( + "When Sebastian Thrun started working on self-driving cars at " + "Google in 2007, few people outside of the company took him " + "seriously. “I can tell you very senior CEOs of major American " + "car companies would shake my hand and turn away because I wasn’t " + "worth talking to,” said Thrun, in an interview with Recode earlier " + "this week.") + + +@pytest.fixture +def en_core_web_trf(): + return spacy.load("en_core_web_trf") + + +@pytest.fixture +def doc_en_core_web_trf(en_core_web_trf): + return en_core_web_trf(en_text) + + +def test_entities(doc_en_core_web_trf): + entities = list(map(lambda e: (e.text, e.label_), + doc_en_core_web_trf.ents)) + + assert entities == [ + ('Sebastian Thrun', 'PERSON'), + ('Google', 'ORG'), + ('2007', 'DATE'), + ('American', 'NORP'), + ('Thrun', 'PERSON'), + ('Recode', 'ORG'), + ('earlier this week', 'DATE'), + ] + + +def test_nouns(doc_en_core_web_trf): + assert [ + chunk.text for chunk in doc_en_core_web_trf.noun_chunks] == [ + 'Sebastian Thrun', + 'self-driving cars', + 'Google', + 'few people', + 'the company', + 'him', + 'I', + 'you', + 'very senior CEOs', + 'major American car companies', + 'my hand', + 'I', + 'Thrun', + 'an interview', + 'Recode'] + + +def test_verbs(doc_en_core_web_trf): + assert [ + token.lemma_ for token in doc_en_core_web_trf if token.pos_ == "VERB"] == [ + 'start', + 'take', + 'tell', + 'shake', + 'turn', + 'be', + 'talk', + 'say'] diff --git a/pkgs/development/python-modules/spacy-transformers/annotation-test/default.nix b/pkgs/development/python-modules/spacy-transformers/annotation-test/default.nix new file mode 100644 index 000000000000..11a927a0a627 --- /dev/null +++ b/pkgs/development/python-modules/spacy-transformers/annotation-test/default.nix @@ -0,0 +1,23 @@ +{ stdenv, pytest, spacy_models }: + +stdenv.mkDerivation { + name = "spacy-transformers-annotation-test"; + + src = ./.; + + dontConfigure = true; + dontBuild = true; + doCheck = true; + + checkInputs = [ pytest spacy_models.en_core_web_trf ]; + + checkPhase = '' + pytest annotate.py + ''; + + installPhase = '' + touch $out + ''; + + meta.timeout = 60; +} diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix new file mode 100644 index 000000000000..1d02460167bf --- /dev/null +++ b/pkgs/development/python-modules/spacy-transformers/default.nix @@ -0,0 +1,42 @@ +{ lib +, callPackage +, fetchPypi +, buildPythonPackage +, pytorch +, spacy +, spacy-alignments +, srsly +, transformers +}: + +buildPythonPackage rec { + pname = "spacy-transformers"; + version = "1.0.2"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-AYshH2trMTgeSkAPRb6wRWpm4gA5FaKV2NJd+PhzAy4="; + }; + + propagatedBuildInputs = [ + pytorch + spacy + spacy-alignments + srsly + transformers + ]; + + # Test fails due to missing arguments for trfs2arrays(). + doCheck = false; + + pythonImportsCheck = [ "spacy_transformers" ]; + + passthru.tests.annotation = callPackage ./annotation-test { }; + + meta = with lib; { + description = "spaCy pipelines for pretrained BERT, XLNet and GPT-2"; + homepage = "https://github.com/explosion/spacy-transformers"; + license = licenses.mit; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/spacy/annotation-test/annotate.py b/pkgs/development/python-modules/spacy/annotation-test/annotate.py index 822eb8ac0743..eb6288084883 100644 --- a/pkgs/development/python-modules/spacy/annotation-test/annotate.py +++ b/pkgs/development/python-modules/spacy/annotation-test/annotate.py @@ -26,10 +26,11 @@ def test_entities(doc_en_core_web_sm): assert entities == [ ('Sebastian Thrun', 'PERSON'), - ('Google', 'ORG'), ('2007', 'DATE'), + ('2007', 'DATE'), ('American', 'NORP'), - ('Thrun', 'ORG'), - ('earlier this week', 'DATE') + ('Thrun', 'PERSON'), + ('Recode', 'PERSON'), + ('earlier this week', 'DATE'), ] @@ -60,10 +61,9 @@ def test_verbs(doc_en_core_web_sm): 'work', 'drive', 'take', - 'can', 'tell', - 'would', 'shake', 'turn', + 'be', 'talk', 'say'] diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 077ac0e6a3bc..3cabc1d6ba20 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -7,42 +7,52 @@ , blis , catalogue , cymem +, jinja2 , jsonschema , murmurhash , numpy , pathlib -, plac , preshed , requests , setuptools , srsly +, spacy-legacy , thinc +, typer , wasabi +, packaging +, pathy +, pydantic }: buildPythonPackage rec { pname = "spacy"; - version = "3.0.5"; + version = "3.0.6"; src = fetchPypi { inherit pname version; - sha256 = "9f7a09fbad53aac2a3cb7696a902de62b94575a15d249dd5e26a98049328060e"; + hash = "sha256-ViirifH1aAmciAsSqcN/Ts4pq4kmBmDP33KMAnEYecU="; }; propagatedBuildInputs = [ blis catalogue cymem + jinja2 jsonschema murmurhash numpy - plac preshed requests setuptools srsly + spacy-legacy thinc wasabi + packaging + pathy + pydantic + typer ] ++ lib.optional (pythonOlder "3.4") pathlib; checkInputs = [ @@ -57,10 +67,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.cfg \ --replace "blis>=0.4.0,<0.8.0" "blis>=0.4.0,<1.0" \ - --replace "catalogue>=0.0.7,<1.1.0" "catalogue>=0.0.7,<3.0" \ - --replace "plac>=0.9.6,<1.2.0" "plac>=0.9.6,<2.0" \ - --replace "srsly>=1.0.2,<1.1.0" "srsly>=1.0.2,<3.0" \ - --replace "thinc>=7.4.1,<7.5.0" "thinc>=7.4.1,<8" + --replace "pydantic>=1.7.1,<1.8.0" "pydantic>=1.7.1,<1.8.3" ''; pythonImportsCheck = [ "spacy" ]; diff --git a/pkgs/development/python-modules/spacy/legacy.nix b/pkgs/development/python-modules/spacy/legacy.nix new file mode 100644 index 000000000000..f8b011d83ccf --- /dev/null +++ b/pkgs/development/python-modules/spacy/legacy.nix @@ -0,0 +1,26 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "spacy-legacy"; + version = "3.0.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-Uy94rjFllSj622RTzd6UJaQmIniCw4gpeq/X57QcIpA="; + }; + + # checkInputs = [ pytestCheckHook spacy ]; + doCheck = false; + pythonImportsCheck = [ "spacy_legacy" ]; + + meta = with lib; { + description = "A Path interface for local and cloud bucket storage"; + homepage = "https://github.com/justindujardin/pathy"; + license = licenses.asl20; + maintainers = with maintainers; [ melling ]; + }; +} diff --git a/pkgs/development/python-modules/spacy/models.json b/pkgs/development/python-modules/spacy/models.json index 3a427f8932a5..a2989b6da502 100644 --- a/pkgs/development/python-modules/spacy/models.json +++ b/pkgs/development/python-modules/spacy/models.json @@ -1,264 +1,332 @@ -[{ - "pname": "da_core_news_lg", - "version": "2.3.0", - "sha256": "18y1jany1ha27jkwb9563haxsbylm0axkh5c8009lsfxc8y2w9hr", - "license": "cc-by-sa-40" -}, -{ - "pname": "da_core_news_md", - "version": "2.3.0", - "sha256": "06nm5grj5jdx0rja7vw1f91vvd69p6vhafrwpfr1npqk24j6cacb", - "license": "cc-by-sa-40" -}, -{ - "pname": "da_core_news_sm", - "version": "2.3.0", - "sha256": "00byhlrcbg4wxplr473g9b3126pvk4vwy0q34xg0zx4994qb6rgn", - "license": "cc-by-sa-40" -}, -{ - "pname": "de_core_news_lg", - "version": "2.3.0", - "sha256": "0rixhgdz4z7sq6f2b1w3n5cn1645cr37g40hbd9xzlvdzdf5cg6d", - "license": "mit" -}, -{ - "pname": "de_core_news_md", - "version": "2.3.0", - "sha256": "0kxir1w000r5fn1kpa38m7688xinkn2mk1m82aiwqlck3r72jdi6", - "license": "mit" -}, -{ - "pname": "de_core_news_sm", - "version": "2.3.0", - "sha256": "00cbmrf4njg28laysapdnp4rv4lw4yw03rxkynw1ain5fwb0izl7", - "license": "mit" -}, -{ - "pname": "el_core_news_lg", - "version": "2.3.0", - "sha256": "001c19dd1kirlvzbdv2i89zw8nf6c4icv2w0chm7rd6x9m3i13gd", - "license": "cc-by-nc-sa-30" -}, -{ - "pname": "el_core_news_md", - "version": "2.3.0", - "sha256": "170x8bzm5nf02mhkxyxjk58yk2639hsjb5b9prcc69500c0vmnp0", - "license": "cc-by-nc-sa-30" -}, -{ - "pname": "el_core_news_sm", - "version": "2.3.0", - "sha256": "10mh3za4jvr07rawzk8ps642rp11s3smraj9xvrxflik4fqkz18b", - "license": "cc-by-nc-sa-30" -}, -{ - "pname": "en_core_web_lg", - "version": "2.3.0", - "sha256": "0mfa5wz31ya295jhyj489gb4qy806zmpq1zc11bvv5alv2m35if2", - "license": "mit" -}, -{ - "pname": "en_core_web_md", - "version": "2.3.0", - "sha256": "1ys8sqkhiap1mq6mhbkbq8bc07lvl68xngbx725xkwvirzl5gabh", - "license": "mit" -}, -{ - "pname": "en_core_web_sm", - "version": "2.3.0", - "sha256": "04icv9qf4pj53ll8vqxcjl2a723q1k00i7lifk8wx5saif28g37a", - "license": "mit" -}, -{ - "pname": "en_vectors_web_lg", - "version": "2.3.0", - "sha256": "13g012rwh0bcxx3ii5mmygqzyryah1y3zd000zhidnacc1x1g743", - "license": "cc-by-sa-30" -}, -{ - "pname": "es_core_news_lg", - "version": "2.3.0", - "sha256": "1r0pr0lzs3j9w7rd5z9nw87iayjm36v7f7gamvaiiphs6bc5p7ls", - "license": "gpl3" -}, -{ - "pname": "es_core_news_md", - "version": "2.3.0", - "sha256": "0nz33bmpr3rxqbnv6vb1id8pkfsvh8ii8vqplwgb3b8772kmpzy2", - "license": "gpl3" -}, -{ - "pname": "es_core_news_sm", - "version": "2.3.0", - "sha256": "02xqhg4m0gg5r9yibvl02zixkll6w0nsmbdhp07y5yyaqjarc90d", - "license": "gpl3" -}, -{ - "pname": "fr_core_news_lg", - "version": "2.3.0", - "sha256": "1yliamws8nqqjhpk9gr2dzlk0dms2mr958zbj21biv8fimbq60ik", - "license": "lgpllr" -}, -{ - "pname": "fr_core_news_md", - "version": "2.3.0", - "sha256": "04fk212ksac3bp9dj7dmzsdcnbqmbsgymsic6ddcv9zbfdv5d0db", - "license": "lgpllr" -}, -{ - "pname": "fr_core_news_sm", - "version": "2.3.0", - "sha256": "0kldww855z67qfc9maa9z1lsvdf5vj5vc8gj0x3h68kv5n1xr4h0", - "license": "lgpllr" -}, -{ - "pname": "it_core_news_lg", - "version": "2.3.0", - "sha256": "192rdmqnwl3ajxzhnw4r1cqv5bkziv0yc2bbzckmzqss64wk7k70", - "license": "cc-by-nc-sa-30" -}, -{ - "pname": "it_core_news_md", - "version": "2.3.0", - "sha256": "019ih4vwq1w6j38j0wc8pyyg1an6yy37wxq2w4amwppynmmcnd5w", - "license": "cc-by-nc-sa-30" -}, -{ - "pname": "it_core_news_sm", - "version": "2.3.0", - "sha256": "1c3ywqa8li0j7cyvd1xqbb096y61978hd6qv7rc6cxxjdhmkrrds", - "license": "cc-by-nc-sa-40" -}, -{ - "pname": "lt_core_news_lg", - "version": "2.3.0", - "sha256": "0hn5w8n7mgv33i6gvnaxl1j44n9gz4j86gg1a9jjlgdw5z98n0p2", - "license": "cc-by-sa-40" -}, -{ - "pname": "lt_core_news_md", - "version": "2.3.0", - "sha256": "1xya79cz2xd5vgzg6qg0ww5j2bmv7kppdk3mdjf6zpwrlzwdbk5d", - "license": "cc-by-sa-40" -}, -{ - "pname": "lt_core_news_sm", - "version": "2.3.0", - "sha256": "0r3rbqgz4897wyhz5jli30lryb45039f4rlvn4q0364cg1pm92g9", - "license": "cc-by-sa-40" -}, -{ - "pname": "nb_core_news_lg", - "version": "2.3.0", - "sha256": "18mblypw3c82004qz5w1p3262iqwn99wl9b781dq7aqwxskr02d6", - "license": "mit" -}, -{ - "pname": "nb_core_news_md", - "version": "2.3.0", - "sha256": "0iw97k9glxbar8mrpvnmmcb1nffgdhb83akn99p53pwmqbzxy9p3", - "license": "mit" -}, -{ - "pname": "nb_core_news_sm", - "version": "2.3.0", - "sha256": "07b7xri2q3m7fvn9a2gjc1044a3f14231vr32hrw96h7k6vg95h7", - "license": "mit" -}, -{ - "pname": "nl_core_news_lg", - "version": "2.3.0", - "sha256": "016166kzpgi0p3m0x3k308a0r60a28yz7npagjvmpl1dfm9lzhnv", - "license": "cc-by-sa-40" -}, -{ - "pname": "nl_core_news_md", - "version": "2.3.0", - "sha256": "1anfhig531k9k14s0cbgsvmvifp3h50qi1h8dhx894kjmq10k2lg", - "license": "cc-by-sa-40" -}, -{ - "pname": "nl_core_news_sm", - "version": "2.3.0", - "sha256": "0alvz7pn7cj0yax8h5gp71vrdblh3mcsmyhzgiddsd44ry35nxnj", - "license": "cc-by-sa-40" -}, -{ - "pname": "pl_core_news_lg", - "version": "2.3.0", - "sha256": "1acchp8pv1h4c6cwvxz07lh4ychn6aw809zfg3mbbsxgsgd2ahjr", - "license": "gpl3" -}, -{ - "pname": "pl_core_news_md", - "version": "2.3.0", - "sha256": "19jjjjvbys3ayibkm3cx497b4bh63ll39hfq04wx116rj4ajpwwg", - "license": "gpl3" -}, -{ - "pname": "pl_core_news_sm", - "version": "2.3.0", - "sha256": "166mqlfkgiszcc6hwg2mr6sir9y88y22nd81a1nidq0fiif5lfji", - "license": "gpl3" -}, -{ - "pname": "pt_core_news_lg", - "version": "2.3.0", - "sha256": "18gvdmfwyy2sbq6206imglhghyagd6a4gb6wcfkwhm7lzbnq714d", - "license": "cc-by-sa-40" -}, -{ - "pname": "pt_core_news_md", - "version": "2.3.0", - "sha256": "1yxnpwby2aq6ydvd35lylc4fs141fisfnzlx8pl88pp2b2gxijvl", - "license": "cc-by-sa-40" -}, -{ - "pname": "pt_core_news_sm", - "version": "2.3.0", - "sha256": "1vcvzdg9f93x0vaafkk9l9xhpmaavfj0cf0l3p06c5kx2d76f9ph", - "license": "cc-by-sa-40" -}, -{ - "pname": "ro_core_news_sm", - "version": "2.3.0", - "sha256": "0lsmbdwsaczv37y5sa1vvgwszy2hs8jp24a0nvc5qm8vb71rxj8w", - "license": "cc-by-sa-40" -}, -{ - "pname": "ro_core_news_md", - "version": "2.3.0", - "sha256": "1igwkz3yd1117gi2g78yilh9ln8n5yrdimas4prfxjgzwid3q8bc", - "license": "cc-by-sa-40" -}, -{ - "pname": "ro_core_news_lg", - "version": "2.3.0", - "sha256": "0id1y32kjfans7llh1i55rgr4n2x6xn208y4qf6yl3pbc17i0n9z", - "license": "cc-by-sa-40" -}, -{ - "pname": "xx_ent_wiki_sm", - "version": "2.3.0", - "sha256": "0x3zmmybl5kh4dn5prkfmr4q5j9bh13p40qc3rhdfi0i3jxc11pn", - "license": "mit" -}, -{ - "pname": "zh_core_web_lg", - "version": "2.3.1", - "sha256": "17zxk7cz47k07yb3qaigc3sx4dj4zwilr1lsn2jq6w7jc8k2h1ll", - "license": "mit" -}, -{ - "pname": "zh_core_web_md", - "version": "2.3.1", - "sha256": "1n4iwxyam4ykn0f9jdzwkhczack8r9c3kkbyga3c4h6iwqsflzcj", - "license": "mit" -}, -{ - "pname": "zh_core_web_sm", - "version": "2.3.1", - "sha256": "1lj5nwhx38cpwnvajwxlfkf84dr1xx2h6wwbg3scycsh459i9fpc", - "license": "mit" -}] +[ + { + "pname": "da_core_news_lg", + "version": "3.0.0", + "sha256": "0l0wljc1lm9a72ngfd4aa90laz4zcc37ix9nsiaqlw004v01z7wj", + "license": "cc-by-sa-40" + }, + { + "pname": "da_core_news_md", + "version": "3.0.0", + "sha256": "14h3ym22224aimfk2kj88pmn83hkb57w402i0x6pd7ra86n372lh", + "license": "cc-by-sa-40" + }, + { + "pname": "da_core_news_sm", + "version": "3.0.0", + "sha256": "05893dpmx76waqnlysnkq8hz9271rkk30xf6hy98gka6244l9a1l", + "license": "cc-by-sa-40" + }, + { + "pname": "de_core_news_lg", + "version": "3.0.0", + "sha256": "0s7vfpr9gv22pvh697ffg35fppxkjhw23ynf4bpz73hl9jikdqvj", + "license": "mit" + }, + { + "pname": "de_core_news_md", + "version": "3.0.0", + "sha256": "09vvlm3rxmyiima81y4bvcyxhn9bjxrqlkbmglzmwhrhxm84nkmx", + "license": "mit" + }, + { + "pname": "de_core_news_sm", + "version": "3.0.0", + "sha256": "1w5aqfzknnnxpsi9i6kn6bki58j0mp24d4gr2203bf6g5kahiq03", + "license": "mit" + }, + { + "pname": "de_dep_news_trf", + "version": "3.0.0", + "sha256": "1snkm911jn73mqfz0y0anr12r6j3gdi6wd8qmd5alwm623x4s6hm", + "license": "mit" + }, + { + "pname": "el_core_news_lg", + "version": "3.0.0", + "sha256": "011lqmx3f3laf2vvqp0hxp5y105pn54kwdh1xzw4hs2pj6fac9p5", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "el_core_news_md", + "version": "3.0.0", + "sha256": "0p75c18sg38j9dj79ykmm5kzcwjxccpgrcw4cjcscb6ad6wwvcjx", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "el_core_news_sm", + "version": "3.0.0", + "sha256": "0gvisa7yg1w49hpfp79ahy50v64l3rmk56k0k7zkgc8ml1gn892r", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "en_core_web_lg", + "version": "3.0.0", + "sha256": "0sdb85zvfb12d14k3wy23dfryy3xwc9ag79zq71qnxwpvvygmc8y", + "license": "mit" + }, + { + "pname": "en_core_web_md", + "version": "3.0.0", + "sha256": "0c669b1vsp3z28n52lfsijmkn9465r8zjjygjml5rlf9lf1paxa5", + "license": "mit" + }, + { + "pname": "en_core_web_sm", + "version": "3.0.0", + "sha256": "0risizvzkicffw7vgrj92z23dfb7zvvzihqgvjcrx8989b7b6wq6", + "license": "mit" + }, + { + "pname": "en_core_web_trf", + "version": "3.0.0", + "sha256": "0plmg77rv1spr0swn4jakci16mbqsxm32mz9nnwc9ylynbvgrhmn", + "license": "mit" + }, + { + "pname": "es_core_news_lg", + "version": "3.0.0", + "sha256": "0832w8qmg0fp2q8329ndlbbzpfkpbw9v38ny7106a45xaz0rn2xc", + "license": "gpl3" + }, + { + "pname": "es_core_news_md", + "version": "3.0.0", + "sha256": "01is980r63a5418jq917scapzkl9xydj56lrsxbr16fya0hh8qnn", + "license": "gpl3" + }, + { + "pname": "es_core_news_sm", + "version": "3.0.0", + "sha256": "1wgya0f25dgix57pb60fyl4hf2msma16d1f6cf617ypk6g3v80rb", + "license": "gpl3" + }, + { + "pname": "es_dep_news_trf", + "version": "3.0.0", + "sha256": "07lim35p0mxb75qiym79wcrak3j7wcan393260haxgwrj29rzpvv", + "license": "gpl3" + }, + { + "pname": "fr_core_news_lg", + "version": "3.0.0", + "sha256": "1frg734lb64gkm7pagqp1mj7lqpwsxxj5vyjm10yja0rkdi6kcca", + "license": "lgpllr" + }, + { + "pname": "fr_core_news_md", + "version": "3.0.0", + "sha256": "1xshr9r639hdb8vkj5nribk4lkm3a5fb7zrxj3y3p678dr53xalz", + "license": "lgpllr" + }, + { + "pname": "fr_core_news_sm", + "version": "3.0.0", + "sha256": "0n23c9rbg1b44c8yjlf6cc0g8ccj6x0rmfjg76ddmpkjaj83jwv1", + "license": "lgpllr" + }, + { + "pname": "fr_dep_news_trf", + "version": "3.0.0", + "sha256": "192l6n5yxn1ndc4fk8k759j2d5hryj9mfkpy2aminaxr4dmp2imr", + "license": "lgpllr" + }, + { + "pname": "it_core_news_lg", + "version": "3.0.0", + "sha256": "121nki732wrnfyzcflvsv54nvrz3l3hx55hkd72hlhrvjw0kvkv5", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "it_core_news_md", + "version": "3.0.0", + "sha256": "0m168wrf1p6dz5kc4n5ga2h8c0d6jzxx876i3ndrg6b7z418hhi5", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "it_core_news_sm", + "version": "3.0.0", + "sha256": "132v06cah8l7q4caxg6n4nw34v9jd8y8cqp20njryx4nirm9c36l", + "license": "cc-by-nc-sa-30" + }, + { + "pname": "lt_core_news_lg", + "version": "3.0.0", + "sha256": "034qycqpbdiyzhpzjz92kpnx6z2nai70dddz75r48hylzlw1d92h", + "license": "cc-by-sa-40" + }, + { + "pname": "lt_core_news_md", + "version": "3.0.0", + "sha256": "18mb2lmrjwnsc7s4yaq3yvdbh8p8p1k0xpm8cqn521hanpr0jqj3", + "license": "cc-by-sa-40" + }, + { + "pname": "lt_core_news_sm", + "version": "3.0.0", + "sha256": "1p998h9lnp16czj3gg8781gywg17dap2h9f8qc6f87daxyc9bdjs", + "license": "cc-by-sa-40" + }, + { + "pname": "mk_core_news_lg", + "version": "3.0.0", + "sha256": "1fmrpgq9plndid7402wkybidpi0phnybb3031jxppan99ihr3hfj", + "license": "cc-by-sa-40" + }, + { + "pname": "mk_core_news_md", + "version": "3.0.0", + "sha256": "1mnabkyjxph2xa4g2an5rqp24d4gbq969ln27zpjycyiwxlkz7vl", + "license": "cc-by-sa-40" + }, + { + "pname": "mk_core_news_sm", + "version": "3.0.0", + "sha256": "1ax6pl61n0p4qf4wcd6c7d42zqjrgh3vhlpl6xby57a78547asxr", + "license": "cc-by-sa-40" + }, + { + "pname": "nb_core_news_lg", + "version": "3.0.0", + "sha256": "07a8nsfswlpb2jc2afzf201bjkl2nlz40kqmjx3dbva8jphj3ljs", + "license": "mit" + }, + { + "pname": "nb_core_news_md", + "version": "3.0.0", + "sha256": "0y1vydhhgb6cifq7k4vc7dy4jl6wb1z6pklbv65v6nxl7rhn76fz", + "license": "mit" + }, + { + "pname": "nb_core_news_sm", + "version": "3.0.0", + "sha256": "1lk1869cb2176j6lvd8lraclfl706p12m1gvvf1ixm99ra8zkxhs", + "license": "mit" + }, + { + "pname": "nl_core_news_lg", + "version": "3.0.0", + "sha256": "0iq4ayzh9g9gil4l8kcl5qcm0l16hymavsqgiczf3ddvamciqaxs", + "license": "cc-by-sa-40" + }, + { + "pname": "nl_core_news_md", + "version": "3.0.0", + "sha256": "0g9dkzwxndcf05bnhkd9fzqj7n614naspyhalg6h9h1kb7v3m2ak", + "license": "cc-by-sa-40" + }, + { + "pname": "nl_core_news_sm", + "version": "3.0.0", + "sha256": "1l4mk3gs15yc5kssy4x4lyab9kmg9y199h4hvizwh8y1ifqbqy03", + "license": "cc-by-sa-40" + }, + { + "pname": "pl_core_news_lg", + "version": "3.0.0", + "sha256": "14ldch7rps1qxh3ldczh7f29ra3dq2kxaxpfbx7r6f1xpmk5s1rv", + "license": "gpl3" + }, + { + "pname": "pl_core_news_md", + "version": "3.0.0", + "sha256": "0fx6ipd8ll2d0w8qwn9cjw0q7w0r3l40467d6mizi4mx93q7m7iw", + "license": "gpl3" + }, + { + "pname": "pl_core_news_sm", + "version": "3.0.0", + "sha256": "0p1gcniyrn9qya4wg1qd6ijfchc7lhk0dh4iba8y71mss3n162fs", + "license": "gpl3" + }, + { + "pname": "pt_core_news_lg", + "version": "3.0.0", + "sha256": "1vsw1ng364466jz6ffyj9dj3jh4s68gk7csxylc1fj7wac8jxrbj", + "license": "cc-by-sa-40" + }, + { + "pname": "pt_core_news_md", + "version": "3.0.0", + "sha256": "11laikyd6m9zprk7bnfn0v2lixvkcgvpv95dp0zpc0q2izmky6q8", + "license": "cc-by-sa-40" + }, + { + "pname": "pt_core_news_sm", + "version": "3.0.0", + "sha256": "12d59q1gvpx8dj48iq17sindd6wid09hnjb4fw0rb00bb28rmqk1", + "license": "cc-by-sa-40" + }, + { + "pname": "ro_core_news_lg", + "version": "3.0.0", + "sha256": "11mkip5piy6g7rg51ljqjn61s4ydlafl6qp3v29zmm3lghc66h8c", + "license": "cc-by-sa-40" + }, + { + "pname": "ro_core_news_md", + "version": "3.0.0", + "sha256": "1jyf3khki7xqbp6ir0p4y2p7rdhs36zq2i1960ik4kr2mhnzrblg", + "license": "cc-by-sa-40" + }, + { + "pname": "ro_core_news_sm", + "version": "3.0.0", + "sha256": "0gc61gdfgji92mjdpznkf30nl1fz7378h9bz8dlhvnc401hjzsky", + "license": "cc-by-sa-40" + }, + { + "pname": "ru_core_news_lg", + "version": "3.0.0", + "sha256": "1x1hxvhki62ypj3x0s4syfhz3znlflp36qkp4l2g2sbxjj2qw7n3", + "license": "mit" + }, + { + "pname": "ru_core_news_md", + "version": "3.0.0", + "sha256": "0ks0qdyq6627cbg8fbbhvr83d3m8njs2aj8pri540gz9nrbj5479", + "license": "mit" + }, + { + "pname": "ru_core_news_sm", + "version": "3.0.0", + "sha256": "1x3bmd7f0fqf03wds01imwpbv4xng1qq9iq61m8rbqvskm5jlzbb", + "license": "mit" + }, + { + "pname": "xx_ent_wiki_sm", + "version": "3.0.0", + "sha256": "1115vap4c6snvkwq8bmc8dld1mw5ky0w9n112hadp85pv012ccds", + "license": "mit" + }, + { + "pname": "xx_sent_ud_sm", + "version": "3.0.0", + "sha256": "062g3xfb3fp33b56wa4fj84smr5rlc0dbja102khxnqm2aakk99k", + "license": "cc-by-sa-30" + }, + { + "pname": "zh_core_web_lg", + "version": "3.0.0", + "sha256": "1ai34fc2wfmb35f1zissddf6jjqpg51wqiyqqq35h03jyf4731jr", + "license": "mit" + }, + { + "pname": "zh_core_web_md", + "version": "3.0.0", + "sha256": "10npzl8nvyj4jdn2f9iai9inq5c4x3hxdk0ycgg9wcgqaj09gnxa", + "license": "mit" + }, + { + "pname": "zh_core_web_sm", + "version": "3.0.0", + "sha256": "1f9x5lr8vnvb1n8hc59vm2xi6kv2rj78x1vm916z6ic3vg7vwl1h", + "license": "mit" + }, + { + "pname": "zh_core_web_trf", + "version": "3.0.0", + "sha256": "178w8dfcvx4aabasid6r0pnwqd5k02cvlq35siqjgfn7j3zb56z0", + "license": "mit" + } +] diff --git a/pkgs/development/python-modules/spacy/models.nix b/pkgs/development/python-modules/spacy/models.nix index 8c57d2e0d262..c34bbdfb83d8 100644 --- a/pkgs/development/python-modules/spacy/models.nix +++ b/pkgs/development/python-modules/spacy/models.nix @@ -1,4 +1,12 @@ -{ lib, buildPythonPackage, fetchurl, jieba, pkuseg, spacy }: +{ lib +, buildPythonPackage +, fetchurl +, jieba +, pymorphy2 +, sentencepiece +, spacy +, spacy-pkuseg +, spacy-transformers }: let buildModelPackage = { pname, version, sha256, license }: let @@ -12,7 +20,15 @@ let }; propagatedBuildInputs = [ spacy ] - ++ lib.optionals (lang == "zh") [ jieba pkuseg ]; + ++ lib.optionals (lang == "zh") [ jieba spacy-pkuseg ] + ++ lib.optionals (lib.hasSuffix "_trf" pname) [ spacy-transformers ] + ++ lib.optionals (lang == "ru") [ pymorphy2 ] + ++ lib.optionals (pname == "fr_dep_news_trf") [ sentencepiece ]; + + postPatch = lib.optionals (pname == "fr_dep_news_trf") '' + substituteInPlace meta.json \ + --replace "sentencepiece==0.1.91" "sentencepiece>=0.1.91" + ''; pythonImportsCheck = [ pname ]; diff --git a/pkgs/development/python-modules/spectral-cube/default.nix b/pkgs/development/python-modules/spectral-cube/default.nix index d2f79c183480..329b225b5769 100644 --- a/pkgs/development/python-modules/spectral-cube/default.nix +++ b/pkgs/development/python-modules/spectral-cube/default.nix @@ -1,11 +1,12 @@ { lib , fetchPypi +, fetchpatch , buildPythonPackage , aplpy , joblib , astropy , radio_beam -, pytest +, pytestCheckHook , pytest-astropy , astropy-helpers }: @@ -20,13 +21,18 @@ buildPythonPackage rec { sha256 = "17zisr26syfb8kn89xj17lrdycm0hsmy5yp5zrn236wgd8rjriki"; }; + patches = [ + # Fix compatibility with radio_beam >= 0.3.3. Will be included + # in the next release of spectral cube > 0.5.0 + (fetchpatch { + url = "https://github.com/radio-astro-tools/spectral-cube/commit/bbe4295ebef7dfa6fe4474275a29acd6cb0cb544.patch"; + sha256 = "1qddfm3364kc34yf6wd9nd6rxh4qc2v5pqilvz9adwb4a50z28bf"; + }) + ]; + nativeBuildInputs = [ astropy-helpers ]; propagatedBuildInputs = [ astropy radio_beam joblib ]; - checkInputs = [ aplpy pytest pytest-astropy ]; - - checkPhase = '' - pytest spectral_cube - ''; + checkInputs = [ pytestCheckHook aplpy pytest-astropy ]; meta = { description = "Library for reading and analyzing astrophysical spectral data cubes"; diff --git a/pkgs/development/python-modules/sphinx-autobuild/default.nix b/pkgs/development/python-modules/sphinx-autobuild/default.nix index 7d4629be50c7..379dbdd0b3da 100644 --- a/pkgs/development/python-modules/sphinx-autobuild/default.nix +++ b/pkgs/development/python-modules/sphinx-autobuild/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, colorama , sphinx , livereload }: @@ -14,10 +15,15 @@ buildPythonPackage rec { sha256 = "de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"; }; - propagatedBuildInputs = [ sphinx livereload ]; + propagatedBuildInputs = [ + colorama + sphinx + livereload + ]; # No tests included. doCheck = false; + pythonImportsCheck = [ "sphinx_autobuild" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/sphinx-jinja/default.nix b/pkgs/development/python-modules/sphinx-jinja/default.nix index 060d7f14a336..6f721ad1a8f6 100644 --- a/pkgs/development/python-modules/sphinx-jinja/default.nix +++ b/pkgs/development/python-modules/sphinx-jinja/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { meta = with lib; { description = "Sphinx extension to include jinja templates in documentation"; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/sphinx-markdown-parser/default.nix b/pkgs/development/python-modules/sphinx-markdown-parser/default.nix new file mode 100644 index 000000000000..e3ebac0744a7 --- /dev/null +++ b/pkgs/development/python-modules/sphinx-markdown-parser/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, sphinx +, markdown +, CommonMark +, recommonmark +, pydash +, pyyaml +, unify +, yapf +, python +}: + +buildPythonPackage rec { + pname = "sphinx-markdown-parser"; + version = "0.2.4"; + + # PyPi release does not include requirements.txt + src = fetchFromGitHub { + owner = "clayrisser"; + repo = "sphinx-markdown-parser"; + # Upstream maintainer currently does not tag releases + # https://github.com/clayrisser/sphinx-markdown-parser/issues/35 + rev = "2fd54373770882d1fb544dc6524c581c82eedc9e"; + sha256 = "0i0hhapmdmh83yx61lxi2h4bsmhnzddamz95844g2ghm132kw5mv"; + }; + + propagatedBuildInputs = [ sphinx markdown CommonMark pydash pyyaml unify yapf recommonmark ]; + + # Avoids running broken tests in test_markdown.py + checkPhase = '' + ${python.interpreter} -m unittest -v tests/test_basic.py tests/test_sphinx.py + ''; + + pythonImportsCheck = [ "sphinx_markdown_parser" ]; + + meta = with lib; { + description = "Write markdown inside of docutils & sphinx projects"; + homepage = "https://github.com/clayrisser/sphinx-markdown-parser"; + license = licenses.mit; + maintainers = with maintainers; [ FlorianFranzen ]; + }; +} diff --git a/pkgs/development/python-modules/sphinx/2.nix b/pkgs/development/python-modules/sphinx/2.nix index 5cf2cecd97f2..0424b9b4c39b 100644 --- a/pkgs/development/python-modules/sphinx/2.nix +++ b/pkgs/development/python-modules/sphinx/2.nix @@ -77,6 +77,6 @@ buildPythonPackage rec { description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects"; homepage = "http://sphinx.pocoo.org/"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ nand0p ]; + maintainers = with lib.maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix index 1c5cc29f4146..5e31b6b19fa1 100644 --- a/pkgs/development/python-modules/sphinx/default.nix +++ b/pkgs/development/python-modules/sphinx/default.nix @@ -1,24 +1,18 @@ { lib , buildPythonPackage -, fetchPypi -, pytest -, simplejson -, mock -, glibcLocales -, html5lib , pythonOlder -, enum34 -, python +, fetchFromGitHub +# propagatedBuildInputs +, Babel +, alabaster , docutils +, imagesize , jinja2 +, packaging , pygments -, alabaster -, Babel -, snowballstemmer -, six -, whoosh -, imagesize , requests +, setuptools +, snowballstemmer , sphinxcontrib-applehelp , sphinxcontrib-devhelp , sphinxcontrib-htmlhelp @@ -26,56 +20,70 @@ , sphinxcontrib-qthelp , sphinxcontrib-serializinghtml , sphinxcontrib-websupport -, typing ? null -, setuptools -, packaging +# check phase +, html5lib +, imagemagick +, pytestCheckHook +, typed-ast }: buildPythonPackage rec { pname = "sphinx"; - version = "3.3.1"; - src = fetchPypi { - pname = "Sphinx"; - inherit version; - sha256 = "1e8d592225447104d1172be415bc2972bd1357e3e12fdc76edf2261105db4300"; + version = "3.5.4"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "sphinx-doc"; + repo = pname; + rev = "v${version}"; + sha256 = "1xjii3dl01rq8x2bsxc6zywiy1s7arfgxrg5l8ml54w1748shadd"; }; - LC_ALL = "en_US.UTF-8"; - checkInputs = [ pytest ]; - buildInputs = [ simplejson mock glibcLocales html5lib ] ++ lib.optional (pythonOlder "3.4") enum34; - # Disable two tests that require network access. - checkPhase = '' - cd tests; ${python.interpreter} run.py --ignore py35 -k 'not test_defaults and not test_anchors_ignored' - ''; propagatedBuildInputs = [ + Babel + alabaster docutils + imagesize jinja2 - pygments - alabaster - Babel packaging + pygments + requests setuptools snowballstemmer - six - whoosh - imagesize - requests sphinxcontrib-applehelp sphinxcontrib-devhelp sphinxcontrib-htmlhelp sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-serializinghtml + # extra[docs] sphinxcontrib-websupport - ] ++ lib.optional (pythonOlder "3.5") typing; + ]; + + checkInputs = [ + imagemagick + html5lib + pytestCheckHook + ] ++ lib.optionals (pythonOlder "3.8") [ + typed-ast + ]; - # Lots of tests. Needs network as well at some point. - doCheck = false; + disabledTests = [ + # requires network access + "test_anchors_ignored" + "test_defaults" + "test_defaults_json" + "test_latex_images" + ]; - meta = { - description = "A tool that makes it easy to create intelligent and beautiful documentation for Python projects"; - homepage = "http://sphinx.pocoo.org/"; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ nand0p ]; + meta = with lib; { + description = "Python documentation generator"; + longDescription = '' + A tool that makes it easy to create intelligent and beautiful + documentation for Python projects + ''; + homepage = "https://www.sphinx-doc.org"; + license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/sphinxcontrib-actdiag/default.nix b/pkgs/development/python-modules/sphinxcontrib-actdiag/default.nix new file mode 100644 index 000000000000..81fa98312565 --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-actdiag/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, sphinx +, actdiag +, blockdiag +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-actdiag"; + version = "2.0.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-TtuFZOLkig4MULLndDQlrTTx8RiGw34MsjmXoPladMY="; + }; + + propagatedBuildInputs = [ sphinx actdiag blockdiag ]; + + pythonImportsCheck = [ "sphinxcontrib.actdiag" ]; + + meta = with lib; { + description = "Sphinx actdiag extension"; + homepage = "https://github.com/blockdiag/sphinxcontrib-actdiag"; + maintainers = with maintainers; [ davidtwco ]; + license = licenses.bsd2; + }; +} diff --git a/pkgs/development/python-modules/sphinxcontrib-blockdiag/default.nix b/pkgs/development/python-modules/sphinxcontrib-blockdiag/default.nix index 956e3c033b9b..97e9c7529f23 100644 --- a/pkgs/development/python-modules/sphinxcontrib-blockdiag/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-blockdiag/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { meta = with lib; { description = "Sphinx blockdiag extension"; homepage = "https://github.com/blockdiag/sphinxcontrib-blockdiag"; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; license = licenses.bsd2; }; diff --git a/pkgs/development/python-modules/sphinxcontrib-nwdiag/default.nix b/pkgs/development/python-modules/sphinxcontrib-nwdiag/default.nix new file mode 100644 index 000000000000..10963a73a912 --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-nwdiag/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, sphinx +, blockdiag +, nwdiag +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-nwdiag"; + version = "2.0.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-bula1DutRv6NwfZRhciZfLHRZmXu42p+qvbeExN/+Fk="; + }; + + propagatedBuildInputs = [ sphinx blockdiag nwdiag ]; + + pythonImportsCheck = [ "sphinxcontrib.nwdiag" ]; + + meta = with lib; { + description = "Sphinx nwdiag extension"; + homepage = "https://github.com/blockdiag/sphinxcontrib-nwdiag"; + maintainers = with maintainers; [ davidtwco ]; + license = licenses.bsd2; + }; +} diff --git a/pkgs/development/python-modules/sphinxcontrib-seqdiag/default.nix b/pkgs/development/python-modules/sphinxcontrib-seqdiag/default.nix new file mode 100644 index 000000000000..c7407300d313 --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-seqdiag/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, sphinx +, blockdiag +, seqdiag +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-seqdiag"; + version = "2.0.0"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-THJ1ra/W2X/lQaDjGbL27VMn0lWPJApwgKMrPhL0JY0="; + }; + + propagatedBuildInputs = [ sphinx blockdiag seqdiag ]; + + pythonImportsCheck = [ "sphinxcontrib.seqdiag" ]; + + meta = with lib; { + description = "Sphinx seqdiag extension"; + homepage = "https://github.com/blockdiag/sphinxcontrib-seqdiag"; + maintainers = with maintainers; [ davidtwco ]; + license = licenses.bsd2; + }; +} diff --git a/pkgs/development/python-modules/sphinxcontrib-spelling/default.nix b/pkgs/development/python-modules/sphinxcontrib-spelling/default.nix index 2b5beb4df079..35b7cf38aa99 100644 --- a/pkgs/development/python-modules/sphinxcontrib-spelling/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-spelling/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { meta = with lib; { description = "Sphinx spelling extension"; homepage = "https://bitbucket.org/dhellmann/sphinxcontrib-spelling"; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; license = licenses.bsd2; }; diff --git a/pkgs/development/python-modules/spidev/default.nix b/pkgs/development/python-modules/spidev/default.nix index 0d0fd582363e..90ca839bc1e0 100644 --- a/pkgs/development/python-modules/spidev/default.nix +++ b/pkgs/development/python-modules/spidev/default.nix @@ -19,6 +19,7 @@ buildPythonPackage rec { description = "Python bindings for Linux SPI access through spidev"; license = licenses.mit; maintainers = with maintainers; [ hexa ]; + platforms = platforms.linux; }; } diff --git a/pkgs/development/python-modules/srsly/default.nix b/pkgs/development/python-modules/srsly/default.nix index c6db32a15e41..86550f998734 100644 --- a/pkgs/development/python-modules/srsly/default.nix +++ b/pkgs/development/python-modules/srsly/default.nix @@ -6,20 +6,19 @@ , catalogue , mock , numpy -, pathlib , pytest -, pytz +, ruamel-yaml }: buildPythonPackage rec { pname = "srsly"; - version = "2.4.0"; + version = "2.4.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "e29730be53015970e4a59050e8e9f9be44d762108a617df56c9dfc981b515ab7"; + hash = "sha256-sPKuwKMp5ufnQqCmDpmnSWjKKb5x81xcTeIh4ygXaSY="; }; nativeBuildInputs = [ cython ]; @@ -30,13 +29,9 @@ buildPythonPackage rec { mock numpy pytest - pytz + ruamel-yaml ]; - # TypeError: cannot serialize '_io.BufferedRandom' object - # Possibly because of sandbox restrictions. - doCheck = false; - pythonImportsCheck = [ "srsly" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/sslyze/default.nix b/pkgs/development/python-modules/sslyze/default.nix index 991f85c900ec..5680b4bd36b3 100644 --- a/pkgs/development/python-modules/sslyze/default.nix +++ b/pkgs/development/python-modules/sslyze/default.nix @@ -6,39 +6,44 @@ , typing-extensions , faker , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "sslyze"; - version = "3.1.0"; + version = "4.1.0"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nabla-c0d3"; repo = pname; rev = version; - sha256 = "02p0lgpkfq88dys0dqw0z8bpg9g8pds2lvs9awd9f2w5cb1pwr83"; + hash = "sha256-oSTKNiECczlPAbv5Azc023PcquFbnlC5O+8tVgNcUW0="; }; patchPhase = '' substituteInPlace setup.py \ - --replace "cryptography>=2.6,<3.3" "cryptography>=2.6,<4.0" + --replace "cryptography>=2.6,<3.5" "cryptography>=2.6,<4.0" ''; checkInputs = [ pytestCheckHook ]; - checkPhase = '' - # Most of the tests are online; hence, applicable tests are listed - # explicitly here - pytest \ - tests/test_main.py \ - tests/test_scanner.py \ - tests/cli_tests/test_console_output.py \ - tests/cli_tests/test_json_output.py \ - tests/cli_tests/test_server_string_parser.py \ - tests/plugins_tests/test_scan_commands.py \ - tests/plugins_tests/certificate_info/test_certificate_utils.py \ - -k "not (TestScanner and test_client_certificate_missing)" - ''; + # Most of the tests are online; hence, applicable tests are listed + # explicitly here + pytestFlagsArray = [ + "tests/test_main.py" + "tests/test_scanner.py" + "tests/cli_tests/test_console_output.py" + "tests/cli_tests/test_json_output.py" + "tests/cli_tests/test_server_string_parser.py" + "tests/plugins_tests/test_scan_commands.py" + "tests/plugins_tests/certificate_info/test_certificate_utils.py" + ]; + + disabledTests = [ + "test_error_client_certificate_needed" + ]; + pythonImportsCheck = [ "sslyze" ]; propagatedBuildInputs = [ nassl cryptography typing-extensions faker ]; @@ -47,7 +52,7 @@ buildPythonPackage rec { homepage = "https://github.com/nabla-c0d3/sslyze"; description = "Fast and powerful SSL/TLS scanning library"; platforms = platforms.linux ++ platforms.darwin; - license = licenses.agpl3; + license = licenses.agpl3Only; maintainers = with maintainers; [ veehaitch ]; }; } diff --git a/pkgs/development/python-modules/stem/default.nix b/pkgs/development/python-modules/stem/default.nix index 32e4bab5afcc..c607d45e1706 100644 --- a/pkgs/development/python-modules/stem/default.nix +++ b/pkgs/development/python-modules/stem/default.nix @@ -12,6 +12,8 @@ buildPythonPackage rec { postPatch = '' rm test/unit/installation.py sed -i "/test.unit.installation/d" test/settings.cfg + # https://github.com/torproject/stem/issues/56 + sed -i '/MOCK_VERSION/d' run_tests.py ''; checkInputs = [ mock ]; diff --git a/pkgs/development/python-modules/stytra/default.nix b/pkgs/development/python-modules/stytra/default.nix index 80eefc0a639e..fba544789a81 100644 --- a/pkgs/development/python-modules/stytra/default.nix +++ b/pkgs/development/python-modules/stytra/default.nix @@ -8,7 +8,6 @@ , pandas , tables , git -, ffmpeg_3 , scikitimage , matplotlib , qdarkstyle @@ -59,7 +58,6 @@ buildPythonPackage rec { pandas tables git - ffmpeg_3 scikitimage matplotlib qdarkstyle @@ -79,7 +77,7 @@ buildPythonPackage rec { meta = { homepage = "https://github.com/portugueslab/stytra"; description = "A modular package to control stimulation and track behaviour"; - license = lib.licenses.gpl3; + license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ tbenst ]; }; } diff --git a/pkgs/development/python-modules/sumo/default.nix b/pkgs/development/python-modules/sumo/default.nix index 9ba073df9228..cc47eafd1afa 100644 --- a/pkgs/development/python-modules/sumo/default.nix +++ b/pkgs/development/python-modules/sumo/default.nix @@ -1,37 +1,44 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy27 +{ lib, buildPythonPackage, fetchFromGitHub +, pythonOlder , h5py , matplotlib , numpy , phonopy , pymatgen -, pytest , scipy , seekpath , spglib +, castepxbin +, pytestCheckHook }: buildPythonPackage rec { pname = "sumo"; - version = "2.2.1"; + version = "2.2.4"; + + disabled = pythonOlder "3.6"; # No tests in Pypi tarball src = fetchFromGitHub { owner = "SMTG-UCL"; repo = "sumo"; rev = "v${version}"; - sha256 = "0r88f5w33h9b0mv7shlqc4przwvas5ycgndvl91wqjnm3b2s3ix0"; + sha256 = "051353gsxmh4qnabshfnc00mmzdbh1fgk1xdfnsfgcnijxgw25bb"; }; - propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ]; - - checkInputs = [ pytest ]; - - checkPhase = '' - pytest . - ''; + propagatedBuildInputs = [ + spglib + numpy + scipy + h5py + pymatgen + phonopy + matplotlib + seekpath + castepxbin + ]; - # tests have type annotations, can only run on 3.5+ - doCheck = (!isPy27); + checkInputs = [ pytestCheckHook ]; meta = with lib; { description = "Toolkit for plotting and analysis of ab initio solid-state calculation data"; diff --git a/pkgs/development/python-modules/sunpy/default.nix b/pkgs/development/python-modules/sunpy/default.nix index 65eb6abb0468..2de1e3fd5ffa 100644 --- a/pkgs/development/python-modules/sunpy/default.nix +++ b/pkgs/development/python-modules/sunpy/default.nix @@ -11,6 +11,7 @@ , beautifulsoup4 , drms , glymur +, h5netcdf , hypothesis , matplotlib , numpy @@ -50,6 +51,7 @@ buildPythonPackage rec { pandas astropy astropy-helpers + h5netcdf parfive sqlalchemy scikitimage diff --git a/pkgs/development/python-modules/surepy/default.nix b/pkgs/development/python-modules/surepy/default.nix index dd071b5cf08f..ff2b588e4702 100644 --- a/pkgs/development/python-modules/surepy/default.nix +++ b/pkgs/development/python-modules/surepy/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "surepy"; - version = "0.5.0"; + version = "0.6.0"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "benleb"; repo = pname; rev = "v${version}"; - sha256 = "1adsnjya142bxdhfxqsi2qa35ylvdcibigs1wafjlxazlxs3mg0j"; + sha256 = "sha256-XoYiZPBc9SybyKocui1HqSA+YPiPpbupJWMCfmQT5RU="; }; nativeBuildInputs = [ poetry-core ]; @@ -43,11 +43,6 @@ buildPythonPackage rec { rich ]; - postPatch = '' - # halo is out-dated, https://github.com/benleb/surepy/pull/7 - substituteInPlace pyproject.toml --replace "^0.0.30" "^0.0.31" - ''; - # Project has no tests doCheck = false; pythonImportsCheck = [ "surepy" ]; diff --git a/pkgs/development/python-modules/tablib/default.nix b/pkgs/development/python-modules/tablib/default.nix index 5216fc7d0d92..b6754e15ad5d 100644 --- a/pkgs/development/python-modules/tablib/default.nix +++ b/pkgs/development/python-modules/tablib/default.nix @@ -2,6 +2,7 @@ , odfpy , openpyxl , pandas +, setuptools-scm , pytest , pytestcov , pyyaml @@ -20,6 +21,7 @@ buildPythonPackage rec { sha256 = "f83cac08454f225a34a305daa20e2110d5e6335135d505f93bc66583a5f9c10d"; }; + nativeBuildInputs = [ setuptools-scm ]; propagatedBuildInputs = [ xlwt openpyxl pyyaml xlrd odfpy ]; checkInputs = [ pytest pytestcov unicodecsv pandas ]; diff --git a/pkgs/development/python-modules/telfhash/default.nix b/pkgs/development/python-modules/telfhash/default.nix index a7aca8866ed7..ddb265bf033a 100644 --- a/pkgs/development/python-modules/telfhash/default.nix +++ b/pkgs/development/python-modules/telfhash/default.nix @@ -17,6 +17,8 @@ buildPythonPackage { sha256 = "jNu6qm8Q/UyJVaCqwFOPX02xAR5DwvCK3PaH6Fvmakk="; }; + patches = [ ./telfhash-new-tlsh-hash.patch ]; + # The tlsh library's name is just "tlsh" postPatch = '' substituteInPlace requirements.txt --replace "python-tlsh" "tlsh" diff --git a/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch b/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch new file mode 100644 index 000000000000..3984a4c1e810 --- /dev/null +++ b/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch @@ -0,0 +1,30 @@ +diff --git a/telfhash/grouping.py b/telfhash/grouping.py +index c62f8d9..4ee9f0b 100644 +--- a/telfhash/grouping.py ++++ b/telfhash/grouping.py +@@ -32,10 +32,10 @@ import tlsh + def get_combination(telfhash_data): + + # +- # TLSH hash is 70 characters long. if the telfhash is not 70 ++ # The new TLSH hash is 72 characters long. if the telfhash is not 72 + # characters in length, exclude from the list + # +- files_list = [x for x in list(telfhash_data.keys()) if telfhash_data[x]["telfhash"] is not None and len(telfhash_data[x]["telfhash"]) == 70] ++ files_list = [x for x in list(telfhash_data.keys()) if telfhash_data[x]["telfhash"] is not None and len(telfhash_data[x]["telfhash"]) == 72] + + # + # get the combination of all the possible pairs of filenames +diff --git a/telfhash/telfhash.py b/telfhash/telfhash.py +index f2bbd25..c6e346c 100755 +--- a/telfhash/telfhash.py ++++ b/telfhash/telfhash.py +@@ -132,7 +132,7 @@ def get_hash(symbols_list): + symbol_string = ",".join(symbols_list) + encoded_symbol_string = symbol_string.encode("ascii") + +- return tlsh.forcehash(encoded_symbol_string).lower() ++ return tlsh.forcehash(encoded_symbol_string) + + + def elf_get_imagebase(elf): diff --git a/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch b/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch new file mode 100644 index 000000000000..c9cb8b4a5281 --- /dev/null +++ b/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch @@ -0,0 +1,40 @@ +From d944d8fa6cb6d1667f3e4c4e0cff4c4b2a7c0a30 Mon Sep 17 00:00:00 2001 +From: Cole Helbling <cole.e.helbling@outlook.com> +Date: Fri, 7 May 2021 11:00:46 -0700 +Subject: [PATCH] Replace `debut` with `debian-inspector` + +--- + requirements.in | 2 +- + tern/analyze/common.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/requirements.in b/requirements.in +index edd90ab..5135841 100644 +--- a/requirements.in ++++ b/requirements.in +@@ -12,6 +12,6 @@ requests + stevedore + pbr + dockerfile-parse +-debut ++debian-inspector + regex + GitPython +diff --git a/tern/analyze/common.py b/tern/analyze/common.py +index 6962404..0f5e77d 100644 +--- a/tern/analyze/common.py ++++ b/tern/analyze/common.py +@@ -19,8 +19,8 @@ from tern.utils import cache + from tern.utils import constants + from tern.utils import general + from tern.utils import rootfs +-from debut import debcon +-from debut import copyright as debut_copyright ++from debian_inspector import debcon ++from debian_inspector import copyright as debut_copyright + + # global logger + logger = logging.getLogger(constants.logger_name) +-- +2.31.1 + diff --git a/pkgs/development/python-modules/tern/default.nix b/pkgs/development/python-modules/tern/default.nix index 6247087dd670..7eb889c873a8 100644 --- a/pkgs/development/python-modules/tern/default.nix +++ b/pkgs/development/python-modules/tern/default.nix @@ -7,7 +7,7 @@ , requests , stevedore , pbr -, debut +, debian-inspector , regex , GitPython , prettytable @@ -22,6 +22,14 @@ buildPythonPackage rec { sha256 = "606c62944991b2cbcccf3f5353be693305d6d7d318c3865b9ecca49dbeab2727"; }; + patches = [ + # debut was renamed to debian-inspector + # https://github.com/tern-tools/tern/pull/962 + # NOTE: Has to be in-tree because the upstream patch doesn't apply cleanly + # to the PyPi source. + ./0001-Replace-debut-with-debian-inspector.patch + ]; + preBuild = '' cp requirements.{in,txt} ''; @@ -36,7 +44,7 @@ buildPythonPackage rec { dockerfile-parse requests stevedore - debut + debian-inspector regex GitPython prettytable diff --git a/pkgs/development/python-modules/teslajsonpy/default.nix b/pkgs/development/python-modules/teslajsonpy/default.nix index 59af2b33d2b9..750b070804c3 100644 --- a/pkgs/development/python-modules/teslajsonpy/default.nix +++ b/pkgs/development/python-modules/teslajsonpy/default.nix @@ -1,10 +1,12 @@ { lib , aiohttp +, authcaptureproxy , backoff , beautifulsoup4 , buildPythonPackage , fetchFromGitHub , fetchpatch +, poetry-core , pytest-asyncio , pytestCheckHook , wrapt @@ -12,24 +14,22 @@ buildPythonPackage rec { pname = "teslajsonpy"; - version = "0.11.5"; + version = "0.18.3"; + format = "pyproject"; src = fetchFromGitHub { owner = "zabuldon"; repo = pname; rev = "v${version}"; - sha256 = "sha256-s0IZ1UNldYddaR3zJoYS6ey8Kjxd1fr4fOwf0gNNbow="; + sha256 = "1hdc5gm6dg1vw6qfs3z6mg2m94scrvjphj0lin6pi8n3zqj1h26k"; }; - patches = [ - (fetchpatch { - name = "dont-use-dummpy-module-bs4.patch"; - url = "https://github.com/zabuldon/teslajsonpy/pull/138/commits/f5a788e47d8338c8ebb06d954f802ba1ec614db3.patch"; - sha256 = "0rws7fhxmca8d5w0bkygx8scvzah3yvb3yfhn05qmp73mn3pmcb3"; - }) + nativeBuildInputs = [ + poetry-core ]; propagatedBuildInputs = [ + authcaptureproxy aiohttp backoff beautifulsoup4 diff --git a/pkgs/development/python-modules/textacy/default.nix b/pkgs/development/python-modules/textacy/default.nix index 31b02e3f2641..9f9fe685c952 100644 --- a/pkgs/development/python-modules/textacy/default.nix +++ b/pkgs/development/python-modules/textacy/default.nix @@ -9,7 +9,7 @@ , pyphen , pytest , requests -, scikitlearn +, scikit-learn , scipy , spacy , srsly @@ -35,7 +35,7 @@ buildPythonPackage rec { pyemd pyphen requests - scikitlearn + scikit-learn scipy spacy srsly diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index a92d349e9928..4aac0d756d46 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -24,11 +24,11 @@ buildPythonPackage rec { pname = "thinc"; - version = "8.0.2"; + version = "8.0.3"; src = fetchPypi { inherit pname version; - sha256 = "20f033b3d9fbd02389d8f828cebcd3a42aee3e17ed4c2d56c6d5163af83a9cee"; + hash = "sha256-w3CnpG0BtYjY1fmdjV42s8usRRJjg1b6Qw9/Urs6iJc="; }; buildInputs = [ cython ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ diff --git a/pkgs/development/python-modules/timeago/default.nix b/pkgs/development/python-modules/timeago/default.nix new file mode 100644 index 000000000000..0c2a688f674e --- /dev/null +++ b/pkgs/development/python-modules/timeago/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "timeago"; + version = "1.0.15"; + + src = fetchFromGitHub { + owner = "hustcc"; + repo = pname; + rev = version; + sha256 = "03vm7c02l4g2d1x33w382i1psk8i3an7xchk69yinha33fjj1cag"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "test/testcase.py" ]; + + pythonImportsCheck = [ "timeago" ]; + + meta = with lib; { + description = "Python module to format past datetime output"; + homepage = "https://github.com/hustcc/timeago"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/tld/default.nix b/pkgs/development/python-modules/tld/default.nix index 13f23edaad15..ed601a2620c8 100644 --- a/pkgs/development/python-modules/tld/default.nix +++ b/pkgs/development/python-modules/tld/default.nix @@ -26,6 +26,12 @@ buildPythonPackage rec { tox ]; + # these tests require network access, but disabledTestPaths doesn't work. + # the file needs to be `import`ed by another python test file, so it + # can't simply be removed. + preCheck = '' + echo > src/tld/tests/test_commands.py + ''; pythonImportsCheck = [ "tld" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/tls-parser/default.nix b/pkgs/development/python-modules/tls-parser/default.nix index 5b6bfe6a0e28..ad35fe501282 100644 --- a/pkgs/development/python-modules/tls-parser/default.nix +++ b/pkgs/development/python-modules/tls-parser/default.nix @@ -1,5 +1,5 @@ { lib -, isPy27 +, pythonOlder , fetchFromGitHub , buildPythonPackage , pytestCheckHook @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "tls-parser"; version = "1.2.2"; - disabled = isPy27; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "nabla-c0d3"; @@ -19,6 +19,8 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "tls_parser" ]; + meta = with lib; { homepage = "https://github.com/nabla-c0d3/tls_parser"; description = "Small library to parse TLS records"; diff --git a/pkgs/development/python-modules/torchvision/bin.nix b/pkgs/development/python-modules/torchvision/bin.nix new file mode 100644 index 000000000000..62980dcca8c4 --- /dev/null +++ b/pkgs/development/python-modules/torchvision/bin.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchurl +, isPy37 +, isPy38 +, isPy39 +, patchelf +, pillow +, python +, pytorch-bin +}: + +let + pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion; + srcs = import ./binary-hashes.nix version; + unsupported = throw "Unsupported system"; + version = "0.9.1"; +in buildPythonPackage { + inherit version; + + pname = "torchvision"; + + format = "wheel"; + + src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported; + + disabled = !(isPy37 || isPy38 || isPy39); + + nativeBuildInputs = [ + patchelf + ]; + + propagatedBuildInputs = [ + pillow + pytorch-bin + ]; + + pythonImportsCheck = [ "torchvision" ]; + + postFixup = let + rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ]; + in '' + # Note: after patchelf'ing, libcudart can still not be found. However, this should + # not be an issue, because PyTorch is loaded before torchvision and brings + # in the necessary symbols. + patchelf --set-rpath "${rpath}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \ + "$out/${python.sitePackages}/torchvision/_C.so" + ''; + + meta = with lib; { + description = "PyTorch vision library"; + homepage = "https://pytorch.org/"; + changelog = "https://github.com/pytorch/vision/releases/tag/v${version}"; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ danieldk ]; + }; +} diff --git a/pkgs/development/python-modules/torchvision/binary-hashes.nix b/pkgs/development/python-modules/torchvision/binary-hashes.nix new file mode 100644 index 000000000000..b9a991e24abb --- /dev/null +++ b/pkgs/development/python-modules/torchvision/binary-hashes.nix @@ -0,0 +1,22 @@ +# Warning: use the same CUDA version as pytorch-bin. +# +# Precompiled wheels can be found at: +# https://download.pytorch.org/whl/torch_stable.html + +version: { + x86_64-linux-37 = { + name = "torchvision-${version}-cp37-cp37m-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp37-cp37m-linux_x86_64.whl"; + hash = "sha256-7EMVB8KZg2I3P4RqnIVk/7OOAPA1OWOipns58cSCUrw="; + }; + x86_64-linux-38 = { + name = "torchvision-${version}-cp38-cp38-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp38-cp38-linux_x86_64.whl"; + hash = "sha256-VjsCBW9Lusr4aDQLqaFh5dpV/5ZJ5PDs7nY4CbCHDTA="; + }; + x86_64-linux-39 = { + name = "torchvision-${version}-cp39-cp39-linux_x86_64.whl"; + url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp39-cp39-linux_x86_64.whl"; + hash = "sha256-pzR7TBE+WcAmozskoeOVBuMkGJf9tvsaXsUkTcu86N8="; + }; +} diff --git a/pkgs/development/python-modules/treq/default.nix b/pkgs/development/python-modules/treq/default.nix index ec648281c89a..8bfbd534f578 100644 --- a/pkgs/development/python-modules/treq/default.nix +++ b/pkgs/development/python-modules/treq/default.nix @@ -51,6 +51,6 @@ buildPythonPackage rec { homepage = "https://github.com/twisted/treq"; description = "A requests-like API built on top of twisted.web's Agent"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/trollius/default.nix b/pkgs/development/python-modules/trollius/default.nix deleted file mode 100644 index 019326c54217..000000000000 --- a/pkgs/development/python-modules/trollius/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k, mock, unittest2, six, futures }: - -buildPythonPackage rec { - pname = "trollius"; - version = "2.2.post1"; - - src = fetchPypi { - inherit pname version; - sha256 = "06s44k6pcq35vl5j4i2pgkpb848djal818qypcvx44gyn4azjrqn"; - }; - - checkInputs = [ mock ] ++ lib.optional (!isPy3k) unittest2; - - propagatedBuildInputs = [ six ] ++ lib.optional (!isPy3k) futures; - - patches = [ - ./tests.patch - ]; - - disabled = isPy3k; - - postPatch = '' - # Overrides PYTHONPATH causing dependencies not to be found - sed -i -e "s|test_env_var_debug|skip_test_env_var_debug|g" tests/test_tasks.py - '' + lib.optionalString stdenv.isDarwin '' - # Some of the tests fail on darwin with `error: AF_UNIX path too long' - # because of the *long* path names for sockets - sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py - sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py - sed -i -e "s|test_create_unix_server_existing_path_nonsock|skip_test_create_unix_server_existing_path_nonsock|g" tests/test_unix_events.py - sed -i -e "s|test_create_unix_server_existing_path_sock|skip_test_create_unix_server_existing_path_sock|g" tests/test_unix_events.py - sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py - sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py - sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py - sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py - sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py - sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py - sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py - sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py - sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py - sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py - sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py - sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py - ''; - - meta = with lib; { - description = "Port of the asyncio project to Python 2.7"; - homepage = "https://github.com/vstinner/trollius"; - license = licenses.asl20; - maintainers = with maintainers; [ ]; - }; -} diff --git a/pkgs/development/python-modules/trollius/tests.patch b/pkgs/development/python-modules/trollius/tests.patch deleted file mode 100644 index 4923bded9493..000000000000 --- a/pkgs/development/python-modules/trollius/tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/tests/test_asyncio.py w/tests/test_asyncio.py -index 39d9e1a..05b7e6f 100644 ---- i/tests/test_asyncio.py -+++ w/tests/test_asyncio.py -@@ -69,7 +69,7 @@ class AsyncioTests(test_utils.TestCase): - def step_future(): - future = asyncio.Future() - self.loop.call_soon(future.set_result, "asyncio.Future") -- return (yield from future) -+ return (yield From(future)) - - # test in release mode - trollius.coroutines._DEBUG = False diff --git a/pkgs/development/python-modules/ttp/default.nix b/pkgs/development/python-modules/ttp/default.nix new file mode 100644 index 000000000000..1ebad5322005 --- /dev/null +++ b/pkgs/development/python-modules/ttp/default.nix @@ -0,0 +1,93 @@ +{ lib +, buildPythonPackage +, callPackage +, fetchFromGitHub +, cerberus +, configparser +, deepdiff +, geoip2 +, jinja2 +, openpyxl +, tabulate +, yangson +, pytestCheckHook +, pyyaml +}: + +let + ttp_templates = callPackage ./templates.nix { }; +in +buildPythonPackage rec { + pname = "ttp"; + version = "0.6.0"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "dmulyalin"; + repo = pname; + rev = version; + sha256 = "08pglwmnhdrsj9rgys1zclhq1h597izb0jq7waahpdabfg25v2sw"; + }; + + propagatedBuildInputs = [ + # https://github.com/dmulyalin/ttp/blob/master/docs/source/Installation.rst#additional-dependencies + cerberus + configparser + deepdiff + geoip2 + jinja2 + # n2g unpackaged + # netmiko unpackaged + # nornir unpackaged + openpyxl + tabulate + yangson + ]; + + pythonImportsCheck = [ + "ttp" + ]; + + checkInputs = [ + pytestCheckHook + pyyaml + ttp_templates + ]; + + disabledTestPaths = [ + # missing package n2g + "test/pytest/test_N2G_formatter.py" + ]; + + disabledTests = [ + # data structure mismatches + "test_yangson_validate" + "test_yangson_validate_yang_lib_in_output_tag_data" + "test_yangson_validate_multiple_inputs_mode_per_input_with_yang_lib_in_file" + "test_yangson_validate_multiple_inputs_mode_per_template" + "test_yangson_validate_multiple_inputs_mode_per_input_with_yang_lib_in_file_to_xml" + "test_yangson_validate_multiple_inputs_mode_per_template_to_xml" + "test_adding_data_from_files" + "test_lookup_include_csv" + "test_inputs_with_template_base_path" + "test_group_inputs" + "test_inputs_url_filters_extensions" + # ValueError: dictionary update sequence element #0 has length 1; 2 is required + "test_include_attribute_with_yaml_loader" + # TypeError: string indices must be integers + "test_lookup_include_yaml" + # missing package n2g + "test_n2g_formatter" + ]; + + pytestFlagsArray = [ + "test/pytest" + ]; + + meta = with lib; { + description = "Template Text Parser"; + homepage = "https://github.com/dmulyalin/ttp"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/ttp/templates.nix b/pkgs/development/python-modules/ttp/templates.nix new file mode 100644 index 000000000000..835548d07842 --- /dev/null +++ b/pkgs/development/python-modules/ttp/templates.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "ttp-templates"; + version = "0.1.1"; + format = "setuptools"; + + src = fetchPypi { + pname = "ttp_templates"; + inherit version; + sha256 = "0vg7k733i8jqnfz8mpq8kzr2l7b7drk29zkzik91029f6w7li007"; + }; + + # drop circular dependency on ttp + postPatch = '' + substituteInPlace setup.py --replace '"ttp>=0.6.0"' "" + ''; + + # circular dependency on ttp + doCheck = false; + + meta = with lib; { + description = "Template Text Parser Templates"; + homepage = "https://github.com/dmulyalin/ttp_templates"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/twitterapi/default.nix b/pkgs/development/python-modules/twitterapi/default.nix index 316709c20413..b45218219c53 100644 --- a/pkgs/development/python-modules/twitterapi/default.nix +++ b/pkgs/development/python-modules/twitterapi/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "twitterapi"; - version = "2.7.2"; + version = "2.7.3"; src = fetchFromGitHub { owner = "geduldig"; repo = "TwitterAPI"; rev = "v${version}"; - sha256 = "sha256-kSL+zAWn/6itBu4T1OcIbg4k5Asatgz/dqzbnlcsqkg="; + sha256 = "sha256-82TOVrC7wX7E9lKsx3iGxaEEjHSzf5uZwePBvAw3hDk="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/txaio/default.nix b/pkgs/development/python-modules/txaio/default.nix index c2f2c9451bdc..074e7b8d5091 100644 --- a/pkgs/development/python-modules/txaio/default.nix +++ b/pkgs/development/python-modules/txaio/default.nix @@ -1,30 +1,55 @@ -{ lib, buildPythonPackage, fetchPypi, pytest, mock, six, twisted, isPy37, isPy27 }: +{ lib +, buildPythonPackage +, fetchPypi +, mock +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, six +, twisted +, zope_interface +}: buildPythonPackage rec { pname = "txaio"; version = "21.2.1"; - disabled = isPy27; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "7d6f89745680233f1c4db9ddb748df5e88d2a7a37962be174c0fd04c8dba1dc8"; + sha256 = "sha256-fW+JdFaAIz8cTbndt0jfXojSp6N5Yr4XTA/QTI26Hcg="; }; - checkInputs = [ pytest mock ]; + propagatedBuildInputs = [ + six + twisted + zope_interface + ]; - propagatedBuildInputs = [ six twisted ]; + checkInputs = [ + mock + pytest-asyncio + pytestCheckHook + ]; - checkPhase = '' - py.test -k "not test_sdist" - ''; + disabledTests = [ + # No real value + "test_sdist" + # Some tests seems out-dated and require additional data + "test_as_future" + "test_errback" + "test_create_future" + "test_callback" + "test_immediate_result" + "test_cancel" + ]; - # Needs some fixing - doCheck = false; + pythonImportsCheck = [ "txaio" ]; meta = with lib; { - description = "Utilities to support code that runs unmodified on Twisted and asyncio."; - homepage = "https://github.com/crossbario/txaio"; - license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + description = "Utilities to support code that runs unmodified on Twisted and asyncio"; + homepage = "https://github.com/crossbario/txaio"; + license = licenses.mit; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/txgithub/default.nix b/pkgs/development/python-modules/txgithub/default.nix index 09af476e94df..45e366764980 100644 --- a/pkgs/development/python-modules/txgithub/default.nix +++ b/pkgs/development/python-modules/txgithub/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { description = "GitHub API client implemented using Twisted."; homepage = "https://github.com/tomprince/txgithub"; license = licenses.mit; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/txrequests/default.nix b/pkgs/development/python-modules/txrequests/default.nix index be32dc4a7387..cf3bee52c590 100644 --- a/pkgs/development/python-modules/txrequests/default.nix +++ b/pkgs/development/python-modules/txrequests/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { description = "Asynchronous Python HTTP for Humans."; homepage = "https://github.com/tardyp/txrequests"; license = licenses.asl20; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix index 05bc653b0591..8e4abc5bd0e3 100644 --- a/pkgs/development/python-modules/uamqp/default.nix +++ b/pkgs/development/python-modules/uamqp/default.nix @@ -16,11 +16,11 @@ buildPythonPackage rec { pname = "uamqp"; - version = "1.2.13"; + version = "1.4.0"; src = fetchPypi { inherit pname version; - sha256 = "sha256-zDUFe/yMCThn+qJqDekMrUHEf1glGxBw4pioExLLoqg="; + sha256 = "sha256-XzfiLzRK1/DCmnxPW/H+KqnBuCbpYPawS2JnTQq+Vbw="; }; patches = [ diff --git a/pkgs/development/python-modules/uc-micro-py/default.nix b/pkgs/development/python-modules/uc-micro-py/default.nix new file mode 100644 index 000000000000..9b20e2251165 --- /dev/null +++ b/pkgs/development/python-modules/uc-micro-py/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "uc-micro-py"; + version = "1.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "tsutsu3"; + repo = "uc.micro-py"; + rev = "v${version}"; + hash = "sha256-23mKwoRGjtxpCOC26V8bAN5QEHLDOoSqPeTlUuIrxZ0="; + }; + + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "uc_micro" ]; + + meta = with lib; { + description = "Micro subset of unicode data files for linkify-it-py"; + homepage = "https://github.com/tsutsu3/uc.micro-py"; + license = licenses.mit; + maintainers = with maintainers; [ AluisioASG ]; + }; +} diff --git a/pkgs/development/python-modules/umap-learn/default.nix b/pkgs/development/python-modules/umap-learn/default.nix index f888704e6a8c..fcf96a715f15 100644 --- a/pkgs/development/python-modules/umap-learn/default.nix +++ b/pkgs/development/python-modules/umap-learn/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , nose , numpy -, scikitlearn +, scikit-learn , scipy , numba , pynndescent @@ -24,7 +24,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn scipy numba pynndescent diff --git a/pkgs/development/python-modules/unpaddedbase64/default.nix b/pkgs/development/python-modules/unpaddedbase64/default.nix index 96b27127cc60..b5ff5be20616 100644 --- a/pkgs/development/python-modules/unpaddedbase64/default.nix +++ b/pkgs/development/python-modules/unpaddedbase64/default.nix @@ -1,19 +1,25 @@ { lib , buildPythonPackage , fetchFromGitHub +, poetry-core }: buildPythonPackage rec { pname = "unpaddedbase64"; - version = "1.1.0"; + version = "2.1.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "matrix-org"; repo = "python-${pname}"; rev = "refs/tags/v${version}"; - sha256 = "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"; + sha256 = "1n6har8pxv0mqb96lanzihp1xf76aa17jw3977drb1fgz947pnmz"; }; + nativeBuildInputs = [ + poetry-core + ]; + meta = with lib; { homepage = "https://github.com/matrix-org/python-unpaddedbase64"; description = "Unpadded Base64"; diff --git a/pkgs/development/python-modules/userpath/default.nix b/pkgs/development/python-modules/userpath/default.nix index 8366a56158dd..237293370aac 100644 --- a/pkgs/development/python-modules/userpath/default.nix +++ b/pkgs/development/python-modules/userpath/default.nix @@ -2,19 +2,18 @@ , buildPythonPackage , fetchPypi , click -, distro }: buildPythonPackage rec { pname = "userpath"; - version = "1.4.1"; + version = "1.5.0"; src = fetchPypi { inherit pname version; - sha256="0mfjmvx286z1dmnrc7bm65x8gj8qrmkcyagl0vf5ywfq0bm48591"; + sha256="0fj2lj9vcns5sxv72v3ggrszcl7j1jd9a6ycnsl00218nycliy31"; }; - propagatedBuildInputs = [ click distro ]; + propagatedBuildInputs = [ click ]; # test suite is difficult to emulate in sandbox due to shell manipulation doCheck = false; diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index 3ba9dcb5f144..125850a080f3 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -44,8 +44,15 @@ buildPythonPackage rec { "--assert=plain" "--strict" "--tb=native" + ] ++ lib.optionals (stdenv.isAarch64) [ + # test gets stuck in epoll_pwait on hydras aarch64 builders + # https://github.com/MagicStack/uvloop/issues/412 + "--deselect" "tests/test_tcp.py::Test_AIO_TCPSSL::test_remote_shutdown_receives_trailing_data" + ]; + + disabledTestPaths = [ # ignore code linting tests - "--ignore=tests/test_sourcecode.py" + "tests/test_sourcecode.py" ]; # force using installed/compiled uvloop vs source by moving tests to temp dir diff --git a/pkgs/development/python-modules/vdirsyncer/default.nix b/pkgs/development/python-modules/vdirsyncer/default.nix index 1f7642bfe347..01ab42ed9c36 100644 --- a/pkgs/development/python-modules/vdirsyncer/default.nix +++ b/pkgs/development/python-modules/vdirsyncer/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , isPy27 , click , click-log @@ -45,6 +46,14 @@ buildPythonPackage rec { pytest-subtesthack ]; + patches = [ + (fetchpatch { + name = "update-usage-deprecated-method.patch"; + url = "https://github.com/pimutils/vdirsyncer/commit/7577fa21177442aacc2d86640ef28cebf1c4aaef.patch"; + sha256 = "0inkr1wfal20kssij8l5myhpjivxg8wlvhppqc3lvml9d1i75qbh"; + }) + ]; + postPatch = '' substituteInPlace setup.py --replace "click>=5.0,<6.0" "click" ''; diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix index da13ad21026d..c48221132043 100644 --- a/pkgs/development/python-modules/vowpalwabbit/default.nix +++ b/pkgs/development/python-modules/vowpalwabbit/default.nix @@ -11,7 +11,7 @@ , pygments , numpy , scipy -, scikitlearn }: +, scikit-learn }: buildPythonPackage rec { pname = "vowpalwabbit"; @@ -36,7 +36,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index df9586fc8e00..9d96977088b5 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "watchdog"; - version = "2.0.3"; + version = "2.1.1"; src = fetchPypi { inherit pname version; - sha256 = "sha256-QojTqYQyTbSS5XqhaWZiOKJXjwr1oIFoVSZgj7n2vWE="; + sha256 = "sha256-KJREC06pWm70xdFS3u2+JwyuRgkmgnELcCigTWppgPY="; }; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; diff --git a/pkgs/development/python-modules/webssh/default.nix b/pkgs/development/python-modules/webssh/default.nix new file mode 100644 index 000000000000..00aff794372d --- /dev/null +++ b/pkgs/development/python-modules/webssh/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi, tornado, paramiko }: + +buildPythonPackage rec { + pname = "webssh"; + version = "1.5.3"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-Au6PE8jYm8LkEp0B1ymW//ZkrkcV0BauwufQmrHLEU4="; + }; + + propagatedBuildInputs = [ tornado paramiko ]; + + pythonImportsCheck = [ "webssh" ]; + + meta = with lib; { + homepage = "https://github.com/huashengdun/webssh/"; + description = "Web based ssh client"; + license = licenses.mit; + maintainers = with maintainers; [ davidtwco ]; + }; +} diff --git a/pkgs/development/python-modules/whoosh/default.nix b/pkgs/development/python-modules/whoosh/default.nix index d3ff703f694a..e31d97a07d92 100644 --- a/pkgs/development/python-modules/whoosh/default.nix +++ b/pkgs/development/python-modules/whoosh/default.nix @@ -25,6 +25,6 @@ buildPythonPackage rec { checking library."; homepage = "https://bitbucket.org/mchaput/whoosh"; license = licenses.bsd2; - maintainers = with maintainers; [ nand0p ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/word2vec/default.nix b/pkgs/development/python-modules/word2vec/default.nix index 259566c8fc26..bda8f59d2ef4 100644 --- a/pkgs/development/python-modules/word2vec/default.nix +++ b/pkgs/development/python-modules/word2vec/default.nix @@ -4,7 +4,7 @@ , fetchzip , cython , numpy -, scikitlearn +, scikit-learn , six , setuptools_scm , gcc @@ -30,7 +30,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm gcc ]; - propagatedBuildInputs = [ cython numpy scikitlearn six ]; + propagatedBuildInputs = [ cython numpy scikit-learn six ]; checkInputs = [ pytest pytestcov ]; diff --git a/pkgs/development/python-modules/wordfreq/default.nix b/pkgs/development/python-modules/wordfreq/default.nix index d687ffd2d0b9..6aa8599653b1 100644 --- a/pkgs/development/python-modules/wordfreq/default.nix +++ b/pkgs/development/python-modules/wordfreq/default.nix @@ -6,38 +6,43 @@ , msgpack , mecab-python3 , jieba -, pytest -, pythonOlder +, pytestCheckHook +, isPy27 , fetchFromGitHub }: buildPythonPackage rec { pname = "wordfreq"; - version = "2.3.2"; - disabled = pythonOlder "3"; + version = "2.5"; + disabled = isPy27; src = fetchFromGitHub { owner = "LuminosoInsight"; repo = "wordfreq"; - # upstream don't tag by version rev = "v${version}"; - sha256 = "078657iiksrqzcc2wvwhiilf3xxq5vlinsv0kz03qzqr1qyvbmas"; + sha256 = "09wzraddbdw3781pk2sxlz8knax9jrcl24ymz54wx6sk0gvq95i7"; }; - propagatedBuildInputs = [ regex langcodes ftfy msgpack mecab-python3 jieba ]; + propagatedBuildInputs = [ + regex + langcodes + ftfy + msgpack + mecab-python3 + jieba + ]; - # patch to relax version requirements for regex - # dependency to prevent break in upgrade postPatch = '' substituteInPlace setup.py --replace "regex ==" "regex >=" ''; - checkInputs = [ pytest ]; - - checkPhase = '' - # These languages require additional dictionaries - pytest tests -k 'not test_japanese and not test_korean and not test_languages and not test_french_and_related' - ''; + checkInputs = [ pytestCheckHook ]; + disabledTests = [ + # These languages require additional dictionaries that aren't packaged + "test_languages" + "test_japanese" + "test_korean" + ]; meta = with lib; { description = "A library for looking up the frequencies of words in many languages, based on many sources of data"; diff --git a/pkgs/development/python-modules/xdg/default.nix b/pkgs/development/python-modules/xdg/default.nix index e47a91fb993b..2ea4e5bedf8b 100644 --- a/pkgs/development/python-modules/xdg/default.nix +++ b/pkgs/development/python-modules/xdg/default.nix @@ -5,7 +5,7 @@ }: buildPythonPackage rec { - version = "5.0.1"; + version = "5.0.2"; pname = "xdg"; disabled = isPy27; format = "pyproject"; @@ -14,7 +14,7 @@ buildPythonPackage rec { owner = "srstevenson"; repo = pname; rev = version; - sha256 = "sha256-WMY9Hs9SbErTp8hVBoCWTz4dLQhuzqTRpXFEyE7+woo="; + sha256 = "sha256-wZfihMrq83Bye5CE5p7bTlI9Z7CsCkSd8Art5ws4vsY="; }; nativeBuildInputs = [ poetry-core ]; diff --git a/pkgs/development/python-modules/xdot/default.nix b/pkgs/development/python-modules/xdot/default.nix index 7dbbd89e781b..e28deaf07d64 100644 --- a/pkgs/development/python-modules/xdot/default.nix +++ b/pkgs/development/python-modules/xdot/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k, python3, xvfb_run +{ lib, buildPythonPackage, fetchPypi, isPy3k, python3, xvfb-run , wrapGAppsHook, gobject-introspection, pygobject3, graphviz, gtk3, numpy }: buildPythonPackage rec { @@ -13,7 +13,7 @@ buildPythonPackage rec { disabled = !isPy3k; nativeBuildInputs = [ wrapGAppsHook ]; propagatedBuildInputs = [ gobject-introspection pygobject3 graphviz gtk3 numpy ]; - checkInputs = [ xvfb_run ]; + checkInputs = [ xvfb-run ]; checkPhase = '' xvfb-run -s '-screen 0 800x600x24' ${python3.interpreter} nix_run_setup test diff --git a/pkgs/development/python-modules/xgboost/default.nix b/pkgs/development/python-modules/xgboost/default.nix index 81a8d05f5bf0..4f02d72c9a18 100644 --- a/pkgs/development/python-modules/xgboost/default.nix +++ b/pkgs/development/python-modules/xgboost/default.nix @@ -1,8 +1,8 @@ { buildPythonPackage -, pytest -, nose +, pytestCheckHook +, cmake , scipy -, scikitlearn +, scikit-learn , stdenv , xgboost , substituteAll @@ -10,28 +10,52 @@ , matplotlib , graphviz , datatable +, hypothesis }: buildPythonPackage { pname = "xgboost"; inherit (xgboost) version src meta; - patches = [ - (substituteAll { - src = ./lib-path-for-python.patch; - libpath = "${xgboost}/lib"; - extention = stdenv.hostPlatform.extensions.sharedLibrary; - }) + nativeBuildInputs = [ cmake ]; + buildInputs = [ xgboost ]; + propagatedBuildInputs = [ scipy ]; + checkInputs = [ + pytestCheckHook + scikit-learn + pandas + matplotlib + graphviz + datatable + hypothesis ]; - postPatch = "cd python-package"; + # Override existing logic for locating libxgboost.so which is not appropriate for Nix + prePatch = let + libPath = "${xgboost}/lib/libxgboost${stdenv.hostPlatform.extensions.sharedLibrary}"; + in '' + echo 'find_lib_path = lambda: ["${libPath}"]' > python-package/xgboost/libpath.py + ''; - propagatedBuildInputs = [ scipy ]; - buildInputs = [ xgboost ]; - checkInputs = [ nose pytest scikitlearn pandas matplotlib graphviz datatable ]; + dontUseCmakeConfigure = true; - checkPhase = '' + postPatch = '' + cd python-package + ''; + + preCheck = '' ln -sf ../demo . - nosetests ../tests/python + ln -s ${xgboost}/bin/xgboost ../xgboost ''; + + pytestFlagsArray = ["../tests/python"]; + disabledTestPaths = [ + # Requires internet access: https://github.com/dmlc/xgboost/blob/03cd087da180b7dff21bd8ef34997bf747016025/tests/python/test_ranking.py#L81 + "../tests/python/test_ranking.py" + ]; + disabledTests = [ + "test_cli_binary_classification" + "test_model_compatibility" + ]; + } diff --git a/pkgs/development/python-modules/xgboost/lib-path-for-python.patch b/pkgs/development/python-modules/xgboost/lib-path-for-python.patch deleted file mode 100644 index c9252c12fed1..000000000000 --- a/pkgs/development/python-modules/xgboost/lib-path-for-python.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py -index d87922c0..859a30fb 100644 ---- a/python-package/xgboost/libpath.py -+++ b/python-package/xgboost/libpath.py -@@ -19,32 +19,4 @@ def find_lib_path(): - lib_path: list(string) - List of all found library path to xgboost - """ -- curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) -- # make pythonpack hack: copy this directory one level upper for setup.py -- dll_path = [curr_path, os.path.join(curr_path, '../../lib/'), -- os.path.join(curr_path, './lib/'), -- os.path.join(sys.prefix, 'xgboost')] -- if sys.platform == 'win32': -- if platform.architecture()[0] == '64bit': -- dll_path.append(os.path.join(curr_path, '../../windows/x64/Release/')) -- # hack for pip installation when copy all parent source directory here -- dll_path.append(os.path.join(curr_path, './windows/x64/Release/')) -- else: -- dll_path.append(os.path.join(curr_path, '../../windows/Release/')) -- # hack for pip installation when copy all parent source directory here -- dll_path.append(os.path.join(curr_path, './windows/Release/')) -- dll_path = [os.path.join(p, 'xgboost.dll') for p in dll_path] -- elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): -- dll_path = [os.path.join(p, 'libxgboost.so') for p in dll_path] -- elif sys.platform == 'darwin': -- dll_path = [os.path.join(p, 'libxgboost.dylib') for p in dll_path] -- -- lib_path = [p for p in dll_path if os.path.exists(p) and os.path.isfile(p)] -- -- # From github issues, most of installation errors come from machines w/o compilers -- if not lib_path and not os.environ.get('XGBOOST_BUILD_DOC', False): -- raise XGBoostLibraryNotFound( -- 'Cannot find XGBoost Library in the candidate path, ' + -- 'did you install compilers and run build.sh in root path?\n' -- 'List of candidates:\n' + ('\n'.join(dll_path))) -- return lib_path -+ return ["@libpath@/libxgboost@extention@"] diff --git a/pkgs/development/python-modules/xknx/default.nix b/pkgs/development/python-modules/xknx/default.nix index aefe3ed2b95c..ca23184726c2 100644 --- a/pkgs/development/python-modules/xknx/default.nix +++ b/pkgs/development/python-modules/xknx/default.nix @@ -11,14 +11,14 @@ buildPythonPackage rec { pname = "xknx"; - version = "0.18.1"; + version = "0.18.2"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "XKNX"; repo = pname; rev = version; - sha256 = "sha256-Zf7Od3v54LxMofm67XHeRM4Yeg1+KQLRhFl1BihAxGc="; + sha256 = "sha256-7jfZtncjcYaAS/7N06FWXh4qSTH6y+VdFx3kKyQxIbM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/xlsx2csv/default.nix b/pkgs/development/python-modules/xlsx2csv/default.nix index 6f7726da68d7..47576e6ee60a 100644 --- a/pkgs/development/python-modules/xlsx2csv/default.nix +++ b/pkgs/development/python-modules/xlsx2csv/default.nix @@ -13,10 +13,9 @@ buildPythonPackage rec { }; meta = with lib; { - homepage = "https://github.com/bitprophet/alabaster"; + homepage = "https://github.com/dilshod/xlsx2csv"; description = "Convert xlsx to csv"; license = licenses.bsd3; maintainers = with maintainers; [ jb55 ]; }; - } diff --git a/pkgs/development/python-modules/xmlschema/default.nix b/pkgs/development/python-modules/xmlschema/default.nix index 58d50d7b6cf3..7008814ba287 100644 --- a/pkgs/development/python-modules/xmlschema/default.nix +++ b/pkgs/development/python-modules/xmlschema/default.nix @@ -5,25 +5,20 @@ }: buildPythonPackage rec { - version = "1.5.3"; + version = "1.6.2"; pname = "xmlschema"; src = fetchFromGitHub { owner = "sissaschool"; repo = "xmlschema"; rev = "v${version}"; - sha256 = "0pv8zdz03wjnjwrgjr5pc3q69h7zh51h0iwgwxwl65qi1r6ydk54"; + sha256 = "sha256-GL2PlHxKDSEsZwHPBAy+tjBSbKyvlbXUWwXakKPmzSs="; }; propagatedBuildInputs = [ elementpath ]; checkInputs = [ lxml pytest ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "elementpath~=2.0.0" "elementpath~=2.0" - ''; - # Ignore broken fixtures, and tests for files which don't exist. # For darwin, we need to explicity say we can't reach network checkPhase = '' diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index c65c88b88d5b..e20536b30eb8 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "yalexs"; - version = "1.1.10"; + version = "1.1.11"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "1qmxiafqmh51i3l30pajaqj5h0kziq4d37fn6hl58429bb85dpp9"; + sha256 = "sha256-fVUYrzIcW4jbxdhS/Bh8eu+aJPFOqj0LXjoQKw+FZdg="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/yangson/default.nix b/pkgs/development/python-modules/yangson/default.nix new file mode 100644 index 000000000000..44ac6cf9fe1e --- /dev/null +++ b/pkgs/development/python-modules/yangson/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools-scm +, pyxb +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "yangson"; + version = "1.4.8"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "11w4aq0w2rnkz1axgmw003z2snd4kc49dil6kp1ajlqnfh1pcx8m"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + pyxb + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "yangson" + ]; + + meta = with lib; { + description = "Library for working with data modelled in YANG"; + homepage = "https://github.com/CZ-NIC/yangson"; + license = with licenses; [ + gpl3Plus + lgpl3Plus + ]; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/development/python-modules/yeelight/default.nix b/pkgs/development/python-modules/yeelight/default.nix index 9d435c1cce6b..41ad75c59883 100644 --- a/pkgs/development/python-modules/yeelight/default.nix +++ b/pkgs/development/python-modules/yeelight/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "yeelight"; - version = "0.6.1"; + version = "0.6.2"; disabled = pythonOlder "3.4"; src = fetchFromGitLab { owner = "stavros"; repo = "python-yeelight"; rev = "v${version}"; - sha256 = "sha256-LB7A8E22hyqhVBElrOwtC3IPNkyQkU7ZJ1ScqaXQ6zs="; + sha256 = "0v0i0s8d5z6b63f2sy42wf85drdzrzswlm1hknzr7v6lfr52pwwm"; }; propagatedBuildInputs = [ @@ -35,7 +35,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python library for controlling YeeLight RGB bulbs"; homepage = "https://gitlab.com/stavros/python-yeelight/"; - license = licenses.asl20; + license = licenses.bsd2; maintainers = with maintainers; [ nyanloutre ]; }; } diff --git a/pkgs/development/python-modules/ytmusicapi/default.nix b/pkgs/development/python-modules/ytmusicapi/default.nix index 4728da51a64b..9c92e5e55a64 100644 --- a/pkgs/development/python-modules/ytmusicapi/default.nix +++ b/pkgs/development/python-modules/ytmusicapi/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "ytmusicapi"; - version = "0.16.0"; + version = "0.17.1"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-/94/taeBI6xZ3uN/wfMnk/NPmk+j0+aaH8CAZBEsK10="; + sha256 = "sha256-b5+AGf9qFqQbx4Rq4RovK2NllYsB+sXVMFU4AvbDkzI="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/zeroconf/default.nix b/pkgs/development/python-modules/zeroconf/default.nix index 5105cbfff021..313f121510e1 100644 --- a/pkgs/development/python-modules/zeroconf/default.nix +++ b/pkgs/development/python-modules/zeroconf/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "zeroconf"; - version = "0.29.0"; + version = "0.31.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "sha256-eu+7ZYtFKx/X5REkNk+TjG9eQtbqiT+iVXvqjAbFQK8="; + sha256 = "sha256-U6GAJIRxxvgb0f/8vOA+2T19jq8QkFyRIaweqZbRmEQ="; }; propagatedBuildInputs = [ ifaddr ]; @@ -25,6 +25,7 @@ buildPythonPackage rec { disabledTests = [ # disable tests that expect some sort of networking in the build container + "test_close_multiple_times" "test_launch_and_close" "test_launch_and_close_v4_v6" "test_launch_and_close_v6_only" diff --git a/pkgs/development/python-modules/zha-quirks/default.nix b/pkgs/development/python-modules/zha-quirks/default.nix index d9c42910e649..34335c65e1a1 100644 --- a/pkgs/development/python-modules/zha-quirks/default.nix +++ b/pkgs/development/python-modules/zha-quirks/default.nix @@ -9,13 +9,13 @@ buildPythonPackage rec { pname = "zha-quirks"; - version = "0.0.56"; + version = "0.0.57"; src = fetchFromGitHub { owner = "zigpy"; repo = "zha-device-handlers"; rev = version; - sha256 = "1jss5pnxdjlp0kplqxgr09vv1zq9n7l9w08hsywy2vglqmd67a66"; + sha256 = "sha256-ajdluj6UIzjJUK30GtoM+e5lsMQRKnn3FPNEg+RS/DM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/zigpy-znp/default.nix b/pkgs/development/python-modules/zigpy-znp/default.nix index 2543d0675852..894539a3e2e0 100644 --- a/pkgs/development/python-modules/zigpy-znp/default.nix +++ b/pkgs/development/python-modules/zigpy-znp/default.nix @@ -3,32 +3,34 @@ , asynctest , buildPythonPackage , coloredlogs -, coveralls , fetchFromGitHub +, jsonschema , pyserial , pyserial-asyncio , pytest-asyncio , pytest-mock , pytest-timeout -, pytestcov , pytestCheckHook +, pythonOlder , voluptuous -, zigpy }: +, zigpy +}: buildPythonPackage rec { pname = "zigpy-znp"; - version = "0.4.0"; + version = "0.5.1"; src = fetchFromGitHub { - owner = "zha-ng"; - repo = "zigpy-znp"; + owner = "zigpy"; + repo = pname; rev = "v${version}"; - sha256 = "1g5jssdnibhb4i4k1js9iy9w40cipf1gdnyp847x0bv6wblzx8rl"; + sha256 = "152d803jfrvkj4namni41fnbbnq85wd7zsqjhmkwrrmn2gvqjiln"; }; propagatedBuildInputs = [ async-timeout coloredlogs + jsonschema pyserial pyserial-asyncio voluptuous @@ -36,18 +38,19 @@ buildPythonPackage rec { ]; checkInputs = [ - asynctest - coveralls pytest-asyncio pytest-mock pytest-timeout - pytestcov pytestCheckHook + ] ++ lib.optionals (pythonOlder "3.8") [ + asynctest ]; + pythonImportsCheck = [ "zigpy_znp" ]; + meta = with lib; { - description = "A library for zigpy which communicates with TI ZNP radios"; - homepage = "https://github.com/zha-ng/zigpy-znp"; + description = "Python library for zigpy which communicates with TI ZNP radios"; + homepage = "https://github.com/zigpy/zigpy-znp"; license = licenses.gpl3Plus; maintainers = with maintainers; [ mvnetbiz ]; platforms = platforms.linux; diff --git a/pkgs/development/python-modules/zulip/default.nix b/pkgs/development/python-modules/zulip/default.nix index ed2276623c3a..66033fcce311 100644 --- a/pkgs/development/python-modules/zulip/default.nix +++ b/pkgs/development/python-modules/zulip/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "zulip"; - version = "0.7.1"; + version = "0.8.0"; disabled = !isPy3k; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "zulip"; repo = "python-zulip-api"; rev = version; - sha256 = "0da1ki1v252avy27j6d7snnc0gyq0xa9fypm3qdmxhw2w79d6q36"; + sha256 = "sha256-gJ+YRJC6wmQzPakApOqytyPy34cS/jjzEZhRIvWUBIQ="; }; sourceRoot = "source/zulip"; diff --git a/pkgs/development/python-modules/zwave-js-server-python/default.nix b/pkgs/development/python-modules/zwave-js-server-python/default.nix index 61dba04a79e1..11d1231b48da 100644 --- a/pkgs/development/python-modules/zwave-js-server-python/default.nix +++ b/pkgs/development/python-modules/zwave-js-server-python/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "zwave-js-server-python"; - version = "0.23.1"; + version = "0.24.0"; disabled = pythonOlder "3.8"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "home-assistant-libs"; repo = pname; rev = version; - sha256 = "0kmmhn357k22ana0ysd8jlz1fyfaqlc8k74ryaik0rrw7nmn1n11"; + sha256 = "sha256-LHAlGWoASDiFwvy59uXl5GH5pPmMuthoo4ZrFegkCIU="; }; propagatedBuildInputs = [ |
