_parse_pyproject
_get_package_name_from_pyproject(pyproject_path)
¶
Get the package name from a local pyproject.toml.
Example 1: if the project table has name="xyz" and
import-name=[], return `"xyz".
Example 2: if the project table has name="pillow" and
import-name=["PIL"], return "PIL".
Example 3: if the project table has name="xyz" and
import-name=["xyz1", "xyz2], return "xyz".
Reference: https://packaging.python.org/en/latest/specifications/pyproject-toml
Source code in src/fractal_task_tools/_parse_pyproject.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
get_author_names_from_pyproject(pyproject_path)
¶
Get the package authors from a local pyproject.toml.
Examples:
authors = [{"name": "a b", "email": "a@b.c"}]
authors = [{"name": "a b"}]
authors = [{"email": "a@b.c"}]
Reference: https://packaging.python.org/en/latest/specifications/pyproject-toml
Source code in src/fractal_task_tools/_parse_pyproject.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |