1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, setuptools
7}:
8
9buildPythonPackage rec {
10 pname = "wheel-filename";
11 version = "1.4.1";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "jwodder";
18 repo = pname;
19 rev = "v${version}";
20 hash = "sha256-M3XGHG733X5qKuMS6mvFSFHYOwWPaBMXw+w0eYo6ByE=";
21 };
22
23 nativeBuildInputs = [
24 setuptools
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 ];
30
31 postPatch = ''
32 substituteInPlace tox.ini \
33 --replace " --cov=wheel_filename --no-cov-on-fail" ""
34 '';
35
36 pythonImportsCheck = [
37 "wheel_filename"
38 ];
39
40 meta = with lib; {
41 description = "Parse wheel filenames";
42 homepage = "https://github.com/jwodder/wheel-filename";
43 license = with licenses; [ mit ];
44 maintainers = with lib.maintainers; [ ayazhafiz ];
45 };
46}