#!/usr/bin/env python
""" Extracts the version of the khmer project. """

import sys
import pkg_resources

try:
    print pkg_resources.get_distribution(  # pylint: disable=E1103
        'khmer').version
except pkg_resources.DistributionNotFound:
    print 'To build the khmer library, the distribution information'
    print 'has to be available.  Either install the package into your'
    print 'development environment or run "setup.py develop" to setup the'
    print 'metadata.  A virtualenv is recommended!'
    sys.exit(1)
del pkg_resources

@@ -1,548 +1,306 @@
-#!/usr/bin/env python%0A%22%22%22 Extracts the version of the khmer project. %22%22%22%0A%0Aimport sys%0Aimport pkg_resources%0A%0Atry:%0A    print pkg_resources.get_distribution(  # pylint: disable=E1103%0A        '
+import sys%0Asys.path.insert(0, '../')%0Aimport versioneer%0Aversioneer.VCS = 'git'%0Aversioneer.versionfile_source = '../
 khmer
-').
+/_
 version
-%0Aexcept pkg_resources.DistributionNotFound:%0A    print 'To build the khmer library, the distribution information'%0A    print 'has to be available.  Either install the package into your'%0A    print 'development environment or run %22setup.py develop%22 to setup the'%0A    print 'metadata.  A virtualenv is recommended!'%0A    sys.exit(1)%0Adel pkg_resources
+.py'%0Aversioneer.versionfile_build = '../khmer/_version.py'%0Aversioneer.tag_prefix = 'v'  # tags are like v1.2.0%0Aversioneer.parentdir_prefix = '..'%0A%0Aprint versioneer.get_version()
 %0A

Use versioneer for ./lib version