pio-installer 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pio_installer/__init__.py +44 -0
- pio_installer/__main__.py +8 -0
- pio_installer/cli.py +14 -0
- pio_installer/core/__init__.py +12 -0
- pio_installer/core/cli.py +1028 -0
- pio_installer/core/console.py +132 -0
- pio_installer/core/download.py +531 -0
- pio_installer/core/files.py +35 -0
- pio_installer/core/installer.py +865 -0
- pio_installer/core/manifest.py +804 -0
- pio_installer/core/target.py +176 -0
- pio_installer/core/usercode.py +193 -0
- pio_installer/core/yamlreader.py +402 -0
- pio_installer/ini.py +275 -0
- pio_installer/library_json.py +161 -0
- pio_installer/pio.py +200 -0
- pio_installer-1.0.0.dist-info/METADATA +428 -0
- pio_installer-1.0.0.dist-info/RECORD +22 -0
- pio_installer-1.0.0.dist-info/WHEEL +5 -0
- pio_installer-1.0.0.dist-info/entry_points.txt +2 -0
- pio_installer-1.0.0.dist-info/licenses/LICENSE +201 -0
- pio_installer-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Install embedded C and C++ libraries into a PlatformIO project.
|
|
3
|
+
|
|
4
|
+
Installed with pip, it is the pio-installer command. It takes a library from
|
|
5
|
+
GitHub, from a downloaded zip, or from a folder, puts it into the project's
|
|
6
|
+
lib folder with a library.json written for it, and gives the whole project
|
|
7
|
+
the defines it needs in platformio.ini. Every framework PlatformIO builds
|
|
8
|
+
with finds it there: Arduino, ESP-IDF, STM32Cube, Zephyr and the rest.
|
|
9
|
+
|
|
10
|
+
The work that is the same for any project is the shared core, in core/, from
|
|
11
|
+
github.com/nimaltd/core-installer. What a PlatformIO project is, is in pio.py.
|
|
12
|
+
|
|
13
|
+
See https://github.com/nimaltd/pio-installer
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
__version__ = "1.0.0"
|
|
17
|
+
|
|
18
|
+
# Before anything of the core is used: it asks the target for every answer
|
|
19
|
+
# that depends on the kind of project.
|
|
20
|
+
from .core import target as _target # noqa: E402
|
|
21
|
+
from .pio import PlatformIO # noqa: E402
|
|
22
|
+
|
|
23
|
+
_target.use(PlatformIO(__version__))
|
|
24
|
+
|
|
25
|
+
from .core.installer import InstallError, Result, install_in_place, install_to # noqa: E402
|
|
26
|
+
from .core.manifest import Manifest, ManifestError, load # noqa: E402
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"InstallError",
|
|
30
|
+
"Manifest",
|
|
31
|
+
"ManifestError",
|
|
32
|
+
"Result",
|
|
33
|
+
"install_in_place",
|
|
34
|
+
"install_to",
|
|
35
|
+
"load",
|
|
36
|
+
"main",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def main(argv=None):
|
|
41
|
+
"""Run the command line interface. Imported lazily to keep start-up cheap."""
|
|
42
|
+
from .cli import main as _main
|
|
43
|
+
|
|
44
|
+
return _main(argv=argv)
|
pio_installer/cli.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The pio-installer command: the core's command line, with the PlatformIO target.
|
|
3
|
+
|
|
4
|
+
The target is chosen when the package is imported, before this runs.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
from .core.cli import main
|
|
10
|
+
|
|
11
|
+
__all__ = ["main"]
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
sys.exit(main())
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The shared core of the installers: stm32-installer, zephyr-installer.
|
|
3
|
+
|
|
4
|
+
It fetches a library from GitHub, a zip or a folder, reads its installer.yml,
|
|
5
|
+
installs what it needs first, copies its files and keeps what the user wrote
|
|
6
|
+
between USER CODE markers. What a project looks like, and how a library is
|
|
7
|
+
registered with it, comes from the installer through target.use().
|
|
8
|
+
|
|
9
|
+
Kept in its own repository, github.com/nimaltd/core-installer, and built into
|
|
10
|
+
each installer's wheel, so an installer still installs from one file with no
|
|
11
|
+
internet.
|
|
12
|
+
"""
|