Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Import Timeline in __init__.py

  • Loading branch information...
commit 6b92108153c2e15c84d66eecc26966a2882ce632 1 parent a271371
@bretthoerner authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 timak/__init__.py
View
5 timak/__init__.py
@@ -1 +1,6 @@
+from __future__ import absolute_import
+
+from .timelines import Timeline
+
+
__version__ = (0, 0, 0)

2 comments on commit 6b92108

@dcramer

There's a potentially problem here:

version is kept in __init__.py

What this means is that you cant safely import <foo> in setup.py to get the version dynamically without having a possible import error due to paths.

So you have several solutions:

  1. I generally (now) stick this in setup.py as simply version=0.0.0, and within __init__.py have VERSION = pkg_resources.get_distribution('timak').version

  2. You could also do what I've seen others do, and have a make release which simply updates the version in both places.

  3. There's also the pkg_resources option, though I'm not familiar with it.

@bretthoerner

Good call, I like #1 because it's easy: e997d44

Please sign in to comment.
Something went wrong with that request. Please try again.