From a4351f56067cb0dff1127310624609000f4e6bd5 Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Wed, 5 Oct 2022 13:40:22 +0200 Subject: [PATCH] Add a "light" installation of msspec This is similar to a "devel" installation, but only the virtualenv is created and the msspec package is installed inside (not in edit mode). Bindings to the Fortran code are not built. It is intended to use msspec functions to create clusters but without having to install wx. --- Makefile | 5 +++++ src/msspec/utils.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a3d284a..1a49fa5 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,11 @@ devel: venv pybinding wx @$(INSIDE_VENV) pip install -e src/ +light: VENV_PATH = ./_venv +light: venv + @$(INSIDE_VENV) pip install src/ + + _build_wx/wxPython.target: @$(INSIDE_VENV) echo "Building wxPython for your `python --version 2>&1` under Linux $(DISTRO_RELEASE)..." # Create a folder to build wx into diff --git a/src/msspec/utils.py b/src/msspec/utils.py index 1dee866..38c289c 100644 --- a/src/msspec/utils.py +++ b/src/msspec/utils.py @@ -38,7 +38,11 @@ import ase.atom from ase import Atom from ase import Atoms -from msspec.iodata import Data +try: + from msspec.iodata import Data +except ImportError as err: + print(err) + from msspec.misc import LOGGER