Skip to content

Commit

Permalink
Stop using custom build of pyodide
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jan 28, 2025
1 parent 8615d37 commit d3f9fc6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 49 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
[submodule "packages/py-faicons"]
path = packages/py-faicons
url = https://github.com/posit-dev/py-faicons.git
[submodule "packages/plotnine"]
path = packages/plotnine
url = https://github.com/wch/plotnine.git
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ SHINY_WHEEL = shiny-$(SHINY_VERSION)-py3-none-any.whl
SHINYWIDGETS_WHEEL = shinywidgets-$(SHINYWIDGETS_VERSION)-py3-none-any.whl
FAICONS_WHEEL = faicons-$(FAICONS_VERSION)-py3-none-any.whl

# Hard code these versions for now
PLOTNINE_VERSION=0.0.0
PLOTNINE_WHEEL=plotnine-$(PLOTNINE_VERSION)-py3-none-any.whl

# libsass is built in gadenbuie/libsass-python
# NOTE: Update https://github.com/gadenbuie/libsass-python/blob/dev/.github/workflows/pyodide.yml
# Pyodide, Emscripten, or Python versions change here.
Expand Down Expand Up @@ -97,13 +93,11 @@ submodules:
git submodule init
git submodule update --depth=20
cd packages/py-shiny && git fetch --tags --unshallow
cd packages/plotnine && git fetch --tags --unshallow

## Pull latest changes in git submodules
submodules-pull:
git submodule update --recursive --remote
cd packages/py-shiny && git fetch --tags
cd packages/plotnine && git fetch --tags
submodules-pull-shiny:
git submodule update --remote packages/py-shiny
cd packages/py-shiny && git fetch --tags
Expand Down Expand Up @@ -178,7 +172,6 @@ pyodide_packages_local: $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(LIBSASS_WHEEL) \
$(BUILD_DIR)/shinylive/pyodide/$(POLARS_WHEEL)

Expand Down Expand Up @@ -206,11 +199,6 @@ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL): $(PACKAGE_DIR)/$(FAICONS_WHEEL)
rm -f $(BUILD_DIR)/shinylive/pyodide/faicons*.whl
cp $(PACKAGE_DIR)/$(FAICONS_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL)

$(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL): $(PACKAGE_DIR)/$(PLOTNINE_WHEEL)
mkdir -p $(BUILD_DIR)/shinylive/pyodide
rm -f $(BUILD_DIR)/shinylive/pyodide/plotnine*.whl
cp $(PACKAGE_DIR)/$(PLOTNINE_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL)

$(BUILD_DIR)/shinylive/pyodide/$(LIBSASS_WHEEL): $(PACKAGE_DIR)/$(LIBSASS_WHEEL)
mkdir -p $(BUILD_DIR)/shinylive/pyodide
rm -f $(BUILD_DIR)/shinylive/pyodide/libsass*.whl
Expand Down Expand Up @@ -281,8 +269,7 @@ packages: clean-packages \
package-htmltools \
package-shiny \
package-shinywidgets \
package-faicons \
package-plotnine
package-faicons


package-htmltools: $(PACKAGE_DIR)/$(HTMLTOOLS_WHEEL)
Expand All @@ -293,8 +280,6 @@ package-shinywidgets: $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL)

package-faicons: $(PACKAGE_DIR)/$(FAICONS_WHEEL)

package-plotnine: $(PACKAGE_DIR)/$(PLOTNINE_WHEEL)


