python312Packages.gin-config: refactor
- add optional-dependencies
This commit is contained in:
parent
3a9aba5506
commit
a0c1b891e2
@ -2,31 +2,39 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
six,
|
||||
enum34,
|
||||
pythonOlder,
|
||||
setuptools,
|
||||
tensorflow,
|
||||
torch,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gin-config";
|
||||
version = "0.5.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0c6ea5026ded927c8c93c990b01c695257c1df446e45e549a158cfbc79e19ed6";
|
||||
hash = "sha256-DG6lAm3tknyMk8mQsBxpUlfB30RuReVJoVjPvHnhntY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
six
|
||||
enum34
|
||||
];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
optional-dependencies = {
|
||||
tensorflow = [ tensorflow ];
|
||||
torch = [ torch ];
|
||||
};
|
||||
|
||||
# PyPI archive does not ship with tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "gin" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/google/gin-config";
|
||||
description = "Gin provides a lightweight configuration framework for Python, based on dependency injection";
|
||||
homepage = "https://github.com/google/gin-config";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jethro ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user