Skip to content

Commit 27d2ea7

Browse files
committed
Adding a meta.py file for setup.py
1 parent c33709e commit 27d2ea7

File tree

2 files changed

+48
-13
lines changed

2 files changed

+48
-13
lines changed

bladex/meta.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
__all__ = [
2+
'__project__',
3+
'__title__',
4+
'__author__',
5+
'__copyright__',
6+
'__license__',
7+
'__version__',
8+
'__mail__',
9+
'__maintainer__',
10+
'__status__']
11+
12+
__project__ = 'BladeX'
13+
__title__ = "bladex"
14+
__author__ = "Marco Tezzele, Mahmoud Gadalla"
15+
__copyright__ = "Copyright 2019, BladeX contributors"
16+
__license__ = "MIT"
17+
__version__ = "0.1.0"
18+
19+
__maintainer__ = __author__
20+
__status__ = "Stable"

setup.py

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
from setuptools import setup
2+
import os
3+
import sys
24

5+
meta = {}
6+
with open("bladex/meta.py") as fp:
7+
exec(fp.read(), meta)
8+
9+
# Package meta-data.
10+
NAME = meta['__title__']
11+
DESCRIPTION = 'BladeX.'
12+
URL = 'https://github.com/mathLab/BladeX'
13+
MAIL = meta['__mail__']
14+
AUTHOR = meta['__author__']
15+
VERSION = meta['__version__']
16+
KEYWORDS='blade-generation propeller iges procal'
17+
18+
REQUIRED = [
19+
'numpy', 'scipy', 'matplotlib', 'Sphinx', 'sphinx_rtd_theme',
20+
]
321

422
def readme():
523
"""
@@ -8,11 +26,10 @@ def readme():
826
with open('README.md') as f:
927
return f.read()
1028

11-
1229
setup(
13-
name='bladex',
14-
version='0.1.0',
15-
description='BladeX.',
30+
name=NAME,
31+
version=VERSION,
32+
description=DESCRIPTION,
1633
long_description=readme(),
1734
classifiers=[
1835
'Development Status :: 5 - Production/Stable',
@@ -21,16 +38,14 @@ def readme():
2138
'Intended Audience :: Science/Research',
2239
'Topic :: Scientific/Engineering :: Mathematics'
2340
],
24-
keywords='blade-generation propeller iges procal',
25-
url='https://github.com/mathLab/BladeX',
26-
author='Marco Tezzele, Mahmoud Gadalla',
27-
41+
keywords=KEYWORDS,
42+
url=URL,
43+
author=AUTHOR,
44+
author_email=MAIL,
2845
license='MIT',
29-
packages=['bladex'],
30-
install_requires=[
31-
'numpy', 'scipy', 'matplotlib', 'Sphinx', 'sphinx_rtd_theme'
32-
],
46+
packages=[NAME],
47+
install_requires=REQUIRED,
3348
test_suite='nose.collector',
3449
tests_require=['nose'],
3550
include_package_data=True,
36-
zip_safe=False)
51+
zip_safe=False)

0 commit comments

Comments
 (0)