nixpkgs/pkgs/development/python-modules/txgithub/default.nix
adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

41 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pyopenssl
, twisted
, service-identity
}:
buildPythonPackage rec {
pname = "txgithub";
version = "15.0.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "16gbizy8vkxasxylwzj4p66yw8979nvzxdj6csidgmng7gi2k8nx";
};
propagatedBuildInputs = [ pyopenssl twisted service-identity ];
# fix python3 issues
patchPhase = ''
sed -i 's/except usage.UsageError, errortext/except usage.UsageError as errortext/' txgithub/scripts/create_token.py
sed -i 's/except usage.UsageError, errortext/except usage.UsageError as errortext/' txgithub/scripts/gist.py
sed -i 's/print response\[\x27html_url\x27\]/print(response\[\x27html_url\x27\])/' txgithub/scripts/gist.py
sed -i '41d' txgithub/scripts/gist.py
sed -i '41d' txgithub/scripts/gist.py
'';
# No tests distributed
doCheck = false;
meta = with lib; {
description = "GitHub API client implemented using Twisted.";
homepage = "https://github.com/tomprince/txgithub";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}