python.pkgs.pylint: use fetchPypi

This commit is contained in:
Frederik Rietdijk 2017-09-06 17:28:21 +02:00
parent 6bbc2e09da
commit c4ec44e4d7

View File

@ -1,42 +1,42 @@
{ stdenv, fetchurl, buildPythonPackage, python, astroid, isort, { stdenv, buildPythonPackage, fetchPypi, python, astroid, isort,
pytest, pytestrunner, mccabe, configparser, backports_functools_lru_cache }: pytest, pytestrunner, mccabe, configparser, backports_functools_lru_cache }:
buildPythonPackage rec { buildPythonPackage rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "pylint"; pname = "pylint";
version = "1.7.2"; version = "1.7.2";
src = fetchurl { src = fetchPypi {
url = "mirror://pypi/p/${pname}/${name}.tar.gz"; inherit pname version;
sha256 = "ea6afb93a9ed810cf52ff3838eb3a15e2bf6a81b80de0eaede1ce442caa5ca69"; sha256 = "ea6afb93a9ed810cf52ff3838eb3a15e2bf6a81b80de0eaede1ce442caa5ca69";
}; };
buildInputs = [ pytest pytestrunner mccabe configparser backports_functools_lru_cache ]; buildInputs = [ pytest pytestrunner mccabe configparser backports_functools_lru_cache ];
propagatedBuildInputs = [ astroid configparser isort ]; propagatedBuildInputs = [ astroid configparser isort ];
postPatch = '' postPatch = ''
# Remove broken darwin tests # Remove broken darwin tests
sed -i -e '/test_parallel_execution/,+2d' pylint/test/test_self.py sed -i -e '/test_parallel_execution/,+2d' pylint/test/test_self.py
sed -i -e '/test_py3k_jobs_option/,+4d' pylint/test/test_self.py sed -i -e '/test_py3k_jobs_option/,+4d' pylint/test/test_self.py
rm -vf pylint/test/test_functional.py rm -vf pylint/test/test_functional.py
''; '';
checkPhase = '' checkPhase = ''
cd pylint/test cd pylint/test
${python.interpreter} -m unittest discover -p "*test*" ${python.interpreter} -m unittest discover -p "*test*"
''; '';
postInstall = '' postInstall = ''
mkdir -p $out/share/emacs/site-lisp mkdir -p $out/share/emacs/site-lisp
cp "elisp/"*.el $out/share/emacs/site-lisp/ cp "elisp/"*.el $out/share/emacs/site-lisp/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.logilab.org/project/pylint; homepage = http://www.logilab.org/project/pylint;
description = "A bug and style checker for Python"; description = "A bug and style checker for Python";
platforms = platforms.all; platforms = platforms.all;
license = licenses.gpl1Plus; license = licenses.gpl1Plus;
maintainers = with maintainers; [ nand0p ]; maintainers = with maintainers; [ nand0p ];
}; };
} }