From 277b92d0e9baf4f7e9db868243cb9459c80f1b3c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 Oct 2022 09:43:28 +0200 Subject: [PATCH 1/4] python310Packages.marshmallow-dataclass: 8.5.8 -> 8.5.9 --- .../python-modules/marshmallow-dataclass/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/marshmallow-dataclass/default.nix b/pkgs/development/python-modules/marshmallow-dataclass/default.nix index 32a490822d2a..9ebb16b83305 100644 --- a/pkgs/development/python-modules/marshmallow-dataclass/default.nix +++ b/pkgs/development/python-modules/marshmallow-dataclass/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "marshmallow-dataclass"; - version = "8.5.8"; + version = "8.5.9"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "lovasoa"; repo = "marshmallow_dataclass"; rev = "v${version}"; - sha256 = "sha256-3kd/V3U3+/HfUmzwkp3/ChwSjknQ8rIYnTUsRH3WoP4="; + sha256 = "sha256-gA5GxE2as/P5yT3ymvXmLQfG2GyZE7Fj+zBaT88O4vY="; }; propagatedBuildInputs = [ From a0bec14d9a3ca7253d1d23c7b4d1ea979c5a9bfb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 Oct 2022 12:17:38 +0200 Subject: [PATCH 2/4] python310Packages.lektor: 3.3.4 -> 3.4.0b2 --- .../python-modules/lektor/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/lektor/default.nix b/pkgs/development/python-modules/lektor/default.nix index 0749a5470646..74fecc7f0e53 100644 --- a/pkgs/development/python-modules/lektor/default.nix +++ b/pkgs/development/python-modules/lektor/default.nix @@ -2,10 +2,12 @@ , babel , buildPythonPackage , click +, deprecated , exifread , fetchFromGitHub , filetype , flask +, importlib-metadata , inifile , jinja2 , marshmallow @@ -21,13 +23,14 @@ , python-slugify , requests , setuptools +, typing-inspect , watchdog , werkzeug }: buildPythonPackage rec { pname = "lektor"; - version = "3.3.5"; + version = "3.4.0b2"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -36,12 +39,13 @@ buildPythonPackage rec { owner = "lektor"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-i3SuvRREuq0EENDtXjQegdmz30RmH1HVqBwdjq/mkTM="; + hash = "sha256-5w3tT0celHgjmLlsM3sdBdYlXx57z3kMePVGSQkOP7M="; }; propagatedBuildInputs = [ babel click + deprecated exifread filetype flask @@ -55,8 +59,11 @@ buildPythonPackage rec { python-slugify requests setuptools + typing-inspect watchdog werkzeug + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata ]; checkInputs = [ @@ -65,6 +72,11 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "typing.inspect < 0.8.0" "typing.inspect" + ''; + pythonImportsCheck = [ "lektor" ]; From 6c2364b16041edc71dc64a38b4318ed28229a55f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Oct 2022 10:38:15 +0200 Subject: [PATCH 3/4] python310Packages.web3: 5.30.0 -> 5.31.1 --- .../python-modules/web3/default.nix | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/web3/default.nix b/pkgs/development/python-modules/web3/default.nix index a8b5f077b9ed..b07bc9cee9d7 100644 --- a/pkgs/development/python-modules/web3/default.nix +++ b/pkgs/development/python-modules/web3/default.nix @@ -20,36 +20,32 @@ # , py-geth , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook }: buildPythonPackage rec { pname = "web3"; - version = "5.30.0"; - disabled = pythonOlder "3.6"; + version = "5.31.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "ethereum"; repo = "web3.py"; rev = "v${version}"; - sha256 = "sha256-HajumvOG18r7TslkmCfI0iiLsEddevGrRZQFWICGeYE="; + hash = "sha256-YsAbPI9Y6z+snKZ9NsA0YSpB38n+ra4+Ei6COYFe8v4="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "eth-account>=0.5.7,<0.6.0" "eth-account>=0.5.7,<0.7" \ - --replace "eth-utils>=1.9.5,<2.0.0" "eth-utils>=1.9.5,<3" \ - --replace "eth-rlp<0.3" "eth-rlp<0.4" \ - --replace "websockets>=9.1,<10" "websockets>=9.1,<11" \ - --replace "eth-abi>=2.0.0b6,<3.0.0" "eth-abi>=2.0.0b6,<4" \ - --replace "eth-typing>=2.0.0,<3.0.0" "eth-typing>=2.0.0,<4" - ''; + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; propagatedBuildInputs = [ aiohttp eth-abi eth-account eth-hash - eth-hash.optional-dependencies.pycryptodome eth-rlp eth-typing eth-utils @@ -60,7 +56,11 @@ buildPythonPackage rec { protobuf requests websockets - ] ++ lib.optional (pythonOlder "3.8") [ typing-extensions ]; + ] ++ lib.optional (pythonOlder "3.8") [ + typing-extensions + ] ++ eth-hash.optional-dependencies.pycryptodome; + + pythonRelaxDeps = true; # TODO: package eth-tester #checkInputs = [ @@ -72,7 +72,9 @@ buildPythonPackage rec { doCheck = false; - pythonImportsCheck = [ "web3" ]; + pythonImportsCheck = [ + "web3" + ]; meta = with lib; { description = "Web3 library for interactions"; From 43d10b6690b80eb1aa900398513191b7e5fbafdd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 8 Oct 2022 10:47:05 +0200 Subject: [PATCH 4/4] python310Packages.cairo-lang: use pythonRelaxDepsHook --- .../python-modules/cairo-lang/default.nix | 79 +++++++++++-------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/cairo-lang/default.nix b/pkgs/development/python-modules/cairo-lang/default.nix index 00a9361c27f8..ec11772fb50f 100644 --- a/pkgs/development/python-modules/cairo-lang/default.nix +++ b/pkgs/development/python-modules/cairo-lang/default.nix @@ -1,35 +1,40 @@ { lib -, fetchzip -, buildPythonPackage -, setuptools -, ecdsa -, fastecdsa -, sympy -, frozendict -, marshmallow -, marshmallow-enum -, marshmallow-dataclass -, marshmallow-oneofschema -, pipdeptree -, eth-hash -, web3 , aiohttp +, buildPythonPackage , cachetools +, ecdsa +, eth-hash +, fastecdsa +, fetchzip +, frozendict +, gmp +, lark +, marshmallow +, marshmallow-dataclass +, marshmallow-enum +, marshmallow-oneofschema , mpmath , numpy +, pipdeptree , prometheus-client -, typeguard -, lark -, pyyaml -, pytest-asyncio , pytest +, pytest-asyncio , pytestCheckHook -, gmp +, pythonOlder +, pythonRelaxDepsHook +, pyyaml +, setuptools +, sympy +, typeguard +, web3 }: buildPythonPackage rec { pname = "cairo-lang"; version = "0.10.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchzip { url = "https://github.com/starkware-libs/cairo-lang/releases/download/v${version}/cairo-lang-${version}.zip"; @@ -37,13 +42,9 @@ buildPythonPackage rec { }; # TODO: remove a substantial part when https://github.com/starkware-libs/cairo-lang/pull/88/files is merged. - # TODO: pytest and pytest-asyncio must be removed as they are check inputs in fact. postPatch = '' substituteInPlace requirements.txt \ - --replace 'frozendict==1.2' 'frozendict>=1.2' \ - --replace 'lark-parser' 'lark' \ - --replace 'pytest-asyncio' ''' \ - --replace "pytest" ''' + --replace "lark-parser" "lark" substituteInPlace starkware/cairo/lang/compiler/parser_transformer.py \ --replace 'value, meta' 'meta, value' \ @@ -52,7 +53,13 @@ buildPythonPackage rec { --replace 'standard' 'basic' ''; - buildInputs = [ gmp ]; + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + buildInputs = [ + gmp + ]; propagatedBuildInputs = [ aiohttp @@ -74,23 +81,33 @@ buildPythonPackage rec { lark web3 eth-hash - eth-hash.optional-dependencies.pycryptodome pyyaml - ]; + ] ++ eth-hash.optional-dependencies.pycryptodome; checkInputs = [ + pytest-asyncio pytestCheckHook ]; + pythonRelaxDeps = [ + "frozendict" + ]; + + pythonRemoveDeps = [ + # TODO: pytest and pytest-asyncio must be removed as they are check inputs + "pytest" + "pytest-asyncio" + ]; + # There seems to be no test included in the ZIP release… # Cloning from GitHub is harder because they use a custom CMake setup # TODO(raitobezarius): upstream was pinged out of band about it. doCheck = false; - meta = { - homepage = "https://github.com/starkware/cairo-lang"; + meta = with lib; { description = "Tooling for Cairo language"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ raitobezarius ]; + homepage = "https://github.com/starkware/cairo-lang"; + license = licenses.mit; + maintainers = with maintainers; [ raitobezarius ]; }; }