-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (60 loc) · 2.45 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
77
78
79
from setuptools import setup, find_packages
from os import path, walk
########################################################################
# BASIC PACKAGE METADATA
########################################################################
sargs = dict(
name = 'sjk',
version = '0.6.1',
description = 'SJK: Some Jupyter Kernels.',
author = 'Roi Docampo',
url = 'https://github.com/roidocampo/sjk',
license = 'MIT',
install_requires = [ 'ipykernel' ],
python_requires = ">=3.5",
)
########################################################################
# LONG DESCRIPTION
########################################################################
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
sargs['long_description'] = f.read()
sargs['long_description_content_type'] = 'text/x-rst'
########################################################################
# CLASSIFIERS
########################################################################
classifiers = """\
Development Status :: 4 - Beta
Framework :: Jupyter
Intended Audience :: Developers
Intended Audience :: Science/Research
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Topic :: Scientific/Engineering
Topic :: Software Development
"""
sargs['classifiers'] = [ c for c in classifiers.split("\n") if c ]
########################################################################
# PYTHON MODULES
########################################################################
sargs['packages'] = find_packages()
########################################################################
# DATA FILES
########################################################################
def data_files(src_root, dest_root):
data = []
src_len = len(src_root)
for src_dir, subdirs, files in walk(src_root):
if files:
rel_dir = src_dir[src_len:]
dest_dir = dest_root + rel_dir
files = [ path.join(src_dir, f) for f in files ]
data.append((dest_dir, files))
return data
sargs['data_files'] = data_files('kernelspecs', 'share/jupyter/kernels')
########################################################################
# RUN SETUP
########################################################################
setup(**sargs)