Skip to content

Commit fea5475

Browse files
author
Frédéric Collonval
committed
Fix update_package_data
1 parent b2e5292 commit fea5475

File tree

2 files changed

+34
-44
lines changed

2 files changed

+34
-44
lines changed

.circleci/config.yml

+15-27
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
check-code-formatting:
55
docker:
6-
- image: circleci/python:3.7-buster-node-browsers
6+
- image: circleci/python:3.7-stretch-node-browsers
77

88
steps:
99
- checkout
@@ -17,10 +17,9 @@ jobs:
1717
# Core
1818
python-2.7-core:
1919
docker:
20-
- image: circleci/python:2.7-buster-node-browsers
20+
- image: circleci/python:2.7-stretch-node-browsers
2121
environment:
2222
PLOTLY_TOX_PYTHON_27: python2.7
23-
resource_class: large
2423

2524
steps:
2625
- checkout
@@ -36,10 +35,9 @@ jobs:
3635

3736
python-3.5-core:
3837
docker:
39-
- image: circleci/python:3.5-buster-node-browsers
38+
- image: circleci/python:3.5-stretch-node-browsers
4039
environment:
4140
PLOTLY_TOX_PYTHON_35: python3.5
42-
resource_class: large
4341

4442
steps:
4543
- checkout
@@ -55,10 +53,9 @@ jobs:
5553

5654
python-3.6-core:
5755
docker:
58-
- image: circleci/python:3.6-buster-node-browsers
56+
- image: circleci/python:3.6-stretch-node-browsers
5957
environment:
6058
PLOTLY_TOX_PYTHON_36: python3.6
61-
resource_class: large
6259

6360
steps:
6461
- checkout
@@ -74,10 +71,9 @@ jobs:
7471

7572
python-3.7-core:
7673
docker:
77-
- image: circleci/python:3.7-buster-node-browsers
74+
- image: circleci/python:3.7-stretch-node-browsers
7875
environment:
7976
PLOTLY_TOX_PYTHON_37: python3.7
80-
resource_class: large
8177

8278
steps:
8379
- checkout
@@ -93,11 +89,10 @@ jobs:
9389

9490
python-3.7-percy:
9591
docker:
96-
- image: circleci/python:3.7-buster-node-browsers
92+
- image: circleci/python:3.7-stretch-node-browsers
9793
environment:
9894
PERCY_ENABLED: True
9995
PERCY_PROJECT: plotly/plotly.py
100-
resource_class: large
10196

10297
steps:
10398
- checkout
@@ -127,10 +122,9 @@ jobs:
127122
# Optional
128123
python-2.7-optional:
129124
docker:
130-
- image: circleci/python:2.7-buster-node-browsers
125+
- image: circleci/python:2.7-stretch-node-browsers
131126
environment:
132127
PLOTLY_TOX_PYTHON_27: python2.7
133-
resource_class: large
134128

135129
steps:
136130
- checkout
@@ -146,10 +140,9 @@ jobs:
146140

147141
python-3.5-optional:
148142
docker:
149-
- image: circleci/python:3.5-buster-node-browsers
143+
- image: circleci/python:3.5-stretch-node-browsers
150144
environment:
151145
PLOTLY_TOX_PYTHON_35: python3.5
152-
resource_class: large
153146

154147
steps:
155148
- checkout
@@ -165,10 +158,9 @@ jobs:
165158

166159
python-3.6-optional:
167160
docker:
168-
- image: circleci/python:3.6-buster-node-browsers
161+
- image: circleci/python:3.6-stretch-node-browsers
169162
environment:
170163
PLOTLY_TOX_PYTHON_36: python3.6
171-
resource_class: large
172164

173165
steps:
174166
- checkout
@@ -184,10 +176,9 @@ jobs:
184176

185177
python-3.7-optional:
186178
docker:
187-
- image: circleci/python:3.7-buster-node-browsers
179+
- image: circleci/python:3.7-stretch-node-browsers
188180
environment:
189181
PLOTLY_TOX_PYTHON_37: python3.7
190-
resource_class: large
191182

192183
steps:
193184
- checkout
@@ -204,10 +195,9 @@ jobs:
204195
# Plot.ly
205196
python-2.7-plot_ly:
206197
docker:
207-
- image: circleci/python:2.7-buster-node-browsers
198+
- image: circleci/python:2.7-stretch-node-browsers
208199
environment:
209200
PLOTLY_TOX_PYTHON_27: python2.7
210-
resource_class: large
211201

212202
steps:
213203
- checkout
@@ -223,10 +213,9 @@ jobs:
223213

224214
python-3.5-plot_ly:
225215
docker:
226-
- image: circleci/python:3.5-buster-node-browsers
216+
- image: circleci/python:3.5-stretch-node-browsers
227217
environment:
228218
PLOTLY_TOX_PYTHON_35: python3.5
229-
resource_class: large
230219

231220
steps:
232221
- checkout
@@ -242,10 +231,9 @@ jobs:
242231

243232
python-3.7-plot_ly:
244233
docker:
245-
- image: circleci/python:3.7-buster-node-browsers
234+
- image: circleci/python:3.7-stretch-node-browsers
246235
environment:
247236
PLOTLY_TOX_PYTHON_37: python3.7
248-
resource_class: large
249237

250238
steps:
251239
- checkout
@@ -352,7 +340,7 @@ jobs:
352340

353341
plotlyjs_dev_build:
354342
docker:
355-
- image: circleci/python:3.7-buster-node-browsers
343+
- image: circleci/python:3.7-stretch-node-browsers
356344
environment:
357345
PLOTLY_TOX_PYTHON_37: python3.7
358346
LANG: en_US.UTF-8
@@ -399,7 +387,7 @@ jobs:
399387
docker:
400388
# specify the version you desire here
401389
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
402-
- image: circleci/python:3.7-buster-node-browsers
390+
- image: circleci/python:3.7-stretch-node-browsers
403391

404392
# working_directory: ~/project
405393

packages/python/plotly/setup.py

+19-17
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,25 @@ def update_package_data(distribution):
9494

9595
# JS assets will not be present if we are skip npm build
9696
if not skip_npm:
97-
distribution.data_files.append(
98-
(
99-
"share/jupyter/labextensions/plotlywidget",
100-
["plotlywidget/labextension/package.json",],
101-
),
102-
(
103-
"share/jupyter/labextensions/plotlywidget/static",
104-
[os.path.join(labstatic, f) for f in os.listdir(labstatic)],
105-
),
106-
(
107-
"share/jupyter/nbextensions/plotlywidget",
108-
[
109-
"plotlywidget/nbextension/extension.js",
110-
"plotlywidget/nbextension/index.js",
111-
"plotlywidget/nbextension/index.js.LICENSE.txt",
112-
],
113-
),
97+
distribution.data_files.extends(
98+
[
99+
(
100+
"share/jupyter/labextensions/plotlywidget",
101+
["plotlywidget/labextension/package.json",],
102+
),
103+
(
104+
"share/jupyter/labextensions/plotlywidget/static",
105+
[os.path.join(labstatic, f) for f in os.listdir(labstatic)],
106+
),
107+
(
108+
"share/jupyter/nbextensions/plotlywidget",
109+
[
110+
"plotlywidget/nbextension/extension.js",
111+
"plotlywidget/nbextension/index.js",
112+
"plotlywidget/nbextension/index.js.LICENSE.txt",
113+
],
114+
),
115+
]
114116
)
115117

116118
# re-init build_py options which load package_data

0 commit comments

Comments
 (0)