From 44b67d49e1e4fe9364e7cbce9a93086037703511 Mon Sep 17 00:00:00 2001 From: Guillaume Lemaitre Date: Fri, 8 Dec 2017 14:10:48 +0100 Subject: [PATCH] MAINT avoid importing spc before install --- setup.py | 14 +++++++++----- spc/__init__.py | 5 ----- spc/_version.py | 4 ++++ 3 files changed, 13 insertions(+), 10 deletions(-) mode change 100644 => 100755 setup.py create mode 100644 spc/_version.py diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 3dd41db..a87e3f4 --- a/setup.py +++ b/setup.py @@ -1,14 +1,18 @@ #!/usr/bin/env python +import os + from distutils.core import setup -import spc +ver_file = os.path.join('spc', '_version.py') +with open(ver_file) as f: + exec(f.read()) setup(name='spc', - version=spc.__version__, - description=spc.__doc__, - author=spc.__author__, - author_email=spc.__author_email__, + version=__version__, + description=__doc__, + author=__author__, + author_email=__author_email__, url='https://github.com/rohanisaac/spc', packages=['spc'], install_requires=['numpy'], diff --git a/spc/__init__.py b/spc/__init__.py index 1849427..5e3b16d 100644 --- a/spc/__init__.py +++ b/spc/__init__.py @@ -3,8 +3,3 @@ """ from .spc import File - -__author__ = "Rohan Isaac" -__author_email__ = "rohan_isaac@yahoo.com" -__version__ = "0.4.0" -__license__ = "GPLv3" diff --git a/spc/_version.py b/spc/_version.py new file mode 100644 index 0000000..946ef5c --- /dev/null +++ b/spc/_version.py @@ -0,0 +1,4 @@ +__author__ = "Rohan Isaac" +__author_email__ = "rohan_isaac@yahoo.com" +__version__ = "0.4.0" +__license__ = "GPLv3"