mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
pythonPackages.qscintilla-qt5: add pythonImportsCheck and disable Python 2 support
This commit is contained in:
parent
38034013e3
commit
d6e728efc2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user