1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 isPyPy,
6 pytestCheckHook,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "six";
12 version = "1.17.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "benjaminp";
17 repo = "six";
18 tag = version;
19 hash = "sha256-tz99C+dz5xJhunoC45bl0NdSdV9NXWya9ti48Z/KaHY=";
20 };
21
22 build-system = [ setuptools ];
23
24 nativeCheckInputs = [ pytestCheckHook ];
25
26 pytestFlagsArray =
27 if isPyPy then
28 [
29 # uses ctypes to find native library
30 "--deselect=test_six.py::test_move_items"
31 ]
32 else
33 null;
34
35 pythonImportsCheck = [ "six" ];
36
37 meta = {
38 changelog = "https://github.com/benjaminp/six/blob/${version}/CHANGES";
39 description = "Python 2 and 3 compatibility library";
40 homepage = "https://github.com/benjaminp/six";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ dotlambda ];
43 };
44}