Unverified Commit 663225ca authored by Martin Weinelt's avatar Martin Weinelt
Browse files

python312Packages.ircrobots: modernize

parent e9ab916f
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -2,21 +2,20 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  setuptools,
  anyio,
  asyncio-rlock,
  asyncio-throttle,
  ircstates,
  async-stagger,
  async-timeout,
  python,
  unittestCheckHook,
}:

buildPythonPackage rec {
  pname = "ircrobots";
  version = "0.6.6";
  format = "setuptools";
  disabled = pythonOlder "3.7";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jesopo";
@@ -25,10 +24,9 @@ buildPythonPackage rec {
    hash = "sha256-mIh3tERwHtGH9eA0AT8Lcnwp1Wn9lQhKkUjuZcOXO/c=";
  };

  postPatch = ''
    # too specific pins https://github.com/jesopo/ircrobots/issues/3
    sed -iE 's/anyio.*/anyio/' requirements.txt
  '';
  build-system = [ setuptools ];

  pythonRelaxDeps = true;

  propagatedBuildInputs = [
    anyio
@@ -39,9 +37,7 @@ buildPythonPackage rec {
    async-timeout
  ];

  checkPhase = ''
    ${python.interpreter} -m unittest test
  '';
  nativeCheckInputs = [ unittestCheckHook ];

  pythonImportsCheck = [ "ircrobots" ];