Skip to content

Commit 56fa518

Browse files
committed
Merge branch 'master' into auto-gen-wrappers
2 parents 1a2aaa4 + b0f0891 commit 56fa518

File tree

9 files changed

+61
-34
lines changed

9 files changed

+61
-34
lines changed

LICENSE

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,41 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
2525
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2727
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
-------------------------------------------------------------------------------
30+
31+
The setupbase.py file is from the jupyter-packaging project:
32+
https://github.com/jupyter/jupyter-packaging/blob/0bb5d34eee0da3d2b53760ab1371dc0ee9af9b8d/jupyter_packaging/setupbase.py
33+
34+
The license is (from https://github.com/jupyter/jupyter-packaging/blob/0bb5d34eee0da3d2b53760ab1371dc0ee9af9b8d/LICENSE):
35+
36+
BSD 3-Clause License
37+
38+
Copyright (c) 2017, Project Jupyter
39+
All rights reserved.
40+
41+
Redistribution and use in source and binary forms, with or without
42+
modification, are permitted provided that the following conditions are met:
43+
44+
* Redistributions of source code must retain the above copyright notice, this
45+
list of conditions and the following disclaimer.
46+
47+
* Redistributions in binary form must reproduce the above copyright notice,
48+
this list of conditions and the following disclaimer in the documentation
49+
and/or other materials provided with the distribution.
50+
51+
* Neither the name of the copyright holder nor the names of its
52+
contributors may be used to endorse or promote products derived from
53+
this software without specific prior written permission.
54+
55+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
56+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
58+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
59+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
60+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
61+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
62+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
63+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
64+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65+

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
recursive-include pythreejs/static *.*
2+
3+
include setupbase.py

js/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyter-threejs",
3-
"version": "0.4.0-alpha.0",
3+
"version": "0.4.0",
44
"description": "jupyter - threejs bridge",
55
"author": "Jupyter-Threejs development team",
66
"license": "BSD-3-Clause",
@@ -10,20 +10,18 @@
1010
"url": "https://github.com/jovyan/pythreejs.git"
1111
},
1212
"scripts": {
13-
"clean": "node ./scripts/clean-generated-files.js",
13+
"clean": "rimraf dist && rimraf ../pythreejs/static && node ./scripts/clean-generated-files.js",
1414
"autogen-enums": "node ./scripts/generate-enums.js",
1515
"autogen": "node ./scripts/generate-wrappers.js",
16-
"prepublish": "npm run autogen",
1716
"build": "webpack && node ./scripts/copy-three.js",
18-
"test": "echo \"Error: no test specified\" && exit 1"
17+
"prepublish": "npm run autogen && npm run build"
1918
},
2019
"devDependencies": {
2120
"fs-extra": "^4.0.1",
2221
"glob": "^7.0.6",
2322
"handlebars": "^4.0.5",
24-
"json-loader": "^0.5.4",
2523
"rimraf": "^2.4.1",
26-
"webpack": "^3.5.5"
24+
"webpack": "^3.6.0"
2725
},
2826
"dependencies": {
2927
"@jupyter-widgets/base": "^1.0.0",

js/src/_base/Three.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ var ThreeModel = widgets.WidgetModel.extend({
1919
defaults: function() {
2020
return _.extend(widgets.WidgetModel.prototype.defaults.call(this), {
2121
_model_name: this.constructor.model_name,
22-
_model_module: 'jupyter-threejs',
22+
_model_module: this.constructor.model_module,
23+
_model_version: this.constructor.model_module_version
2324
});
2425
},
2526

js/webpack.config.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
const path = require('path');
22

3-
var loaders = [
4-
{ test: /\.json$/, loader: "json-loader" }
5-
];
6-
73
var externals = ['@jupyter-widgets/base', 'jupyter-datawidgets', 'three'];
84

95
module.exports = [
@@ -12,7 +8,7 @@ module.exports = [
128
entry: './src/extension.js',
139
output: {
1410
filename: 'extension.js',
15-
path: path.resolve('../pythreejs/static'),
11+
path: path.resolve(__dirname, '..', 'pythreejs', 'static'),
1612
libraryTarget: 'amd'
1713
},
1814
resolve: {
@@ -24,13 +20,10 @@ module.exports = [
2420
entry: './src/index.js',
2521
output: {
2622
filename: 'index.js',
27-
path: path.resolve('../pythreejs/static'),
23+
path: path.resolve(__dirname, '..', 'pythreejs', 'static'),
2824
libraryTarget: 'amd'
2925
},
3026
devtool: 'source-map',
31-
module: {
32-
rules: loaders
33-
},
3427
externals: externals,
3528
resolve: {
3629
extensions: [ ".autogen.js", ".js" ]
@@ -42,13 +35,10 @@ module.exports = [
4235
entry: './src/embed.js',
4336
output: {
4437
filename: 'index.js',
45-
path: path.resolve('./dist/'),
38+
path: path.resolve(__dirname, 'dist'),
4639
libraryTarget: 'amd'
4740
},
4841
devtool: 'source-map',
49-
module: {
50-
rules: loaders
51-
},
5242
externals: externals,
5343
resolve: {
5444
extensions: [ ".autogen.js", ".js" ]
@@ -60,12 +50,9 @@ module.exports = [
6050
entry: './src/index.js',
6151
output: {
6252
filename: 'index.standalone.js',
63-
path: path.resolve('./dist/'),
53+
path: path.resolve(__dirname, 'dist'),
6454
},
6555
devtool: 'source-map',
66-
module: {
67-
rules: loaders
68-
},
6956
resolve: {
7057
extensions: [ ".autogen.js", ".js" ]
7158
},

jslab/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jupyterlab-threejs",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"description": "",
55
"main": "lib/index.js",
66
"scripts": {
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@jupyter-widgets/jupyterlab-manager": "^0.27.0",
1313
"jupyterlab-datawidgets": "^2.0.1",
14-
"jupyter-threejs": "^0.4.0-alpha.0"
14+
"jupyter-threejs": "^0.4.0"
1515
},
1616
"jupyterlab": {
1717
"extension": true

pythreejs/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version_info = (0, 4, 0, 'alpha', 0)
1+
version_info = (0, 4, 0, 'final', 0)
22

33
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
44

55
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
66
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
77

8-
EXTENSION_VERSION = '0.4.0-alpha.0'
8+
EXTENSION_VERSION = '0.4.0'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
]),
5050
],
5151
'install_requires': [
52-
'ipywidgets>=7.0.0',
52+
'ipywidgets>=7,<8',
5353
'ipydatawidgets>=1.1.1'
5454
],
5555
'packages': find_packages(),

setupbase.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,12 @@ def run(self):
348348
pass
349349

350350
result = cls.run(self)
351-
data_files = []
352-
for dname in data_dirs:
353-
data_files.extend(get_data_files(dname))
354-
# update data-files in case this created new files
355-
self.distribution.data_files = data_files
351+
if data_dirs:
352+
data_files = self.distribution.data_files if self.distribution.data_files else []
353+
for dname in data_dirs:
354+
data_files.extend(get_data_files(dname))
355+
# update data-files in case this created new files
356+
self.distribution.data_files = data_files
356357
# also update package data
357358
update_package_data(self.distribution)
358359
return result

0 commit comments

Comments
 (0)