Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit b7540b8

Browse files
author
Simon Biggs
committed
fix example to not need a properly set path
1 parent 28cc85f commit b7540b8

5 files changed

Lines changed: 13 additions & 4 deletions

File tree

example/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pip install -e .
1919
To then use the package, in any directory on your machine within a terminal run:
2020

2121
```bash
22-
example
22+
python -m example
2323
```
2424

2525
This will then boot up the scriptedforms GUI in your default browser.
@@ -37,7 +37,7 @@ Here is a list of all of these instances within files:
3737

3838
* [`setup.py`](./setup.py) lines [4](./setup.py#L4), [11](./setup.py#L11), and two instances on line [15](./setup.py#L15).
3939
* [`MANIFEST.in`](./MANIFEST.in#L1)
40-
* and [`your_package_name/__init__.py`](./example/__init__.py#L1)
40+
* and [`your_package_name/__main__.py`](./example/__main__.py#L1)
4141

4242
And then the `example` directory needs to be changed to your own package
4343
name as well as `example.py`.
@@ -87,7 +87,7 @@ pip install -e .
8787
Once it is installed create a `.bat` file which simply has within it:
8888

8989
```batch
90-
start your_package_name
90+
start python -m your_package_name
9191
```
9292

9393
And then place that on the desktop, or where ever you expect the user will be

example/example/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .example import main
1+
from .__main__ import main

example/example/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .example import main
2+
3+
if __name__ == '__main__':
4+
main()

portable-windows-bundle/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
python/
2+
scriptedforms.zip

portable-windows-bundle/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@ This currently doesn't work on Linux, need to test on Windows
5151

5252
wine cmd
5353
scriptedforms ./simple-form/simple.md
54+
55+
## Create the bundle
56+
57+
zip -r scriptedforms.zip python/* simple-form/* scriptedforms.bat

0 commit comments

Comments
 (0)