/
setup.py
77 lines (66 loc) · 2.12 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
66
67
68
69
70
71
72
73
74
75
76
from distutils.util import convert_path
from setuptools import setup, find_packages
module = 'nb2xls'
# get version from __meta__
meta_ns = {}
path = convert_path(module+'/__meta__.py')
with open(path) as meta_file:
exec(meta_file.read(), meta_ns)
# read requirements.txt
with open('requirements.txt', 'r') as f:
content = f.read()
li_req = content.split('\n')
install_requires = [e.strip() for e in li_req if len(e)]
name = module
name_url = name.replace('_', '-')
packages = [module]
version = meta_ns['__version__']
description = 'Export Jupyter notebook as an Excel xls file.'
long_description = 'Export Jupyter notebook as an Excel xls file.'
author = 'ideonate'
author_email = 'dan@ideonate.com'
# github template
url = 'https://github.com/{}/{}'.format(author,
name_url)
download_url = 'https://github.com/{}/{}/tarball/{}'.format(author,
name_url,
version)
keywords = ['jupyter',
'nbconvert',
]
license = 'MIT'
classifiers = ['Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
]
include_package_data = True
zip_safe = False
extra_requirements = {
'test': ['pytest', 'testpath', 'openpyxl', 'matplotlib']
}
# ref https://packaging.python.org/tutorials/distributing-packages/
setup(
name=name,
version=version,
packages=packages,
author=author,
author_email=author_email,
description=description,
long_description=long_description,
url=url,
download_url=download_url,
keywords=keywords,
license=license,
classifiers=classifiers,
include_package_data=include_package_data,
install_requires=install_requires,
extras_require=extra_requirements,
zip_safe=zip_safe,
entry_points = {
'nbconvert.exporters': [
'xls = nb2xls:XLSExporter'
],
}
)