pythonPackages.qscintilla-qt5: add pythonImportsCheck and disable Python 2 support

This commit is contained in:
Eduardo Sánchez Muñoz 2021-05-18 19:58:36 +02:00
parent 38034013e3
commit d6e728efc2

View file

@ -10,6 +10,8 @@ buildPythonPackage rec {
src = qscintilla.src;
format = "other";
disabled = !isPy3k;
nativeBuildInputs = [ sip_4 qtbase ];
buildInputs = [ qscintilla ];
propagatedBuildInputs = [ pyqt5 ];
@ -23,11 +25,6 @@ buildPythonPackage rec {
"'$out/${python.sitePackages}'"
'';
pyqt5_sip_dir = if isPy3k then
"${pyqt5}/${python.sitePackages}/PyQt5/bindings"
else
"${pyqt5}/share/sip/PyQt5";
preConfigure = ''
# configure.py will look for this folder
mkdir -p $out/share/sip/PyQt5
@ -43,11 +40,21 @@ buildPythonPackage rec {
--qsci-incdir=${qscintilla}/include \
--qsci-featuresdir=${qscintilla}/mkspecs/features \
--qsci-libdir=${qscintilla}/lib \
--pyqt-sipdir=${pyqt5_sip_dir} \
--pyqt-sipdir=${pyqt5}/${python.sitePackages}/PyQt5/bindings \
--qsci-sipdir=$out/share/sip/PyQt5 \
--sip-incdir=${sip_4}/include
'';
postInstall = ''
# Needed by pythonImportsCheck to find the module
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
'';
# Checked using pythonImportsCheck
doCheck = false;
pythonImportsCheck = [ "PyQt5.Qsci" ];
meta = with lib; {
description = "A Python binding to QScintilla, Qt based text editing control";
license = licenses.lgpl21Plus;