1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
# nativeBuildInputs
setuptools,
# nativeCheckInputs
pytestCheckHook,
# install_requires
appdirs,
beautifulsoup4,
cachecontrol,
distro,
feedparser,
packaging,
python-dateutil,
pyyaml,
requests,
tqdm,
urllib3,
}:
buildPythonPackage rec {
pname = "lastversion";
version = "3.5.12";
pyproject = true;
src = fetchFromGitHub {
owner = "dvershinin";
repo = "lastversion";
tag = "v${version}";
hash = "sha256-0yq4rH5okkfbZRxIowClVSV9ihFMCnhRxqwUpMPFDyk=";
};
build-system = [ setuptools ];
dependencies = [
appdirs
beautifulsoup4
cachecontrol
distro
feedparser
packaging
python-dateutil
pyyaml
requests
tqdm
urllib3
]
++ cachecontrol.optional-dependencies.filecache;
pythonRelaxDeps = [
"cachecontrol" # Use newer cachecontrol that uses filelock instead of lockfile
"urllib3" # The cachecontrol and requests incompatibility issue is closed
];
pythonRemoveDeps = [
"lockfile" # "cachecontrol" now uses filelock
];
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [
"tests/test_cli.py"
];
enabledTests = [
"test_cli_format"
];
# CLI tests expect the output bin/ in PATH
preCheck = ''
PATH="$out/bin:$PATH"
'';
pythonImportsCheck = [ "lastversion" ];
meta = {
description = "Find the latest release version of an arbitrary project";
homepage = "https://github.com/dvershinin/lastversion";
changelog = "https://github.com/dvershinin/lastversion/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ ShamrockLee ];
mainProgram = "lastversion";
};
}
|