devel/py-astor 0.8.1nb3 NetBSD
Read/rewrite/write Python ASTs
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- License
- 2-clause-bsd
- Categories
- devel, python
- Package size
- 58.5 KiB, 303.3 KiB installed
Description
astor is designed to allow easy manipulation of Python source via the AST. There are some other similar libraries, but astor focuses on the following areas:
* Round-trip back to Python via Armin Ronacher's codegen.py module: ** Modified AST doesn't need linenumbers, ctx, etc. or otherwise be directly compileable ** Easy to read generated code as, well, code * Dump pretty-printing of AST ** Harder to read than round-tripped code, but more accurate to figure out what is going on. ** Easier to read than dump from built-in AST module * Non-recursive treewalk ** Sometimes you want a recursive treewalk (and astor supports that, starting at any node on the tree), but sometimes you don't need to do that. astor doesn't require you to explicitly visit sub-nodes unless you want to: ** You can add code that executes before a node's children are visited, and/or ** You can add code that executes after a node's children are visited, and/or ** You can add code that executes and keeps the node's children from being visited (and optionally visit them yourself via a recursive call) ** Write functions to access the tree based on object names and/or attribute names ** Enjoy easy access to parent node(s) for tree rewriting
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | devel/py-astor | 0.8.1nb3 |
| FreeBSD | devel/py-astor | 0.8.1_1 |
| OpenBSD | devel/py-astor | 0.8.1p4 |
| DragonFly | devel/py-astor | 0.8.1_1 |
| MidnightBSD | devel/py-astor | 0.8.1_1 |
| HardenedBSD | devel/py-astor | 0.8.1_1 |
| GhostBSD | devel/py-astor | 0.8.1_1 |
Install
Binary package:
pkgin install py311-astor
From pkgsrc:
cd /usr/pkgsrc/devel/py-astor && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.8.1nb3 |
| NetBSD 10.1 aarch64 | 0.8.1nb3 |
| SmartOS / illumos x86_64 | 0.8.1nb3 |
| macOS 15 arm64 | 0.8.1nb3 |
Dependencies
Run dependencies 1
No port depends on this one.
Configuration
No options to configure.
- Service scripts
- none
- Flavors
py312-astor-0.8.1nb3,py313-astor-0.8.1nb3,py314-astor-0.8.1nb3