[chore] keplergl-jupyter: reduce list of python build requirements#3083
Open
jorisvandenbossche wants to merge 1 commit intokeplergl:masterfrom
Open
[chore] keplergl-jupyter: reduce list of python build requirements#3083jorisvandenbossche wants to merge 1 commit intokeplergl:masterfrom
jorisvandenbossche wants to merge 1 commit intokeplergl:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR aims to reduce the Python build requirements for keplergl-jupyter by removing packages that are not needed for building the wheel.
- Removed unnecessary build-time dependencies (geopandas, ipywidgets, notebook, jupyter-contrib-nbextensions, jupyterlab, pyarrow, wheel)
- Retained only the essential build dependencies (jupyter_packaging and setuptools)
Comments suppressed due to low confidence (1)
bindings/kepler.gl-jupyter/pyproject.toml:2
- Confirm that the dependencies removed from the build requirements are properly declared as runtime dependencies in setup.py to ensure a consistent installation experience.
requires = ["jupyter_packaging~=0.12.3", "setuptools>=69.5.1"]
Collaborator
|
Thanks, @jorisvandenbossche! The pyproject.toml has not been really used in the build system. Maybe this is a good time to I have copilot generate the following pyproject.toml. Can you do a quick check if this makes sense? Thank you very much! [build-system]
requires = ["setuptools>=61.0", "wheel", "jupyter_packaging>=0.12.3"]
build-backend = "setuptools.build_meta"
[project]
name = "keplergl"
dynamic = ["version"] # Let jupyter_packaging handle version
description = "This is a simple jupyter widget for kepler.gl, an advanced geospatial visualization tool, to render large-scale interactive maps."
readme = "README.md"
authors = [
{name = "Shan He", email = "shan@uber.com"}
]
license = {text = "MIT"}
keywords = ["ipython", "jupyter", "widgets", "geospatial", "visualization", "webGL"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: IPython",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Multimedia :: Graphics",
"Programming Language :: Python :: 2",
"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.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Visualization",
]
requires-python = ">=3.6,<3.13"
dependencies = [
"ipywidgets>=8.1.5",
"traittypes>=0.2.1",
"traitlets>=4.3.2",
"geopandas>=0.14.3",
"Shapely>=1.6.4.post2",
"jupyter_packaging>=0.12.3",
"jupyter>=1.0.0",
"jupyterlab>=4.1.6",
"notebook>=6.0.1",
"pyarrow>=16.0.0",
"geoarrow-pyarrow>=0.1.2",
"geoarrow-pandas>=0.1.1",
]
[project.urls]
Homepage = "https://github.com/keplergl/kepler.gl/tree/master/bindings/kepler.gl-jupyter"
Documentation = "https://docs.kepler.gl/docs/keplergl-jupyter"
Repository = "https://github.com/keplergl/kepler.gl"
Issues = "https://github.com/keplergl/kepler.gl/issues"
[project.optional-dependencies]
dev = [
"pytest>=6.0",
"pytest-cov>=2.0",
"black>=22.0",
"isort>=5.0",
"flake8>=4.0",
]
[tool.setuptools]
packages = ["keplergl"]
zip-safe = false
include-package-data = true
[tool.jupyter-packaging]
js-dir = "js"
npm = ["yarn"]
build-cmd = "build"
data-files = [
["share/jupyter/nbextensions/keplergl-jupyter", "keplergl/static", "**"],
["share/jupyter/labextensions/keplergl-jupyter", "keplergl-jupyter/labextension", "**"],
["etc/jupyter/nbconfig/notebook.d", ".", "keplergl-jupyter.json"]
]
ensure-targets = [
["keplergl/static/index.js"],
["keplergl-jupyter/labextension/package.json"]
]
[tool.setuptools.dynamic]
version = {attr = "keplergl._version.__version__"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that installing this package installs a bunch of packages when pip creates the isolated build environment (which happens since keplergl-jupyter only provides a source distribution, so it will "build" a wheel when installing).
Right now also packages like geopandas and pyarrow get installed in that isolated build environment, while those are not needed for building the wheel (only as runtime dependency in the environment in which you are installing keplergl into).
I think only
jupyter-packaging(and its dependencies like setuptools) is needed for runningsetup.py(also following https://github.com/jupyter/jupyter-packaging?tab=readme-ov-file#as-a-build-requirement).The actual runtime dependencies which includes the packages like geopandas and pyarrow, are still listed in
is still the setup.py (install_requires), so this change should not impact the end result ofpip install keplergl-jupyter`