18
18
# from __future__ import print_function
19
19
import os
20
20
import sys
21
- from os import path
22
21
from setuptools import setup
23
22
24
23
# io.open is needed for projects that support Python 2.7
@@ -37,13 +36,18 @@ def read(fname):
37
36
return fhandle .read ()
38
37
39
38
40
- req_path = os .path .join (os .path .dirname ('__file__' ), 'requirements.txt' )
39
+ setup_dir_name = os .path .abspath (os .path .dirname (__file__ ))
40
+ req_path = os .path .join (setup_dir_name , 'requirements.txt' )
41
41
required = [req .strip () for req in read (req_path ).splitlines () if req .strip ()]
42
42
43
- test_req_path = os .path .join (os . path . dirname ( '__file__' ) , 'requirements-dev.txt' )
43
+ test_req_path = os .path .join (setup_dir_name , 'requirements-dev.txt' )
44
44
test_required = [req .strip () for req in read (test_req_path ).splitlines () if req .strip ()]
45
45
extras_require = {"test" : test_required , "dev" : test_required }
46
46
47
+ target_dir = os .path .join ("etc" , "jupyter" , "jupyter_notebook_config.d" )
48
+ config_files = [os .path .join ("jupyter_config" , "jupyter_notebook_config.d" , "bookstore.json" )]
49
+ data_files = [(target_dir , config_files )]
50
+
47
51
pip_too_old = False
48
52
pip_message = ''
49
53
@@ -72,8 +76,7 @@ def read(fname):
72
76
73
77
74
78
# Get the long description from the README file
75
- here = path .abspath (path .dirname (__file__ ))
76
- with open (path .join (here , 'README.md' ), encoding = 'utf-8' ) as f :
79
+ with open (os .path .join (setup_dir_name , 'README.md' ), encoding = 'utf-8' ) as f :
77
80
long_description = f .read ()
78
81
79
82
setup (
@@ -93,6 +96,7 @@ def read(fname):
93
96
install_requires = required ,
94
97
extras_require = extras_require ,
95
98
entry_points = {},
99
+ data_files = data_files ,
96
100
project_urls = {
97
101
'Documentation' : 'https://github.com/nteract/bookstore/#todo' ,
98
102
'Funding' : 'https://nteract.io' ,
0 commit comments