Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit 90f5ac5

Browse files
authored
Add more skip-if-exists, fix wheel packaging (#181)
* Add more skip-if-exists * remove wheel config * fix typo * Remove before-build-python hook * Re-add `wasm` to files * Fix build:prod script * Delete MANIFEST.in * edit config * include static directory explicitely ? * narrow down gitignore * fix typo
1 parent e1371a8 commit 90f5ac5

File tree

4 files changed

+21
-45
lines changed

4 files changed

+21
-45
lines changed

.gitignore

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ node_modules/
44
*.egg-info/
55
.ipynb_checkpoints
66
*.tsbuildinfo
7-
*.tar.gz
8-
empack_env_meta.json
7+
/*.tar.gz
98
# Created by https://www.gitignore.io/api/python
109
# Edit at https://www.gitignore.io/?templates=python
1110

@@ -114,15 +113,18 @@ dmypy.json
114113
_output
115114
*.doit.db
116115

117-
python_data.js
118-
*.data
116+
# Generated files
117+
src/python_data.js
118+
src/*.data
119119
src/*.js
120-
xpython_wasm.js
121-
xpython_wasm.wasm
122-
xpython_wasm.hash
123-
120+
src/xpython_wasm.js
121+
src/xpython_wasm.wasm
122+
src/xpython_wasm.hash
124123
src/worker.ts
125124
src/web_worker_kernel.ts
125+
src/*.tar.gz
126+
src/empack_env_meta.json
127+
*.js.map
126128

127129
# Labextension
128130
jupyterlite_xeus_python/labextension

MANIFEST.in

Lines changed: 0 additions & 30 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"license": "BSD-3-Clause",
1616
"author": "JupyterLite Contributors",
1717
"files": [
18-
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
18+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf,wasm}",
1919
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
2020
],
2121
"main": "lib/index.js",
@@ -31,7 +31,7 @@
3131
"build": "jlpm run build:xeus-python && jlpm run build:lib && jlpm run build:worker && jlpm run copy-files && jlpm run build:labextension:dev",
3232
"build:xeus-python": "python jupyterlite_xeus_python/build.py --output-path src --build-worker",
3333
"build:worker:prod": "webpack --config worker.webpack.config.js --mode=production",
34-
"build:prod": "jlpm run clean && jlpm run build build:xeus-python && jlpm run build:lib:prod && jlpm run build:worker:prod && jlpm run copy-files && jlpm run build:labextension",
34+
"build:prod": "jlpm run clean && jlpm run build:xeus-python && jlpm run build:lib:prod && jlpm run build:worker:prod && jlpm run copy-files && jlpm run build:labextension",
3535
"build:labextension": "jupyter labextension build .",
3636
"build:labextension:dev": "jupyter labextension build --development True .",
3737
"build:lib": "tsc --sourceMap",

pyproject.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ fields = ["description", "authors", "urls"]
5252
artifacts = ["jupyterlite_xeus_python/labextension"]
5353
exclude = [".github"]
5454

55-
[tool.hatch.build.targets.wheel]
56-
artifacts = ["jupyterlite_xeus_python/labextension"]
57-
include = ["jupyterlite_xeus_python/"]
58-
5955
[tool.hatch.build.targets.wheel.shared-data]
6056
"jupyterlite_xeus_python/labextension" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel"
6157
"install.json" = "share/jupyter/labextensions/@jupyterlite/xeus-python-kernel/install.json"
@@ -73,11 +69,19 @@ ensured-targets = [
7369
"jupyterlite_xeus_python/labextension/static/xpython_wasm.wasm",
7470
"jupyterlite_xeus_python/labextension/package.json",
7571
]
76-
skip-if-exists = ["jupyterlite_xeus_python/labextension/static/style.js"]
72+
skip-if-exists = [
73+
"jupyterlite_xeus_python/labextension/static/style.js",
74+
"jupyterlite_xeus_python/labextension/static/empack_env_meta.json",
75+
"jupyterlite_xeus_python/labextension/static/xpython_wasm.js",
76+
"jupyterlite_xeus_python/labextension/static/xpython_wasm.wasm",
77+
"jupyterlite_xeus_python/labextension/package.json",
78+
]
7779

7880
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
7981
build_cmd = "build:prod"
8082
npm = ["jlpm"]
83+
source_dir = "src"
84+
build_dir = "jupyterlite_xeus_python/labextension"
8185

8286
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
8387
build_cmd = "install:extension"

0 commit comments

Comments
 (0)