Skip to content

Commit 4a19316

Browse files
Yevhen ShymotyukJon
authored andcommitted
python3Packages.pipx: init at 0.15.5.0
1 parent 5df3339 commit 4a19316

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{ lib
2+
, buildPythonPackage
3+
, fetchFromGitHub
4+
, pythonOlder
5+
, userpath
6+
, argcomplete
7+
, packaging
8+
, pytestCheckHook
9+
}:
10+
11+
buildPythonPackage rec {
12+
pname = "pipx";
13+
version = "0.15.5.0";
14+
15+
disabled = pythonOlder "3.6";
16+
17+
# no tests in the pypi tarball, so we directly fetch from github
18+
src = fetchFromGitHub {
19+
owner = "pipxproject";
20+
repo = pname;
21+
rev = version;
22+
sha256 = "13z032i8r9f6d09hssvyjpxjacb4wgms5bh2i37da2ili9bh72m6";
23+
};
24+
25+
propagatedBuildInputs = [ userpath argcomplete packaging ];
26+
27+
# avoid inconclusive venv assertion, see https://github.com/pipxproject/pipx/pull/477
28+
# remove after PR is merged
29+
postPatch = ''
30+
substituteInPlace tests/helpers.py \
31+
--replace 'assert getattr(sys, "base_prefix", sys.prefix) != sys.prefix, "Tests require venv"' ""
32+
'';
33+
34+
checkInputs = [ pytestCheckHook ];
35+
36+
preCheck = ''
37+
export HOME=$(mktemp -d)
38+
'';
39+
40+
# disable tests, which require internet connection
41+
disabledTests = [
42+
"install"
43+
"inject"
44+
"ensure_null_pythonpath"
45+
"missing_interpreter"
46+
"cache"
47+
"internet"
48+
"runpip"
49+
"upgrade"
50+
];
51+
52+
meta = with lib; {
53+
description =
54+
"Install and Run Python Applications in Isolated Environments";
55+
homepage = "https://github.com/pipxproject/pipx";
56+
license = licenses.mit;
57+
maintainers = with maintainers; [ yevhenshymotiuk ];
58+
};
59+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5346,6 +5346,8 @@ in {
53465346

53475347
pip = callPackage ../development/python-modules/pip { };
53485348

5349+
pipx = callPackage ../development/python-modules/pipx { };
5350+
53495351
pip-tools = callPackage ../development/python-modules/pip-tools {
53505352
git = pkgs.gitMinimal;
53515353
glibcLocales = pkgs.glibcLocales;

0 commit comments

Comments
 (0)