1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "distlib";
11 version = "0.4.0";
12 format = "pyproject";
13
14 src = fetchPypi {
15 inherit pname version;
16 hash = "sha256-/uxAB1vgOgRQGpc9gfYzc1tLafmLBUUFkjEMD0AaTg0=";
17 };
18
19 nativeBuildInputs = [ setuptools ];
20
21 postFixup = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
22 find $out -name '*.exe' -delete
23 '';
24
25 pythonImportsCheck = [
26 "distlib"
27 "distlib.database"
28 "distlib.locators"
29 "distlib.index"
30 "distlib.markers"
31 "distlib.metadata"
32 "distlib.util"
33 "distlib.resources"
34 ];
35
36 # Tests use pypi.org.
37 doCheck = false;
38
39 meta = with lib; {
40 description = "Low-level components of distutils2/packaging";
41 homepage = "https://distlib.readthedocs.io";
42 license = licenses.psfl;
43 maintainers = with maintainers; [ lnl7 ];
44 };
45}