forked from dunovank/jupyter-themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (63 loc) · 2.27 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
import os
from glob import glob
from setuptools import setup
import numpy as np
major = 0
minor = 14
patch = 1
version = '.'.join([str(v) for v in [major, minor, patch]])
url = 'https://github.com/dunovank/jupyter-themes'
download_url = '/'.join([url, 'tarball', 'v'+version])
# get readme content after screenshots for pypi site
README = os.path.join(os.path.dirname(__file__), 'README.md')
with open(README) as read_me:
longdescr = ''
startReading = False
for line in read_me:
if "Travis" in line.strip():
startReading = True
if "Monospace Fonts" in line.strip():
break
if startReading:
longdescr += line
pkgname = 'jupyterthemes'
datafiles = {pkgname: ['sandbox/*.js', 'layout/*.less', 'layout/*.css', 'styles/*.less', 'styles/compiled/*.css']}
# recursively point to all included font directories
fontfams = ['monospace', 'sans-serif', 'serif']
fsubdirs = [os.path.join(pkgname, 'fonts', subdir) for subdir in fontfams]
fontsdata = np.hstack([['/'.join(f.split('/')[1:]) for f in glob(os.path.join(fsub, '*', '*'))] for fsub in fsubdirs]).tolist()
datafiles[pkgname].extend(fontsdata)
setup(
name='jupyterthemes',
version=version,
packages=['jupyterthemes'],
include_package_data=True,
package_data = datafiles,
description='Select and install a Jupyter notebook theme',
long_description=longdescr,
license='MIT',
url=url,
download_url=download_url,
author='dunovank',
author_email='[email protected]',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
install_requires=['jupyter', 'jupyter_core', 'numpy', 'lesscpy>=0.12.0'],
keywords=['jupyter', 'ipython', 'notebook', 'themes', 'css'],
entry_points={
'console_scripts': [
'jupyter-theme = jupyterthemes:main',
'jt = jupyterthemes:main',
],
}
)