python3Packages.gpapi: refactor and modernize

This commit is contained in:
Pyrox 2024-10-24 18:27:55 -04:00
parent 83cdd624e4
commit 59ec08c4fb
No known key found for this signature in database
GPG Key ID: 8CDF3F7CAA53A0F5

View File

@ -7,16 +7,17 @@
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 = ''
@ -24,30 +25,32 @@ buildPythonPackage rec {
--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" ];
preBuild = ''
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python"
'';
buildInputs = [
protobuf_27
];
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 = [ ];
};