Teichlab / tracer

TraCeR - reconstruction of T cell receptor sequences from single-cell RNAseq data
Other
123 stars 48 forks source link

Installing tracer does not create a tracer python package #32

Closed carandraug closed 7 years ago

carandraug commented 7 years ago

The setup.py script creates a tracerlib package only but not a tracer package. I have tried to install both from the last released tarball as well as from development sources.

$ git clone https://github.com/Teichlab/tracer.git
$ cd tracer
$ python setup.py install --user
$ tracer test
Traceback (most recent call last):
  File "/home/carandraug/.local/bin/tracer", line 11, in <module>
    load_entry_point('tracer==0.1', 'console_scripts', 'tracer')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ImportError: No module named tracer.tracerlib.__main__
$ which tracer
/home/carandraug/.local/bin//tracer
$ ls ~/.local/lib/python2.7/site-packages/ | grep tracer
tracer-0.1.egg-info
tracerlib
$ python -c 'import tracer'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named tracer
$ python -c 'import tracerlib'
carandraug commented 7 years ago

Please consider pulling 9e2927fdd5e07f3 and 7859eb2d4c4d from https://github.com/carandraug/tracer.git which fixes the issue in the implementing_build branch.

carandraug commented 7 years ago

ping ?

boombard commented 7 years ago

Thanks @carandraug. This fix has been sitting on my fork for a while, I've just merged it into master with a number of other changes in #33.

boombard commented 7 years ago

Closing issue

carandraug commented 7 years ago

Did you consider removal of the tracer script at the root of the package? The entry point for the program should be created by setuptools so the file is redundant. Otherwise one of them, the tracer script or the entry point defined in setup.py, runs the risk of getting out of date with the rest of the project which is what happened now.

boombard commented 7 years ago

Yes, we did consider it but left it in just for backwards compatibility. We don't really envision drastic structural change in the near future that would make either out of date, but might still remove it in a future release.