diff --git a/pkgs/development/python-modules/django-tastypie/default.nix b/pkgs/development/python-modules/django-tastypie/default.nix new file mode 100644 index 00000000000..a6c184e2d67 --- /dev/null +++ b/pkgs/development/python-modules/django-tastypie/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python-dateutil +, python-mimeparse +, pythonOlder +}: + +buildPythonPackage rec { + pname = "django-tastypie"; + version = "0.14.4"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "django-tastypie"; + repo = pname; + rev = "v${version}"; + hash = "sha256-O/aVi8BshOZmg9WQxrFlBEOXfgyqJKVK/QlEFG3Edqs="; + }; + + propagatedBuildInputs = [ + python-dateutil + python-mimeparse + ]; + + # Tests requires a Django instance + doCheck = false; + + pythonImportsCheck = [ + "tastypie" + ]; + + meta = with lib; { + description = "Utilities and helpers for writing Pylint plugins"; + homepage = "https://github.com/django-tastypie/django-tastypie"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/pylint-django/default.nix b/pkgs/development/python-modules/pylint-django/default.nix index 61d49bd3ba0..ca26f11ccb3 100644 --- a/pkgs/development/python-modules/pylint-django/default.nix +++ b/pkgs/development/python-modules/pylint-django/default.nix @@ -1,24 +1,25 @@ { lib , buildPythonPackage -, coverage , django , factory_boy , fetchFromGitHub -, isPy3k , pylint-plugin-utils , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "pylint-django"; - version = "2.5.2"; - disabled = !isPy3k; + version = "2.5.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = "v${version}"; - sha256 = "sha256-VgGdV1T154LauclGo6jpLPUrYn5vTOWwvO4IXQ9se7c="; + hash = "sha256-5xEXjNMkOetRM9NDz0S4DsC6v39YQi34s2s+Fs56hYU="; }; propagatedBuildInputs = [ @@ -27,7 +28,6 @@ buildPythonPackage rec { ]; checkInputs = [ - coverage factory_boy pytestCheckHook ]; @@ -38,6 +38,7 @@ buildPythonPackage rec { "external_factory_boy_noerror" "func_noerror_foreign_key_attributes" "func_noerror_foreign_key_key_cls_unbound" + "test_everything" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pylint-plugin-utils/default.nix b/pkgs/development/python-modules/pylint-plugin-utils/default.nix index f2bbef2cc8c..46c12f0d0d0 100644 --- a/pkgs/development/python-modules/pylint-plugin-utils/default.nix +++ b/pkgs/development/python-modules/pylint-plugin-utils/default.nix @@ -1,39 +1,46 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchFromGitHub -, isPy3k -, lib - -# pythonPackages , pylint +, pytestCheckHook +, pythonOlder , toml }: buildPythonPackage rec { pname = "pylint-plugin-utils"; - version = "0.6"; - disabled = !isPy3k; + version = "0.7"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = version; - sha256 = "1zapmbczxs1phrwbd0yvpfxhljd2pyv4pi9rwggaq38lcnc325s7"; + hash = "sha256-uDsSSUWdlzuQz6umoYLbIotOYNEnLQu041ZZVMRd2ww="; }; propagatedBuildInputs = [ - pylint toml + pylint + toml + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pylint_plugin_utils" ]; - checkPhase = '' - python tests.py - ''; + # https://github.com/PyCQA/pylint-plugin-utils/issues/26 + doCheck = false; meta = with lib; { description = "Utilities and helpers for writing Pylint plugins"; homepage = "https://github.com/PyCQA/pylint-plugin-utils"; - license = licenses.gpl2; - maintainers = with maintainers; [ - kamadorueda - ]; + license = licenses.gpl2Only; + maintainers = with maintainers; [ kamadorueda ]; }; } diff --git a/pkgs/development/tools/prospector/default.nix b/pkgs/development/tools/prospector/default.nix index 2f58737637f..0d6e5de4cfe 100644 --- a/pkgs/development/tools/prospector/default.nix +++ b/pkgs/development/tools/prospector/default.nix @@ -11,20 +11,22 @@ with python3.pkgs; buildPythonApplication rec { pname = "prospector"; - version = "1.5.1"; + version = "1.7.7"; format = "pyproject"; + disabled = pythonOlder "3.6.1"; src = pkgs.fetchFromGitHub { owner = "PyCQA"; repo = pname; rev = version; - sha256 = "17f822cxrvcvnrzdx1a9fyi9afljq80b6g6z1k2bqa1vs21gwv7l"; + hash = "sha256-sbPZmVeJtNphtjuZEfKcUgty9bJ3E/2Ya9RuX3u/XEs="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace 'pep8-naming = ">=0.3.3,<=0.10.0"' 'pep8-naming = "*"' + --replace 'pep8-naming = ">=0.3.3,<=0.10.0"' 'pep8-naming = "*"' \ + --replace 'mccabe = "^0.6.0"' 'mccabe = "*"' ''; nativeBuildInputs = [ @@ -61,9 +63,7 @@ buildPythonApplication rec { meta = with lib; { description = "Tool to analyse Python code and output information about errors, potential problems, convention violations and complexity"; homepage = "https://github.com/PyCQA/prospector"; - license = licenses.gpl2; - maintainers = with maintainers; [ - kamadorueda - ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ kamadorueda ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0fd04a7ff14..33f449129ee 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2399,6 +2399,8 @@ in { django-taggit = callPackage ../development/python-modules/django-taggit { }; + django-tastypie = callPackage ../development/python-modules/django-tastypie { }; + django-timezone-field = callPackage ../development/python-modules/django-timezone-field { }; django_treebeard = callPackage ../development/python-modules/django_treebeard { };