File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ A template for new Python projects
5
5
6
6
# install to current environment (with current dir at top of repo)
7
7
pip install . # "static" install
8
- pip install -e . # "editable" install
8
+ pip install -e . # "editable" install (setup.py handles source being under `src/`)
9
9
10
10
# run app from instal
11
11
python -m gnp
@@ -39,3 +39,18 @@ A template for new Python projects
39
39
mypy -p gnp
40
40
mypy -p gnp.common
41
41
mypy -m gnp.common.util
42
+
43
+
44
+ # Running app from PyCharm
45
+
46
+ ## Use Default Python Interpreter from PyCharm
47
+ - For ` src/ ` , do "Mark Directory" and set as "Sources Root" (folder turns light blue)
48
+ - Right click on ` src/gnp/__main__.py ` and choose "Run \_\_ main\_\_ "
49
+ - This relies on the Run Configuration having "Add source roots to PYTHONPATH" set to true (the default)
50
+
51
+ ## Use local venv
52
+ - Create venv
53
+ - Install package into the venv (ex: ` pip install -e . ` )
54
+ - Set venv as the project's Python interpreter in PyCharm
55
+ - Right click on ` src/gnp/__misc__.py ` and choose "Run \_\_ main\_\_ "
56
+ - Note: This does NOT rely on a Sources Root folder being set or PYTHONPATH in the Run Configuration.
You can’t perform that action at this time.
0 commit comments