Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.nicegui: init at 2.5.0 #352189

Merged
merged 6 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions pkgs/development/python-modules/nicegui-highcharts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
setuptools,
docutils,
nicegui,
pythonOlder,
}:

buildPythonPackage rec {
pname = "nicegui-highcharts";
version = "2.0.2";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "zauberzeug";
repo = "nicegui-highcharts";
rev = "refs/tags/v${version}";
hash = "sha256-r4X4faU7Nlq/FDbIYbTpvnC1w14XskpsNGtkEXtGrFo=";
};

postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools>=30.3.0,<50",' ""
'';

pythonRelaxDeps = [
"docutils"
"nicegui"
];

build-system = [
poetry-core
setuptools
];

dependencies = [
docutils
nicegui
];

# Module has no tests
doCheck = false;

pythonImportsCheck = [ "nicegui_highcharts" ];

meta = {
description = "NiceGUI with support for Highcharts";
homepage = "https://github.com/zauberzeug/nicegui-highcharts";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
123 changes: 123 additions & 0 deletions pkgs/development/python-modules/nicegui/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
lib,
aiofiles,
aiohttp,
buildPythonPackage,
certifi,
pkgs,
docutils,
fastapi,
fetchFromGitHub,
httpx,
ifaddr,
itsdangerous,
jinja2,
libsass,
markdown2,
matplotlib,
orjson,
pandas,
plotly,
poetry-core,
pyecharts,
pygments,
pytest-asyncio,
pytest-selenium,
pytestCheckHook,
python-multipart,
python-socketio,
pythonOlder,
pywebview,
requests,
setuptools,
typing-extensions,
urllib3,
uvicorn,
vbuild,
watchfiles,
webdriver-manager,
}:

buildPythonPackage rec {
pname = "nicegui";
version = "2.5.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "zauberzeug";
repo = "nicegui";
rev = "refs/tags/v${version}";
hash = "sha256-oT191QVpvE5xszgBFt3o4A2hU50zmzPUywmAQuKZ5OE=";
};

postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools>=30.3.0,<50",' ""
'';

build-system = [
poetry-core
setuptools
];

dependencies = [
aiofiles
aiohttp
certifi
docutils
fastapi
httpx
ifaddr
itsdangerous
jinja2
markdown2
orjson
pygments
python-multipart
python-socketio
requests
typing-extensions
urllib3
uvicorn
vbuild
watchfiles
];

optional-dependencies = {
# Circular dependency
# highcharts = [ nicegui-highcharts ];
matplotlib = [ matplotlib ];
native = [ pywebview ];
plotly = [ plotly ];
sass = [ libsass ];
};

nativeCheckInputs = [
pandas
pkgs.chromedriver
pyecharts
pytest-asyncio
pytest-selenium
pytestCheckHook
webdriver-manager
] ++ lib.flatten (builtins.attrValues optional-dependencies);

preCheck = ''
export HOME=$(mktemp -d)
'';

pythonImportsCheck = [ "nicegui" ];

# chromedriver release doesn't seems to be supported, try with next release
doCheck = false;

meta = {
description = "Module to create web-based user interfaces";
homepage = "https://github.com/zauberzeug/nicegui/";
changelog = "https://github.com/zauberzeug/nicegui/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
66 changes: 66 additions & 0 deletions pkgs/development/python-modules/pyecharts/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
jinja2,
numpy,
pandas,
pillow,
prettytable,
pytestCheckHook,
pythonOlder,
requests,
setuptools,
simplejson,
}:

buildPythonPackage rec {
pname = "pyecharts";
version = "2.0.6";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "pyecharts";
repo = "pyecharts";
rev = "refs/tags/v${version}";
hash = "sha256-cD2jtiE2LDKCmhqM+qKYcsZyjDyMDpp8/Bn17csZgqo=";
};

build-system = [ setuptools ];

dependencies = [
jinja2
prettytable
simplejson
];

optional-dependencies = {
images = [ pillow ];
};

nativeCheckInputs = [
numpy
pandas
pytestCheckHook
requests
] ++ lib.flatten (builtins.attrValues optional-dependencies);

pythonImportsCheck = [ "pyecharts" ];

disabledTests = [
# Tests require network access
"test_render_embed_js"
"test_display_javascript_v2"
"test_lines3d_base"
];

meta = {
description = "Python Echarts Plotting Library";
homepage = "https://github.com/pyecharts/pyecharts";
changelog = "https://github.com/pyecharts/pyecharts/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
81 changes: 81 additions & 0 deletions pkgs/development/python-modules/pytest-selenium/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatch-vcs,
hatchling,
pytest-base-url,
pytest-html,
pytest-mock,
pytest-variables,
pytest-xdist,
pytest,
pytestCheckHook,
pythonOlder,
requests,
selenium,
tenacity,
}:

buildPythonPackage rec {
pname = "pytest-selenium";
version = "4.1.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "pytest-dev";
repo = "pytest-selenium";
rev = "refs/tags/${version}";
hash = "sha256-fIyos73haqTAgp5WVvMwJswQAtXnsnUeXKjPweXLGRM=";
};

build-system = [
hatch-vcs
hatchling
];

buildInput = [ pytest ];

dependencies = [
pytest-base-url
pytest-html
pytest-variables
requests
selenium
tenacity
];

nativeCheckInputs = [
pytest-mock
pytest-xdist
pytestCheckHook
];

pythonImportsCheck = [ "pytest_selenium" ];

disabledTests = [
# Tests require additional setup and/or network features
"test_driver_quit"
"test_driver_retry_pass"
"test_event_listening_webdriver"
"test_invalid_credentials_env"
"test_invalid_credentials_file"
"test_invalid_host"
"test_launch_case_insensitive"
"test_launch"
"test_options"
"test_preferences_marker"
"test_profile"
"test_xdist"
];

meta = {
description = "Plugin for running Selenium with pytest";
homepage = "https://github.com/pytest-dev/pytest-selenium";
changelog = "https://github.com/pytest-dev/pytest-selenium/releases/tag/${version}";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ fab ];
};
}
53 changes: 53 additions & 0 deletions pkgs/development/python-modules/pytest-variables/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatch-vcs,
hatchling,
pytest,
hjson,
toml,
pytestCheckHook,
pyyaml,
pythonOlder,
}:

buildPythonPackage rec {
pname = "pytest-variables";
version = "3.1.0";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "pytest-dev";
repo = "pytest-variables";
rev = "refs/tags/${version}";
hash = "sha256-adKoE3td12JtF2f6/1/+TlSIy4i6gRDmeeWalsE6B/w=";
};

build-system = [
hatch-vcs
hatchling
];

buildInput = [ pytest ];

optional-dependencies = {
hjson = [ hjson ];
toml = [ toml ];
yaml = [ pyyaml ];
};

nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies);

pythonImportsCheck = [ "pytest_variables" ];

meta = {
description = "Plugin for providing variables to pytest tests/fixtures";
homepage = "https://github.com/pytest-dev/pytest-variables";
changelog = "https://github.com/pytest-dev/pytest-variables/blob/${src.rev}/CHANGES.rst";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ fab ];
};
}
Loading
Loading