python3Packages.plyer: Maintain abit

- format = "setuptools" -> pyproject = true, add setuptools to build-system
- --replace -> --replace-fail
- Stop deleting examples dir, has seemingly no effect on the resulting output
- Drop meta-wide "with lib"
- Use writableTmpDirAsHomeHook
- Formatting

OPNA2608 0d76146b 50d67d02

+14 -8
+14 -8
pkgs/development/python-modules/plyer/default.nix
··· 6 fetchpatch, 7 keyring, 8 pytestCheckHook, 9 }: 10 11 buildPythonPackage rec { 12 pname = "plyer"; 13 version = "2.1.0"; 14 - format = "setuptools"; 15 16 src = fetchFromGitHub { 17 owner = "kivy"; ··· 45 ]; 46 47 postPatch = '' 48 - rm -r examples 49 # remove all the wifi stuff. Depends on a python wifi module that has not been updated since 2016 50 find -iname "wifi*" -exec rm {} \; 51 substituteInPlace plyer/__init__.py \ 52 - --replace "wifi = Proxy('wifi', facades.Wifi)" "" \ 53 - --replace "'wifi', " "" 54 substituteInPlace plyer/facades/__init__.py \ 55 - --replace "from plyer.facades.wifi import Wifi" "" 56 ''; 57 58 propagatedBuildInputs = [ keyring ]; 59 60 nativeCheckInputs = [ 61 pytestCheckHook 62 ]; 63 64 enabledTestPaths = [ "plyer/tests" ]; ··· 69 # The test and the API under test do work outside the nix build. 70 "test_uniqueid" 71 ]; 72 preCheck = '' 73 - HOME=$(mktemp -d) 74 mkdir -p $HOME/.config/ $HOME/Pictures 75 ''; 76 77 pythonImportsCheck = [ "plyer" ]; 78 79 - meta = with lib; { 80 broken = stdenv.hostPlatform.isDarwin; 81 description = "Plyer is a platform-independent api to use features commonly found on various platforms"; 82 homepage = "https://github.com/kivy/plyer"; 83 - license = licenses.mit; 84 teams = [ 85 lib.teams.ngi 86 ];
··· 6 fetchpatch, 7 keyring, 8 pytestCheckHook, 9 + setuptools, 10 + writableTmpDirAsHomeHook, 11 }: 12 13 buildPythonPackage rec { 14 pname = "plyer"; 15 version = "2.1.0"; 16 + pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "kivy"; ··· 47 ]; 48 49 postPatch = '' 50 # remove all the wifi stuff. Depends on a python wifi module that has not been updated since 2016 51 find -iname "wifi*" -exec rm {} \; 52 substituteInPlace plyer/__init__.py \ 53 + --replace-fail "wifi = Proxy('wifi', facades.Wifi)" "" \ 54 + --replace-fail "'wifi', " "" 55 substituteInPlace plyer/facades/__init__.py \ 56 + --replace-fail "from plyer.facades.wifi import Wifi" "" 57 ''; 58 59 + build-system = [ 60 + setuptools 61 + ]; 62 + 63 propagatedBuildInputs = [ keyring ]; 64 65 nativeCheckInputs = [ 66 pytestCheckHook 67 + writableTmpDirAsHomeHook 68 ]; 69 70 enabledTestPaths = [ "plyer/tests" ]; ··· 75 # The test and the API under test do work outside the nix build. 76 "test_uniqueid" 77 ]; 78 + 79 preCheck = '' 80 mkdir -p $HOME/.config/ $HOME/Pictures 81 ''; 82 83 pythonImportsCheck = [ "plyer" ]; 84 85 + meta = { 86 broken = stdenv.hostPlatform.isDarwin; 87 description = "Plyer is a platform-independent api to use features commonly found on various platforms"; 88 homepage = "https://github.com/kivy/plyer"; 89 + license = lib.licenses.mit; 90 teams = [ 91 lib.teams.ngi 92 ];