Re: [cctbxbb] [git/cctbx] master: libtbx.clean_clutter runs isort in supported locations (612869130)

Hi Markus, could isort be added as a dependency instead? If I understand this commit right, when running libtbx.clean_clutter, if .isort.cfg is present and isort is not installed, pip is invoked to install isort. l'm nervous about pip being imported anywhere in our code, especially to install things when running code unrelated to installation. It's important to keep installation of stuff separate from running of stuff. Otherwise, it's impossible to keep dependencies straight. -Aaron On Thu, Oct 26, 2017 at 2:29 AM, CCTBX Commit via DLS Jenkins < graeme.winter@gmail.com> wrote:

Hi Aaron,
I didn't want to add it as a dependency in bootstrap since it is definitely only a developer tool, and I wouldn't want to install it with a distribution.
I guess we could just run it if it is installed and add a command to install this kinds of development stuff? What do you think?
-Markus
________________________________
From: cctbxbb-bounces@phenix-online.org [cctbxbb-bounces@phenix-online.org] on behalf of Aaron Brewster [asbrewster@lbl.gov]
Sent: Thursday, October 26, 2017 17:54
To: cctbx mailing list
Cc: CCTBX-COMMIT@jiscmail.ac.uk
Subject: Re: [cctbxbb] [git/cctbx] master: libtbx.clean_clutter runs isort in supported locations (612869130)
Hi Markus, could isort be added as a dependency instead? If I understand this commit right, when running libtbx.clean_clutter, if .isort.cfg is present and isort is not installed, pip is invoked to install isort. l'm nervous about pip being imported anywhere in our code, especially to install things when running code unrelated to installation.
It's important to keep installation of stuff separate from running of stuff. Otherwise, it's impossible to keep dependencies straight.
-Aaron
On Thu, Oct 26, 2017 at 2:29 AM, CCTBX Commit via DLS Jenkins

Hi Markus, I understand. I think a try import followed by a print
statement giving directions how to install it if not there could be
sufficient? Something like this:
try:
from isort.main import main
except ImportError:
print "isort not available. Run 'libtbx.python -m pip install isort' and
try again."
exit()
On Thu, Oct 26, 2017 at 10:19 AM,
participants (2)
-
Aaron Brewster
-
markus.gerstel@diamond.ac.uk