Merge pull request #45163 from LnL7/mypy-protobuf
mypy-protobuf: init at 1.6
This commit is contained in:
commit
51469b7d2b
20
pkgs/development/python-modules/mypy-protobuf/default.nix
Normal file
20
pkgs/development/python-modules/mypy-protobuf/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user