klebgenomics / Kaptive

GNU General Public License v3.0
44 stars 21 forks source link

Make pip installable #4

Closed tseemann closed 7 months ago

tseemann commented 6 years ago

Any chance you could use @andersgs template from Kleborate:development to also make this installable by pip2 command?

Would help package it in Bioconda and Brew.

rrwick commented 6 years ago

I just made a setup.py file and a new release of Kaptive (v0.5.1). Pip installing should now work:

pip3 install --user git+https://github.com/katholt/Kaptive
kaptive.py -h

I used scripts=['kaptive.py'] in the setup.py file, which means that it simply copies the kaptive.py file to your installation directory. It doesn't install the reference databases anywhere, so you'll need to download those separately from here.

The alternative is to rearrange the Kaptive repo into a proper Python module, use entry_points in the setup.py file and install the databases as well. This would:

  1. Make running Kaptive from a pip-install easier, as the databases could be included.
  2. Make the repo structure more complex, and the simple clone-it-and-run-it approach would be less easy.

I'm inclined to leave Kaptive as it is (simple Python script), but I'm open to suggestion here. If you think the advantage of point 1 outweighs the disadvantage of point 2, I'll consider turning Kaptive into a proper module.

Ryan

tseemann commented 6 years ago

@rrwick that works, thanks. I think what I really mean is add it to pypi The problem with git versions is that pip3 list --outdated never shows it and pip3 install --upgrade kaptive doesn't work.

tomdstanton commented 7 months ago

Done in #30 https://pypi.org/project/kaptive