summary refs log blame commit diff
path: root/pkgs/development/python-modules/astroid/default.nix
blob: 59bd0bc7c369ff6d0b9e79315cd11379f2e6c4de (plain) (tree)
1
2
3
4
5
6
7
8
9

                    
                 





                   
                
        
  
 
                        
                    
                                                                          
 
                               
 




                                                                   
    
 



                                         

    
                               



                                                             
 


                   
 



                    
                    
                                                                              
                                                  
                                  
                              
                                        

    
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, isPyPy
, lazy-object-proxy
, wrapt
, typed-ast
, pytestCheckHook
, setuptools-scm
, pylint
}:

buildPythonPackage rec {
  pname = "astroid";
  version = "2.5.6"; # Check whether the version is compatible with pylint

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "PyCQA";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-/nWXzuWkerUDvFT/tJTZuhfju46MAM0cwosVH9BXoY8=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION=version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  # From astroid/__pkginfo__.py
  propagatedBuildInputs = [
    lazy-object-proxy
    wrapt
  ] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;

  checkInputs = [
    pytestCheckHook
  ];

  passthru.tests = {
    inherit pylint;
  };

  meta = with lib; {
    description = "An abstract syntax tree for Python with inference support";
    homepage = "https://github.com/PyCQA/astroid";
    license = licenses.lgpl21Plus;
    platforms = platforms.all;
    maintainers = with maintainers; [ ];
  };
}