python3Packages.lektor: disable on older Python releases

- Enable tests
- Add pythonImportsCheck
- Adjust inputs
This commit is contained in:
Fabian Affolter 2022-04-05 22:56:00 +02:00 committed by GitHub
parent bcf7e9346d
commit bf2d815f5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,27 +1,28 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, click
, filetype
, watchdog
, exifread
, requests
, mistune
, inifile
, Babel
, jinja2
, buildPythonPackage
, click
, exifread
, fetchFromGitHub
, filetype
, flask
, inifile
, jinja2
, marshmallow
, marshmallow-dataclass
, mistune
, pip
, pyopenssl
, ndg-httpsclient
, pytestCheckHook
, pytest-cov
, pytest-click
, pytest-mock
, pytest-pylint
, pytest-click
, pytestCheckHook
, pythonOlder
, python-slugify
, isPy27
, functools32
, requests
, setuptools
, watchdog
, werkzeug
}:
buildPythonPackage rec {
@ -29,30 +30,55 @@ buildPythonPackage rec {
version = "3.3.3";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "lektor";
repo = "lektor";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-3jPN4VQdIUVjSSGJxPek2RrnXzCwkDxoEBqk4vuL+nc=";
hash = "sha256-3jPN4VQdIUVjSSGJxPek2RrnXzCwkDxoEBqk4vuL+nc=";
};
propagatedBuildInputs = [
click filetype watchdog exifread requests mistune inifile Babel jinja2
flask pyopenssl python-slugify ndg-httpsclient setuptools
] ++ lib.optionals isPy27 [ functools32 ];
checkInputs = [
pytestCheckHook pytest-cov pytest-mock pytest-pylint pytest-click
Babel
click
exifread
filetype
flask
inifile
jinja2
marshmallow
marshmallow-dataclass
mistune
pip
pyopenssl
python-slugify
requests
setuptools
watchdog
werkzeug
];
# many errors -- tests assume inside of git repo, linting errors 13/317 fail
doCheck = false;
checkInputs = [
pytest-click
pytest-mock
pytest-pylint
pytestCheckHook
];
pythonImportsCheck = [
"lektor"
];
disabledTests = [
# Test requires network access
"test_path_installed_plugin_is_none"
];
meta = with lib; {
description = "A static content management system";
homepage = "https://www.getlektor.com/";
license = licenses.bsd0;
homepage = "https://www.getlektor.com/";
license = licenses.bsd0;
maintainers = with maintainers; [ costrouc ];
};
}