$(PACKAGE_DIR)/$(HTMLTOOLS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-htmltools
# Remove any old copies of the package
Expand All @@ -317,11 +302,6 @@ $(PACKAGE_DIR)/$(FAICONS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-faicons
rm -f $(PACKAGE_DIR)/faicons*.whl
. $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-faicons && make install && mv dist/*.whl ../

$(PACKAGE_DIR)/$(PLOTNINE_WHEEL): $(PYBIN) $(PACKAGE_DIR)/plotnine
rm -f $(PACKAGE_DIR)/plotnine*.whl
$(PYBIN)/pip install -e $(PACKAGE_DIR)/plotnine[build]
. $(PYBIN)/activate && cd $(PACKAGE_DIR)/plotnine && make dist && mv dist/*.whl ../$(PLOTNINE_WHEEL)

$(PACKAGE_DIR)/$(LIBSASS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/$(LIBSASS_WHEEL)
rm -f $(PACKAGE_DIR)/libsass*.whl
curl --fail -L https://pkg.garrickadenbuie.com/libsass-python/$(LIBSASS_WHEEL) -o $(PACKAGE_DIR)/$(LIBSASS_WHEEL)
Expand Down
1 change: 0 additions & 1 deletion packages/plotnine
Submodule plotnine deleted from 64295e
35 changes: 17 additions & 18 deletions shinylive_lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,17 @@
},
"plotnine": {
"name": "plotnine",
"version": "0.10.1.post98+g64295e1a",
"filename": "plotnine-0.0.0-py3-none-any.whl",
"sha256": null,
"url": null,
"version": "0.14.5",
"filename": "plotnine-0.14.5-py3-none-any.whl",
"sha256": "4a8bc4360732dd69a0263def4abab285ed8f0f4386186f1e44c642f2cea79b88",
"url": "https://files.pythonhosted.org/packages/4d/c5/7cfda7ba9fa02243367fbfb4880b6de8039266f22c47c2dbbd39b6adc46f/plotnine-0.14.5-py3-none-any.whl",
"depends": [
{"name": "matplotlib", "specs": [[">=", "3.5.0"]]},
{"name": "mizani", "specs": [[">=", "0.8.1"]]},
{"name": "numpy", "specs": [[">=", "1.23.0"]]},
{"name": "pandas", "specs": [[">=", "1.3.5"]]},
{"name": "patsy", "specs": [[">=", "0.5.1"]]},
{"name": "scipy", "specs": [[">=", "1.5.0"]]},
{"name": "statsmodels", "specs": [[">=", "0.13.2"]]}
{"name": "matplotlib", "specs": [[">=", "3.8.0"]]},
{"name": "pandas", "specs": [[">=", "2.2.0"]]},
{"name": "mizani", "specs": [["~=", "0.13.0"]]},
{"name": "numpy", "specs": [[">=", "1.23.5"]]},
{"name": "scipy", "specs": [[">=", "1.8.0"]]},
{"name": "statsmodels", "specs": [[">=", "0.14.0"]]}
],
"imports": [
"plotnine"
Expand Down Expand Up @@ -325,14 +324,14 @@
},
"mizani": {
"name": "mizani",
"version": "0.11.4",
"filename": "mizani-0.11.4-py3-none-any.whl",
"sha256": "5b6271dc3da2c88694dca2e0e0a7e1879f0e2fb046c789776f54d090a5243735",
"url": "https://files.pythonhosted.org/packages/2a/11/f3777ad46c5d92e3ead121c22ea45fafb6c3b2c1edca0c0c6494969c125c/mizani-0.11.4-py3-none-any.whl",
"version": "0.13.1",
"filename": "mizani-0.13.1-py3-none-any.whl",
"sha256": "7da0dcacd43fbcc01c279ea06a76f1f064ae90dbb387c4a985ba24a92d3c7d7a",
"url": "https://files.pythonhosted.org/packages/29/85/16e17e75831ec01808c5f07e578f1552df87a4f5c827caa8be28f97b4c19/mizani-0.13.1-py3-none-any.whl",
"depends": [
{"name": "numpy", "specs": [[">=", "1.23.0"]]},
{"name": "scipy", "specs": [[">=", "1.7.0"]]},
{"name": "pandas", "specs": [[">=", "2.1.0"]]},
{"name": "numpy", "specs": [[">=", "1.23.5"]]},
{"name": "scipy", "specs": [[">=", "1.8.0"]]},
{"name": "pandas", "specs": [[">=", "2.2.0"]]},
{"name": "tzdata", "specs": []}
],
"imports": [
Expand Down
7 changes: 1 addition & 6 deletions shinylive_requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@
"version": "latest",
"comment": "Needed to suppress warning from shiny/ui/_markdown.py."
},
{
"name": "plotnine",
"source": "local",
"version": "latest",
"comment": "Fixed version needed to avoid problem with mizani calling zoneinfo.ZoneInfo('UTC')."
},
{ "name": "plotnine", "source": "pypi", "version": "latest" },
{ "name": "plotly", "source": "pypi", "version": "latest" },
{ "name": "seaborn", "source": "pypi", "version": "latest" },
{ "name": "ipywidgets", "source": "pypi", "version": "latest" },
Expand Down

0 comments on commit d3f9fc6

Please sign in to comment.