lol

python3Packages.gpapi: refactor and modernize

+17 -14
+17 -14
pkgs/development/python-modules/gpapi/default.nix
··· 7 7 pycryptodome, 8 8 requests, 9 9 protobuf_27, 10 + setuptools, 10 11 }: 11 12 12 13 buildPythonPackage rec { 13 14 version = "0.4.4"; 14 - format = "setuptools"; 15 15 pname = "gpapi"; 16 + pyproject = true; 16 17 17 18 src = fetchPypi { 18 19 inherit version pname; 19 - sha256 = "0ampvsv97r3hy1cakif4kmyk1ynf3scbvh4fbk02x7xrxn4kl38w"; 20 + sha256 = "sha256-HA06ie25ny7AXI7AvZgezvowfZ3ExalY8HDkk7betyo="; 20 21 }; 21 22 22 23 postPatch = '' ··· 24 25 --replace-fail 'PROTOC_EXEC = "protoc"' 'PROTOC_EXEC = "${lib.getExe protobuf_27}"' 25 26 ''; 26 27 27 - # package doesn't contain unit tests 28 - # scripts in ./test require networking 29 - doCheck = false; 30 - 31 - pythonImportsCheck = [ "gpapi.googleplay" ]; 32 - 33 - preBuild = '' 34 - export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" 35 - ''; 28 + build-system = [ setuptools ]; 36 29 37 30 buildInputs = [ 38 31 protobuf_27 39 32 ]; 40 33 41 - propagatedBuildInputs = [ 34 + dependencies = [ 42 35 cryptography 43 36 protobuf 44 37 pycryptodome 45 38 requests 46 39 ]; 47 40 48 - meta = with lib; { 41 + preBuild = '' 42 + export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" 43 + ''; 44 + 45 + # package doesn't contain unit tests 46 + # scripts in ./test require networking 47 + doCheck = false; 48 + 49 + pythonImportsCheck = [ "gpapi.googleplay" ]; 50 + 51 + meta = { 49 52 homepage = "https://github.com/NoMore201/googleplay-api"; 50 - license = licenses.gpl3Only; 53 + license = lib.licenses.gpl3Only; 51 54 description = "Google Play Unofficial Python API"; 52 55 maintainers = [ ]; 53 56 };