|
1 |
| -A Simple Python Project Skeleton |
2 |
| -================================ |
3 |
| -This repo attempts to standardize the structure of the Python-based project's |
4 |
| -repositories using modern Python packaging and configuration techniques. |
5 |
| -Using this `blog post`_ as inspiration, this repository serves as the base for |
6 |
| -all new Python projects and is mergeable in existing repositories as well. |
| 1 | +python-inspector - inspect Python packages dependencies and metadata |
| 2 | +===================================================================== |
7 | 3 |
|
8 |
| -.. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/ |
9 | 4 |
|
| 5 | +Copyright (c) nexB Inc. and others. |
| 6 | +SPDX-License-Identifier: Apache-2.0 |
| 7 | +Homepage: https://github.com/nexB/python-inspector and https://www.aboutcode.org/ |
10 | 8 |
|
11 |
| -Usage |
12 |
| -===== |
13 | 9 |
|
14 |
| -A brand new project |
15 |
| -------------------- |
16 |
| -.. code-block:: bash |
| 10 | +``python-inspector`` is a collection of utilities to: |
17 | 11 |
|
18 |
| - git init my-new-repo |
19 |
| - cd my-new-repo |
20 |
| - git pull [email protected]:nexB/skeleton |
| 12 | +- resolve PyPI packages dependencies |
21 | 13 |
|
22 |
| - # Create the new repo on GitHub, then update your remote |
23 |
| - git remote set-url origin [email protected]:nexB/your-new-repo.git |
| 14 | +- parse various manifests and packages files such as pip requirement files, |
| 15 | + Pipfile, pyproject.toml, poetry.lock, setup.py and setup.cfg and legacy and |
| 16 | + current metadata file formats for eggs, wheels and sdist. |
24 | 17 |
|
25 |
| -From here, you can make the appropriate changes to the files for your specific project. |
| 18 | +- query PyPI JSON and simple APIs for package information |
26 | 19 |
|
27 |
| -Update an existing project |
28 |
| ---------------------------- |
29 |
| -.. code-block:: bash |
| 20 | +It grew out of ScanCode toolkit to find and analyze PyPI archives and |
| 21 | +installed Python packages and their files. |
30 | 22 |
|
31 |
| - cd my-existing-project |
32 |
| - git remote add skeleton [email protected]:nexB/skeleton |
33 |
| - git fetch skeleton |
34 |
| - git merge skeleton/main --allow-unrelated-histories |
| 23 | +The goal of python-inspector is to be a comprehensive library |
| 24 | +that can handle every style of Python package layouts, manifests and lockfiles. |
35 | 25 |
|
36 |
| -This is also the workflow to use when updating the skeleton files in any given repository. |
37 | 26 |
|
38 |
| -More usage instructions can be found in ``docs/skeleton-usage.rst``. |
| 27 | +Its companion libraries are: |
39 | 28 |
|
| 29 | +- ``pip-requirements-parser``, a mostly correct pip requirements parsing |
| 30 | + library extracted from pip. |
40 | 31 |
|
41 |
| -Release Notes |
42 |
| -============= |
| 32 | +- ``pkginfo2``, a safer fork of pkginfo to parse various installed and extracted |
| 33 | + package layouts and their metadata files. |
43 | 34 |
|
44 |
| -- 2022-03-04: |
45 |
| - - Synchronize configure and configure.bat scripts for sanity |
46 |
| - - Update CI operating system support with latest Azure OS images |
47 |
| - - Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies |
48 |
| - There are now fewer scripts. See etc/scripts/README.rst for details |
| 35 | +- ``dparse2``, a safer fork of dparse to parse various package manifests |
49 | 36 |
|
50 |
| -- 2021-09-03: |
51 |
| - - ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt`` |
52 |
| - - ``configure`` can now accept multiple options at once |
53 |
| - - Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files |
54 |
| - - Rename virtual environment directory from ``tmp`` to ``venv`` |
55 |
| - - Update README.rst with instructions for generating ``requirements.txt`` and ``requirements-dev.txt``, |
56 |
| - as well as collecting dependencies as wheels and generating ABOUT files for them. |
| 37 | +- ``resolvelib``, the library used by pip for dependency resolution |
57 | 38 |
|
58 |
| -- 2021-05-11: |
59 |
| - - Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used. |
| 39 | +- ``packaging``, the official Python packaging utility library to process |
| 40 | + versions, specifiers, markers and other packaging data formats. |
| 41 | + |
| 42 | +- ``importlib_metadata``, the official Python utility library to process |
| 43 | + installed site-packages and their metadata formats. |
| 44 | + |
| 45 | +- ``packageurl-python`` to use Package URL to reference Python packages |
| 46 | + |
| 47 | + |
0 commit comments