commit
9be4c79278
@ -3,12 +3,15 @@
|
|||||||
, fetchPypi
|
, fetchPypi
|
||||||
, curtsies
|
, curtsies
|
||||||
, greenlet
|
, greenlet
|
||||||
, mock
|
, jedi
|
||||||
, pygments
|
, pygments
|
||||||
|
, pyxdg
|
||||||
, requests
|
, requests
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, urwid
|
, urwid
|
||||||
, which }:
|
, watchdog
|
||||||
|
, which
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "bpython";
|
pname = "bpython";
|
||||||
@ -24,17 +27,22 @@ buildPythonPackage rec {
|
|||||||
which = "${which}/bin/which";
|
which = "${which}/bin/which";
|
||||||
})];
|
})];
|
||||||
|
|
||||||
propagatedBuildInputs = [ curtsies greenlet pygments requests urwid ];
|
propagatedBuildInputs = [
|
||||||
|
curtsies
|
||||||
|
greenlet
|
||||||
|
pygments
|
||||||
|
pyxdg
|
||||||
|
requests
|
||||||
|
urwid
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
substituteInPlace "$out/share/applications/org.bpython-interpreter.bpython.desktop" \
|
substituteInPlace "$out/share/applications/org.bpython-interpreter.bpython.desktop" \
|
||||||
--replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython"
|
--replace "Exec=/usr/bin/bpython" "Exec=$out/bin/bpython"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ mock ];
|
checkInputs = [ jedi watchdog ];
|
||||||
|
pythonImportsCheck = [ "bpython" ];
|
||||||
# tests fail: https://github.com/bpython/bpython/issues/712
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A fancy curses interface to the Python interactive interpreter";
|
description = "A fancy curses interface to the Python interactive interpreter";
|
||||||
|
@ -1,22 +1,14 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, blessings, mock, nose, pyte, wcwidth, typing ? null}:
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, blessings, mock, nose, pyte, cwcwidth, typing ? null}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "curtsies";
|
pname = "curtsies";
|
||||||
version = "0.3.0";
|
version = "0.3.5";
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "89c802ec051d01dec6fc983e9856a3706e4ea8265d2940b1f6d504a9e26ed3a9";
|
sha256 = "1g8dwafx4vx06isjkn28r3cwb0hw1bv67lgygaz34yk66lrzz1x5";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
propagatedBuildInputs = [ blessings cwcwidth ]
|
||||||
# Fix dependency on typing. Remove with the next release
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/bpython/curtsies/commit/217b4f83e954837f8adc4c549c1f2f9f2bb272a7.patch";
|
|
||||||
sha256 = "1d3zwx9c7i0drb4nvydalm9mr83jrvdm75ffgisri89h337hiffs";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ blessings wcwidth ]
|
|
||||||
++ lib.optionals (pythonOlder "3.5") [ typing ];
|
++ lib.optionals (pythonOlder "3.5") [ typing ];
|
||||||
|
|
||||||
checkInputs = [ mock pyte nose ];
|
checkInputs = [ mock pyte nose ];
|
||||||
|
34
pkgs/development/python-modules/cwcwidth/default.nix
Normal file
34
pkgs/development/python-modules/cwcwidth/default.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ lib, buildPythonPackage, fetchPypi, cython, pytestCheckHook }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "cwcwidth";
|
||||||
|
version = "0.1.4";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cython ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
# Hack needed to make pytest + cython work
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
|
||||||
|
preCheck = ''
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
cp -r $TMP/$sourceRoot/tests $HOME
|
||||||
|
pushd $HOME
|
||||||
|
'';
|
||||||
|
postCheck = "popd";
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "cwcwidth" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python bindings for wc(s)width";
|
||||||
|
homepage = "https://github.com/sebastinas/cwcwidth";
|
||||||
|
changelog = "https://github.com/sebastinas/cwcwidth/blob/main/CHANGELOG.md";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ eduardosm ];
|
||||||
|
};
|
||||||
|
}
|
@ -1631,6 +1631,8 @@ in {
|
|||||||
|
|
||||||
cvxpy = callPackage ../development/python-modules/cvxpy { };
|
cvxpy = callPackage ../development/python-modules/cvxpy { };
|
||||||
|
|
||||||
|
cwcwidth = callPackage ../development/python-modules/cwcwidth { };
|
||||||
|
|
||||||
cx_Freeze = callPackage ../development/python-modules/cx_freeze { };
|
cx_Freeze = callPackage ../development/python-modules/cx_freeze { };
|
||||||
|
|
||||||
cx_oracle = callPackage ../development/python-modules/cx_oracle { };
|
cx_oracle = callPackage ../development/python-modules/cx_oracle { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user