Skip to content

Commit

Permalink
Merge pull request #568 from manics/updates
Browse files Browse the repository at this point in the history
Use setuptools-scm to include files in sdist, switch to `python -mbuild`
  • Loading branch information
manics authored Feb 11, 2024
2 parents e490078 + 82eabb1 commit 14cbac9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Build dist
run: |
python setup.py sdist bdist_wheel
python -mbuild
ls dist/*tar.gz dist/*.whl
- name: Javascript format
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ image:
tasks:
# https://www.gitpod.io/docs/languages/python#start-tasks
- init: >
pip3 install -r dev-requirements-jl3.txt &&
pip3 install -r dev-requirements-jl4.txt &&
pip3 install .
18 changes: 1 addition & 17 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
include LICENSE
include LICENSE.dexie
include README.md
include pyproject.toml

include package.json
include ts*.json
include webpack.config.js
# setuptools-scm includes all source controlled files

graft jupyter_offlinenotebook/static

# Javascript files
graft src
graft style
prune **/node_modules
prune lib

# Patterns to exclude from any directory
global-exclude *~
global-exclude *.pyc
global-exclude *.pyo
global-exclude .git
global-exclude .ipynb_checkpoints
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build==1.0.3
jupyter_packaging==0.12.3
flaky==3.7.0
nbclassic==1.0.0
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
[build-system]
requires = [
"jupyter_packaging~=0.7.0",
"jupyterlab>=3.0.0,==3.*", # jlpm is used to build static js
"setuptools>=40.8.0",
"jupyter_packaging~=0.12.3",
"jupyterlab~=4.0", # jlpm is used to build static js
"setuptools>=60",
"setuptools-scm>=8",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# Used to ensure all files are packaged in the sdist
# This is not used for versioning
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def get_version():

# Representative files that should exist after a successful build
jstargets = [
# tsc
os.path.join(HERE, "lib", "index.js"),
# notebook
os.path.join(HERE, name, "static", "jslib", "offlinenotebook.js"),
# jupyterlab 3 bundled extension
Expand Down

0 comments on commit 14cbac9

Please sign in to comment.