-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·65 lines (54 loc) · 1.85 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from setuptools import setup
import codecs
import os
import glob
name = 'transit_simulator'
description = 'Graphic interface for transit visualisation'
url = 'https://github.com/atsiaras/transit_simulator'
install_requires = ['matplotlib', 'numpy', 'pylightcurve']
os.chdir(os.path.abspath(os.path.dirname(__file__)))
subdirs_to_include = []
for x in os.walk(name):
if os.path.isdir(x[0]):
if x[0] != name:
subdirs_to_include.append(x[0])
files_to_include = []
for x in glob.glob(os.path.join(name, '*')):
if x[-2:] != 'py':
files_to_include.append(os.path.join(name, os.path.split(x)[1]))
files_to_include.append('README.md')
files_to_include.append('LICENSE')
w = open('MANIFEST.in', 'w')
for i in subdirs_to_include:
w.write('include ' + os.path.join(i, '*') + ' \n')
for i in files_to_include:
w.write('include ' + i + ' \n')
w.close()
with codecs.open('README.md', encoding='utf-8') as f:
long_description = f.read()
version = ' '
for i in open(os.path.join(name, '__init__.py')):
if len(i.split('__version__')) > 1:
version = i.split()[-1][1:-1]
setup(
name=name,
version=version,
description=description,
long_description=long_description,
url=url,
author='Angelos Tsiaras',
author_email='[email protected]',
license='MIT',
classifiers=['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Astronomy',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: MacOS :: MacOS X'
'Programming Language :: Python :: 3.6',
],
packages=[name],
install_requires=install_requires,
include_package_data=True,
zip_safe=False,
)