Skip to content

Commit 1af5ecc

Browse files
authored
Merge pull request #65 from nexB/insecure-option
Evaluate live setup.py with a new --insecure option #62
2 parents 0de9f65 + 426b929 commit 1af5ecc

30 files changed

+9721
-202
lines changed

CHANGELOG.rst

+16
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
Changelog
22
=========
33

4+
5+
v0.7.0
6+
------
7+
8+
- Enable live evaluation of the "setup.py" that use computed arguments.
9+
When this occurs, a live evaluation of the Python code is the only working
10+
solution short of a full installation. Because this can be a security issue,
11+
there is a new "--analyze-setup-py-insecurely" command line option to enable this feature.
12+
Note that this not more insecure than actually installing a PyPI package.
13+
- Add metadata for packages.
14+
15+
416
v0.6.5
517
------
618

719
- Add --version option.
820

21+
922
v0.6.4
1023
------
1124

1225
- Add support for setup.py
1326

27+
1428
v0.6.3
1529
------
1630

1731
- Ensure to filter out top level dependencies on the basis of their environment markers
1832
- Do not ignore files on basis of name
1933

34+
2035
v0.6.2
2136
------
2237

2338
- Ignore invalid requirement files on basis of name
2439
- Use netrc file from home directory if not present
2540

41+
2642
v0.6.1
2743
------
2844

requirements_builder.ABOUT

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
[metadata]
2+
name = python-inspector
3+
license = Apache-2.0
4+
5+
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
6+
description = python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
7+
long_description = file:README.rst
8+
long_description_content_type = text/x-rst
9+
url = https://github.com/nexB/python-inspector
10+
11+
author = nexB. Inc. and others
12+
author_email = [email protected]
13+
14+
classifiers =
15+
Development Status :: 4 - Beta
16+
Intended Audience :: Developers
17+
Programming Language :: Python :: 3
18+
Programming Language :: Python :: 3 :: Only
19+
Topic :: Software Development
20+
Topic :: Utilities
21+
22+
keywords =
23+
open source
24+
scan
25+
package
26+
dependency
27+
pypi
28+
python
29+
SBOM
30+
sca
31+
dependencies
32+
dependency resolution
33+
resolver
34+
resolvelib
35+
pip
36+
requirements
37+
38+
license_files =
39+
apache-2.0.LICENSE
40+
NOTICE
41+
AUTHORS.rst
42+
CHANGELOG.rst
43+
CODE_OF_CONDUCT.rst
44+
45+
[options]
46+
package_dir =
47+
=src
48+
packages = find:
49+
include_package_data = true
50+
zip_safe = false
51+
52+
setup_requires = setuptools_scm[toml] >= 4
53+
54+
python_requires = >=3.6.*
55+
56+
install_requires =
57+
attrs >= 18.1, !=20.1.0
58+
click > 7.0
59+
colorama >= 0.3.9
60+
commoncode >= 30.0.0
61+
dparse2 >= 0.6.1
62+
importlib_metadata >= 4.12.0
63+
packageurl_python >= 0.9.0
64+
pkginfo2 >= 30.0.0
65+
pip-requirements-parser >= 31.2.0
66+
requests >= 2.18.0
67+
resolvelib >= 0.8.1
68+
saneyaml >= 0.5.2
69+
tinynetrc >= 1.3.1
70+
toml >= 0.10.0
71+
mock >= 3.0.5
72+
73+
[options.packages.find]
74+
where = src
75+
76+
[options.entry_points]
77+
console_scripts =
78+
python-inspector = python_inspector.resolve_cli:resolve_dependencies
79+
80+
[options.extras_require]
81+
testing =
82+
pytest >= 6, != 7.0.0
83+
pytest-xdist >= 2
84+
aboutcode-toolkit >= 7.0.2
85+
twine
86+
black
87+
isort
88+
pycodestyle
89+
90+
docs =
91+
Sphinx >= 3.3.1
92+
sphinx-rtd-theme >= 0.5.0
93+
doc8 >= 0.8.1

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ install_requires =
6868
saneyaml >= 0.5.2
6969
tinynetrc >= 1.3.1
7070
toml >= 0.10.0
71+
mock >= 3.0.5
7172

7273
[options.packages.find]
7374
where = src

src/python_inspector/package_data.py

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def get_pypi_data_from_purl(
9292
from python_inspector.resolution import get_response
9393

9494
response = get_response(api_url)
95+
if not response:
96+
return []
9597
info = response.get("info") or {}
9698
homepage_url = info.get("home_page")
9799
license = info.get("license")

0 commit comments

Comments
 (0)