From c46bf045cfb243a43fd79efbf3cc44566cc464f1 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Thu, 31 Jan 2019 07:30:57 +0100 Subject: [PATCH] setup: Can't import from deepbgc when first installing Signed-off-by: Kai Blin --- setup.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a1d65ac..1e9bebb 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ +import os from setuptools import setup, find_packages -from deepbgc import VERSION install_requires = [ 'argparse', @@ -12,9 +12,17 @@ 'matplotlib' ] +def get_version(): + for line in open(os.path.join('deepbgc', '__init__.py'), 'r'): + if line.startswith('VERSION'): + break + + _, _, version_str = line.strip().split() + return version_str[1:-1] + setup( name='deepbgc', - version=VERSION, + version=get_version(), description='DeepBGC - Biosynthetic Gene Cluster detection and classification', long_description=open('README.md', 'r').read(), author='David Příhoda, Geoffrey Hannigan',