depot/third_party/nixpkgs/pkgs/development/python-modules/sopel/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

73 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, dnspython
, fetchPypi
, geoip2
, ipython
, isPyPy
, praw
, pyenchant
, pygeoip
, pytestCheckHook
, pythonOlder
, pytz
, sqlalchemy
, xmltodict
}:
buildPythonPackage rec {
pname = "sopel";
version = "7.1.9";
format = "setuptools";
disabled = isPyPy || pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-IJ+ovLQv6/UU1oepmUQjzaWBG3Rdd3xvui7FjK85Urs=";
};
propagatedBuildInputs = [
dnspython
geoip2
ipython
praw
pyenchant
pygeoip
pytz
sqlalchemy
xmltodict
];
checkInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "praw>=4.0.0,<6.0.0" "praw" \
--replace "sqlalchemy<1.4" "sqlalchemy" \
--replace "xmltodict==0.12" "xmltodict>=0.12"
'';
preCheck = ''
export TESTDIR=$(mktemp -d)
cp -R ./test $TESTDIR
pushd $TESTDIR
'';
postCheck = ''
popd
'';
pythonImportsCheck = [
"sopel"
];
meta = with lib; {
description = "Simple and extensible IRC bot";
homepage = "https://sopel.chat";
license = licenses.efl20;
maintainers = with maintainers; [ mog ];
};
}