From 2f9e5670da2953a0938c9c24a96ef4880d63bb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sat, 14 Dec 2019 09:13:51 +0200 Subject: [PATCH] Don't import legacy code to speed up qpms import. Former-commit-id: b34cdc751f6076d0a02ebc6b122abbd8fbe9cde8 --- qpms/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qpms/__init__.py b/qpms/__init__.py index 3b2c737..e7caea7 100644 --- a/qpms/__init__.py +++ b/qpms/__init__.py @@ -16,7 +16,6 @@ except ImportError as ex: __warnings.warn("Does your LD_LIBRARY_PATH include a directory where you installed libqpms? Check and run python again." '\nCurrently, I see LD_LIBRARY_PATH="%s"' % __os.environ['LD_LIBRARY_PATH']) raise ex -from .qpms_p import * from .cyquaternions import CQuat, IRot3 from .cybspec import VSWFNorm, BaseSpec, default_bspec from .cytmatrices import CTMatrix, TMatrixInterpolator, TMatrixGenerator @@ -24,7 +23,12 @@ from .cytranslations import trans_calculator from .cymaterials import MaterialInterpolator, EpsMu, LorentzDrudeModel, lorentz_drude, EpsMuGenerator from .cycommon import dbgmsg_enable, dbgmsg_disable, dbgmsg_active, BesselType, VSWFType from .cywaves import vswf_single -from .lattices2d import * -from .hexpoints import * -from .tmatrices import * + +from .qpms_p import * # maybe don't import automatically in the future (adds around 0.5 s delay) +from .constants import * + +# legacy code which brutally slows down the whole package init: +#from .lattices2d import * +#from .hexpoints import * +#from .tmatrices import *