Merge pull request #45163 from LnL7/mypy-protobuf

mypy-protobuf: init at 1.6
This commit is contained in:
Daiderd Jordan 2018-08-23 21:41:13 +02:00 committed by GitHub
commit 51469b7d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,20 @@
{ stdenv, fetchPypi, buildPythonApplication, protobuf }:
buildPythonApplication rec {
pname = "mypy-protobuf";
version = "1.6";
src = fetchPypi {
inherit pname version;
sha256 = "1bmpd82qm7rjnzc4i275lm18mmz8anhrjhwq2ci179l64hrfr0nb";
};
propagatedBuildInputs = [ protobuf ];
meta = with stdenv.lib; {
description = "Generate mypy stub files from protobuf specs";
homepage = "https://github.com/dropbox/mypy-protobuf";
license = licenses.asl20;
maintainers = with maintainers; [ lnl7 ];
};
}

View File

@ -28,7 +28,10 @@ buildPythonPackage rec {
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2
'';
preBuild = optionalString (versionAtLeast protobuf.version "2.6.0") ''
preBuild = ''
# Workaround for https://github.com/google/protobuf/issues/2895
${python}/bin/${python.executable} setup.py build
'' + optionalString (versionAtLeast protobuf.version "2.6.0") ''
${python}/bin/${python.executable} setup.py build_ext --cpp_implementation
'';

View File

@ -7883,6 +7883,8 @@ in {
mypy = callPackage ../development/python-modules/mypy { };
mypy-protobuf = callPackage ../development/python-modules/mypy-protobuf { };
mwclient = buildPythonPackage rec {
version = "0.8.3";
pname = "mwclient";