at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools-scm, 6 setuptools, 7 python, 8 docutils, 9 jaraco-collections, 10 jaraco-functools, 11 jaraco-envs, 12 jaraco-path, 13 jaraco-text, 14 more-itertools, 15 packaging, 16 path, 17 pyfakefs, 18 pytestCheckHook, 19 stdenv, 20}: 21 22buildPythonPackage { 23 pname = "distutils"; 24 inherit (setuptools) version; 25 pyproject = true; 26 27 src = fetchFromGitHub { 28 owner = "pypa"; 29 repo = "distutils"; 30 rev = "72837514c2b67081401db556be9aaaa43debe44f"; # correlate commit from setuptools version 31 hash = "sha256-Kx4Iudy9oZ0oQT96Meyq/m0k0BuexPLVxwvpNJehCW0="; 32 }; 33 34 build-system = [ setuptools-scm ]; 35 36 dependencies = [ 37 jaraco-collections 38 jaraco-functools 39 more-itertools 40 packaging 41 ]; 42 43 postInstall = '' 44 rm -r $out/${python.sitePackages}/distutils 45 ln -s ${setuptools}/${python.sitePackages}/setuptools/_distutils $out/${python.sitePackages}/distutils 46 ''; 47 48 pythonImportsCheck = [ "distutils" ]; 49 50 nativeCheckInputs = [ 51 docutils 52 jaraco-envs 53 jaraco-path 54 jaraco-text 55 more-itertools 56 path 57 pyfakefs 58 pytestCheckHook 59 ]; 60 61 # jaraco-path depends ob pyobjc 62 doCheck = !stdenv.hostPlatform.isDarwin; 63 64 meta = { 65 description = "Distutils as found in cpython"; 66 homepage = "https://github.com/pypa/distutils"; 67 license = lib.licenses.mit; 68 maintainers = with lib.maintainers; [ dotlambda ]; 69 }; 70}