Python functions to get top-level importables names
0

Configure Feed

Select the types of activity you want to include in your feed.

Complete README

Juan Luis Cano Rodríguez (Dec 4, 2023, 9:28 PM +0100) 6d24ed37 75d28430

+24 -5
+24 -5
README.md
··· 4 4 [![Code style: ruff-format](https://img.shields.io/badge/code%20style-ruff_format-6340ac.svg)](https://github.com/astral-sh/ruff) 5 5 [![PyPI](https://img.shields.io/pypi/v/pygetpackages)](https://pypi.org/project/pygetpackages) 6 6 7 - Python function that gets packages from a source tree 7 + Python functions to get packages from a source tree and an already built wheel. 8 + 9 + See https://discuss.python.org/t/script-to-get-top-level-packages-from-source-tree/40232?u=astrojuanlu 8 10 9 11 ## Installation 10 12 ··· 14 16 (.venv) $ pip install pygetpackages 15 17 ``` 16 18 19 + ## Usage 20 + 21 + To get the packages directly from a source tree: 22 + 23 + ``` 24 + >>> from pygetpackages import get_packages 25 + >>> get_packages(".") # Wait a few seconds, requires working `pip install` 26 + {'pygetpackages'} 27 + ``` 28 + 29 + To get packages from an already built wheel: 30 + 31 + ``` 32 + (.venv) $ python -m build 33 + ... 34 + (.venv) $ python -q 35 + >>> from pygetpackages import get_packages_from_wheel 36 + >>> get_packages_from_wheel("dist/pygetpackages-0.1.0+d20231204-py3-none-any.whl") # Fast 37 + {'pygetpackages'} 38 + ``` 39 + 17 40 ## Development 18 41 19 42 To run style checks: ··· 22 45 (.venv) $ pip install pre-commit 23 46 (.venv) $ pre-commit -a 24 47 ``` 25 - 26 - ## Overview 27 - 28 - Add a longer description here.