mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
python3Packages.gpapi: Fix build; modernize (#351045)
This commit is contained in:
commit
f040e1d5c5
@ -6,34 +6,51 @@
|
||||
protobuf,
|
||||
pycryptodome,
|
||||
requests,
|
||||
protobuf_27,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "0.4.4";
|
||||
format = "setuptools";
|
||||
pname = "gpapi";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version pname;
|
||||
sha256 = "0ampvsv97r3hy1cakif4kmyk1ynf3scbvh4fbk02x7xrxn4kl38w";
|
||||
sha256 = "sha256-HA06ie25ny7AXI7AvZgezvowfZ3ExalY8HDkk7betyo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail 'PROTOC_EXEC = "protoc"' 'PROTOC_EXEC = "${lib.getExe protobuf_27}"'
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [
|
||||
protobuf_27
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
cryptography
|
||||
protobuf
|
||||
pycryptodome
|
||||
requests
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"
|
||||
'';
|
||||
|
||||
# package doesn't contain unit tests
|
||||
# scripts in ./test require networking
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "gpapi.googleplay" ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cryptography
|
||||
protobuf
|
||||
pycryptodome
|
||||
requests
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://github.com/NoMore201/googleplay-api";
|
||||
license = licenses.gpl3Only;
|
||||
license = lib.licenses.gpl3Only;
|
||||
description = "Google Play Unofficial Python API";
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user