python311Packages.asyncinotify: refactor
This commit is contained in:
parent
624b8aefb3
commit
85beb27fca
1 changed files with 23 additions and 13 deletions
|
@ -1,19 +1,22 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitLab
|
||||
, fetchFromGitHub
|
||||
, flit-core
|
||||
, python
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "asyncinotify";
|
||||
version = "4.0.2";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "Taywee";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "absperf";
|
||||
repo = "asyncinotify";
|
||||
rev = "v${version}";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-Q7b406UENCmD9SGbaml+y2YLDi7VLZBmDkYMo8CLuVw=";
|
||||
};
|
||||
|
||||
|
@ -21,15 +24,22 @@ buildPythonPackage rec {
|
|||
flit-core
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
${python.pythonOnBuildForHost.interpreter} ${src}/test.py
|
||||
'';
|
||||
pythonImportsCheck = ["asyncinotify"];
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"asyncinotify"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"test.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features";
|
||||
homepage = "https://pypi.org/project/asyncinotify/";
|
||||
changelog = "https://gitlab.com/Taywee/asyncinotify/-/blob/master/CHANGELOG.md";
|
||||
description = "Module for inotify";
|
||||
homepage = "https://github.com/absperf/asyncinotify/";
|
||||
changelog = "https://github.com/absperf/asyncinotify/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ cynerd ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue