1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 docutils,
6 requests,
7 pytestCheckHook,
8 testpath,
9 responses,
10 flit-core,
11 tomli-w,
12}:
13
14# Flit is actually an application to build universal wheels.
15# It requires Python 3 and should eventually be moved outside of
16# python-packages.nix. When it will be used to build wheels,
17# care should be taken that there is no mingling of PYTHONPATH.
18
19buildPythonPackage rec {
20 pname = "flit";
21 version = "3.9.0";
22 format = "pyproject";
23
24 src = fetchFromGitHub {
25 owner = "pypa";
26 repo = "flit";
27 rev = version;
28 hash = "sha256-yl2+PcKr7xRW4oIBWl+gzh/nKhSNu5GH9fWKRGgaNHU=";
29 };
30
31 patches = [
32 # https://github.com/pypa/flit/commit/6ab62c91d0db451b5e9ab000f0dba5471550b442.patch
33 ./python314-compat.patch
34 ];
35
36 nativeBuildInputs = [ flit-core ];
37
38 propagatedBuildInputs = [
39 docutils
40 requests
41 flit-core
42 tomli-w
43 ];
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 testpath
48 responses
49 ];
50
51 disabledTests = [
52 # needs some ini file.
53 "test_invalid_classifier"
54 # calls pip directly. disabled for PEP 668
55 "test_install_data_dir"
56 "test_install_module_pep621"
57 "test_symlink_data_dir"
58 "test_symlink_module_pep621"
59 ];
60
61 meta = with lib; {
62 changelog = "https://github.com/pypa/flit/blob/${version}/doc/history.rst";
63 description = "Simple packaging tool for simple packages";
64 mainProgram = "flit";
65 homepage = "https://github.com/pypa/flit";
66 license = licenses.bsd3;
67 };
68}