mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 04:37:22 -05:00
parent
62c950120c
commit
d3ca0cd0b3
2 changed files with 22 additions and 5 deletions
13
.idea.dist/repo.iml
Normal file
13
.idea.dist/repo.iml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/out/pylib" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/pylib" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/qt" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/extra" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/out/pyenv" />
|
||||
</content>
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -46,10 +46,14 @@ see and install a number of recommended extensions.
|
|||
|
||||
## PyCharm/IntelliJ
|
||||
|
||||
If you decide to use PyCharm instead of VS Code, there are somethings to be
|
||||
aware of.
|
||||
### Setting up Python environment
|
||||
|
||||
### Pylib References
|
||||
To make PyCharm recognize `anki` and `aqt` imports, you need to add source paths to _Settings > Project Structure_.
|
||||
You can copy the provided .idea.dist directory to set up the paths automatically:
|
||||
|
||||
You'll need to use File>Project Structure to tell IntelliJ that pylib/ is a
|
||||
sources root, so it knows references to 'anki' in aqt are valid.
|
||||
```
|
||||
mkdir .idea && cd .idea
|
||||
ln -sf ../.idea.dist/* .
|
||||
```
|
||||
|
||||
You also need to add a new Python interpreter under _Settings > Python > Interpreter_ pointing to the Python executable under `out/pyenv` (available after building Anki).
|
||||
|
|
|
|||
Loading…
Reference in a new issue