From be08c7d5bc1048bdf7364e473a39079746e028da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 08:55:48 +0100 Subject: [PATCH 1/8] Ensure that node_modules are never added --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fa34ecfb..76dd668b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,12 +68,14 @@ raw-options = { version_scheme = "no-guess-dev" } [tool.hatch.build.targets.wheel] include = ["geoviews"] +exclude = ["geoviews/node_modules"] [tool.hatch.build.targets.wheel.force-include] "geoviews/dist" = "geoviews/dist" [tool.hatch.build.targets.sdist] include = ["geoviews", "scripts"] +exclude = ["geoviews/node_modules"] [tool.hatch.build.targets.sdist.force-include] "geoviews/dist" = "geoviews/dist" From bb56fafd67e3a76ffada59a8e31d761d12117f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 08:56:12 +0100 Subject: [PATCH 2/8] Try to move from wheel to sdist for build --- scripts/conda/build.sh | 2 +- scripts/conda/recipe-core/meta.yaml | 4 ++-- scripts/conda/recipe-recommended/meta.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh index 4941a6df..3e3d7485 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -4,7 +4,7 @@ set -euxo pipefail PACKAGE="geoviews" -python -m build . # Can add -w when this is solved: https://github.com/pypa/hatch/issues/1305 +python -m build --sdist . VERSION=$(python -c "import $PACKAGE; print($PACKAGE._version.__version__)") export VERSION diff --git a/scripts/conda/recipe-core/meta.yaml b/scripts/conda/recipe-core/meta.yaml index 89395f52..31735af7 100644 --- a/scripts/conda/recipe-core/meta.yaml +++ b/scripts/conda/recipe-core/meta.yaml @@ -6,11 +6,11 @@ package: version: {{ VERSION }} source: - url: ../../../dist/{{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + url: ../../../dist/{{ project["name"] }}-{{ VERSION }}.tar.gz build: noarch: python - script: {{ PYTHON }} -m pip install --no-deps -vv {{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + script: {{ PYTHON }} -m pip install --no-deps -vv . entry_points: {% for group,epoints in project.get("entry_points",{}).items() %} {% for entry_point in epoints %} diff --git a/scripts/conda/recipe-recommended/meta.yaml b/scripts/conda/recipe-recommended/meta.yaml index b7823cab..79fb89eb 100644 --- a/scripts/conda/recipe-recommended/meta.yaml +++ b/scripts/conda/recipe-recommended/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ VERSION }} source: - url: ../../../dist/{{ project["name"] }}-{{ VERSION }}-py3-none-any.whl + url: ../../../dist/{{ project["name"] }}-{{ VERSION }}.tar.gz build: noarch: python From 8e25be44c311371291c7049c67f28b0f188b34c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 08:56:31 +0100 Subject: [PATCH 3/8] Add --package-format --- scripts/conda/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh index 3e3d7485..1800a174 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -19,8 +19,8 @@ else: print('bokeh') ") -conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c "$BK_CHANNEL" -c pyviz -conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c "$BK_CHANNEL" -c pyviz +conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c conda-forge -c "$BK_CHANNEL" -c pyviz --package-format 1 +conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c conda-forge -c "$BK_CHANNEL" -c pyviz --package-format 1 mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-core-$VERSION-py_0.tar.bz2" dist mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2" dist From 735ab14c09b60a982b3cc16ab769ceb260114645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 08:59:41 +0100 Subject: [PATCH 4/8] Add channels to setup-miniconda --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cad5eca6..c9c32309 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -77,6 +77,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" + channels: "conda-forge" - name: conda setup run: | conda install -y anaconda-client From 6fa21c468aed98c33e92ee0231d276ea2f97fcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 09:08:32 +0100 Subject: [PATCH 5/8] Run npm audit fix --- geoviews/package-lock.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/geoviews/package-lock.json b/geoviews/package-lock.json index 1dccf5c9..4b907d38 100644 --- a/geoviews/package-lock.json +++ b/geoviews/package-lock.json @@ -858,9 +858,10 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2619,9 +2620,9 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", From 5dfabc80cc65206983cc2dcc435a1ff04cf3e4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 09:23:16 +0100 Subject: [PATCH 6/8] Use _version.__version__ for pip install step --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c9c32309..9bdc9129 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -126,7 +126,7 @@ jobs: - name: Install package run: python -m pip install dist/*.whl - name: Test package - run: python -c "import $PACKAGE; print($PACKAGE.__version__)" + run: python -c "import $PACKAGE; print($PACKAGE._version.__version__)" pip_publish: name: Publish PyPI From cafd5ec18f105b20bf0a93c3978108456d01a300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 09:33:24 +0100 Subject: [PATCH 7/8] Update channel list for conda build --- scripts/conda/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh index 1800a174..b8f1ab10 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -14,13 +14,13 @@ import bokeh from packaging.version import Version if Version(bokeh.__version__).is_prerelease: - print('bokeh/label/dev') + print('bokeh/label/rc') else: print('bokeh') ") -conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c conda-forge -c "$BK_CHANNEL" -c pyviz --package-format 1 -conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c conda-forge -c "$BK_CHANNEL" -c pyviz --package-format 1 +conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1 +conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1 mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-core-$VERSION-py_0.tar.bz2" dist mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-$VERSION-py_0.tar.bz2" dist From 2eb24acf29e3e18a30048c9e6f7ccb96f90aff56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Wed, 27 Nov 2024 11:28:12 +0100 Subject: [PATCH 8/8] Update scripts/conda/build.sh --- scripts/conda/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/conda/build.sh b/scripts/conda/build.sh index b8f1ab10..d40dea1b 100755 --- a/scripts/conda/build.sh +++ b/scripts/conda/build.sh @@ -19,7 +19,7 @@ else: print('bokeh') ") -conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1 +conda build scripts/conda/recipe-core --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1 conda build scripts/conda/recipe-recommended --no-anaconda-upload --no-verify -c pyviz -c "$BK_CHANNEL" -c conda-forge --package-format 1 mv "$CONDA_PREFIX/conda-bld/noarch/$PACKAGE-core-$VERSION-py_0.tar.bz2" dist