about summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2017-01-21 19:05:18 -0500
committerGitHub <noreply@github.com>2017-01-21 19:05:18 -0500
commitd298a961f1db2356495026702dd9bbc396e000af (patch)
tree1c5fd8464c7d280eac9a3333798fce462cab8200 /pkgs/top-level
parent5b1b089de350aa67233a8be237a4eb5d263f5409 (diff)
parent7ebcada02028e5ce8199cc123fda6aa1aba72e64 (diff)
downloadnixlib-d298a961f1db2356495026702dd9bbc396e000af.tar
nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.gz
nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.bz2
nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.lz
nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.xz
nixlib-d298a961f1db2356495026702dd9bbc396e000af.tar.zst
nixlib-d298a961f1db2356495026702dd9bbc396e000af.zip
Merge pull request #21416 from cstrahan/mesos-1.1.0
mesos: 1.0.1 -> 1.1.0
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/python-packages.nix23
1 files changed, 20 insertions, 3 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 8b0aa4f94688..039779361210 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -19307,18 +19307,35 @@ in {
     '';
 
     preConfigure = optionalString (versionAtLeast protobuf.version "2.6.0") ''
-      PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
-      PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
+      export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
+      export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
     '';
 
-    checkPhase = if versionAtLeast protobuf.version "2.6.0" then ''
+    preBuild = optionalString (versionAtLeast protobuf.version "2.6.0") ''
+      ${python}/bin/${python.executable} setup.py build_ext --cpp_implementation
+    '';
+
+    checkPhase = ''
+      runHook preCheck
+    '' + (if versionAtLeast protobuf.version "2.6.0" then ''
       ${python.executable} setup.py google_test --cpp_implementation
+      echo "sanity checking the C extension . . ."
+      echo "import google.protobuf.descriptor" | ${python.executable}
     '' else ''
       ${python.executable} setup.py test
+    '') + ''
+      runHook postCheck
     '';
 
     installFlags = optional (versionAtLeast protobuf.version "2.6.0") "--install-option='--cpp_implementation'";
 
+    # the _message.so isn't installed, so we'll do that manually.
+    # if someone can figure out a less hacky way to get the _message.so to
+    # install, please do replace this.
+    postInstall = optionalString (versionAtLeast protobuf.version "2.6.0") ''
+      cp -v $(find build -name "_message*") $out/${python.sitePackages}/google/protobuf/pyext
+    '';
+
     doCheck = true;
 
     meta = {