From 82460949c9ae48a96c69d60006cd2bbd08c72e59 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 19 Jul 2024 11:59:09 -0400 Subject: [PATCH] chore: make shinyswatch a submodule --- .gitmodules | 3 +++ Makefile | 18 ++++++++++++++++++ packages/py-shinyswatch | 1 + shinylive_lock.json | 10 +++++----- shinylive_requirements.json | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) create mode 160000 packages/py-shinyswatch diff --git a/.gitmodules b/.gitmodules index 2f0f79e1..6d43c0cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "packages/plotnine"] path = packages/plotnine url = https://github.com/wch/plotnine.git +[submodule "packages/py-shinyswatch"] + path = packages/py-shinyswatch + url = https://github.com/posit-dev/py-shinyswatch.git diff --git a/Makefile b/Makefile index 080506bf..a85a3e63 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,13 @@ SHINYLIVE_DIR = ./_shinylive HTMLTOOLS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-htmltools/htmltools/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINY_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shiny/shiny/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') SHINYWIDGETS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinywidgets/shinywidgets/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') +SHINYSWATCH_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-shinyswatch/shinyswatch/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') FAICONS_VERSION = $(shell grep '^__version__ = ' $(PACKAGE_DIR)/py-faicons/faicons/__init__.py | sed -E -e 's/^__version__ = "(.*)"/\1/') HTMLTOOLS_WHEEL = htmltools-$(HTMLTOOLS_VERSION)-py3-none-any.whl SHINY_WHEEL = shiny-$(SHINY_VERSION)-py3-none-any.whl SHINYWIDGETS_WHEEL = shinywidgets-$(SHINYWIDGETS_VERSION)-py3-none-any.whl +SHINYSWATCH_WHEEL = shinyswatch-$(SHINYSWATCH_VERSION)-py3-none-any.whl FAICONS_WHEEL = faicons-$(FAICONS_VERSION)-py3-none-any.whl # Hard code these versions for now @@ -163,6 +165,7 @@ pyodide_js: 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/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(PLOTNINE_WHEEL) @@ -184,6 +187,12 @@ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL): $(PACKAGE_DIR)/$(SHINYWIDG rm -f $(BUILD_DIR)/shinylive/pyodide/shinywidgets*.whl cp $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) +$(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL): $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) + mkdir -p $(BUILD_DIR)/shinylive/pyodide + # Remove any old copies of shinyswatch + rm -f $(BUILD_DIR)/shinylive/pyodide/shinyswatch*.whl + cp $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) + $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL): $(PACKAGE_DIR)/$(FAICONS_WHEEL) mkdir -p $(BUILD_DIR)/shinylive/pyodide # Remove any old copies of faicons @@ -255,6 +264,7 @@ packages: clean-packages \ package-htmltools \ package-shiny \ package-shinywidgets \ + package-shinyswatch \ package-faicons \ package-plotnine @@ -265,6 +275,8 @@ package-shiny: $(PACKAGE_DIR)/$(SHINY_WHEEL) package-shinywidgets: $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL) +package-shinyswatch: $(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL) + package-faicons: $(PACKAGE_DIR)/$(FAICONS_WHEEL) package-plotnine: $(PACKAGE_DIR)/$(PLOTNINE_WHEEL) @@ -286,6 +298,11 @@ $(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinywidgets rm -f $(PACKAGE_DIR)/shinywidgets*.whl . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinywidgets && make install && mv dist/*.whl ../ +$(PACKAGE_DIR)/$(SHINYSWATCH_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinyswatch + # Remove any old copies of the package + rm -f $(PACKAGE_DIR)/shinyswatch*.whl + . $(PYBIN)/activate && cd $(PACKAGE_DIR)/py-shinyswatch && make install && mv dist/*.whl ../ + $(PACKAGE_DIR)/$(FAICONS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-faicons # Remove any old copies of the package rm -f $(PACKAGE_DIR)/faicons*.whl @@ -311,6 +328,7 @@ retrieve_packages: $(PYBIN) $(BUILD_DIR)/shinylive/pyodide \ $(BUILD_DIR)/shinylive/pyodide/$(HTMLTOOLS_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINY_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(SHINYWIDGETS_WHEEL) \ + $(BUILD_DIR)/shinylive/pyodide/$(SHINYSWATCH_WHEEL) \ $(BUILD_DIR)/shinylive/pyodide/$(FAICONS_WHEEL) $(PYBIN)/pip install -r requirements-dev.txt mkdir -p $(BUILD_DIR)/shinylive/pyodide diff --git a/packages/py-shinyswatch b/packages/py-shinyswatch new file mode 160000 index 00000000..04820b92 --- /dev/null +++ b/packages/py-shinyswatch @@ -0,0 +1 @@ +Subproject commit 04820b92295fc54accb174bbff3556271eaa25e4 diff --git a/shinylive_lock.json b/shinylive_lock.json index a6e11640..cef18bc2 100644 --- a/shinylive_lock.json +++ b/shinylive_lock.json @@ -53,15 +53,15 @@ }, "shinyswatch": { "name": "shinyswatch", - "version": "0.6.0", - "filename": "shinyswatch-0.6.0-py3-none-any.whl", - "sha256": "8de7153f84d533bc8252bf47674c622351a8cb0ae6b2afaf81f167b7af1b417f", - "url": "https://files.pythonhosted.org/packages/f0/22/ee61c29ae02dd6f9cb5bd80804ade3d85b9b0c9782c930d8c061fcc863a8/shinyswatch-0.6.0-py3-none-any.whl", + "version": "0.7.0", + "filename": "shinyswatch-0.7.0-py3-none-any.whl", + "sha256": null, + "url": null, "depends": [ {"name": "typing-extensions", "specs": [[">=", "3.10.0.0"]]}, {"name": "packaging", "specs": [[">=", "20.9"]]}, {"name": "htmltools", "specs": [[">=", "0.2.0"]]}, - {"name": "shiny", "specs": [[">=", "0.8.1"]]} + {"name": "shiny", "specs": [[">=", "1.0.0"]]} ], "imports": [ "shinyswatch" diff --git a/shinylive_requirements.json b/shinylive_requirements.json index 265ab60e..f9883682 100644 --- a/shinylive_requirements.json +++ b/shinylive_requirements.json @@ -2,7 +2,7 @@ { "name": "htmltools", "source": "local", "version": "latest" }, { "name": "shiny", "source": "local", "version": "latest" }, { "name": "shinywidgets", "source": "local", "version": "latest" }, - { "name": "shinyswatch", "source": "pypi", "version": "latest" }, + { "name": "shinyswatch", "source": "local", "version": "latest" }, { "name": "faicons", "source": "local", "version": "latest" }, { "name": "mdit-py-plugins",