- Add ipywidgets-pr3138-pr3194-packaging.patch for python310 packaging - Actually adds the JS files now OBS-URL: https://build.opensuse.org/request/show/944225 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyterlab-widgets?expand=0&rev=3
195 lines
6.2 KiB
Diff
195 lines
6.2 KiB
Diff
|
|
Index: jupyterlab_widgets-1.0.2/pyproject.toml
|
|
===================================================================
|
|
--- jupyterlab_widgets-1.0.2.orig/pyproject.toml
|
|
+++ jupyterlab_widgets-1.0.2/pyproject.toml
|
|
@@ -1,3 +1,17 @@
|
|
[build-system]
|
|
-requires = ["jupyter_packaging~=0.7.9", "jupyterlab~=3.0", "setuptools>=40.8.0", "wheel"]
|
|
-build-backend = "setuptools.build_meta"
|
|
+requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.0"]
|
|
+build-backend = "jupyter_packaging.build_api"
|
|
+
|
|
+[tool.jupyter-packaging.options]
|
|
+skip-if-exists = ["jupyterlab_widgets/labextension/package.json"]
|
|
+ensured-targets = ["jupyterlab_widgets/labextension/package.json"]
|
|
+
|
|
+[tool.jupyter-packaging.builder]
|
|
+factory = "jupyter_packaging.npm_builder"
|
|
+
|
|
+[tool.jupyter-packaging.build-args]
|
|
+build_cmd = "build:prod"
|
|
+npm = ["jlpm"]
|
|
+
|
|
+[tool.check-manifest]
|
|
+ignore = ["jupyterlab_widgets/labextension/**", "yarn.lock", ".*", "package-lock.json"]
|
|
\ No newline at end of file
|
|
Index: jupyterlab_widgets-1.0.2/setup.cfg
|
|
===================================================================
|
|
--- jupyterlab_widgets-1.0.2.orig/setup.cfg
|
|
+++ jupyterlab_widgets-1.0.2/setup.cfg
|
|
@@ -1,4 +1,37 @@
|
|
-[egg_info]
|
|
-tag_build =
|
|
-tag_date = 0
|
|
+[metadata]
|
|
+name = jupyterlab_widgets
|
|
+version = attr: jupyterlab_widgets._version.__version__
|
|
+author = Jupyter Development Team
|
|
+author_email = jupyter@googlegroups.com
|
|
+url = https://github.com/jupyter-widgets/ipywidgets
|
|
+description = Jupyter interactive widgets for JupyterLab
|
|
+long_description = file: README.md
|
|
+long_description_content_type = text/markdown
|
|
+license_file = LICENSE
|
|
+license = BSD-3-Clause
|
|
+platforms = Linux, Mac OS X, Windows
|
|
+keywords = Interactive, Interpreter, Shell, Web, notebook, widgets, Jupyter, JupyterLab, JupyterLab3
|
|
+classifiers =
|
|
+ Intended Audience :: Developers
|
|
+ Intended Audience :: System Administrators
|
|
+ Intended Audience :: Science/Research
|
|
+ License :: OSI Approved :: BSD License
|
|
+ Programming Language :: Python
|
|
+ Programming Language :: Python :: 3
|
|
+ Programming Language :: Python :: 3.6
|
|
+ Programming Language :: Python :: 3.7
|
|
+ Programming Language :: Python :: 3.8
|
|
+ Programming Language :: Python :: 3.9
|
|
+ Programming Language :: Python :: 3.10
|
|
+ Programming Language :: Python :: 3 :: Only
|
|
+ Framework :: Jupyter
|
|
+ Framework :: Jupyter :: JupyterLab
|
|
+ Framework :: Jupyter :: JupyterLab :: 3
|
|
+ Framework :: Jupyter :: JupyterLab :: Extensions
|
|
+ Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
|
|
|
|
+[options]
|
|
+python_requires = >=3.6
|
|
+zip_safe=False
|
|
+include_package_data = True
|
|
+packages = find:
|
|
\ No newline at end of file
|
|
Index: jupyterlab_widgets-1.0.2/setup.py
|
|
===================================================================
|
|
--- jupyterlab_widgets-1.0.2.orig/setup.py
|
|
+++ jupyterlab_widgets-1.0.2/setup.py
|
|
@@ -1,96 +1,38 @@
|
|
+# Copyright (c) Jupyter Development Team.
|
|
+# Distributed under the terms of the Modified BSD License.
|
|
+
|
|
"""
|
|
jupyterlab_widgets setup
|
|
"""
|
|
-import os
|
|
-
|
|
from jupyter_packaging import (
|
|
- create_cmdclass, install_npm, ensure_targets,
|
|
- combine_commands, ensure_python, get_version,
|
|
+ wrap_installers,
|
|
+ npm_builder,
|
|
+ get_data_files
|
|
)
|
|
-import setuptools
|
|
+from pathlib import Path
|
|
+from setuptools import setup
|
|
|
|
-HERE = os.path.abspath(os.path.dirname(__file__))
|
|
+HERE = Path(__file__).parent.resolve()
|
|
+IS_REPO = (HERE.parent / '.git').exists()
|
|
+LAB_PATH = HERE / "jupyterlab_widgets" / "labextension"
|
|
|
|
# The name of the project
|
|
name = "jupyterlab_widgets"
|
|
-
|
|
-# Ensure a valid python version
|
|
-ensure_python(">=3.6")
|
|
-
|
|
-# Get our version
|
|
-version = get_version(os.path.join(name, "_version.py"))
|
|
-
|
|
-lab_path = os.path.join(HERE, name, "labextension")
|
|
-
|
|
-# Representative files that should exist after a successful build
|
|
-jstargets = [
|
|
- os.path.join(lab_path, "package.json"),
|
|
-]
|
|
-
|
|
-package_data_spec = {
|
|
- name: [
|
|
- "*"
|
|
- ]
|
|
-}
|
|
-
|
|
labext_name = "@jupyter-widgets/jupyterlab-manager"
|
|
|
|
data_files_spec = [
|
|
- ("share/jupyter/labextensions/%s" % labext_name, lab_path, "**"),
|
|
- ("share/jupyter/labextensions/%s" % labext_name, HERE, "install.json"),
|
|
+ (f"share/jupyter/labextensions/{labext_name}", LAB_PATH, "**"),
|
|
+ (f"share/jupyter/labextensions/{labext_name}", HERE, "install.json"),
|
|
]
|
|
|
|
-cmdclass = create_cmdclass(
|
|
- "jsdeps",
|
|
- package_data_spec=package_data_spec,
|
|
- data_files_spec=data_files_spec
|
|
-)
|
|
-
|
|
-# if the static assets already exist, do not invoke npm so we can make a wheel
|
|
-# from the sdist package, since the npm build really only works from this
|
|
-# repo.
|
|
-jsbuild = []
|
|
-if all(os.path.exists(f) for f in jstargets):
|
|
- jsbuild.append(install_npm(HERE, build_cmd="build:prod", npm=["jlpm"]))
|
|
-jsbuild.append(ensure_targets(jstargets))
|
|
-
|
|
-cmdclass["jsdeps"] = combine_commands(*jsbuild)
|
|
-
|
|
-with open("README.md", "r") as fh:
|
|
- long_description = fh.read()
|
|
-
|
|
-setup_args = dict(
|
|
- name=name,
|
|
- version=version,
|
|
- url="https://github.com/jupyter-widgets/ipywidgets",
|
|
- author="Jupyter Development Team",
|
|
- description="A JupyterLab extension.",
|
|
- long_description= long_description,
|
|
- long_description_content_type="text/markdown",
|
|
- cmdclass=cmdclass,
|
|
- packages=setuptools.find_packages(),
|
|
- install_requires=[],
|
|
- zip_safe=False,
|
|
- include_package_data=True,
|
|
- python_requires=">=3.6",
|
|
- license="BSD-3-Clause",
|
|
- platforms="Linux, Mac OS X, Windows",
|
|
- keywords=["Jupyter", "JupyterLab", "JupyterLab3"],
|
|
- classifiers=[
|
|
- "License :: OSI Approved :: BSD License",
|
|
- "Programming Language :: Python",
|
|
- "Programming Language :: Python :: 3",
|
|
- "Programming Language :: Python :: 3.6",
|
|
- "Programming Language :: Python :: 3.7",
|
|
- "Programming Language :: Python :: 3.8",
|
|
- "Framework :: Jupyter",
|
|
- "Framework :: Jupyter :: JupyterLab",
|
|
- "Framework :: Jupyter :: JupyterLab :: 3",
|
|
- "Framework :: Jupyter :: JupyterLab :: Extensions",
|
|
- "Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
|
|
- ],
|
|
+post_develop = npm_builder(
|
|
+ build_cmd="install:extension", source_dir="src", build_dir=LAB_PATH
|
|
)
|
|
|
|
+cmdclass = wrap_installers(post_develop=post_develop)
|
|
|
|
if __name__ == "__main__":
|
|
- setuptools.setup(**setup_args)
|
|
+ setup(
|
|
+ cmdclass=cmdclass,
|
|
+ data_files=get_data_files(data_files_spec),
|
|
+ )
|
|
\ No newline at end of file
|