python3Packages.ircrobots: init at 0.3.3

This commit is contained in:
Martin Weinelt 2020-10-04 02:39:44 +02:00
parent c70681f334
commit f31f1020bc
No known key found for this signature in database
GPG key ID: BD4AA0528F63F17E
3 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, anyio
, asyncio-throttle
, dataclasses
, ircstates
, async_stagger
, async-timeout
, python
}:
buildPythonPackage rec {
pname = "ircrobots";
version = "0.3.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "jesopo";
repo = pname;
rev = "v${version}";
sha256 = "0ykn6ch7aazv2cx13q2gr94arh6f96d8hwjwnrcjai3i3x4q2pkq";
};
patches = [
./relax-dependencies.patch
];
propagatedBuildInputs = [
anyio
asyncio-throttle
ircstates
async_stagger
async-timeout
] ++ lib.optionals (pythonOlder "3.7") [
dataclasses
];
checkPhase = ''
${python.interpreter} -m unittest test
'';
pythonImportsCheck = [ "ircrobots" ];
meta = with lib; {
description = "Asynchronous bare-bones IRC bot framework for python3";
license = licenses.mit;
homepage = "https://github.com/jesopo/ircrobots";
maintainers = with maintainers; [ hexa ];
};
}

View file

@ -0,0 +1,14 @@
diff --git a/requirements.txt b/requirements.txt
index 87a2d31..4e0efb1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
-anyio ==1.3.0
+anyio
asyncio-throttle ==1.0.1
-dataclasses ==0.6
-ircstates ==0.11.2
+dataclasses; python_version < "3.7"
+ircstates >=0.11.2
async_stagger ==0.3.0
async_timeout ==3.0.1

View file

@ -2971,6 +2971,8 @@ in {
irc = callPackage ../development/python-modules/irc { };
ircrobots = callPackage ../development/python-modules/ircrobots { };
ircstates = callPackage ../development/python-modules/ircstates { };
irctokens = callPackage ../development/python-modules/irctokens { };