From 37c564ae5089dbdfd23e92ee63ca0d8b84405097 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 5 Nov 2020 17:21:34 -0800 Subject: [PATCH] python3Packages.dotnetcore2: remove Outdated, and new package isn't trivial to package anymore. Not really useful outside of Azure Machine Learning anyway. --- .../python-modules/dotnetcore2/default.nix | 59 ------------------- .../python-modules/dotnetcore2/runtime.patch | 22 ------- pkgs/top-level/python-packages.nix | 2 - 3 files changed, 83 deletions(-) delete mode 100644 pkgs/development/python-modules/dotnetcore2/default.nix delete mode 100644 pkgs/development/python-modules/dotnetcore2/runtime.patch diff --git a/pkgs/development/python-modules/dotnetcore2/default.nix b/pkgs/development/python-modules/dotnetcore2/default.nix deleted file mode 100644 index 7cc069707aad..000000000000 --- a/pkgs/development/python-modules/dotnetcore2/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ stdenv, lib, buildPythonPackage, fetchPypi, python, isPy27 -, dotnet-sdk -, substituteAll -, distro -, unzip -}: - -buildPythonPackage rec { - pname = "dotnetcore2"; - version = "2.1.14"; - format = "wheel"; - disabled = isPy27; - - src = fetchPypi { - inherit pname version format; - python = "py3"; - platform = "manylinux1_x86_64"; - sha256 = "0dxp9a73ncjylc09bjwq81fgj5ysk1yi27l8ka5f98121k1kmn6q"; - }; - - nativeBuildInputs = [ unzip ]; - - propagatedBuildInputs = [ distro ]; - - # needed to apply patches - prePatch = '' - unzip dist/dotnet* - ''; - - patches = [ - ( substituteAll { - src = ./runtime.patch; - dotnet = dotnet-sdk; - } - ) - ]; - - # remove bin, which has a broken dotnetcore installation - installPhase = '' - rm -rf dotnetcore2/bin - mkdir -p $out/${python.sitePackages}/ - cp -r dotnetcore2 $out/${python.sitePackages}/ - ''; - - # no tests, ensure it's one useful function works - checkPhase = '' - rm -r dotnetcore2 # avoid importing local directory - export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH - ${python.interpreter} -c 'from dotnetcore2 import runtime; print(runtime.get_runtime_path()); runtime.ensure_dependencies()' - ''; - - meta = with lib; { - description = "DotNet Core runtime"; - homepage = "https://github.com/dotnet/core"; - license = licenses.mit; - platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ jonringer ]; - }; -} diff --git a/pkgs/development/python-modules/dotnetcore2/runtime.patch b/pkgs/development/python-modules/dotnetcore2/runtime.patch deleted file mode 100644 index 28cf10e21d15..000000000000 --- a/pkgs/development/python-modules/dotnetcore2/runtime.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/dotnetcore2/runtime.py b/dotnetcore2/runtime.py -index 475e2b4..5b578ec 100644 ---- a/dotnetcore2/runtime.py -+++ b/dotnetcore2/runtime.py -@@ -41,6 +41,7 @@ def _get_bin_folder() -> str: - - - def get_runtime_path(): -+ return "@dotnet@/dotnet" - search_string = os.path.join(_get_bin_folder(), 'dotnet*') - matches = [f for f in glob.glob(search_string, recursive=True)] - return matches[0] -@@ -96,8 +97,7 @@ class _FileLock(): - - - def ensure_dependencies() -> Optional[str]: -- if dist is None: -- return None -+ return None - - bin_folder = _get_bin_folder() - deps_path = os.path.join(bin_folder, 'deps') diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e52d78f0f3c2..2609284bf61a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1811,8 +1811,6 @@ in { dot2tex = callPackage ../development/python-modules/dot2tex { inherit (pkgs) graphviz; }; - dotnetcore2 = callPackage ../development/python-modules/dotnetcore2 { inherit (pkgs) substituteAll dotnet-sdk; }; - dparse = callPackage ../development/python-modules/dparse { }; dpath = callPackage ../development/python-modules/dpath { };