Permalink
Browse files

Adding Bio.__version__ and using this in setup.py automatically. The …

…file Bio/__init__.py will now need to be updated manually for each release, instead of setup.py
  • Loading branch information...
peterjc committed Mar 5, 2009
1 parent 618b986 commit 839c345bf9a01006dfb46625fb2a7192fb5a32c8
Showing with 11 additions and 1 deletion.
  1. +2 −0 Bio/__init__.py
  2. +9 −1 setup.py
View
@@ -10,5 +10,7 @@
http://biopython.org
"""
+__version__ = "1.49+" #The plus indicates this is unreleased CVS code
+
class MissingExternalDependencyError(Exception):
pass
View
@@ -398,9 +398,17 @@ def run (self):
outfile = dst
self.outfiles.append(outfile)
+#We now define the Biopython version number in Bio/__init__.py
+#Here we can't use "import Bio" then "Bio.__version__" as that would
+#tell us the version of Biopython already installed (if any).
+__version__ = "Undefined"
+for line in open('Bio/__init__.py'):
+ if (line.startswith('__version__')):
+ exec(line.strip())
+
setup(
name='biopython',
- version='1.49',
+ version=__version__,
author='The Biopython Consortium',
author_email='biopython@biopython.org',
url='http://www.biopython.org/',

0 comments on commit 839c345

Please sign in to comment.