skypyproject / skypy

SkyPy: A package for modelling the Universe.
BSD 3-Clause "New" or "Revised" License
118 stars 38 forks source link

SkyPy script installation error #98

Closed rrjbca closed 4 years ago

rrjbca commented 4 years ago

Describe the bug

When installing skypy-0.1rc1 using PyPI scripts/skypy is not installed properly; it is simply copied into the bin directory. In contrast, cloning the repo and running python setup.py install gives an executable script configured for the python environment.

To Reproduce

  1. pip install skypy
  2. skypy --help
    skypy: line 1: import: command not found
    from: can't read /var/mail/skypy.pipeline.driver
    skypy: line 3: import: command not found
    skypy: line 5: syntax error near unexpected token `('
    skypy: line 5: `parser = argparse.ArgumentParser(description="SkyPy pipeline driver")'

Expected behavior

  1. python setup.py install
  2. skypy --help
    
    usage: skypy [-h] -c CONFIG [-f {fits,hdf5}]

SkyPy pipeline driver

optional arguments: -h, --help show this help message and exit -c CONFIG, --config CONFIG Config file name -f {fits,hdf5}, --format {fits,hdf5} Table file format



**Desktop (please complete the following information):**
 - OS X 10.14.6
 - skypy-0.1rc1
itrharrison commented 4 years ago

I get a really bizarre looking error when trying to install skypy on a fresh conda environment:

To Reproduce

  1. conda create --name skypy-rc-test
  2. conda activate skypy-rc-test
  3. conda install pip
  4. pip install skypy
  5. skypy --help
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
Usage: import [options ...] [ file ]

Image Settings:
  -adjoin              join images into a single multi-image file
  -border              include window border in the output image
  -channel type        apply option to select image channels
  -colorspace type     alternate image colorspace
  -comment string      annotate image with comment
  -compress type       type of pixel compression when writing the image
  -define format:option
...

Desktop

@ntessore can you reproduce or help with the (maybe) conda aspect to this?

itrharrison commented 4 years ago

The same error happens in both scenarios below:

To Reproduce

  1. pip install skypy (i.e. in my existing conda environment)
  2. skypy --help

and

  1. pip install .
  2. skypy --help