@@ -190,9 +190,7 @@ in {
190190
191191 breathe = callPackage ../development/python-modules/breathe { };
192192
193− browsermob-proxy = if ! isPy3k then
194− callPackage ../development/python-modules/browsermob-proxy {}
195− else throw "browsermob-proxy is not supported for ${python.executable}";
193+ browsermob-proxy = disabledIf isPy3k (callPackage ../development/python-modules/browsermob-proxy {});
196194
197195 bugseverywhere = callPackage ../applications/version-management/bugseverywhere {};
198196
@@ -258,11 +256,11 @@ in {
258256
259257 pyamf = callPackage ../development/python-modules/pyamf { };
260258
261− pyatspi = if isPy3k then callPackage ../development/python-modules/pyatspi { } else throw "pyatspi not supported for interpreter ${python.executable}";
259+ pyatspi = disabledIf (!isPy3k) (callPackage ../development/python-modules/pyatspi { });
262260
263261 pycairo = callPackage ../development/python-modules/pycairo { };
264262
265− pycangjie = if isPy3k then callPackage ../development/python-modules/pycangjie { } else throw "pycangjie not supported for interpreter ${python.executable}";
263+ pycangjie = disabledIf (!isPy3k) (callPackage ../development/python-modules/pycangjie { });
266264
267265 pycrypto = callPackage ../development/python-modules/pycrypto { };
268266
@@ -272,7 +270,7 @@ in {
272270
273271 PyChromecast = callPackage ../development/python-modules/pychromecast { };
274272
275− pyexiv2 = if (!isPy3k) then callPackage ../development/python-modules/pyexiv2 {} else throw "pyexiv2 not supported for interpreter ${python.executable}";
273+ pyexiv2 = disabledIf isPy3k (callPackage ../development/python-modules/pyexiv2 {});
276274
277275 py3exiv2 = callPackage ../development/python-modules/py3exiv2 { };
278276
@@ -334,13 +332,13 @@ in {
334332
335333 PyWebDAV = callPackage ../development/python-modules/pywebdav { };
336334
337− pyxml = if !isPy3k then callPackage ../development/python-modules/pyxml{ } else throw "pyxml not supported for interpreter ${python.executable}";
335+ pyxml = disabledIf isPy3k (callPackage ../development/python-modules/pyxml{ });
338336
339337 relatorio = callPackage ../development/python-modules/relatorio { };
340338
341339 pyzufall = callPackage ../development/python-modules/pyzufall { };
342340
343− rhpl = if !isPy3k then callPackage ../development/python-modules/rhpl {} else throw "rhpl not supported for interpreter ${python.executable}";
341+ rhpl = disabledIf isPy3k (callPackage ../development/python-modules/rhpl {});
344342
345343 simpleeval = callPackage ../development/python-modules/simpleeval { };
346344
@@ -4771,11 +4769,11 @@ in {
47714769
47724770 easy-thumbnails = callPackage ../development/python-modules/easy-thumbnails { };
47734771
4774− eccodes = if (isPy27) then
4775− toPythonModule (pkgs.eccodes.override {
4772+ eccodes = disabledIf (!isPy27)
4773+ (toPythonModule (pkgs.eccodes.override {
47764774 enablePython = true;
47774775 pythonPackages = self;
4778− }) else throw "eccodes not supported for interpreter ${python.executable}";
4776+ }));
47794777
47804778 EditorConfig = buildPythonPackage rec {
47814779 name = "EditorConfig-${version}";
@@ -9296,11 +9294,11 @@ in {
92969294 };
92979295 };
92989296
9299− grib-api = if (isPy27) then toPythonModule
9297+ grib-api = disabledIf (!isPy27) (toPythonModule
93009298 (pkgs.grib-api.override {
93019299 enablePython = true;
93029300 pythonPackages = self;
9303− }) else throw "grib-api not supported for interpreter ${python.executable}";
9301+ }));
93049302
93059303 gspread = buildPythonPackage rec {
93069304 version = "0.2.3";
@@ -10402,13 +10400,13 @@ in {
1040210400 inherit (pkgs) libsodium;
1040310401 };
1040410402
10405− libplist = if isPy3k then throw "libplist not supported for interpreter ${python.executable}" else
10403+ libplist = disabledIf isPy3k
1040610404 (toPythonModule (pkgs.libplist.override{python2Packages=self; })).py;
1040710405
10408− libxml2 = if isPy3k then throw "libxml2 not supported for interpreter ${python.executable}" else
10406+ libxml2 = disabledIf isPy3k
1040910407 (toPythonModule (pkgs.libxml2.override{pythonSupport=true; python2=python;})).py;
1041010408
10411− libxslt = if isPy3k then throw "libxslt not supported for interpreter ${python.executable}" else
10409+ libxslt = disabledIf isPy3k
1041210410 (toPythonModule (pkgs.libxslt.override{pythonSupport=true; python2=python; inherit (self) libxml2;})).py;
1041310411
1041410412 limnoria = buildPythonPackage rec {
@@ -17021,9 +17019,8 @@ in {
1702117019 };
1702217020 };
1702317021
17024− qscintilla = if isPy3k || isPyPy
17025− then throw "qscintilla-${pkgs.qscintilla.version} not supported for interpreter ${python.executable}"
17026− else buildPythonPackage rec {
17022+ qscintilla = disabledIf (isPy3k || isPyPy)
17023+ (buildPythonPackage rec {
1702717024 # TODO: Qt5 support
1702817025 name = "qscintilla-${version}";
1702917026 version = pkgs.qscintilla.version;
@@ -17052,7 +17049,7 @@ in {
1705217049 maintainers = with maintainers; [ danbst ];
1705317050 platforms = platforms.linux;
1705417051 };
17055− };
17052+ });
1705617053
1705717054
1705817055 qserve = buildPythonPackage rec {
@@ -24384,9 +24381,8 @@ EOF
2438424381 ROPGadget = callPackage ../development/python-modules/ROPGadget { };
2438524382
2438624383 # We need "normal" libxml2 and not the python package by the same name.
24387− pywbem = if !(isPy36)
24388− then callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; }
24389− else throw "pywbem not supported for interpreter ${python.executable}";
24384+ pywbem = disabledIf isPy36
24385+ (callPackage ../development/python-modules/pywbem { libxml2 = pkgs.libxml2; });
2439024386
2439124387 unicorn = callPackage ../development/python-modules/unicorn { };
2439224388
@@ -24458,7 +24454,7 @@ EOF
2445824454
2445924455 zeep = callPackage ../development/python-modules/zeep { };
2446024456
24461− zeitgeist = if isPy3k then throw "zeitgeist not supported for interpreter ${python.executable}" else
24457+ zeitgeist = disabledIf isPy3k
2446224458 (toPythonModule (pkgs.zeitgeist.override{python2Packages=self;})).py;
2446324459
2446424460 zeroconf = callPackage ../development/python-modules/zeroconf { };