From a0b0a4ac298264e9e712a32bbe39006ed4aa537e Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 15:48:42 -0500 Subject: [PATCH 1/6] python3Packages.scikit-build-core: init at 0.1.3 --- .../scikit-build-core/default.nix | 83 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/development/python-modules/scikit-build-core/default.nix diff --git a/pkgs/development/python-modules/scikit-build-core/default.nix b/pkgs/development/python-modules/scikit-build-core/default.nix new file mode 100644 index 000000000000..802b50cab32f --- /dev/null +++ b/pkgs/development/python-modules/scikit-build-core/default.nix @@ -0,0 +1,83 @@ +{ lib +, buildPythonPackage +, fetchPypi +, distlib +, pythonOlder +, exceptiongroup +, hatch-vcs +, hatchling +, cattrs +, cmake +, packaging +, pathspec +, pyproject-metadata +, pytest-subprocess +, pytestCheckHook +, tomli +}: + +buildPythonPackage rec { + pname = "scikit-build-core"; + version = "0.1.3"; + format = "pyproject"; + + src = fetchPypi { + pname = "scikit_build_core"; + inherit version; + hash = "sha256-qkVj7fS2+JB8mpJ788vTw4jhD/TGtZAMtCiBlmjbFM8="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'minversion = "7.2"' "" \ + --replace '"error",' '"error", "ignore::DeprecationWarning", "ignore::UserWarning",' + ''; + + nativeBuildInputs = [ + hatch-vcs + hatchling + ]; + + propagatedBuildInputs = [ + packaging + ] ++ lib.optionals (pythonOlder "3.11") [ + exceptiongroup + tomli + ]; + + passthru.optional-dependencies = { + pyproject = [ + distlib + pathspec + pyproject-metadata + ]; + }; + + dontUseCmakeConfigure = true; + + checkInputs = [ + cattrs + cmake + pytest-subprocess + pytestCheckHook + ] ++ passthru.optional-dependencies.pyproject; + + disabledTestPaths = [ + # runs pip, requires network access + "tests/test_pyproject_pep517.py" + "tests/test_pyproject_pep518.py" + "tests/test_setuptools_pep517.py" + "tests/test_setuptools_pep518.py" + ]; + + pythonImportsCheck = [ + "scikit_build_core" + ]; + + meta = with lib; { + description = "A next generation Python CMake adaptor and Python API for plugins"; + homepage = "https://github.com/scikit-build/scikit-build-core"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 511fea250077..de6eaebcaeac 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10080,6 +10080,8 @@ self: super: with self; { scikit-build = callPackage ../development/python-modules/scikit-build { }; + scikit-build-core = callPackage ../development/python-modules/scikit-build-core { }; + scikit-fmm = callPackage ../development/python-modules/scikit-fmm { }; scikit-fuzzy = callPackage ../development/python-modules/scikit-fuzzy { }; From 02ba62f8f37eee351dce1417cd2317ee3b3db1e8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 15:49:03 -0500 Subject: [PATCH 2/6] python3Packages.awkward-cpp: init at 2 --- .../python-modules/awkward-cpp/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/awkward-cpp/default.nix diff --git a/pkgs/development/python-modules/awkward-cpp/default.nix b/pkgs/development/python-modules/awkward-cpp/default.nix new file mode 100644 index 000000000000..00c50e912016 --- /dev/null +++ b/pkgs/development/python-modules/awkward-cpp/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, cmake +, numpy +, pybind11 +, scikit-build-core +, typing-extensions +}: + +buildPythonPackage rec { + pname = "awkward-cpp"; + version = "2"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-XmP0PjE19224Hgkkp07PSHD1hcEan0MlaLN3wEAohow="; + }; + + nativeBuildInputs = [ + cmake + pybind11 + scikit-build-core + ] ++ scikit-build-core.optional-dependencies.pyproject; + + propagatedBuildInputs = [ + numpy + ]; + + dontUseCmakeConfigure = true; + + pythonImportsCheck = [ + "awkward_cpp" + ]; + + meta = with lib; { + description = "CPU kernels and compiled extensions for Awkward Array"; + homepage = "https://github.com/scikit-hep/awkward"; + license = licenses.bsd3; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index de6eaebcaeac..11674b16d09a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -818,6 +818,8 @@ self: super: with self; { awkward0 = callPackage ../development/python-modules/awkward0 { }; awkward = callPackage ../development/python-modules/awkward { }; + awkward-cpp = callPackage ../development/python-modules/awkward-cpp { }; + aws-adfs = callPackage ../development/python-modules/aws-adfs { }; aws-lambda-builders = callPackage ../development/python-modules/aws-lambda-builders { }; From d014abb57400655d311e9602049b00d0ef995f66 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 15:49:26 -0500 Subject: [PATCH 3/6] python3Packages.awkward: 1.10.2 -> 2.0.0 --- .../python-modules/awkward/default.nix | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/pkgs/development/python-modules/awkward/default.nix b/pkgs/development/python-modules/awkward/default.nix index 9e8ef3098a9d..f15810ae8ab8 100644 --- a/pkgs/development/python-modules/awkward/default.nix +++ b/pkgs/development/python-modules/awkward/default.nix @@ -1,40 +1,40 @@ { lib , buildPythonPackage , fetchPypi -, cmake +, pythonOlder +, awkward-cpp +, hatch-fancy-pypi-readme +, hatchling , numba , numpy +, packaging +, typing-extensions , pytestCheckHook -, pythonOlder -, pyyaml -, rapidjson -, setuptools }: buildPythonPackage rec { pname = "awkward"; - version = "1.10.2"; - format = "setuptools"; + version = "2.0.0"; + format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-MDvAkZ8JMts+eKklTBf83rEl5L5lzYlLQN+8O/3fwFQ="; + hash = "sha256-N4KzRkMIPW7nZE6f2z2ur8S2AwpmfyGf1hy3sjSXa2g="; }; nativeBuildInputs = [ - cmake - ]; - - buildInputs = [ - pyyaml - rapidjson + hatch-fancy-pypi-readme + hatchling ]; propagatedBuildInputs = [ + awkward-cpp numpy - setuptools + packaging + ] ++ lib.optionals (pythonOlder "3.11") [ + typing-extensions ]; dontUseCmakeConfigure = true; @@ -44,11 +44,6 @@ buildPythonPackage rec { numba ]; - disabledTests = [ - # incomatible with numpy 1.23 - "test_numpyarray" - ]; - disabledTestPaths = [ "tests-cuda" ]; From d8f20f1cebb9fce148f4f568c96775b971075add Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 18:37:14 -0500 Subject: [PATCH 4/6] python3Packages.scikit-hep-testdata: 0.4.21 -> 0.4.24 --- .../python-modules/scikit-hep-testdata/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikit-hep-testdata/default.nix b/pkgs/development/python-modules/scikit-hep-testdata/default.nix index ed0cbd28acb6..a4fc84d2f66b 100644 --- a/pkgs/development/python-modules/scikit-hep-testdata/default.nix +++ b/pkgs/development/python-modules/scikit-hep-testdata/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "scikit-hep-testdata"; - version = "0.4.21"; + version = "0.4.24"; format = "pyproject"; # fetch from github as we want the data files @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "scikit-hep"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-DhOtoxjhczsYqOn+CwLGlRIPa2hh7mH6EfwcLLPMQcw="; + sha256 = "sha256-Q9yyzwFQpqN3Q1SmNKDBxdo51uMqKp8xJ9Ilo9eCTV0="; }; nativeBuildInputs = [ From 3018e5d392b1939525094327e54dd7aec4effd20 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 18:37:34 -0500 Subject: [PATCH 5/6] python3Packages.uproot: 4.3.6 -> 5.0.0 --- .../python-modules/uproot/default.nix | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/uproot/default.nix b/pkgs/development/python-modules/uproot/default.nix index 784d02dafa42..03ac20ad6038 100644 --- a/pkgs/development/python-modules/uproot/default.nix +++ b/pkgs/development/python-modules/uproot/default.nix @@ -1,13 +1,15 @@ { lib -, awkward , buildPythonPackage , fetchFromGitHub +, pythonOlder +, awkward +, hatchling , importlib-metadata -, lz4 , numpy , packaging , pytestCheckHook -, pythonOlder +, lz4 +, pytest-timeout , scikit-hep-testdata , xxhash , zstandard @@ -15,32 +17,37 @@ buildPythonPackage rec { pname = "uproot"; - version = "4.3.6"; - format = "setuptools"; + version = "5.0.0"; + format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "scikit-hep"; - repo = "uproot4"; + repo = "uproot5"; rev = "refs/tags/v${version}"; - hash = "sha256-Te4D2tHVD5fD8DH2njjQMGnTUvLQdcGBzApklnGn6g8="; + hash = "sha256-3i6AUQKKWu5KOtfLdLK2LpgkHyiqG30Eiyy6OH4fjUY="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ awkward numpy - lz4 packaging - xxhash - zstandard ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; checkInputs = [ pytestCheckHook + lz4 + pytest-timeout scikit-hep-testdata + xxhash + zstandard ]; preCheck = '' From e62f497a2f8c1ef4143ac9dac06bb66ea2e7cd2d Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Tue, 13 Dec 2022 18:40:05 -0500 Subject: [PATCH 6/6] pythonPackages.{awkward0,uproot3}: remove --- .../python-modules/awkward0/default.nix | 37 --------------- .../uproot3-methods/default.nix | 31 ------------ .../python-modules/uproot3/default.nix | 47 ------------------- pkgs/top-level/python-aliases.nix | 3 ++ pkgs/top-level/python-packages.nix | 5 -- 5 files changed, 3 insertions(+), 120 deletions(-) delete mode 100644 pkgs/development/python-modules/awkward0/default.nix delete mode 100644 pkgs/development/python-modules/uproot3-methods/default.nix delete mode 100644 pkgs/development/python-modules/uproot3/default.nix diff --git a/pkgs/development/python-modules/awkward0/default.nix b/pkgs/development/python-modules/awkward0/default.nix deleted file mode 100644 index ce9f1eabc77a..000000000000 --- a/pkgs/development/python-modules/awkward0/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, numpy -, pytest-runner -, pytestCheckHook -}: - -buildPythonPackage rec { - pname = "awkward0"; - version = "0.15.5"; - - src = fetchFromGitHub { - owner = "scikit-hep"; - repo = "awkward-0.x"; - rev = version; - sha256 = "039pxzgll2yz8xpr6bw788ymvgvqgna5kgl9m6d9mzi4yhbjsjpx"; - }; - - nativeBuildInputs = [ pytest-runner ]; - - propagatedBuildInputs = [ numpy ]; - - checkInputs = [ pytestCheckHook ]; - - # Can't find a fixture - disabledTests = [ "test_import_pandas" ]; - - pythonImportsCheck = [ "awkward0" ]; - - meta = with lib; { - description = "Manipulate jagged, chunky, and/or bitmasked arrays as easily as Numpy"; - homepage = "https://github.com/scikit-hep/awkward-array"; - license = licenses.bsd3; - maintainers = with maintainers; [ costrouc SuperSandro2000 ]; - }; -} diff --git a/pkgs/development/python-modules/uproot3-methods/default.nix b/pkgs/development/python-modules/uproot3-methods/default.nix deleted file mode 100644 index f5760b974ffd..000000000000 --- a/pkgs/development/python-modules/uproot3-methods/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, numpy -, awkward0 -}: - -buildPythonPackage rec { - version = "0.10.1"; - pname = "uproot3-methods"; - - src = fetchPypi { - inherit pname version; - sha256 = "dd68f90be1ea276360b96369836849df29045f7fe4e534f9ac21ea00798ee358"; - }; - - nativeBuildInputs = [ awkward0 ]; - - propagatedBuildInputs = [ numpy awkward0 ]; - - # No tests on PyPi - doCheck = false; - pythonImportsCheck = [ "uproot3_methods" ]; - - meta = with lib; { - homepage = "https://github.com/scikit-hep/uproot3-methods"; - description = "Pythonic mix-ins for ROOT classes"; - license = licenses.bsd3; - maintainers = with maintainers; [ costrouc SuperSandro2000 ]; - }; -} diff --git a/pkgs/development/python-modules/uproot3/default.nix b/pkgs/development/python-modules/uproot3/default.nix deleted file mode 100644 index e5b3903eefa7..000000000000 --- a/pkgs/development/python-modules/uproot3/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, fetchFromGitHub, buildPythonPackage, isPy27 -, awkward0, backports_lzma ? null, cachetools, lz4, pandas -, pytestCheckHook, pkgconfig, mock -, numpy, requests, uproot3-methods, xxhash, zstandard -}: - -buildPythonPackage rec { - pname = "uproot3"; - version = "3.14.4"; - - src = fetchFromGitHub { - owner = "scikit-hep"; - repo = "uproot3"; - rev = version; - sha256 = "sha256-hVJpKdYvyoCPyqgZzKYp30SvkYm+HWSNBdd9bYCYACE="; - }; - - postPatch = '' - substituteInPlace setup.py \ - --replace '"pytest-runner"' "" - ''; - - propagatedBuildInputs = [ - awkward0 - cachetools - lz4 - numpy - uproot3-methods - xxhash - zstandard - ] ++ lib.optional isPy27 backports_lzma; - - checkInputs = [ - mock - pandas - pkgconfig - pytestCheckHook - requests - ] ++ lib.optional isPy27 backports_lzma; - - meta = with lib; { - homepage = "https://github.com/scikit-hep/uproot3"; - description = "ROOT I/O in pure Python and Numpy"; - license = licenses.bsd3; - maintainers = with maintainers; [ ktf SuperSandro2000 ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 460b90b2b0b8..5db18622e775 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -38,6 +38,7 @@ mapAliases ({ anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18 argon2_cffi = argon2-cffi; # added 2022-05-09 asyncio-nats-client = nats-py; # added 2022-02-08 + awkward0 = throw "awkward0 has been removed, use awkward instead"; # added 2022-12-13 Babel = babel; # added 2022-05-06 bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15 blockdiagcontrib-cisco = throw "blockdiagcontrib-cisco is not compatible with blockdiag 2.0.0 and has been removed."; # added 2020-11-29 @@ -217,6 +218,8 @@ mapAliases ({ tvnamer = throw "tvnamer was moved to pkgs.tvnamer"; # added 2021-07-05 types-cryptography = throw "types-cryptography has been removed because it is obsolete since cryptography version 3.4.4."; # added 2022-05-30 types-paramiko = throw "types-paramiko has been removed because it was unused."; # added 2022-05-30 + uproot3 = throw "uproot3 has been removed, use uproot instead"; # added 2022-12-13 + uproot3-methods = throw "uproot3-methods has been removed"; # added 2022-12-13 Wand = wand; # added 2022-11-13 WazeRouteCalculator = wazeroutecalculator; # added 2021-09-29 weakrefmethod = throw "weakrefmethod was removed since it's not needed in Python >= 3.4"; # added 2022-12-01 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 11674b16d09a..d7d43850dfb8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -815,7 +815,6 @@ self: super: with self; { awesomeversion = callPackage ../development/python-modules/awesomeversion { }; - awkward0 = callPackage ../development/python-modules/awkward0 { }; awkward = callPackage ../development/python-modules/awkward { }; awkward-cpp = callPackage ../development/python-modules/awkward-cpp { }; @@ -11675,10 +11674,6 @@ self: super: with self; { uproot = callPackage ../development/python-modules/uproot { }; - uproot3 = callPackage ../development/python-modules/uproot3 { }; - - uproot3-methods = callPackage ../development/python-modules/uproot3-methods { }; - uptime = callPackage ../development/python-modules/uptime { }; uptime-kuma-monitor = callPackage ../development/python-modules/uptime-kuma-monitor { };