python-inspector 0.12.1__tar.gz → 0.13.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_inspector-0.12.1 → python_inspector-0.13.1}/.github/workflows/pypi-release.yml +4 -4
- {python_inspector-0.12.1 → python_inspector-0.13.1}/CHANGELOG.rst +9 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/PKG-INFO +115 -2
- python_inspector-0.13.1/README.rst +187 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/azure-pipelines.yml +8 -8
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/api.py +10 -20
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/cli_utils.py +1 -2
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/package_data.py +4 -2
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/resolution.py +11 -22
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/resolve_cli.py +4 -7
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pip_compatibility_tags.py.ABOUT +1 -1
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pypi.py +6 -1
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/PKG-INFO +115 -2
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/SOURCES.txt +2 -0
- python_inspector-0.13.1/tests/data/azure-devops.req-310-expected.json +2629 -0
- python_inspector-0.13.1/tests/data/azure-devops.req-312-expected.json +2629 -0
- python_inspector-0.13.1/tests/data/azure-devops.req-313-expected.json +2629 -0
- python_inspector-0.13.1/tests/data/azure-devops.req-38-expected.json +2631 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/default-url-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/environment-marker-test-requirements.txt-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/example-requirements-ignore-errors-expected.json +136 -140
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/frozen-requirements.txt-expected.json +26 -26
- python_inspector-0.13.1/tests/data/insecure-setup/setup.py-expected.json +446 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/insecure-setup-2/setup.py-expected.json +52 -50
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pdt-requirements.txt-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pinned-pdt-requirements.txt-expected.json +105 -101
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pinned-requirements.txt-expected.json +109 -105
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/prefer-source-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/no-direct-dependencies-setup.py-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/simple-setup.py-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/spdx-setup.py-expected.json +40 -113
- python_inspector-0.13.1/tests/data/single-url-except-simple-expected.json +1085 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/single-url-expected.json +3 -3
- python_inspector-0.13.1/tests/data/test-api-expected.json +740 -0
- python_inspector-0.13.1/tests/data/test-api-pdt-expected.json +752 -0
- python_inspector-0.13.1/tests/data/test-api-with-lief-python-312.json +67 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/test-api-with-partial-setup-py.json +18 -16
- python_inspector-0.13.1/tests/data/test-api-with-prefer-source.json +390 -0
- python_inspector-0.13.1/tests/data/test-api-with-python-311.json +390 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/test-api-with-recursive-requirement-file.json +20 -20
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/test-api-with-requirement-file.json +24 -24
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/tilde_req-expected.json +3 -3
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_api.py +12 -1
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_cli.py +19 -1
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_codestyle.py +4 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_resolution.py +28 -28
- python_inspector-0.12.1/README.rst +0 -75
- python_inspector-0.12.1/tests/data/azure-devops.req-310-expected.json +0 -2595
- python_inspector-0.12.1/tests/data/azure-devops.req-312-expected.json +0 -2595
- python_inspector-0.12.1/tests/data/azure-devops.req-38-expected.json +0 -2595
- python_inspector-0.12.1/tests/data/insecure-setup/setup.py-expected.json +0 -514
- python_inspector-0.12.1/tests/data/single-url-except-simple-expected.json +0 -1107
- python_inspector-0.12.1/tests/data/test-api-expected.json +0 -750
- python_inspector-0.12.1/tests/data/test-api-pdt-expected.json +0 -762
- python_inspector-0.12.1/tests/data/test-api-with-prefer-source.json +0 -395
- python_inspector-0.12.1/tests/data/test-api-with-python-311.json +0 -395
- {python_inspector-0.12.1 → python_inspector-0.13.1}/.gitattributes +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/.github/workflows/docs-ci.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/.gitignore +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/.readthedocs.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/AUTHORS.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/CODE_OF_CONDUCT.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/MANIFEST.in +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/Makefile +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/NOTICE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/apache-2.0.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/configure +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/configure.bat +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/Makefile +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/make.bat +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/scripts/doc8_style_check.sh +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/scripts/sphinx_build_link_check.sh +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/source/_static/theme_overrides.css +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/source/conf.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/source/dependencies-design.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/source/index.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/docs/source/test-protocol.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/azure-container-deb.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/azure-container-rpm.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/azure-posix.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/azure-win.yml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/install_sudo.sh +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/macports-ci +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/macports-ci.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/ci/mit.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/README.rst +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/check_thirdparty.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/fetch_thirdparty.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/gen_pypi_simple.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/gen_pypi_simple.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/gen_pypi_simple.py.NOTICE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/gen_requirements.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/gen_requirements_dev.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/test_utils_pip_compatibility_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/test_utils_pip_compatibility_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/test_utils_pypi_supported_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/test_utils_pypi_supported_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_dejacode.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_pip_compatibility_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_pip_compatibility_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_pypi_supported_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_pypi_supported_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_requirements.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_thirdparty.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/etc/scripts/utils_thirdparty.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/pyproject.toml +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/requirements-dev.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/requirements_builder.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/setup.cfg +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/__init__.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/models.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi.py.NOTICE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi_setup_py.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi_setup_py.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/pypi_setup_py.py.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/_packagedcode/utils.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/__init__.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/dependencies.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/error.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/resolution.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/resolution.py.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/setup_py_live_eval.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/setup_py_live_eval.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/setup_py_live_eval.py.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pip_compatibility_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pypi.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pypi_supported_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector/utils_pypi_supported_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/dependency_links.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/entry_points.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/not-zip-safe +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/requires.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/src/python_inspector.egg-info/top_level.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/conftest.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/azure-devops.req.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/environment-marker-test-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/error-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/fetch_links_test.html +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/frozen-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/insecure-setup/rdflib/__init__.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/insecure-setup/setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/insecure-setup-2/setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/insecure-setup-2/testpkh/__init__.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/other_req.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/parse-reqs-with-setup_requires-and-python-requires.json +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/parse-reqs.json +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/partial-setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pdt-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pinned-pdt-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/pinned-requirements.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/psycopg2-links-expected.json +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/psycopg2.html +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/recursive_requirements/com.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/recursive_requirements/r.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/relative-links-expected.json +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/req.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/requirements-test.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/requirements.devel.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/secure-setup/setup-emptyrequires.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/secure-setup/setup-norequires.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/secure-setup/setup-requires.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/no-direct-dependencies-setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/simple-setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup/spdx-setup.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup-distutils-asnames.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup-distutils-qualifiedfct.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup-distutils.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup-qualifiedfct.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup.cfg +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup.txt +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup_if_main.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/setup_with_setup_requires_and_python_requires.cfg +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/test-commented.netrc +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/data/test.netrc +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_packagecode_pypi.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_pypi.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_requirement_parsing.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_live_eval.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_live_eval.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_live_eval.py.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_live_eval_cli.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_live_eval_cli.py.LICENSE +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_setup_py_parsing.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_skeleton_codestyle.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils_pip_compatibility_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils_pip_compatibility_tags.py.ABOUT +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils_pypi.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils_pypi_supported_tags.py +0 -0
- {python_inspector-0.12.1 → python_inspector-0.13.1}/tests/test_utils_pypi_supported_tags.py.ABOUT +0 -0
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
runs-on: ubuntu-20.04
|
|
25
25
|
|
|
26
26
|
steps:
|
|
27
|
-
- uses: actions/checkout@
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
28
|
- name: Set up Python
|
|
29
29
|
uses: actions/setup-python@v4
|
|
30
30
|
with:
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
37
37
|
run: python -m build --sdist --wheel --outdir dist/
|
|
38
38
|
|
|
39
39
|
- name: Upload built archives
|
|
40
|
-
uses: actions/upload-artifact@
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
41
|
with:
|
|
42
42
|
name: pypi_archives
|
|
43
43
|
path: dist/*
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
|
|
52
52
|
steps:
|
|
53
53
|
- name: Download built archives
|
|
54
|
-
uses: actions/download-artifact@
|
|
54
|
+
uses: actions/download-artifact@v4
|
|
55
55
|
with:
|
|
56
56
|
name: pypi_archives
|
|
57
57
|
path: dist
|
|
@@ -71,7 +71,7 @@ jobs:
|
|
|
71
71
|
|
|
72
72
|
steps:
|
|
73
73
|
- name: Download built archives
|
|
74
|
-
uses: actions/download-artifact@
|
|
74
|
+
uses: actions/download-artifact@v4
|
|
75
75
|
with:
|
|
76
76
|
name: pypi_archives
|
|
77
77
|
path: dist
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
v0.13.1
|
|
5
|
+
-----------
|
|
6
|
+
|
|
7
|
+
- Fix ResolutionImpossible for lief==0.15.1 #202
|
|
8
|
+
- Add license expression data from pypi API #208
|
|
9
|
+
- Add python 3.13 in python-inspector #196
|
|
10
|
+
- Update homepage_url and fix CI and tests
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
v0.12.1
|
|
5
14
|
-----------
|
|
6
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-inspector
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
|
|
5
5
|
Home-page: https://github.com/aboutcode-org/python-inspector
|
|
6
6
|
Author: nexB. Inc. and others
|
|
@@ -49,6 +49,7 @@ Requires-Dist: Sphinx>=5.0.2; extra == "docs"
|
|
|
49
49
|
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
50
50
|
Requires-Dist: sphinx-reredirects>=0.1.2; extra == "docs"
|
|
51
51
|
Requires-Dist: doc8>=0.11.2; extra == "docs"
|
|
52
|
+
Dynamic: license-file
|
|
52
53
|
|
|
53
54
|
python-inspector - inspect Python packages dependencies and metadata
|
|
54
55
|
=====================================================================
|
|
@@ -125,3 +126,115 @@ Its companion libraries are:
|
|
|
125
126
|
- ``packageurl-python`` to use Package URL to reference Python packages
|
|
126
127
|
|
|
127
128
|
|
|
129
|
+
|
|
130
|
+
Acknowledgements, Funding, Support and Sponsoring
|
|
131
|
+
--------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
This project is funded, supported and sponsored by:
|
|
134
|
+
|
|
135
|
+
- Generous support and contributions from users like you!
|
|
136
|
+
- the European Commission NGI programme
|
|
137
|
+
- the NLnet Foundation
|
|
138
|
+
- the Swiss State Secretariat for Education, Research and Innovation (SERI)
|
|
139
|
+
- Google, including the Google Summer of Code and the Google Seasons of Doc programmes
|
|
140
|
+
- Mercedes-Benz Group
|
|
141
|
+
- Microsoft and Microsoft Azure
|
|
142
|
+
- AboutCode ASBL
|
|
143
|
+
- nexB Inc.
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|europa| |dgconnect|
|
|
148
|
+
|
|
149
|
+
|ngi| |nlnet|
|
|
150
|
+
|
|
151
|
+
|aboutcode| |nexb|
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
This project was funded through the NGI0 Discovery Fund, a fund established by NLnet with financial
|
|
155
|
+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
|
|
156
|
+
Communications Networks, Content and Technology under grant agreement No 825322.
|
|
157
|
+
|
|
158
|
+
|ngidiscovery| https://nlnet.nl/project/vulnerabilitydatabase/
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial
|
|
162
|
+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
|
|
163
|
+
Communications Networks, Content and Technology under grant agreement No 101092990.
|
|
164
|
+
|
|
165
|
+
|ngizerocore| https://nlnet.nl/project/Back2source-next/
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
.. |nlnet| image:: https://nlnet.nl/logo/banner.png
|
|
170
|
+
:target: https://nlnet.nl
|
|
171
|
+
:height: 50
|
|
172
|
+
:alt: NLnet foundation logo
|
|
173
|
+
|
|
174
|
+
.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png
|
|
175
|
+
:target: https://ngi.eu35
|
|
176
|
+
:height: 50
|
|
177
|
+
:alt: NGI logo
|
|
178
|
+
|
|
179
|
+
.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg
|
|
180
|
+
:target: https://nexb.com
|
|
181
|
+
:height: 30
|
|
182
|
+
:alt: nexB logo
|
|
183
|
+
|
|
184
|
+
.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png
|
|
185
|
+
:target: http://ec.europa.eu/index_en.htm
|
|
186
|
+
:height: 40
|
|
187
|
+
:alt: Europa logo
|
|
188
|
+
|
|
189
|
+
.. |aboutcode| image:: https://aboutcode.org/wp-content/uploads/2023/10/AboutCode.svg
|
|
190
|
+
:target: https://aboutcode.org/
|
|
191
|
+
:height: 30
|
|
192
|
+
:alt: AboutCode logo
|
|
193
|
+
|
|
194
|
+
.. |swiss| image:: https://www.sbfi.admin.ch/sbfi/en/_jcr_content/logo/image.imagespooler.png/1493119032540/logo.png
|
|
195
|
+
:target: https://www.sbfi.admin.ch/sbfi/en/home/seri/seri.html
|
|
196
|
+
:height: 40
|
|
197
|
+
:alt: Swiss logo
|
|
198
|
+
|
|
199
|
+
.. |dgconnect| image:: https://commission.europa.eu/themes/contrib/oe_theme/dist/ec/images/logo/positive/logo-ec--en.svg
|
|
200
|
+
:target: https://commission.europa.eu/about-european-commission/departments-and-executive-agencies/communications-networks-content-and-technology_en
|
|
201
|
+
:height: 40
|
|
202
|
+
:alt: EC DG Connect logo
|
|
203
|
+
|
|
204
|
+
.. |ngizerocore| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
|
|
205
|
+
:target: https://nlnet.nl/core
|
|
206
|
+
:height: 40
|
|
207
|
+
:alt: NGI Zero Core Logo
|
|
208
|
+
|
|
209
|
+
.. |ngizerocommons| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
|
|
210
|
+
:target: https://nlnet.nl/commonsfund/
|
|
211
|
+
:height: 40
|
|
212
|
+
:alt: NGI Zero Commons Logo
|
|
213
|
+
|
|
214
|
+
.. |ngizeropet| image:: https://nlnet.nl/image/logos/NGI0PET_tag.svg
|
|
215
|
+
:target: https://nlnet.nl/PET
|
|
216
|
+
:height: 40
|
|
217
|
+
:alt: NGI Zero PET logo
|
|
218
|
+
|
|
219
|
+
.. |ngizeroentrust| image:: https://nlnet.nl/image/logos/NGI0Entrust_tag.svg
|
|
220
|
+
:target: https://nlnet.nl/entrust
|
|
221
|
+
:height: 38
|
|
222
|
+
:alt: NGI Zero Entrust logo
|
|
223
|
+
|
|
224
|
+
.. |ngiassure| image:: https://nlnet.nl/image/logos/NGIAssure_tag.svg
|
|
225
|
+
:target: https://nlnet.nl/image/logos/NGIAssure_tag.svg
|
|
226
|
+
:height: 32
|
|
227
|
+
:alt: NGI Assure logo
|
|
228
|
+
|
|
229
|
+
.. |ngidiscovery| image:: https://nlnet.nl/image/logos/NGI0Discovery_tag.svg
|
|
230
|
+
:target: https://nlnet.nl/discovery/
|
|
231
|
+
:height: 40
|
|
232
|
+
:alt: NGI Discovery logo
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
python-inspector - inspect Python packages dependencies and metadata
|
|
2
|
+
=====================================================================
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Copyright (c) nexB Inc. and others.
|
|
6
|
+
SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
Homepage: https://github.com/aboutcode-org/python-inspector and https://www.aboutcode.org/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
``python-inspector`` is a collection of utilities to:
|
|
11
|
+
|
|
12
|
+
- resolve PyPI packages dependencies
|
|
13
|
+
|
|
14
|
+
- parse various requirements.txt files and setup.py files as input
|
|
15
|
+
for resolving dependencies.
|
|
16
|
+
|
|
17
|
+
- parse additionally various manifests and packages files such as
|
|
18
|
+
Pipfile, pyproject.toml, poetry.lock and setup.cfg and legacy and
|
|
19
|
+
current metadata file formats for eggs, wheels and sdist. These
|
|
20
|
+
have not been wired with the command line yet.
|
|
21
|
+
|
|
22
|
+
- query PyPI JSON and simple APIs for package information
|
|
23
|
+
|
|
24
|
+
It grew out of ScanCode toolkit to find and analyze PyPI archives and
|
|
25
|
+
installed Python packages and their files.
|
|
26
|
+
|
|
27
|
+
The goal of python-inspector is to be a comprehensive library
|
|
28
|
+
that can handle every style of Python package layouts, manifests and lockfiles.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Testing
|
|
32
|
+
--------
|
|
33
|
+
|
|
34
|
+
- Run the tests with::
|
|
35
|
+
|
|
36
|
+
pytest -vvs
|
|
37
|
+
|
|
38
|
+
- These are live tests to regenrate the tests with updated data run::
|
|
39
|
+
|
|
40
|
+
PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs
|
|
41
|
+
|
|
42
|
+
Usage
|
|
43
|
+
--------
|
|
44
|
+
|
|
45
|
+
- Install with pip::
|
|
46
|
+
|
|
47
|
+
pip install git+https://github.com/aboutcode-org/python-inspector
|
|
48
|
+
|
|
49
|
+
- Run the command line utility with::
|
|
50
|
+
|
|
51
|
+
python-inspector --help
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Its companion libraries are:
|
|
56
|
+
|
|
57
|
+
- ``pip-requirements-parser``, a mostly correct pip requirements parsing
|
|
58
|
+
library extracted from pip.
|
|
59
|
+
|
|
60
|
+
- ``pkginfo2``, a safer fork of pkginfo to parse various installed and extracted
|
|
61
|
+
package layouts and their metadata files.
|
|
62
|
+
|
|
63
|
+
- ``dparse2``, a safer fork of dparse to parse various package manifests
|
|
64
|
+
|
|
65
|
+
- ``resolvelib``, the library used by pip for dependency resolution
|
|
66
|
+
|
|
67
|
+
- ``packaging``, the official Python packaging utility library to process
|
|
68
|
+
versions, specifiers, markers and other packaging data formats.
|
|
69
|
+
|
|
70
|
+
- ``importlib_metadata``, the official Python utility library to process
|
|
71
|
+
installed site-packages and their metadata formats.
|
|
72
|
+
|
|
73
|
+
- ``packageurl-python`` to use Package URL to reference Python packages
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Acknowledgements, Funding, Support and Sponsoring
|
|
78
|
+
--------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
This project is funded, supported and sponsored by:
|
|
81
|
+
|
|
82
|
+
- Generous support and contributions from users like you!
|
|
83
|
+
- the European Commission NGI programme
|
|
84
|
+
- the NLnet Foundation
|
|
85
|
+
- the Swiss State Secretariat for Education, Research and Innovation (SERI)
|
|
86
|
+
- Google, including the Google Summer of Code and the Google Seasons of Doc programmes
|
|
87
|
+
- Mercedes-Benz Group
|
|
88
|
+
- Microsoft and Microsoft Azure
|
|
89
|
+
- AboutCode ASBL
|
|
90
|
+
- nexB Inc.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|europa| |dgconnect|
|
|
95
|
+
|
|
96
|
+
|ngi| |nlnet|
|
|
97
|
+
|
|
98
|
+
|aboutcode| |nexb|
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
This project was funded through the NGI0 Discovery Fund, a fund established by NLnet with financial
|
|
102
|
+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
|
|
103
|
+
Communications Networks, Content and Technology under grant agreement No 825322.
|
|
104
|
+
|
|
105
|
+
|ngidiscovery| https://nlnet.nl/project/vulnerabilitydatabase/
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial
|
|
109
|
+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
|
|
110
|
+
Communications Networks, Content and Technology under grant agreement No 101092990.
|
|
111
|
+
|
|
112
|
+
|ngizerocore| https://nlnet.nl/project/Back2source-next/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
.. |nlnet| image:: https://nlnet.nl/logo/banner.png
|
|
117
|
+
:target: https://nlnet.nl
|
|
118
|
+
:height: 50
|
|
119
|
+
:alt: NLnet foundation logo
|
|
120
|
+
|
|
121
|
+
.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png
|
|
122
|
+
:target: https://ngi.eu35
|
|
123
|
+
:height: 50
|
|
124
|
+
:alt: NGI logo
|
|
125
|
+
|
|
126
|
+
.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg
|
|
127
|
+
:target: https://nexb.com
|
|
128
|
+
:height: 30
|
|
129
|
+
:alt: nexB logo
|
|
130
|
+
|
|
131
|
+
.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png
|
|
132
|
+
:target: http://ec.europa.eu/index_en.htm
|
|
133
|
+
:height: 40
|
|
134
|
+
:alt: Europa logo
|
|
135
|
+
|
|
136
|
+
.. |aboutcode| image:: https://aboutcode.org/wp-content/uploads/2023/10/AboutCode.svg
|
|
137
|
+
:target: https://aboutcode.org/
|
|
138
|
+
:height: 30
|
|
139
|
+
:alt: AboutCode logo
|
|
140
|
+
|
|
141
|
+
.. |swiss| image:: https://www.sbfi.admin.ch/sbfi/en/_jcr_content/logo/image.imagespooler.png/1493119032540/logo.png
|
|
142
|
+
:target: https://www.sbfi.admin.ch/sbfi/en/home/seri/seri.html
|
|
143
|
+
:height: 40
|
|
144
|
+
:alt: Swiss logo
|
|
145
|
+
|
|
146
|
+
.. |dgconnect| image:: https://commission.europa.eu/themes/contrib/oe_theme/dist/ec/images/logo/positive/logo-ec--en.svg
|
|
147
|
+
:target: https://commission.europa.eu/about-european-commission/departments-and-executive-agencies/communications-networks-content-and-technology_en
|
|
148
|
+
:height: 40
|
|
149
|
+
:alt: EC DG Connect logo
|
|
150
|
+
|
|
151
|
+
.. |ngizerocore| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
|
|
152
|
+
:target: https://nlnet.nl/core
|
|
153
|
+
:height: 40
|
|
154
|
+
:alt: NGI Zero Core Logo
|
|
155
|
+
|
|
156
|
+
.. |ngizerocommons| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
|
|
157
|
+
:target: https://nlnet.nl/commonsfund/
|
|
158
|
+
:height: 40
|
|
159
|
+
:alt: NGI Zero Commons Logo
|
|
160
|
+
|
|
161
|
+
.. |ngizeropet| image:: https://nlnet.nl/image/logos/NGI0PET_tag.svg
|
|
162
|
+
:target: https://nlnet.nl/PET
|
|
163
|
+
:height: 40
|
|
164
|
+
:alt: NGI Zero PET logo
|
|
165
|
+
|
|
166
|
+
.. |ngizeroentrust| image:: https://nlnet.nl/image/logos/NGI0Entrust_tag.svg
|
|
167
|
+
:target: https://nlnet.nl/entrust
|
|
168
|
+
:height: 38
|
|
169
|
+
:alt: NGI Zero Entrust logo
|
|
170
|
+
|
|
171
|
+
.. |ngiassure| image:: https://nlnet.nl/image/logos/NGIAssure_tag.svg
|
|
172
|
+
:target: https://nlnet.nl/image/logos/NGIAssure_tag.svg
|
|
173
|
+
:height: 32
|
|
174
|
+
:alt: NGI Assure logo
|
|
175
|
+
|
|
176
|
+
.. |ngidiscovery| image:: https://nlnet.nl/image/logos/NGI0Discovery_tag.svg
|
|
177
|
+
:target: https://nlnet.nl/discovery/
|
|
178
|
+
:height: 40
|
|
179
|
+
:alt: NGI Discovery logo
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
@@ -9,7 +9,7 @@ jobs:
|
|
|
9
9
|
parameters:
|
|
10
10
|
job_name: ubuntu20_cpython
|
|
11
11
|
image_name: ubuntu-20.04
|
|
12
|
-
python_versions: ["3.
|
|
12
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
13
13
|
test_suites:
|
|
14
14
|
all: venv/bin/pytest -n 2 -vvs --reruns 2
|
|
15
15
|
|
|
@@ -17,15 +17,15 @@ jobs:
|
|
|
17
17
|
parameters:
|
|
18
18
|
job_name: ubuntu22_cpython
|
|
19
19
|
image_name: ubuntu-22.04
|
|
20
|
-
python_versions: ["3.
|
|
20
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
21
21
|
test_suites:
|
|
22
22
|
all: venv/bin/pytest -n 2 -vvs --reruns 2
|
|
23
23
|
|
|
24
24
|
- template: etc/ci/azure-posix.yml
|
|
25
25
|
parameters:
|
|
26
|
-
job_name:
|
|
27
|
-
image_name: macOS-
|
|
28
|
-
python_versions: ["3.
|
|
26
|
+
job_name: macos14_cpython
|
|
27
|
+
image_name: macOS-14
|
|
28
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
29
29
|
test_suites:
|
|
30
30
|
all: venv/bin/pytest -n 2 -vvs --reruns 2
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ jobs:
|
|
|
33
33
|
parameters:
|
|
34
34
|
job_name: macos13_cpython
|
|
35
35
|
image_name: macos-13
|
|
36
|
-
python_versions: ["3.
|
|
36
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
37
37
|
test_suites:
|
|
38
38
|
all: venv/bin/pytest -n 2 -vvs --reruns 2
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
parameters:
|
|
42
42
|
job_name: win2019_cpython
|
|
43
43
|
image_name: windows-2019
|
|
44
|
-
python_versions: ["3.
|
|
44
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
45
45
|
test_suites:
|
|
46
46
|
all: venv\Scripts\pytest -n 2 -vvs --reruns 2
|
|
47
47
|
|
|
@@ -49,6 +49,6 @@ jobs:
|
|
|
49
49
|
parameters:
|
|
50
50
|
job_name: win2022_cpython
|
|
51
51
|
image_name: windows-2022
|
|
52
|
-
python_versions: ["3.
|
|
52
|
+
python_versions: ["3.9", "3.10", "3.11", "3.12"]
|
|
53
53
|
test_suites:
|
|
54
54
|
all: venv\Scripts\pytest -n 2 -vvs --reruns 2
|
|
@@ -64,8 +64,7 @@ class Resolution(NamedTuple):
|
|
|
64
64
|
# clean file paths
|
|
65
65
|
for file in files:
|
|
66
66
|
path = file["path"]
|
|
67
|
-
file["path"] = utils.remove_test_data_dir_variable_prefix(
|
|
68
|
-
path=path)
|
|
67
|
+
file["path"] = utils.remove_test_data_dir_variable_prefix(path=path)
|
|
69
68
|
return {
|
|
70
69
|
"files": files,
|
|
71
70
|
"packages": [package for package in self.packages],
|
|
@@ -152,20 +151,16 @@ def resolve_dependencies(
|
|
|
152
151
|
|
|
153
152
|
# requirements
|
|
154
153
|
for req_file in requirement_files:
|
|
155
|
-
deps = dependencies.get_dependencies_from_requirements(
|
|
156
|
-
requirements_file=req_file)
|
|
154
|
+
deps = dependencies.get_dependencies_from_requirements(requirements_file=req_file)
|
|
157
155
|
for extra_data in dependencies.get_extra_data_from_requirements(requirements_file=req_file):
|
|
158
|
-
index_urls = (
|
|
159
|
-
|
|
160
|
-
index_urls = (
|
|
161
|
-
*index_urls, *tuple(extra_data.get("index_url") or []))
|
|
156
|
+
index_urls = (*index_urls, *tuple(extra_data.get("extra_index_urls") or []))
|
|
157
|
+
index_urls = (*index_urls, *tuple(extra_data.get("index_url") or []))
|
|
162
158
|
direct_dependencies.extend(deps)
|
|
163
159
|
package_data = [
|
|
164
160
|
pkg_data.to_dict() for pkg_data in PipRequirementsFileHandler.parse(location=req_file)
|
|
165
161
|
]
|
|
166
162
|
if generic_paths:
|
|
167
|
-
req_file = utils.remove_test_data_dir_variable_prefix(
|
|
168
|
-
path=req_file)
|
|
163
|
+
req_file = utils.remove_test_data_dir_variable_prefix(path=req_file)
|
|
169
164
|
|
|
170
165
|
files.append(
|
|
171
166
|
dict(
|
|
@@ -218,15 +213,13 @@ def resolve_dependencies(
|
|
|
218
213
|
files=[setup_py_file],
|
|
219
214
|
analyze_setup_py_insecurely=analyze_setup_py_insecurely,
|
|
220
215
|
)
|
|
221
|
-
setup_py_file_deps = list(
|
|
222
|
-
get_dependent_packages_from_reqs(reqs))
|
|
216
|
+
setup_py_file_deps = list(get_dependent_packages_from_reqs(reqs))
|
|
223
217
|
direct_dependencies.extend(setup_py_file_deps)
|
|
224
218
|
|
|
225
219
|
package_data.dependencies = setup_py_file_deps
|
|
226
220
|
file_package_data = [package_data.to_dict()]
|
|
227
221
|
if generic_paths:
|
|
228
|
-
setup_py_file = utils.remove_test_data_dir_variable_prefix(
|
|
229
|
-
path=setup_py_file)
|
|
222
|
+
setup_py_file = utils.remove_test_data_dir_variable_prefix(path=setup_py_file)
|
|
230
223
|
files.append(
|
|
231
224
|
dict(
|
|
232
225
|
type="file",
|
|
@@ -267,11 +260,9 @@ def resolve_dependencies(
|
|
|
267
260
|
else:
|
|
268
261
|
credentials = None
|
|
269
262
|
if parsed_netrc:
|
|
270
|
-
login, password = utils.get_netrc_auth(
|
|
271
|
-
index_url, parsed_netrc)
|
|
263
|
+
login, password = utils.get_netrc_auth(index_url, parsed_netrc)
|
|
272
264
|
credentials = (
|
|
273
|
-
dict(login=login,
|
|
274
|
-
password=password) if login and password else None
|
|
265
|
+
dict(login=login, password=password) if login and password else None
|
|
275
266
|
)
|
|
276
267
|
repo = utils_pypi.PypiSimpleRepository(
|
|
277
268
|
index_url=index_url,
|
|
@@ -391,8 +382,7 @@ def get_resolved_dependencies(
|
|
|
391
382
|
),
|
|
392
383
|
reporter=BaseReporter(),
|
|
393
384
|
)
|
|
394
|
-
resolver_results = resolver.resolve(
|
|
395
|
-
requirements=requirements, max_rounds=max_rounds)
|
|
385
|
+
resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
|
|
396
386
|
package_list = get_package_list(results=resolver_results)
|
|
397
387
|
if pdt_output:
|
|
398
388
|
return (format_pdt_tree(resolver_results), package_list)
|
|
@@ -21,8 +21,7 @@ class FileOptionType(click.File):
|
|
|
21
21
|
|
|
22
22
|
def convert(self, value, param, ctx):
|
|
23
23
|
known_opts = set(
|
|
24
|
-
chain.from_iterable(
|
|
25
|
-
p.opts for p in ctx.command.params if isinstance(p, click.Option))
|
|
24
|
+
chain.from_iterable(p.opts for p in ctx.command.params if isinstance(p, click.Option))
|
|
26
25
|
)
|
|
27
26
|
if value in known_opts:
|
|
28
27
|
self.fail(
|
|
@@ -53,8 +53,7 @@ def get_pypi_data_from_purl(
|
|
|
53
53
|
project_urls = info.get("project_urls") or {}
|
|
54
54
|
code_view_url = get_pypi_codeview_url(project_urls)
|
|
55
55
|
bug_tracking_url = get_pypi_bugtracker_url(project_urls)
|
|
56
|
-
python_version = get_python_version_from_env_tag(
|
|
57
|
-
python_version=environment.python_version)
|
|
56
|
+
python_version = get_python_version_from_env_tag(python_version=environment.python_version)
|
|
58
57
|
valid_distribution_urls = []
|
|
59
58
|
|
|
60
59
|
valid_distribution_urls.append(
|
|
@@ -65,6 +64,8 @@ def get_pypi_data_from_purl(
|
|
|
65
64
|
)
|
|
66
65
|
)
|
|
67
66
|
|
|
67
|
+
valid_distribution_urls = [url for url in valid_distribution_urls if url]
|
|
68
|
+
|
|
68
69
|
# if prefer_source is True then only source distribution is used
|
|
69
70
|
# in case of no source distribution available then wheel is used
|
|
70
71
|
if not valid_distribution_urls or not prefer_source:
|
|
@@ -94,6 +95,7 @@ def get_pypi_data_from_purl(
|
|
|
94
95
|
api_data_url=api_url,
|
|
95
96
|
bug_tracking_url=bug_tracking_url,
|
|
96
97
|
code_view_url=code_view_url,
|
|
98
|
+
license_expression=info.get("license_expression"),
|
|
97
99
|
declared_license=get_declared_license(info),
|
|
98
100
|
download_url=dist_url,
|
|
99
101
|
size=url.get("size"),
|
|
@@ -210,15 +210,13 @@ def get_sdist_file_path_from_filename(sdist):
|
|
|
210
210
|
sdist_file = sdist.rstrip(".tar.gz")
|
|
211
211
|
with tarfile.open(os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, sdist)) as file:
|
|
212
212
|
file.extractall(
|
|
213
|
-
os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR,
|
|
214
|
-
"extracted_sdists", sdist_file)
|
|
213
|
+
os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, "extracted_sdists", sdist_file)
|
|
215
214
|
)
|
|
216
215
|
elif sdist.endswith(".zip"):
|
|
217
216
|
sdist_file = sdist.rstrip(".zip")
|
|
218
217
|
with ZipFile(os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, sdist)) as zip:
|
|
219
218
|
zip.extractall(
|
|
220
|
-
os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR,
|
|
221
|
-
"extracted_sdists", sdist_file)
|
|
219
|
+
os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, "extracted_sdists", sdist_file)
|
|
222
220
|
)
|
|
223
221
|
|
|
224
222
|
else:
|
|
@@ -361,8 +359,7 @@ class PythonInputProvider(AbstractProvider):
|
|
|
361
359
|
ignore_errors=False,
|
|
362
360
|
):
|
|
363
361
|
self.environment = environment
|
|
364
|
-
self.environment_marker = get_environment_marker_from_environment(
|
|
365
|
-
self.environment)
|
|
362
|
+
self.environment_marker = get_environment_marker_from_environment(self.environment)
|
|
366
363
|
self.repos = repos or []
|
|
367
364
|
self.versions_by_package = {}
|
|
368
365
|
self.dependencies_by_purl = {}
|
|
@@ -411,11 +408,9 @@ class PythonInputProvider(AbstractProvider):
|
|
|
411
408
|
versions = []
|
|
412
409
|
for version, package in repo.get_package_versions(name).items():
|
|
413
410
|
python_version = parse_version(
|
|
414
|
-
get_python_version_from_env_tag(
|
|
415
|
-
python_version=self.environment.python_version)
|
|
411
|
+
get_python_version_from_env_tag(python_version=self.environment.python_version)
|
|
416
412
|
)
|
|
417
|
-
wheels = list(package.get_supported_wheels(
|
|
418
|
-
environment=self.environment))
|
|
413
|
+
wheels = list(package.get_supported_wheels(environment=self.environment))
|
|
419
414
|
valid_wheel_present = False
|
|
420
415
|
pypi_valid_python_version = False
|
|
421
416
|
if wheels:
|
|
@@ -464,8 +459,7 @@ class PythonInputProvider(AbstractProvider):
|
|
|
464
459
|
Return requirements for a package from the simple repositories.
|
|
465
460
|
"""
|
|
466
461
|
python_version = parse_version(
|
|
467
|
-
get_python_version_from_env_tag(
|
|
468
|
-
python_version=self.environment.python_version)
|
|
462
|
+
get_python_version_from_env_tag(python_version=self.environment.python_version)
|
|
469
463
|
)
|
|
470
464
|
|
|
471
465
|
wheels = utils_pypi.download_wheel(
|
|
@@ -478,8 +472,7 @@ class PythonInputProvider(AbstractProvider):
|
|
|
478
472
|
|
|
479
473
|
if wheels:
|
|
480
474
|
for wheel in wheels:
|
|
481
|
-
wheel_location = os.path.join(
|
|
482
|
-
utils_pypi.CACHE_THIRDPARTY_DIR, wheel)
|
|
475
|
+
wheel_location = os.path.join(utils_pypi.CACHE_THIRDPARTY_DIR, wheel)
|
|
483
476
|
requirements = get_requirements_from_distribution(
|
|
484
477
|
handler=PypiWheelHandler,
|
|
485
478
|
location=wheel_location,
|
|
@@ -571,8 +564,7 @@ class PythonInputProvider(AbstractProvider):
|
|
|
571
564
|
):
|
|
572
565
|
valid_versions.append(parsed_version)
|
|
573
566
|
if not all(version.is_prerelease for version in valid_versions):
|
|
574
|
-
valid_versions = [
|
|
575
|
-
version for version in valid_versions if not version.is_prerelease]
|
|
567
|
+
valid_versions = [version for version in valid_versions if not version.is_prerelease]
|
|
576
568
|
for version in valid_versions:
|
|
577
569
|
yield Candidate(name=name, version=version, extras=extras)
|
|
578
570
|
|
|
@@ -593,8 +585,7 @@ class PythonInputProvider(AbstractProvider):
|
|
|
593
585
|
versions.extend(self.get_versions_for_package(name=name))
|
|
594
586
|
else:
|
|
595
587
|
for repo in self.repos:
|
|
596
|
-
versions.extend(
|
|
597
|
-
self.get_versions_for_package(name=name, repo=repo))
|
|
588
|
+
versions.extend(self.get_versions_for_package(name=name, repo=repo))
|
|
598
589
|
|
|
599
590
|
if not versions:
|
|
600
591
|
if self.ignore_errors:
|
|
@@ -685,8 +676,7 @@ def dfs(mapping: Dict, graph: DirectedGraph, src: str):
|
|
|
685
676
|
|
|
686
677
|
return dict(
|
|
687
678
|
package=str(src_purl),
|
|
688
|
-
dependencies=sorted([dfs(mapping, graph, c)
|
|
689
|
-
for c in children], key=lambda d: d["package"]),
|
|
679
|
+
dependencies=sorted([dfs(mapping, graph, c) for c in children], key=lambda d: d["package"]),
|
|
690
680
|
)
|
|
691
681
|
|
|
692
682
|
|
|
@@ -804,8 +794,7 @@ def get_setup_requirements(sdist_location: str, setup_py_location: str, setup_cf
|
|
|
804
794
|
"""
|
|
805
795
|
|
|
806
796
|
if not os.path.exists(setup_py_location) and not os.path.exists(setup_cfg_location):
|
|
807
|
-
raise Exception(
|
|
808
|
-
f"No setup.py or setup.cfg found in pypi sdist {sdist_location}")
|
|
797
|
+
raise Exception(f"No setup.py or setup.cfg found in pypi sdist {sdist_location}")
|
|
809
798
|
|
|
810
799
|
# Some commonon packages like flask may have some dependencies in setup.cfg
|
|
811
800
|
# and some dependencies in setup.py. We are going to check both.
|
|
@@ -19,7 +19,7 @@ from python_inspector.utils import write_output_in_file
|
|
|
19
19
|
|
|
20
20
|
TRACE = False
|
|
21
21
|
|
|
22
|
-
__version__ = "0.
|
|
22
|
+
__version__ = "0.13.0"
|
|
23
23
|
|
|
24
24
|
DEFAULT_PYTHON_VERSION = "38"
|
|
25
25
|
PYPI_SIMPLE_URL = "https://pypi.org/simple"
|
|
@@ -84,8 +84,7 @@ def print_version(ctx, param, value):
|
|
|
84
84
|
metavar="OS",
|
|
85
85
|
show_default=True,
|
|
86
86
|
required=True,
|
|
87
|
-
help="OS to use for dependency resolution. One of " +
|
|
88
|
-
", ".join(utils_pypi.PLATFORMS_BY_OS),
|
|
87
|
+
help="OS to use for dependency resolution. One of " + ", ".join(utils_pypi.PLATFORMS_BY_OS),
|
|
89
88
|
)
|
|
90
89
|
@click.option(
|
|
91
90
|
"--index-url",
|
|
@@ -229,8 +228,7 @@ def resolve_dependencies(
|
|
|
229
228
|
from python_inspector.api import resolve_dependencies as resolver_api
|
|
230
229
|
|
|
231
230
|
if not (json_output or pdt_output):
|
|
232
|
-
click.secho(
|
|
233
|
-
"No output file specified. Use --json or --json-pdt.", err=True)
|
|
231
|
+
click.secho("No output file specified. Use --json or --json-pdt.", err=True)
|
|
234
232
|
ctx.exit(1)
|
|
235
233
|
|
|
236
234
|
if json_output and pdt_output:
|
|
@@ -339,8 +337,7 @@ def get_pretty_options(ctx, generic_paths=False):
|
|
|
339
337
|
value = [value]
|
|
340
338
|
|
|
341
339
|
for val in value:
|
|
342
|
-
val = get_pretty_value(param_type=param.type,
|
|
343
|
-
value=val, generic_paths=generic_paths)
|
|
340
|
+
val = get_pretty_value(param_type=param.type, value=val, generic_paths=generic_paths)
|
|
344
341
|
|
|
345
342
|
if isinstance(param, click.Argument):
|
|
346
343
|
args.append(val)
|