diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95877ea..01f80ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.gitpod.yml b/.gitpod.yml index 1b03e81..dd179d7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -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 . diff --git a/MANIFEST.in b/MANIFEST.in index e26a613..643c189 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/dev-requirements.txt b/dev-requirements.txt index 720e2ec..a799df2 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ +build==1.0.3 jupyter_packaging==0.12.3 flaky==3.7.0 nbclassic==1.0.0 diff --git a/pyproject.toml b/pyproject.toml index 5159a41..a7cd0a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/setup.py b/setup.py index ba852cf..691c91e 100644 --- a/setup.py +++ b/setup.py @@ -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