Merge pull request #112949 from SuperSandro2000/codespell
This commit is contained in:
commit
1ca7cd20ac
31
pkgs/development/python-modules/aspell-python/default.nix
Normal file
31
pkgs/development/python-modules/aspell-python/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ lib, buildPythonPackage, fetchPypi, isPy27, aspell, aspellDicts, python }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "aspell-python";
|
||||||
|
version = "1.15";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit version;
|
||||||
|
pname = "aspell-python-py3";
|
||||||
|
extension = "tar.bz2";
|
||||||
|
sha256 = "13dk3jrvqmfvf2w9b8afj37d8bh32kcx295lyn3z7r8qch792hi0";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ aspell ];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
${python.interpreter} test/unittests.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "aspell" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python wrapper for aspell (C extension and python version)";
|
||||||
|
homepage = "https://github.com/WojciechMula/aspell-python";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,31 +1,31 @@
|
|||||||
{ lib, buildPythonApplication, fetchPypi, pytest, chardet }:
|
{ lib, buildPythonApplication, fetchFromGitHub, pytestCheckHook, pytest-cov, pytest-dependency, aspell-python, aspellDicts, chardet }:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "codespell";
|
pname = "codespell";
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "codespell-project";
|
||||||
sha256 = "dd9983e096b9f7ba89dd2d2466d1fc37231d060f19066331b9571341363c77b8";
|
repo = "codespell";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "187g26s3wzjmvdx9vjabbnajpbg0s9klixyv6baymmgz9lrcv4ln";
|
||||||
};
|
};
|
||||||
|
|
||||||
# no tests in pypi tarball
|
checkInputs = [ aspell-python chardet pytestCheckHook pytest-cov pytest-dependency ];
|
||||||
doCheck = false;
|
|
||||||
checkInputs = [ pytest chardet ];
|
preCheck = ''
|
||||||
checkPhase = ''
|
export ASPELL_CONF="dict-dir ${aspellDicts.en}/lib/aspell"
|
||||||
# We don't want to be affected by the presence of these
|
|
||||||
rm -r codespell_lib setup.cfg
|
|
||||||
# test_command assumes too much about the execution environment
|
|
||||||
pytest --pyargs codespell_lib.tests -k "not test_command"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# tries to run not rully installed script
|
||||||
|
disabledTests = [ "test_command" ];
|
||||||
|
|
||||||
pythonImportsCheck = [ "codespell_lib" ];
|
pythonImportsCheck = [ "codespell_lib" ];
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Fix common misspellings in source code";
|
description = "Fix common misspellings in source code";
|
||||||
homepage = "https://github.com/codespell-project/codespell";
|
homepage = "https://github.com/codespell-project/codespell";
|
||||||
license = with lib.licenses; [ gpl2 cc-by-sa-30 ];
|
license = with licenses; [ gpl2Only cc-by-sa-30 ];
|
||||||
maintainers = with lib.maintainers; [ johnazoidberg ];
|
maintainers = with maintainers; [ johnazoidberg SuperSandro2000 ];
|
||||||
platforms = lib.platforms.all;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -461,6 +461,8 @@ in {
|
|||||||
|
|
||||||
asn1crypto = callPackage ../development/python-modules/asn1crypto { };
|
asn1crypto = callPackage ../development/python-modules/asn1crypto { };
|
||||||
|
|
||||||
|
aspell-python = callPackage ../development/python-modules/aspell-python { };
|
||||||
|
|
||||||
aspy-yaml = callPackage ../development/python-modules/aspy.yaml { };
|
aspy-yaml = callPackage ../development/python-modules/aspy.yaml { };
|
||||||
|
|
||||||
asteval = callPackage ../development/python-modules/asteval { };
|
asteval = callPackage ../development/python-modules/asteval { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user