Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Add wheel install (#1310)
Browse files Browse the repository at this point in the history
* Update Makefile.mk
* Update Python.md

Signed-off-by: David P. Chassin <[email protected]>
  • Loading branch information
dchassin committed Sep 22, 2023
1 parent 8bab27e commit 7c44bcb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/Module/Python.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

# Synopsis

Python 3.6 or greater:
Installation:
~~~
python3.10 -m venv myenv
. myenv/bin/activate
python3 -m pip install $(gridlabd --version=install)/share/gridlabd/*.whl
~~~

Python 3.10:
~~~
>>> import gridlabd
>>> gridlabd.title()
Expand Down Expand Up @@ -256,6 +263,7 @@ Saves the full model to the file. The currently supported formats are `.glm`, `
The following model is `test.glm`:
~~~
module test;
#set suppress_repeat_messages=FALSE
clock {
starttime '2018-01-01 00:00:00';
stoptime '2018-01-01 01:00:00';
Expand Down
2 changes: 2 additions & 0 deletions python/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ $(PYPKG)-$(PYTHONVERSION).tar.gz: $(top_srcdir)/python/dist/gridlabd-$(PYTHONVER
@cp $(top_srcdir)/python/dist/gridlabd-$(PYTHONVERSION)*.{tar.gz,whl} $(PYENV)/lib/python$(PYVER)/site-packages

python-install: $(PYPKG)-$(PYTHONVERSION).dist-info
@mkdir -p $(datadir)/$(PACKAGE)/
@cp $(PYPKG)-$(PYTHONVERSION)-*.whl $(datadir)/$(PACKAGE)/

$(PYPKG)-$(PYTHONVERSION).dist-info: $(PYPKG)-$(PYTHONVERSION).tar.gz
@echo "installing gridlabd-$(PYTHONVERSION)..."
Expand Down

0 comments on commit 7c44bcb

Please sign in to comment.