Skip to content

Commit

Permalink
chore: make shinyswatch a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Jul 19, 2024
1 parent 2aae20d commit 8246094
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -255,6 +264,7 @@ packages: clean-packages \
package-htmltools \
package-shiny \
package-shinywidgets \
package-shinyswatch \
package-faicons \
package-plotnine

Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/py-shinyswatch
Submodule py-shinyswatch added at 04820b
10 changes: 5 additions & 5 deletions shinylive_lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion shinylive_requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8246094

Please sign in to comment.