Merge pull request #114680 from fabaff/bump-pydantic

This commit is contained in:
Sandro 2021-02-28 20:11:09 +01:00 committed by GitHub
commit 6c05b987f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 25 deletions

View file

@ -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";

View file

@ -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";