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

Python package fixes #311156

Closed
wants to merge 5 commits into from
Closed
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
8 changes: 4 additions & 4 deletions pkgs/development/python-modules/binwalk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ buildPythonPackage rec {

build-system = [ setuptools ];

propagatedBuildInputs =
dependencies =
[
zlib
xz
Expand Down Expand Up @@ -75,11 +75,11 @@ buildPythonPackage rec {

pythonImportsCheck = [ "binwalk" ];

meta = with lib; {
meta = {
homepage = "https://github.com/OSPG/binwalk";
description = "Tool for searching a given binary image for embedded files";
mainProgram = "binwalk";
maintainers = [ maintainers.koral ];
license = licenses.mit;
maintainers = with lib.maintainers; [ koral ];
license = lib.licenses.mit;
};
}
26 changes: 13 additions & 13 deletions pkgs/development/python-modules/blessings/default.nix
pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
buildPythonPackage,
fetchPypi,
six,
nose,
setuptools,
}:

buildPythonPackage rec {
pname = "blessings";
version = "1.7";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "98e5854d805f50a5b58ac2333411b0482516a8210f23f43308baeb58d77c157d";
hash = "sha256-mOWFTYBfUKW1isIzNBGwSCUWqCEPI/QzCLrrWNd8FX0=";
};

# 4 failing tests, 2to3
doCheck = false;
build-system = [ setuptools ];

dependencies = [ six ];

propagatedBuildInputs = [ six ];
nativeCheckInputs = [ nose ];
# Running tests produces a failure that's not able to be patched easily.
# See PR #165 in the repo for the package for more information.
doCheck = false;

checkPhase = ''
nosetests
'';
pythonImportsCheck = [ "blessings" ];

meta = with lib; {
meta = {
homepage = "https://github.com/erikrose/blessings";
description = "Thin, practical wrapper around terminal coloring, styling, and positioning";
license = licenses.mit;
maintainers = with maintainers; [ domenkozar ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ domenkozar ];
};
}
41 changes: 22 additions & 19 deletions pkgs/development/python-modules/cgroup-utils/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,41 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pep8,
nose,
setuptools,
}:

buildPythonPackage rec {
version = "0.8";
format = "setuptools";
pname = "cgroup-utils";

buildInputs = [
pep8
nose
];
# Pep8 tests fail...
doCheck = false;

postPatch = ''
sed -i -e "/argparse/d" setup.py
'';
pyproject = true;

src = fetchFromGitHub {
owner = "peo3";
repo = "cgroup-utils";
rev = "v${version}";
sha256 = "0qnbn8cnq8m14s8s1hcv25xjd55dyb6yy54l5vc7sby5xzzp11fq";
hash = "sha256-2IVw/+/FL33YLpQU783yrZQmexGbwaCRJqEibBmyy2I=";
};

meta = with lib; {
postPatch = ''
sed -i -e "/argparse/d" setup.py
substituteInPlace test_pep8.py --replace-fail \
'print message' 'print(message)'
pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
rm test_pep8.py
'';

build-system = [ setuptools ];

# Importing causes it to check the /sys directory, which isn't allowed, and so
# tests fail. Therefore, tests can't be run.
doCheck = false;

pythonImportsCheck = [ "cgutils" ];

pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
meta = {
description = "Utility tools for control groups of Linux";
mainProgram = "cgutil";
maintainers = with maintainers; [ layus ];
platforms = platforms.linux;
license = licenses.gpl2;
maintainers = with lib.maintainers; [ layus ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
};
}
24 changes: 14 additions & 10 deletions pkgs/development/python-modules/chart-studio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
buildPythonPackage,
fetchFromGitHub,
mock,
nose,
plotly,
pytest,
pytestCheckHook,
requests,
retrying,
setuptools,
Expand Down Expand Up @@ -38,18 +37,23 @@ buildPythonPackage rec {

nativeCheckInputs = [
mock
nose
pytest
pytestCheckHook
];
# most tests talk to a service
checkPhase = ''
HOME=$TMPDIR pytest chart_studio/tests/test_core chart_studio/tests/test_plot_ly/test_api

preCheck = ''
export HOME=$TMPDIR
'';

meta = with lib; {
# most tests talk to a service
pytestFlagsArray = [
"chart_studio/tests/test_core"
"chart_studio/tests/test_plot_ly/test_api"
];

meta = {
description = "Utilities for interfacing with Plotly's Chart Studio service";
homepage = "https://github.com/plotly/plotly.py/tree/master/packages/python/chart-studio";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ];
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ ];
};
}
22 changes: 12 additions & 10 deletions pkgs/development/python-modules/citeproc-py/default.nix
pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,41 @@
lib,
buildPythonPackage,
fetchPypi,
nose,
pytestCheckHook,
git,
lxml,
rnc2rng,
setuptools,
}:

buildPythonPackage rec {
pname = "citeproc-py";
version = "0.6.0";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "d9e3a224f936fe2e5033b5d9ffdacab769cedb61d96c4e0cf2f0b488f1d24b4e";
hash = "sha256-2eOiJPk2/i5QM7XZ/9rKt2nO22HZbE4M8vC0iPHSS04=";
};

buildInputs = [ rnc2rng ];

propagatedBuildInputs = [ lxml ];
build-system = [ setuptools ];

dependencies = [ lxml ];

nativeCheckInputs = [
nose
pytestCheckHook
git
];
checkPhase = "nosetests tests";
doCheck = false; # seems to want a Git repository, but fetchgit with leaveDotGit also fails
# doCheck = false; # seems to want a Git repository, but fetchgit with leaveDotGit also fails
pythonImportsCheck = [ "citeproc" ];

meta = with lib; {
pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
meta = {
homepage = "https://github.com/brechtm/citeproc-py";
description = "Citation Style Language (CSL) parser for Python";
mainProgram = "csl_unsorted";
license = licenses.bsd2;
maintainers = with maintainers; [ bcdarwin ];
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}