Skip to content

Do not merge: Work on fixing CI tests for fcollonval/issue3036 #3168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Condition packaged data on skip npm
  • Loading branch information
Frédéric Collonval committed Apr 9, 2021
commit b2e529212b983d0bd64e75781a83d843905b30d6
2 changes: 1 addition & 1 deletion packages/python/plotly/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["jupyterlab~=3.0", "setuptools>=40.8.0", "wheel"]
requires = ["jupyterlab~=3.0;python_version>='3.6'", "setuptools>=40.8.0", "wheel"]
build-backend = "setuptools.build_meta"
41 changes: 20 additions & 21 deletions packages/python/plotly/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,26 @@ def update_package_data(distribution):
"""update package_data to catch changes during setup"""
build_py = distribution.get_command_obj("build_py")

# Add JupyterLab extension static files as their names are unknown
distribution.data_files.append(
(
"share/jupyter/labextensions/plotlywidget/static",
[os.path.join(labstatic, f) for f in os.listdir(labstatic)],
# JS assets will not be present if we are skip npm build
if not skip_npm:
distribution.data_files.append(
(
"share/jupyter/labextensions/plotlywidget",
["plotlywidget/labextension/package.json",],
),
(
"share/jupyter/labextensions/plotlywidget/static",
[os.path.join(labstatic, f) for f in os.listdir(labstatic)],
),
(
"share/jupyter/nbextensions/plotlywidget",
[
"plotlywidget/nbextension/extension.js",
"plotlywidget/nbextension/index.js",
"plotlywidget/nbextension/index.js.LICENSE.txt",
],
),
)
)

# re-init build_py options which load package_data
build_py.finalize_options()
Expand Down Expand Up @@ -531,21 +544,7 @@ def run(self):
],
"plotlywidget": ["nbextension/*", "labextension/*", "labextension/static/*"],
},
data_files=[
(
"share/jupyter/labextensions/plotlywidget",
["plotlywidget/labextension/package.json",],
),
(
"share/jupyter/nbextensions/plotlywidget",
[
"plotlywidget/nbextension/extension.js",
"plotlywidget/nbextension/index.js",
"plotlywidget/nbextension/index.js.LICENSE.txt",
],
),
("etc/jupyter/nbconfig/notebook.d", ["plotlywidget.json"]),
],
data_files=[("etc/jupyter/nbconfig/notebook.d", ["plotlywidget.json"]),],
install_requires=["retrying>=1.3.3", "six"],
zip_safe=False,
cmdclass=dict(
Expand Down