Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z3ntu/python-pkgbuild
Python library to parse pacman's .SRCINFO file
https://github.com/z3ntu/python-pkgbuild
Last synced: about 16 hours ago
JSON representation
Python library to parse pacman's .SRCINFO file
- Host: GitHub
- URL: https://github.com/z3ntu/python-pkgbuild
- Owner: z3ntu
- License: mit
- Created: 2016-02-22T09:48:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T18:49:48.000Z (over 2 years ago)
- Last Synced: 2023-03-02T13:26:18.337Z (over 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-pkgbuild
Python library to parse pacman's .SRCINFO file## Usage
```
>>> import pkgbuild
>>> import json
>>> srcinfo = pkgbuild.SRCINFO("/path/to/.SRCINFO")
>>> json.dumps(srcinfo.content)
'{"pkgrel": "1", "options": ["debug", "!strip"], "pkgbase": "sway-git", "license": "MIT",
"pkgname": "sway-git", "makedepends": ["cmake", "git", "asciidoc"], "optdepends":
["rxvt-unicode: Default terminal emulator.", "dmenu: Default for launching applications.",
"imagemagick: For taking screenshots.", "ffmpeg: For recording screencasts.", "i3status: To
display system information with a bar."], "url": "https://github.com/SirCmpwn/sway", "pkgdesc":
"i3 compatible window manager for Wayland", "arch": ["i686", "x86_64"], "source":
"sway::git+https://github.com/SirCmpwn/sway.git", "sha1sums": "SKIP", "pkgver": "r1302.016a774",
"depends": ["wlc-git", "xorg-server-xwayland", "xcb-util-image", "json-c", "pango", "cairo",
"wayland", "gdk-pixbuf2"]}'
>>> print(srcinfo.content.get("license"))
MIT
>>> print(pkgbuild.parse_source_field(srcinfo.content.get("source"), pkgbuild.SourceParts.vcs))
git
```## Installation
```
python setup.py install
```
It is also available in the [AUR](https://aur.archlinux.org/packages/python-pkgbuild-git).