From 3817fec3e2105a6820e8efd3847c8aa8e870e606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 9 Dec 2022 08:25:05 -0800 Subject: [PATCH] python2Packages.protobuf: remove --- .../python2-modules/protobuf/default.nix | 59 ------------------- pkgs/top-level/python2-packages.nix | 5 -- 2 files changed, 64 deletions(-) delete mode 100644 pkgs/development/python2-modules/protobuf/default.nix diff --git a/pkgs/development/python2-modules/protobuf/default.nix b/pkgs/development/python2-modules/protobuf/default.nix deleted file mode 100644 index 30e9fbf9ea7..00000000000 --- a/pkgs/development/python2-modules/protobuf/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ buildPackages -, lib -, fetchpatch -, python -, buildPythonPackage -, isPy37 -, protobuf -, google-apputils ? null -, six -, pyext -, isPy27 -, disabled -, doCheck ? true -}: - -buildPythonPackage { - inherit (protobuf) pname src version; - inherit disabled; - doCheck = doCheck && !isPy27; # setuptools>=41.4 no longer collects correctly on python2 - - propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ]; - propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc. - nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ]; - buildInputs = [ protobuf ]; - - patches = lib.optional (isPy37 && (lib.versionOlder protobuf.version "3.6.1.2")) - # Python 3.7 compatibility (not needed for protobuf >= 3.6.1.2) - (fetchpatch { - url = "https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7.patch"; - sha256 = "09hw22y3423v8bbmc9xm07znwdxfbya6rp78d4zqw6fisdvjkqf1"; - stripLen = 1; - }) - ; - - prePatch = '' - while [ ! -d python ]; do - cd * - done - cd python - ''; - - setupPyGlobalFlags = lib.optional (lib.versionAtLeast protobuf.version "2.6.0") - "--cpp_implementation"; - - pythonImportsCheck = [ - "google.protobuf" - ] ++ lib.optionals (lib.versionAtLeast protobuf.version "2.6.0") [ - "google.protobuf.internal._api_implementation" # Verify that --cpp_implementation worked - ]; - - meta = with lib; { - description = "Protocol Buffers are Google's data interchange format"; - homepage = "https://developers.google.com/protocol-buffers/"; - license = licenses.bsd3; - maintainers = with maintainers; [ knedlsepp ]; - }; - - passthru.protobuf = protobuf; -} diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index cbbcb053a53..e28bec80402 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -47,11 +47,6 @@ with self; with super; { pluggy = callPackage ../development/python2-modules/pluggy { }; - protobuf = callPackage ../development/python2-modules/protobuf { - disabled = isPyPy; - protobuf = pkgs.protobuf3_17; # last version compatible with Python 2 - }; - pycairo = callPackage ../development/python2-modules/pycairo { inherit (pkgs.buildPackages) meson; };