python3Packages.orange3: setup direct dependencies to fetch from GitHub + bump (#354279)

This commit is contained in:
Gaétan Lepage
2024-12-30 22:17:56 +01:00
committed by GitHub
5 changed files with 136 additions and 71 deletions
@@ -16,6 +16,7 @@
lockfile,
numpy,
pip,
trubar,
qasync,
requests-cache,
typing-extensions,
@@ -26,18 +27,19 @@
pytestCheckHook,
stdenv,
gitUpdater,
}:
buildPythonPackage rec {
pname = "orange-canvas-core";
version = "0.2.2";
version = "0.2.4";
pyproject = true;
src = fetchFromGitHub {
owner = "biolab";
repo = "orange-canvas-core";
rev = "refs/tags/${version}";
hash = "sha256-Jp3vCQmRdkFADStVkbCFPiCBqpbI0a4JiJ8qs60rpqw=";
tag = version;
hash = "sha256-tLFWOXsAhqxFV0wdlAKestO/F/rDtdFnKDd0FXPeNpg=";
};
build-system = [ setuptools ];
@@ -55,6 +57,7 @@ buildPythonPackage rec {
qasync
requests-cache
typing-extensions
trubar
];
pythonImportsCheck = [ "orangecanvas" ];
@@ -85,6 +88,8 @@ buildPythonPackage rec {
"test_widgettoolgrid"
];
passthru.updateScript = gitUpdater { };
disabledTestPaths = [ "orangecanvas/canvas/items/tests/test_graphicstextitem.py" ];
meta = {
@@ -1,8 +1,10 @@
{
lib,
gitUpdater,
stdenv,
buildPythonPackage,
fetchPypi,
setuptools,
fetchFromGitHub,
pyqt5,
pyqtwebengine,
matplotlib,
@@ -17,15 +19,19 @@
buildPythonPackage rec {
pname = "orange-widget-base";
version = "4.24.0";
format = "setuptools";
version = "4.25.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-2cBg7s4+qMrb2G4sMk5yednOzJCNheHIQ3lty4KAg18=";
src = fetchFromGitHub {
owner = "biolab";
repo = "orange-widget-base";
tag = version;
hash = "sha256-tWo8vwC8xLA2ZKeab2GqpXGdlHhaqOT9wu1efqSHZSg=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
matplotlib
orange-canvas-core
pyqt5
@@ -53,6 +59,8 @@ buildPythonPackage rec {
"orangewidget/tests/test_widget.py"
];
passthru.updateScript = gitUpdater { };
meta = {
description = "Implementation of the base OWBaseWidget class and utilities for use in Orange Canvas workflows";
homepage = "https://github.com/biolab/orange-widget-base";
@@ -1,52 +1,58 @@
{
lib,
stdenv,
baycomp,
bottleneck,
buildPythonPackage,
chardet,
fetchFromGitHub,
# build-system
oldest-supported-numpy,
setuptools,
# nativeBuildInputs
copyDesktopItems,
cython,
qt5,
recommonmark,
sphinx,
# dependencies
baycomp,
bottleneck,
catboost,
xgboost,
fetchFromGitHub,
fetchurl,
chardet,
httpx,
joblib,
keyring,
keyrings-alt,
makeDesktopItem,
matplotlib,
nix-update-script,
numpy,
oldest-supported-numpy,
openpyxl,
opentsne,
orange-canvas-core,
orange-widget-base,
pandas,
pytestCheckHook,
pytest-qt,
pyqtgraph,
pyqt5,
pyqtwebengine,
python,
python-louvain,
pythonOlder,
pyyaml,
pip,
qt5,
pyqt5,
pyqtgraph,
pyqtwebengine,
python-louvain,
pyyaml,
qtconsole,
recommonmark,
requests,
scikit-learn,
scipy,
serverfiles,
setuptools,
sphinx,
wheel,
xgboost,
xlrd,
xlsxwriter,
makeDesktopItem,
# passthru
gitUpdater,
python,
pytest-qt,
pytestCheckHook,
}:
let
@@ -55,15 +61,18 @@ let
version = "3.37.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "biolab";
repo = "orange3";
rev = "refs/tags/${version}";
tag = version;
hash = "sha256-3PybiHXH6oIYJb78/a7LnQA6cYUicDx4Mf65QhIhT4w=";
};
build-system = [
oldest-supported-numpy
setuptools
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'cython>=3.0' 'cython'
@@ -74,50 +83,47 @@ let
nativeBuildInputs = [
copyDesktopItems
oldest-supported-numpy
cython
qt5.wrapQtAppsHook
recommonmark
setuptools
sphinx
wheel
];
enableParallelBuilding = true;
pythonRelaxDeps = [ "scikit-learn" ];
propagatedBuildInputs = [
numpy
scipy
chardet
dependencies = [
baycomp
bottleneck
catboost
xgboost
chardet
httpx
joblib
keyring
keyrings-alt
matplotlib
numpy
openpyxl
opentsne
qtconsole
setuptools
bottleneck
matplotlib
joblib
requests
keyring
scikit-learn
pandas
pyqtwebengine
serverfiles
orange-canvas-core
orange-widget-base
pandas
pip
pyqt5
pyqtgraph
pyqtwebengine
python-louvain
pyyaml
qtconsole
requests
scikit-learn
scipy
serverfiles
setuptools
xgboost
xlrd
xlsxwriter
httpx
pyqtgraph
pyqt5
orange-widget-base
keyrings-alt
pyyaml
baycomp
pip
];
# FIXME: ImportError: cannot import name '_variable' from partially initialized module 'Orange.data' (most likely due to a circular import) (/build/source/Orange/data/__init__.py)
@@ -165,7 +171,7 @@ let
'';
passthru = {
updateScript = nix-update-script { };
updateScript = gitUpdater { };
tests.unittests = stdenv.mkDerivation {
name = "${self.name}-tests";
inherit (self) src;
@@ -181,13 +187,13 @@ let
chmod +w -R .
substituteInPlace Orange/classification/tests/test_xgb_cls.py \
--replace test_learners mk_test_learners
--replace-fail test_learners mk_test_learners
substituteInPlace Orange/modelling/tests/test_xgb.py \
--replace test_learners mk_test_learners
--replace-fail test_learners mk_test_learners
substituteInPlace Orange/**/tests/*.py \
--replace test_filename filename_test
--replace-fail test_filename filename_test
# TODO: debug why orange is crashing on GC, may be a upstream issue
chmod +x Orange/__init__.py
@@ -196,8 +202,8 @@ let
'';
nativeBuildInputs = [
pytestCheckHook
pytest-qt
pytestCheckHook
];
postCheck = ''
@@ -211,12 +217,12 @@ let
};
};
meta = with lib; {
meta = {
description = "Data mining and visualization toolbox for novice and expert alike";
homepage = "https://orangedatamining.com/";
changelog = "https://github.com/biolab/orange3/blob/${version}/CHANGELOG.md";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ lucasew ];
license = [ lib.licenses.gpl3Plus ];
maintainers = [ lib.maintainers.lucasew ];
mainProgram = "orange-canvas";
};
};
@@ -0,0 +1,44 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
gitUpdater,
pytestCheckHook,
libcst,
pyyaml,
}:
buildPythonPackage rec {
pname = "trubar";
version = "0.3.4";
pyproject = true;
src = fetchFromGitHub {
owner = "janezd";
repo = "trubar";
tag = version;
hash = "sha256-ChKmeACEMnFcMYSdkdVlFiE3td171ihUS2A+qsP5ASk=";
};
build-system = [ setuptools ];
dependencies = [
libcst
pyyaml
];
pythonImportsCheck = [ "trubar" ];
nativeCheckInputs = [ pytestCheckHook ];
passthru.updateScript = gitUpdater { };
meta = {
description = "Utility for translation of strings and f-strings in Python files";
homepage = "https://github.com/janezd/trubar";
changelog = "https://github.com/janezd/trubar/releases/tag/${version}";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.lucasew ];
};
}
+2
View File
@@ -16425,6 +16425,8 @@ self: super: with self; {
trove-classifiers = callPackage ../development/python-modules/trove-classifiers { };
trubar = callPackage ../development/python-modules/trubar { };
trueskill = callPackage ../development/python-modules/trueskill { };
truncnorm = callPackage ../development/python-modules/truncnorm { };