From e4d305e0f1aed7137c4395072653af95c8c7b36f Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Tue, 8 Dec 2020 20:25:22 -0500 Subject: [PATCH 1/2] Provide a more helpful error on pip install. --- setup.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0fb392c..5c7030e 100644 --- a/setup.py +++ b/setup.py @@ -7,10 +7,24 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() +# The install_requires does not support installation from git. +try: + import databroker_fitshandler +except ImportError: + print( + "\n" + "\n" + "You must manually install databroker_fitshandler:\n" + "pip install git+git://github.com/als-computing/datahandler_fits@master#egg=databroker-fitshandler" + "\n" + "\n" + ) + import sys + sys.exit(1) with open(path.join(here, 'requirements.txt')) as requirements_file: # Parse requirements.txt, ignoring any commented-out lines. requirements = [line for line in requirements_file.read().splitlines() - if not line.startswith('#')] + if not (line.startswith('#') or line.startswith("git+"))] setup( name='splash-server', From 0d75db43986ac6afcd94108a4b9dd5d38471b16f Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Tue, 8 Dec 2020 20:50:52 -0500 Subject: [PATCH 2/2] Fix import name. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5c7030e..fb90efd 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ # The install_requires does not support installation from git. try: - import databroker_fitshandler + import file_handlers.fits_handler except ImportError: print( "\n"