From 7a944fd0a2f36a34156333898e9135c19821b2bf Mon Sep 17 00:00:00 2001 From: sigvaldm Date: Tue, 15 Dec 2020 10:37:50 +0100 Subject: [PATCH 1/2] Bugfix #124: imports GPy before installing it --- ezyrb/__init__.py | 11 +---------- ezyrb/meta.py | 9 +++++++++ setup.py | 21 ++++++++++++--------- 3 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 ezyrb/meta.py diff --git a/ezyrb/__init__.py b/ezyrb/__init__.py index 1ca3d5cc..2efc7611 100644 --- a/ezyrb/__init__.py +++ b/ezyrb/__init__.py @@ -4,16 +4,7 @@ 'approximation', 'rbf', 'linear', 'gpr' ] -__project__ = 'EZyRB' -__title__ = "ezyrb" -__author__ = "Nicola Demo, Marco Tezzele" -__copyright__ = "Copyright 2016-2019, EZyRB contributors" -__license__ = "MIT" -__version__ = "1.0" -__mail__ = 'demo.nicola@gmail.com, marcotez@gmail.com' -__maintainer__ = __author__ -__status__ = "Stable" - +from .meta import * from .database import Database from .reduction import Reduction from .pod import POD diff --git a/ezyrb/meta.py b/ezyrb/meta.py new file mode 100644 index 00000000..6f70e589 --- /dev/null +++ b/ezyrb/meta.py @@ -0,0 +1,9 @@ +__project__ = 'EZyRB' +__title__ = "ezyrb" +__author__ = "Nicola Demo, Marco Tezzele" +__copyright__ = "Copyright 2016-2019, EZyRB contributors" +__license__ = "MIT" +__version__ = "1.0" +__mail__ = 'demo.nicola@gmail.com, marcotez@gmail.com' +__maintainer__ = __author__ +__status__ = "Stable" diff --git a/setup.py b/setup.py index ba676304..6e1d3c2b 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,19 @@ from setuptools import setup, Command import os import sys -import ezyrb from shutil import rmtree +meta = {} +with open("ezyrb/meta.py") as fp: + exec(fp.read(), meta) + # Package meta-data. -NAME = ezyrb.__title__ +NAME = meta['__title__'] DESCRIPTION = 'Easy Reduced Basis' URL = 'https://github.com/mathLab/EZyRB' -MAIL = ezyrb.__mail__ -AUTHOR = ezyrb.__author__ -VERSION = ezyrb.__version__ +MAIL = meta['__mail__'] +AUTHOR = meta['__author__'] +VERSION = meta['__version__'] KEYWORDS='pod interpolation reduced-basis model-order-reduction' REQUIRED = [ @@ -75,10 +78,10 @@ def run(self): author=AUTHOR, author_email=MAIL, classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'License :: OSI Approved :: MIT License', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + 'Development Status :: 5 - Production/Stable', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Mathematics' ], From 8b5a08b2e8751d6cdf9aaffeba8c79c79bea61df Mon Sep 17 00:00:00 2001 From: sigvaldm Date: Tue, 15 Dec 2020 11:19:56 +0100 Subject: [PATCH 2/2] Have meta.py export dunder variables --- ezyrb/meta.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ezyrb/meta.py b/ezyrb/meta.py index 6f70e589..fd3e6f09 100644 --- a/ezyrb/meta.py +++ b/ezyrb/meta.py @@ -1,3 +1,14 @@ +__all__ = [ + '__project__', + '__title__', + '__author__', + '__copyright__', + '__license__', + '__version__', + '__mail__', + '__maintainer__', + '__status__'] + __project__ = 'EZyRB' __title__ = "ezyrb" __author__ = "Nicola Demo, Marco Tezzele"