mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
python3Packages.gradio-pdf: init at 0.0.3
This commit is contained in:
parent
ed2cb7927b
commit
6722aa294f
50
pkgs/development/python-modules/gradio-pdf/default.nix
Normal file
50
pkgs/development/python-modules/gradio-pdf/default.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, hatch-fancy-pypi-readme
|
||||||
|
, hatch-requirements-txt
|
||||||
|
, hatchling
|
||||||
|
, gradio
|
||||||
|
, gradio-client
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "gradio-pdf";
|
||||||
|
version = "0.0.3";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
pname = "gradio_pdf";
|
||||||
|
inherit version;
|
||||||
|
hash = "sha256-l9bcH/6paEdKk9Q7HM3ap9MI1Qi7rPZ/ucAibBUEPKI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
hatch-fancy-pypi-readme
|
||||||
|
hatch-requirements-txt
|
||||||
|
hatchling
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
gradio-client
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gradio.sans-reverse-dependencies
|
||||||
|
];
|
||||||
|
disallowedReferences = [
|
||||||
|
gradio.sans-reverse-dependencies
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "gradio_pdf" ];
|
||||||
|
|
||||||
|
# tested in `gradio`
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python library for easily interacting with trained machine learning models";
|
||||||
|
homepage = "https://pypi.org/project/gradio-pdf/";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ pbsds ];
|
||||||
|
};
|
||||||
|
}
|
@ -25,24 +25,6 @@
|
|||||||
, gradio
|
, gradio
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
# Cyclic dependencies are fun!
|
|
||||||
# This is gradio without gradio-client, only needed for checkPhase
|
|
||||||
gradio' = (gradio.override (old: {
|
|
||||||
gradio-client = null;
|
|
||||||
})).overridePythonAttrs (old: {
|
|
||||||
pname = old.pname + "-sans-client";
|
|
||||||
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pythonRelaxDepsHook ];
|
|
||||||
pythonRemoveDeps = (old.pythonRemoveDeps or []) ++ [ "gradio-client" ];
|
|
||||||
doInstallCheck = false;
|
|
||||||
doCheck = false;
|
|
||||||
pythonImportsCheck = null;
|
|
||||||
dontCheckRuntimeDeps = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "gradio-client";
|
pname = "gradio-client";
|
||||||
version = "0.7.3";
|
version = "0.7.3";
|
||||||
@ -93,11 +75,10 @@ buildPythonPackage rec {
|
|||||||
pydub
|
pydub
|
||||||
rich
|
rich
|
||||||
tomlkit
|
tomlkit
|
||||||
gradio'
|
gradio.sans-reverse-dependencies
|
||||||
];
|
|
||||||
disallowedReferences = [
|
|
||||||
gradio' # ensuring we don't propagate this intermediate build
|
|
||||||
];
|
];
|
||||||
|
# ensuring we don't propagate this intermediate build
|
||||||
|
disallowedReferences = [ gradio.sans-reverse-dependencies ];
|
||||||
|
|
||||||
# Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail).
|
# Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail).
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, pythonRelaxDepsHook
|
, pythonRelaxDepsHook
|
||||||
|
, gradio
|
||||||
|
|
||||||
# pyproject
|
# pyproject
|
||||||
, hatchling
|
, hatchling
|
||||||
@ -165,6 +166,22 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
pythonImportsCheck = [ "gradio" ];
|
pythonImportsCheck = [ "gradio" ];
|
||||||
|
|
||||||
|
# Cyclic dependencies are fun!
|
||||||
|
# This is gradio without gradio-client and gradio-pdf
|
||||||
|
passthru = {
|
||||||
|
sans-reverse-dependencies = (gradio.override (old: {
|
||||||
|
gradio-client = null;
|
||||||
|
})).overridePythonAttrs (old: {
|
||||||
|
pname = old.pname + "-sans-client";
|
||||||
|
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [ pythonRelaxDepsHook ];
|
||||||
|
pythonRemoveDeps = (old.pythonRemoveDeps or []) ++ [ "gradio-client" ];
|
||||||
|
doInstallCheck = false;
|
||||||
|
doCheck = false;
|
||||||
|
pythonImportsCheck = null;
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.gradio.app/";
|
homepage = "https://www.gradio.app/";
|
||||||
description = "Python library for easily interacting with trained machine learning models";
|
description = "Python library for easily interacting with trained machine learning models";
|
||||||
|
@ -4821,6 +4821,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
gradio-client = callPackage ../development/python-modules/gradio/client.nix { };
|
gradio-client = callPackage ../development/python-modules/gradio/client.nix { };
|
||||||
|
|
||||||
|
gradio-pdf = callPackage ../development/python-modules/gradio-pdf { };
|
||||||
|
|
||||||
grafanalib = callPackage ../development/python-modules/grafanalib/default.nix { };
|
grafanalib = callPackage ../development/python-modules/grafanalib/default.nix { };
|
||||||
|
|
||||||
grammalecte = callPackage ../development/python-modules/grammalecte { };
|
grammalecte = callPackage ../development/python-modules/grammalecte { };
|
||||||
|
Loading…
Reference in New Issue
Block a user