Merge pull request #114680 from fabaff/bump-pydantic
This commit is contained in:
commit
6c05b987f9
2 changed files with 35 additions and 25 deletions
|
@ -1,44 +1,45 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, ujson
|
||||
, email_validator
|
||||
, typing-extensions
|
||||
, python
|
||||
, isPy3k
|
||||
, pytest
|
||||
, pytestcov
|
||||
, fetchFromGitHub
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, python-dotenv
|
||||
, pythonOlder
|
||||
, typing-extensions
|
||||
, ujson
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pydantic";
|
||||
version = "1.7.3";
|
||||
disabled = !isPy3k;
|
||||
version = "1.8";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "samuelcolvin";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "xihEDmly0vprmA+VdeCoGXg9PjWRPmBWAwk/9f2DLts=";
|
||||
sha256 = "sha256-+HfnM/IrFlUyQJdiOYyaJUNenh8dLtd8CUJWSbn6hwQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
ujson
|
||||
email_validator
|
||||
python-dotenv
|
||||
typing-extensions
|
||||
ujson
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytest
|
||||
pytestcov
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
pytest
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pydantic" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/samuelcolvin/pydantic";
|
||||
description = "Data validation and settings management using Python type hinting";
|
||||
|
|
|
@ -1,29 +1,38 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, isPy27
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, click
|
||||
, fetchPypi
|
||||
, ipython
|
||||
, pytest
|
||||
, sh
|
||||
, typing
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, sh
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-dotenv";
|
||||
version = "0.15.0";
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "587825ed60b1711daea4832cf37524dfd404325b7db5e25ebe88c495c9f807a0";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ click ] ++ lib.optionals isPy27 [ typing ];
|
||||
propagatedBuildInputs = [ click ];
|
||||
|
||||
checkInputs = [ ipython mock pytest sh ];
|
||||
checkInputs = [
|
||||
ipython
|
||||
mock
|
||||
pytestCheckHook
|
||||
sh
|
||||
];
|
||||
|
||||
# cli tests are impure
|
||||
checkPhase = ''
|
||||
pytest tests/ -k 'not cli'
|
||||
'';
|
||||
disabledTests = [
|
||||
"cli"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "dotenv" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Add .env support to your django/flask apps in development and deployments";
|
||||
|
|
Loading…
Reference in a new issue