freeman-lab / showit

simple and sensible display of images in python
MIT License
14 stars 3 forks source link

Use pkg_resources to locate the VERSION file. #5

Closed ttung closed 6 years ago

ttung commented 6 years ago

This is apparently the canonical API to locate a file included in a package. The only downside is that it can only locate a file inside a package, so I moved VERSION inside the package.

Tested with:

  1. importing showit from a relative path.
  2. pip install -e, importing showit.
  3. python setup.py sdist, importing showit.

Connects to https://github.com/spacetx/starfish/issues/385

ttung commented 6 years ago

Whoops, forgot to add the moved VERSION file.

freeman-lab commented 6 years ago

lgtm!