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

python3Packages.perfplot: 0.5.0 -> 0.8.4, fix build by packaging new dependencies #100168

Merged
merged 3 commits into from Oct 12, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions pkgs/development/python-modules/dufte/default.nix
@@ -0,0 +1,44 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, isPy3k
, pythonOlder
, importlib-metadata
, matplotlib
, numpy
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "dufte";
version = "0.2.9";
disabled = !isPy3k;

src = fetchPypi {
inherit pname version;
sha256 = "0nkaczipbsm8c14j9svxry2wigmn5iharibb6b8g062sjaph8x17";
};
format = "pyproject";

propagatedBuildInputs = [
matplotlib
numpy
] ++ stdenv.lib.optionals (pythonOlder "3.8") [
importlib-metadata
];

preCheck = ''
export HOME=$TMPDIR
mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
'';
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "dufte" ];

meta = with stdenv.lib; {
description = "Clean matplotlib plots";
homepage = "https://github.com/nschloe/dufte";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ris ];
};
}
14 changes: 11 additions & 3 deletions pkgs/development/python-modules/perfplot/default.nix
@@ -1,30 +1,35 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, dufte
, matplotlib
, numpy
, pipdate
, tqdm
, rich
, pytest
, isPy27
}:

buildPythonPackage rec {
pname = "perfplot";
version = "0.5.0";
version = "0.8.4";
disabled = isPy27;

src = fetchFromGitHub {
owner = "nschloe";
repo = "perfplot";
rev = "v${version}";
sha256 = "16aj5ryjic1k3qn8xhpw6crczvxcs691vs5kv4pvb1zdx69g1xbv";
sha256 = "0avb0inx8qh8ss3j460v3z6mmn863hswa3bl19vkh475ndsjwmp0";
};
format = "pyproject";

propagatedBuildInputs = [
dufte
matplotlib
numpy
pipdate
rich
tqdm
];

Expand All @@ -33,7 +38,10 @@ buildPythonPackage rec {
];

checkPhase = ''
HOME=$(mktemp -d) pytest test/perfplot_test.py
export HOME=$TMPDIR
mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
pytest test/perfplot_test.py
'';

meta = with lib; {
Expand Down
46 changes: 46 additions & 0 deletions pkgs/development/python-modules/rich/default.nix
@@ -0,0 +1,46 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, CommonMark
, colorama
, dataclasses
, ipywidgets
, poetry
, pygments
, typing-extensions
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "rich";
version = "8.0.0";

# tests not included in pypi tarball
src = fetchFromGitHub {
owner = "willmcgugan";
repo = pname;
rev = "v${version}";
sha256 = "0hv27b22x7dbx1i7nzsd8y8fymmvdak2hcx9242jwk4c1a7jr151";
};
format = "pyproject";

nativeBuildInputs = [ poetry ];
propagatedBuildInputs = [
CommonMark
colorama
ipywidgets
pygments
typing-extensions
] ++ stdenv.lib.optional (pythonOlder "3.7") dataclasses;

checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "rich" ];

meta = with stdenv.lib; {
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal";
homepage = "https://github.com/willmcgugan/rich";
license = licenses.mit;
maintainers = with maintainers; [ ris ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -1815,6 +1815,8 @@ in {

duecredit = callPackage ../development/python-modules/duecredit { };

dufte = callPackage ../development/python-modules/dufte { };

dugong = callPackage ../development/python-modules/dugong { };

dulwich = if isPy3k then
Expand Down Expand Up @@ -6176,6 +6178,8 @@ in {

rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl { });

rich = callPackage ../development/python-modules/rich { };

rig = callPackage ../development/python-modules/rig { };

ripser = callPackage ../development/python-modules/ripser { };
Expand Down