-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate to Hatch * Remove extraneous build script * Fix a typo * Remove commented lines
- Loading branch information
Showing
7 changed files
with
76 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
# | ||
|
||
version_info = (0, 18, 1) | ||
|
||
__version__ = "%s.%s.%s" % (version_info[0], version_info[1], version_info[2]) | ||
|
||
EXTENSION_VERSION = "^0.18" | ||
__version__ = "0.18.1" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,75 @@ | ||
[build-system] | ||
# avoid 3.6 so we don't need the rust buildchain | ||
requires = ["jupyter_packaging~=0.12", "jupyterlab~=4.0.8", "setuptools>=40.8.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
requires = [ | ||
"hatchling", | ||
"jupyterlab==4.*", | ||
] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "ipyleaflet" | ||
version = "0.18.1" | ||
description = "A Jupyter widget for dynamic Leaflet maps" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Project Jupyter", email = "[email protected]" }, | ||
] | ||
keywords = [ | ||
"ipython", "jupyter", "widgets", "graphics", "GIS", | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Multimedia :: Graphics", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
dependencies = [ | ||
"ipywidgets>=7.6.0,<9", | ||
"traittypes>=0.2.1,<3", | ||
"xyzservices>=2021.8.1", | ||
"branca>=0.5.0", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/jupyter-widgets/ipyleaflet" | ||
|
||
[tool.hatch.build] | ||
artifacts = [ | ||
"ipyleaflet/nbextension/index.*", | ||
"ipyleaflet/labextension", | ||
] | ||
|
||
[tool.hatch.build.targets.wheel.shared-data] | ||
"ipyleaflet/nbextension" = "share/jupyter/nbextensions/jupyter-leaflet" | ||
"ipyleaflet/labextension" = "share/jupyter/labextensions/jupyter-leaflet" | ||
"jupyter-leaflet.json" = "etc/jupyter/nbconfig/notebook.d/jupyter-leaflet.json" | ||
|
||
[tool.hatch.build.targets.sdist] | ||
exclude = [ | ||
".github", | ||
] | ||
|
||
[tool.hatch.build.hooks.jupyter-builder] | ||
ensured-targets = [ | ||
"ipyleaflet/nbextension/index.js", | ||
"ipyleaflet/labextension/package.json", | ||
] | ||
dependencies = [ | ||
"hatch-jupyter-builder>=0.8.1", | ||
] | ||
build-function = "hatch_jupyter_builder.npm_builder" | ||
|
||
[tool.hatch.build.hooks.jupyter-builder.build-kwargs] | ||
path = "./js" | ||
build_cmd = "build" | ||
npm = [ | ||
"jlpm", | ||
] | ||
|
||
[tool.ruff] | ||
extend-include = ["*.ipynb"] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
from setuptools import setup, find_packages | ||
|
||
from jupyter_packaging import ( | ||
create_cmdclass, | ||
install_npm, | ||
ensure_targets, | ||
combine_commands, | ||
get_version, | ||
skip_if_exists, | ||
) | ||
|
||
# the name of the package | ||
name = "ipyleaflet" | ||
long_description = "A Jupyter widget for dynamic Leaflet maps" | ||
|
||
here = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
# Get ipyleaflet version | ||
version = get_version(os.path.join(name, "_version.py")) | ||
|
||
js_dir = os.path.join(here, "js") | ||
|
||
# Representative files that should exist after a successful build | ||
jstargets = [ | ||
os.path.join("ipyleaflet/nbextension", "index.js"), | ||
os.path.join("ipyleaflet/labextension", "package.json"), | ||
] | ||
|
||
data_files_spec = [ | ||
("share/jupyter/nbextensions/jupyter-leaflet", "ipyleaflet/nbextension", "*.*"), | ||
("share/jupyter/labextensions/jupyter-leaflet", "ipyleaflet/labextension", "**"), | ||
("etc/jupyter/nbconfig/notebook.d", ".", "jupyter-leaflet.json"), | ||
] | ||
|
||
cmdclass = create_cmdclass("jsdeps", data_files_spec=data_files_spec) | ||
js_command = combine_commands( | ||
install_npm(js_dir, npm=["yarn"], build_cmd="build"), | ||
ensure_targets(jstargets), | ||
) | ||
|
||
is_repo = os.path.exists(os.path.join(here, ".git")) | ||
if is_repo: | ||
cmdclass["jsdeps"] = js_command | ||
else: | ||
cmdclass["jsdeps"] = skip_if_exists(jstargets, js_command) | ||
|
||
setup_args = dict( | ||
name=name, | ||
version=version, | ||
description="A Jupyter widget for dynamic Leaflet maps", | ||
long_description=long_description, | ||
license="MIT License", | ||
python_requires=">=3.7", | ||
include_package_data=True, | ||
install_requires=[ | ||
"ipywidgets>=7.6.0,<9", | ||
"traittypes>=0.2.1,<3", | ||
"xyzservices>=2021.8.1", | ||
"branca>=0.5.0", | ||
], | ||
packages=find_packages(), | ||
zip_safe=False, | ||
cmdclass=cmdclass, | ||
author="Project Jupyter", | ||
author_email="[email protected]", | ||
url="https://github.com/jupyter-widgets/ipyleaflet", | ||
keywords=["ipython", "jupyter", "widgets", "graphics", "GIS"], | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Multimedia :: Graphics", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
], | ||
) | ||
|
||
setup(**setup_args) | ||
# Copyright (c) Jupyter Development Team. | ||
__import__("setuptools").setup() |