Debian Codegraph @

bqplot/setup.py

raw ◀ ▶
1 Debian patch touch this file
1 # Copyright 2015 Bloomberg Finance L.P.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 from __future__ import print_function
16
17 from setuptools import setup
18
19 from jupyter_packaging import (
20 create_cmdclass,
21 install_npm,
22 ensure_targets,
23 combine_commands,
24 get_version,
25 skip_if_exists,
26 )
27
28 import os
29 from os.path import join as pjoin
30
31 here = os.path.dirname(os.path.abspath(__file__))
32 version = get_version(pjoin('bqplot', '_version.py'))
33
34 js_dir = pjoin(here, 'js')
35
36 # Representative files that should exist after a successful build
37 jstargets = [
38 pjoin('share', 'jupyter', 'nbextensions', 'bqplot', 'index.js'),
39 pjoin('share', 'jupyter', 'labextensions', 'bqplot', 'package.json'),
40 ]
41
42 data_files_spec = [
43 ('share/jupyter/nbextensions/bqplot', 'share/jupyter/nbextensions/bqplot', '*.js'),
44 ('share/jupyter/labextensions/bqplot/', 'share/jupyter/labextensions/bqplot/', '**'),
45 ('share/jupyter/labextensions/bqplot/', here, 'install.json'),
46 ('etc/jupyter/nbconfig/notebook.d', 'etc/jupyter/nbconfig/notebook.d', 'bqplot.json'),
47 ]
48
49 # Adding "map_data" as package_data manually, this should not be needed because it's already
50 # specified in MANIFEST and include_package_data=True. This might be a bug in jupyter-packaging?
51 cmdclass = create_cmdclass('jsdeps', data_files_spec=data_files_spec, package_data_spec={"bqplot": ["map_data/*.json"]})
52
53 setup(version=version, cmdclass=cmdclass)