1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5, docutils
6, requests
7, requests_download
8, zipfile36
9, pythonOlder
10, pytest
11, testpath
12, responses
13, pytoml
14}:
15
16# Flit is actually an application to build universal wheels.
17# It requires Python 3 and should eventually be moved outside of
18# python-packages.nix. When it will be used to build wheels,
19# care should be taken that there is no mingling of PYTHONPATH.
20
21buildPythonPackage rec {
22 pname = "flit";
23 version = "1.0";
24
25 src = fetchPypi {
26 inherit pname version;
27 sha256 = "95b8577b2232da39ee14ae237575b7a85afeeabc1e87f4a19485fac34f85aa89";
28 };
29
30 disabled = !isPy3k;
31 propagatedBuildInputs = [ docutils requests requests_download pytoml ] ++ lib.optional (pythonOlder "3.6") zipfile36;
32
33 checkInputs = [ pytest testpath responses ];
34
35 # Disable test that needs some ini file.
36 # Disable test that wants hg
37 checkPhase = ''
38 py.test -k "not test_invalid_classifier and not test_build_sdist"
39 '';
40
41 meta = {
42 description = "A simple packaging tool for simple packages";
43 homepage = https://github.com/takluyver/flit;
44 license = lib.licenses.bsd3;
45 maintainers = [ lib.maintainers.fridh ];
46 };
47}