Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

remove (name, github ID) __credits__ and __version__ from __init__.py files #105

Closed
jairideout opened this Issue · 3 comments

3 participants

@jairideout
Owner

There's a few __init__.py files with (name, github ID) tuples for __credits__ and unnecessary __version__ vars. After talking with @gregcaporaso, it sounds like these were supposed to be removed sometime in the past, but a few were forgotten.

@gregcaporaso

fixed in #104?

@Jorge-C
Collaborator

Currently, __version__ is defined in setup.py and in the main __init__, but there are a bunch of different ways to remove the redundancy. I'm aware of at least these three:

  • Define it only in __init__ and import that in setup.py. Issues when init isn't empty (ie, if another package is imported from init, installation will fail if that dependency isn't already installed).
  • Define it just in setup.py and use pkg_resources.get_distribution('bipy').version to put it in bipy.__version__ at runtime. It has to be in a try/except block to deal with running the package from source without installing (not sure about the details).
  • Define it somewhere (e.g., bipy/_version.py), parse it in setup and import it in __init__.py. Actually, there's a 4th way because scipy and numpy do kind of the opposite (they define the version in setup, and setup generates a file ({numpy|scipy}/version.py) that is then imported in init, and assigned to __version__ (I think scipy/numpy can't be imported from their source directory).

@wasade does verman solve some of these issues? How would you all like to handle this? Is it OK to keep the redundancy?

@jairideout
Owner

@gregcaporaso no this wasn't fixed in #104

@Jorge-C I'm okay with having two version strings (one in the top-level __init__, one in setup.py), though it would be nice to remove the redundancy at some point. Likely not that high priority right now though.

@Jorge-C Jorge-C was assigned by jairideout
@jairideout jairideout closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.