Merge pull request #141515 from kfollesdal/kfollesdal/typical
This commit is contained in:
commit
3176c8243e
28
pkgs/development/python-modules/future-typing/default.nix
Normal file
28
pkgs/development/python-modules/future-typing/default.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytestCheckHook
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "future-typing";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "future_typing";
|
||||
inherit version;
|
||||
sha256 = "65fdc5034a95db212790fee5e977fb0a2df8deb60dccf3bac17d6d2b1a9bbacd";
|
||||
};
|
||||
|
||||
doCheck = false; # No tests in pypi source. Did not get tests from GitHub source to work.
|
||||
|
||||
pythonImportsCheck = [ "future_typing" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Use generic type hints and new union syntax `|` with python 3.6+";
|
||||
homepage = "https://github.com/PrettyWood/future-typing";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kfollesdal ];
|
||||
};
|
||||
}
|
69
pkgs/development/python-modules/typical/default.nix
Normal file
69
pkgs/development/python-modules/typical/default.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, inflection
|
||||
, pendulum
|
||||
, fastjsonschema
|
||||
, typing-extensions
|
||||
, orjson
|
||||
, future-typing
|
||||
, poetry-core
|
||||
, pydantic
|
||||
, sqlalchemy
|
||||
, pandas
|
||||
, mypy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "typical";
|
||||
version = "2.7.9";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "seandstewart";
|
||||
repo = "typical";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ITIsSM92zftnvqLiVGFl//IbBb8N3ffkkqohzOx2JO4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./use-poetry-core.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
inflection
|
||||
pendulum
|
||||
fastjsonschema
|
||||
orjson
|
||||
typing-extensions
|
||||
future-typing
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
mypy
|
||||
pydantic
|
||||
sqlalchemy
|
||||
pandas
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
"test_ujson" # We use orjson
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"benchmark/"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "typic" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://python-typical.org/";
|
||||
description = "Typical: Python's Typing Toolkit.";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kfollesdal ];
|
||||
};
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index a588a0d..43da394 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -154,7 +154,7 @@ exclude = '''
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
-build-backend = "poetry.masonry.api"
|
||||
+build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[bumpver]
|
||||
current_version = "v2.7.5"
|
@ -2979,6 +2979,8 @@ in {
|
||||
|
||||
future-fstrings = callPackage ../development/python-modules/future-fstrings { };
|
||||
|
||||
future-typing = callPackage ../development/python-modules/future-typing { };
|
||||
|
||||
fuzzyfinder = callPackage ../development/python-modules/fuzzyfinder { };
|
||||
|
||||
fuzzywuzzy = callPackage ../development/python-modules/fuzzywuzzy { };
|
||||
@ -9606,6 +9608,8 @@ in {
|
||||
|
||||
typesystem = callPackage ../development/python-modules/typesystem { };
|
||||
|
||||
typical = callPackage ../development/python-modules/typical { };
|
||||
|
||||
typing = null;
|
||||
|
||||
typing-extensions = callPackage ../development/python-modules/typing-extensions { };
|
||||
|
Loading…
Reference in New Issue
Block a user