From 51d57b053d2140c30cf54aef7606e70f3ce7e565 Mon Sep 17 00:00:00 2001 From: David Acevedo Date: Fri, 28 Apr 2023 14:45:28 -0500 Subject: [PATCH] fix(back): #1070 update python linter deps - now using up to date versions of setuptools and wheel - removed old versions Signed-off-by: David Acevedo --- docs/src/api/extensions/python.md | 21 ++++---- src/args/lint-python-imports/default.nix | 6 +-- src/args/lint-python/default.nix | 6 +-- .../make-python-pypi-environment/default.nix | 48 ++++++++----------- 4 files changed, 36 insertions(+), 45 deletions(-) diff --git a/docs/src/api/extensions/python.md b/docs/src/api/extensions/python.md index f6c2e867..cf874d9e 100644 --- a/docs/src/api/extensions/python.md +++ b/docs/src/api/extensions/python.md @@ -75,17 +75,14 @@ Types: - withNumpy_1_24_0 (`bool`): Optional. Bootstrap numpy 1.24.0 to the environment Defaults to `false`. - - withSetuptools_57_4_0 (`bool`): Optional. - Bootstrap setuptools 57.4.0 to the environment + - withSetuptools_67_7_2 (`bool`): Optional. + Bootstrap setuptools 67.7.2 to the environment Defaults to `false`. - - withSetuptoolsScm_5_0_2 (`bool`) Optional. - Bootstrap setuptools-scm 5.0.2 to the environment + - withSetuptoolsScm_7_1_0 (`bool`) Optional. + Bootstrap setuptools-scm 7.1.0 to the environment Defaults to `false`. - - withSetuptoolsScm_6_0_1 (`bool`) Optional. - Bootstrap setuptools-scm 6.0.1 to the environment - Defaults to `false`. - - withWheel_0_37_0 (`bool`): Optional. - Bootstrap wheel 0.37.0 to the environment + - withWheel_0_40_0 (`bool`): Optional. + Bootstrap wheel 0.40.0 to the environment Defaults to `false`. Example: @@ -115,9 +112,9 @@ Example: # Other packages require a few bootstrapped dependencies, # enable them like this: withCython_0_29_24 = true; - withSetuptools_57_4_0 = true; - withSetuptoolsScm_6_0_1 = true; - withWheel_0_37_0 = true; + withSetuptools_67_7_2 = true; + withSetuptoolsScm_7_1_0 = true; + withWheel_0_40_0 = true; } ``` diff --git a/src/args/lint-python-imports/default.nix b/src/args/lint-python-imports/default.nix index ae58a61d..b86cf5a1 100644 --- a/src/args/lint-python-imports/default.nix +++ b/src/args/lint-python-imports/default.nix @@ -21,9 +21,9 @@ makeDerivation { (makePythonPypiEnvironment { name = "lint-python-imports"; sourcesYaml = ./pypi-sources.yaml; - withSetuptools_57_4_0 = true; - withSetuptoolsScm_6_0_1 = true; - withWheel_0_37_0 = true; + withSetuptools_67_7_2 = true; + withSetuptoolsScm_7_1_0 = true; + withWheel_0_40_0 = true; }) ]; } diff --git a/src/args/lint-python/default.nix b/src/args/lint-python/default.nix index 679f3001..ccbebb18 100644 --- a/src/args/lint-python/default.nix +++ b/src/args/lint-python/default.nix @@ -38,9 +38,9 @@ makeDerivation { "3.11" = ./pypi-sources-3.11.yaml; } .${python}; - withSetuptools_57_4_0 = true; - withSetuptoolsScm_5_0_2 = true; - withWheel_0_37_0 = true; + withSetuptools_67_7_2 = true; + withSetuptoolsScm_7_1_0 = true; + withWheel_0_40_0 = true; }) ]; }; diff --git a/src/args/make-python-pypi-environment/default.nix b/src/args/make-python-pypi-environment/default.nix index d8f6d099..68b794be 100644 --- a/src/args/make-python-pypi-environment/default.nix +++ b/src/args/make-python-pypi-environment/default.nix @@ -20,10 +20,9 @@ sourcesYaml ? null, withCython_0_29_24 ? false, withNumpy_1_24_0 ? false, - withSetuptools_57_4_0 ? false, - withSetuptoolsScm_5_0_2 ? false, - withSetuptoolsScm_6_0_1 ? false, - withWheel_0_37_0 ? false, + withSetuptools_67_7_2 ? false, + withSetuptoolsScm_7_1_0 ? false, + withWheel_0_40_0 ? false, }: assert builtins.any (_: _) [ (sourcesJson == null && sourcesRaw != null && sourcesYaml == null) @@ -72,15 +71,15 @@ assert builtins.any (_: _) [ .${sources.python}; withCython_0_29_24 = true; })) - (listOptional withWheel_0_37_0 (makePythonPypiEnvironment { - name = "wheel-0.37.0"; + (listOptional withWheel_0_40_0 (makePythonPypiEnvironment { + name = "wheel-0.40.0"; sourcesYaml = toFileYaml "sources.yaml" { - closure.wheel = "0.37.0"; + closure.wheel = "0.40.0"; links = [ { - name = "wheel-0.37.0-py2.py3-none-any.whl"; - sha256 = "1za6c4s0yjy1dzprmib3kph40hr8xgj3apdsnqs00v9wv4mln091"; - url = "https://pypi.org/packages/py2.py3/w/wheel/wheel-0.37.0-py2.py3-none-any.whl"; + name = "wheel-0.40.0-py3-none-any.whl"; + sha256 = "0izjbcsxh6nawadg540g34q5q758xralra0g77rdl8mmgh7b4dnj"; + url = "https://pypi.org/packages/py3/w/wheel/wheel-0.40.0-py3-none-any.whl"; } ]; inherit (sources) python; @@ -109,25 +108,20 @@ assert builtins.any (_: _) [ }) (builtins.concatLists [ sources.links - (listOptional withSetuptools_57_4_0 { - name = "setuptools-57.4.0-py3-none-any.whl"; - sha256 = "1mhq6jw21sglccqmimydqi2rjvh3g5xjykb16gcvkkx6gabk14m4"; - url = "https://pypi.org/packages/py3/s/setuptools/setuptools-57.4.0-py3-none-any.whl"; + (listOptional withSetuptools_67_7_2 { + name = "setuptools-67.7.2-py3-none-any.whl"; + sha256 = "0awmhw9a3z21qqhrd0xgaqjpnlbp5pqh69yk06wcwlnahmmziai3"; + url = "https://pypi.org/packages/py3/s/setuptools/setuptools-67.7.2-py3-none-any.whl"; }) - (listOptional withSetuptoolsScm_6_0_1 { - name = "setuptools_scm-6.0.1-py3-none-any.whl"; - sha256 = "0p4i5nypfdqzjlmlkwvy45107y7kpq3x9s5zq2jl9vwd3iq5zgf3"; - url = "https://files.pythonhosted.org/packages/py3/s/setuptools_scm/setuptools_scm-6.0.1-py3-none-any.whl"; + (listOptional withSetuptoolsScm_7_1_0 { + name = "setuptools_scm-7.1.0-py3-none-any.whl"; + sha256 = "13ix4l2q4w34h1kpalyaryxr55d2dsc8r91a2jpy42c7hinqp63k"; + url = "https://files.pythonhosted.org/packages/py3/s/setuptools_scm/setuptools_scm-7.1.0-py3-none-any.whl"; }) - (listOptional withSetuptoolsScm_5_0_2 { - name = "setuptools_scm-5.0.2-py2.py3-none-any.whl"; - sha256 = "0d3by5bk5l57s63gfba2lv28hi147kmrmy29fl8kw42cywvlwp5x"; - url = "https://files.pythonhosted.org/packages/6a/18/23ad8654c5c8d91d1238b2d52882e50152473f2bd2db0da60215b51f401b/setuptools_scm-5.0.2-py2.py3-none-any.whl"; - }) - (listOptional withWheel_0_37_0 { - name = "wheel-0.37.0-py2.py3-none-any.whl"; - sha256 = "1za6c4s0yjy1dzprmib3kph40hr8xgj3apdsnqs00v9wv4mln091"; - url = "https://pypi.org/packages/py2.py3/w/wheel/wheel-0.37.0-py2.py3-none-any.whl"; + (listOptional withWheel_0_40_0 { + name = "wheel-0.40.0-py3-none-any.whl"; + sha256 = "0izjbcsxh6nawadg540g34q5q758xralra0g77rdl8mmgh7b4dnj"; + url = "https://pypi.org/packages/py3/w/wheel/wheel-0.40.0-py3-none-any.whl"; }) (listOptional true { name = "pip-21.2.4-py3-none-any.whl";