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