mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +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
|
||||
}:
|
||||
|
||||
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 {
|
||||
pname = "gradio-client";
|
||||
version = "0.7.3";
|
||||
@ -87,17 +69,16 @@ buildPythonPackage rec {
|
||||
websockets
|
||||
];
|
||||
|
||||
nativeCheckInputs =[
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-asyncio
|
||||
pydub
|
||||
rich
|
||||
tomlkit
|
||||
gradio'
|
||||
];
|
||||
disallowedReferences = [
|
||||
gradio' # ensuring we don't propagate this intermediate build
|
||||
gradio.sans-reverse-dependencies
|
||||
];
|
||||
# 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).
|
||||
preCheck = ''
|
||||
|
@ -3,6 +3,7 @@
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
, pythonRelaxDepsHook
|
||||
, gradio
|
||||
|
||||
# pyproject
|
||||
, hatchling
|
||||
@ -165,6 +166,22 @@ buildPythonPackage rec {
|
||||
|
||||
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; {
|
||||
homepage = "https://www.gradio.app/";
|
||||
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-pdf = callPackage ../development/python-modules/gradio-pdf { };
|
||||
|
||||
grafanalib = callPackage ../development/python-modules/grafanalib/default.nix { };
|
||||
|
||||
grammalecte = callPackage ../development/python-modules/grammalecte { };
|
||||
|
Loading…
Reference in New Issue
Block a user