binary-inspector 0.1.2__tar.gz → 0.2.0__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.
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.github/workflows/docs-ci.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.github/workflows/pypi-release.yml +6 -5
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.github/workflows/tests.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.readthedocs.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/CHANGELOG.rst +5 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/PKG-INFO +6 -7
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/README.rst +2 -2
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/azure-pipelines.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/configure +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/configure.bat +2 -2
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/azure-container-deb.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/azure-container-rpm.yml +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_thirdparty.py +32 -33
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/pyproject.toml +1 -1
- binary_inspector-0.2.0/requirements-dev.txt +1 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/requirements.txt +3 -4
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/setup.cfg +4 -4
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/blint_binary.py +11 -5
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/PKG-INFO +6 -7
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/requires.txt +2 -7
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/macho/Lumen-symbols-plugin.json +67 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/test_binary.py +1 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/test_plugin.py +2 -2
- binary_inspector-0.1.2/requirements-dev.txt +0 -1
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.gitattributes +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/.gitignore +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/AUTHORS.rst +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/CODE_OF_CONDUCT.rst +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/MANIFEST.in +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/Makefile +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/NOTICE +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/apache-2.0.LICENSE +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/Makefile +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/make.bat +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/scripts/doc8_style_check.sh +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/scripts/sphinx_build_link_check.sh +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/source/_static/theme_overrides.css +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/source/conf.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/source/contribute/contrib_doc.rst +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/docs/source/index.rst +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/azure-posix.yml +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/azure-win.yml +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/install_sudo.sh +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/macports-ci +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/macports-ci.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/ci/mit.LICENSE +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/README.rst +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/check_thirdparty.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/fetch_thirdparty.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/gen_pypi_simple.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/gen_pypi_simple.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/gen_pypi_simple.py.NOTICE +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/gen_requirements.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/gen_requirements_dev.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/requirements.txt +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pip_compatibility_tags.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pip_compatibility_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pypi_supported_tags.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pypi_supported_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/update_skeleton.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_dejacode.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pip_compatibility_tags.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pip_compatibility_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pypi_supported_tags.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pypi_supported_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_requirements.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_thirdparty.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/setup.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/__init__.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/binary.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/blint_binary.py.ABOUT +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/blint_binary.py.LICENSE +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/config.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/plugin.py +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/SOURCES.txt +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/dependency_links.txt +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/entry_points.txt +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/not-zip-safe +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/top_level.txt +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/macho/Lumen +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/macho/Lumen-symbols.json +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/winpe/TranslucentTB-setup.exe +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/winpe/TranslucentTB-symbols-plugin.json +0 -0
- {binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/winpe/TranslucentTB-symbols.json +0 -0
|
@@ -31,10 +31,10 @@ jobs:
|
|
|
31
31
|
python-version: 3.12
|
|
32
32
|
|
|
33
33
|
- name: Install pypa/build and twine
|
|
34
|
-
run: python -m pip install --user build twine
|
|
34
|
+
run: python -m pip install --user --upgrade build twine pkginfo
|
|
35
35
|
|
|
36
36
|
- name: Build a binary wheel and a source tarball
|
|
37
|
-
run: python -m build --
|
|
37
|
+
run: python -m build --wheel --sdist --outdir dist/
|
|
38
38
|
|
|
39
39
|
- name: Validate wheel and sdis for Pypi
|
|
40
40
|
run: python -m twine check dist/*
|
|
@@ -71,6 +71,9 @@ jobs:
|
|
|
71
71
|
needs:
|
|
72
72
|
- create-gh-release
|
|
73
73
|
runs-on: ubuntu-24.04
|
|
74
|
+
environment: pypi-publish
|
|
75
|
+
permissions:
|
|
76
|
+
id-token: write
|
|
74
77
|
|
|
75
78
|
steps:
|
|
76
79
|
- name: Download built archives
|
|
@@ -81,6 +84,4 @@ jobs:
|
|
|
81
84
|
|
|
82
85
|
- name: Publish to PyPI
|
|
83
86
|
if: startsWith(github.ref, 'refs/tags')
|
|
84
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
85
|
-
with:
|
|
86
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
87
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: binary-inspector
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: binary-inspector is a library and tools to inspect binaries (elf, winpe, mach0) for symbols and other information, and models to store this.
|
|
5
5
|
Home-page: https://github.com/aboutcode-org/binary-inspector
|
|
6
6
|
Author: nexB. Inc. and others
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
14
|
Classifier: Topic :: Software Development
|
|
15
15
|
Classifier: Topic :: Utilities
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: apache-2.0.LICENSE
|
|
19
19
|
License-File: NOTICE
|
|
@@ -21,12 +21,11 @@ License-File: AUTHORS.rst
|
|
|
21
21
|
License-File: CHANGELOG.rst
|
|
22
22
|
License-File: CODE_OF_CONDUCT.rst
|
|
23
23
|
License-File: README.rst
|
|
24
|
-
Requires-Dist: click
|
|
25
|
-
Requires-Dist: click>=8.2.0; python_version >= "3.10"
|
|
24
|
+
Requires-Dist: click>=8.2.0
|
|
26
25
|
Requires-Dist: commoncode
|
|
27
26
|
Requires-Dist: plugincode
|
|
28
27
|
Requires-Dist: typecode
|
|
29
|
-
Requires-Dist: lief==0.
|
|
28
|
+
Requires-Dist: lief==0.17.0
|
|
30
29
|
Requires-Dist: symbolic==10.2.1
|
|
31
30
|
Provides-Extra: dev
|
|
32
31
|
Requires-Dist: scancode-toolkit; extra == "dev"
|
|
@@ -149,8 +148,8 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
149
148
|
:height: 30
|
|
150
149
|
:alt: AboutCode logo
|
|
151
150
|
|
|
152
|
-
.. |swiss| image:: https://www.sbfi.admin.ch/
|
|
153
|
-
:target: https://www.sbfi.admin.ch/
|
|
151
|
+
.. |swiss| image:: https://www.sbfi.admin.ch/images/swiss-logo-flag.svg
|
|
152
|
+
:target: https://www.sbfi.admin.ch/de
|
|
154
153
|
:height: 40
|
|
155
154
|
:alt: Swiss logo
|
|
156
155
|
|
|
@@ -103,8 +103,8 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
103
103
|
:height: 30
|
|
104
104
|
:alt: AboutCode logo
|
|
105
105
|
|
|
106
|
-
.. |swiss| image:: https://www.sbfi.admin.ch/
|
|
107
|
-
:target: https://www.sbfi.admin.ch/
|
|
106
|
+
.. |swiss| image:: https://www.sbfi.admin.ch/images/swiss-logo-flag.svg
|
|
107
|
+
:target: https://www.sbfi.admin.ch/de
|
|
108
108
|
:height: 40
|
|
109
109
|
:alt: Swiss logo
|
|
110
110
|
|
|
@@ -110,7 +110,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (
|
|
|
110
110
|
|
|
111
111
|
if exist "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" (
|
|
112
112
|
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
|
|
113
|
-
--
|
|
113
|
+
--pip embed --setuptools embed ^
|
|
114
114
|
--seeder pip ^
|
|
115
115
|
--never-download ^
|
|
116
116
|
--no-periodic-update ^
|
|
@@ -126,7 +126,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (
|
|
|
126
126
|
)
|
|
127
127
|
)
|
|
128
128
|
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
|
|
129
|
-
--
|
|
129
|
+
--pip embed --setuptools embed ^
|
|
130
130
|
--seeder pip ^
|
|
131
131
|
--never-download ^
|
|
132
132
|
--no-periodic-update ^
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
2
3
|
#
|
|
3
4
|
# Copyright (c) nexB Inc. and others. All rights reserved.
|
|
4
5
|
# ScanCode is a trademark of nexB Inc.
|
|
@@ -24,13 +25,14 @@ import license_expression
|
|
|
24
25
|
import packageurl
|
|
25
26
|
import requests
|
|
26
27
|
import saneyaml
|
|
27
|
-
import utils_pip_compatibility_tags
|
|
28
28
|
from commoncode import fileutils
|
|
29
29
|
from commoncode.hash import multi_checksums
|
|
30
30
|
from commoncode.text import python_safe_name
|
|
31
31
|
from packvers import tags as packaging_tags
|
|
32
32
|
from packvers import version as packaging_version
|
|
33
33
|
|
|
34
|
+
import utils_pip_compatibility_tags
|
|
35
|
+
|
|
34
36
|
"""
|
|
35
37
|
Utilities to manage Python thirparty libraries source, binaries and metadata in
|
|
36
38
|
local directories and remote repositories.
|
|
@@ -91,8 +93,7 @@ Wheel downloader
|
|
|
91
93
|
|
|
92
94
|
- parse requirement file
|
|
93
95
|
- create a TODO queue of requirements to process
|
|
94
|
-
- done: create an empty map of processed binary requirements as
|
|
95
|
-
{package name: (list of versions/tags}
|
|
96
|
+
- done: create an empty map of processed binary requirements as {package name: (list of versions/tags}
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
- while we have package reqs in TODO queue, process one requirement:
|
|
@@ -114,13 +115,14 @@ TRACE_DEEP = False
|
|
|
114
115
|
TRACE_ULTRA_DEEP = False
|
|
115
116
|
|
|
116
117
|
# Supported environments
|
|
117
|
-
PYTHON_VERSIONS = "
|
|
118
|
+
PYTHON_VERSIONS = "310", "311", "312", "313", "314"
|
|
118
119
|
|
|
119
120
|
PYTHON_DOT_VERSIONS_BY_VER = {
|
|
120
|
-
"37": "3.7",
|
|
121
|
-
"38": "3.8",
|
|
122
|
-
"39": "3.9",
|
|
123
121
|
"310": "3.10",
|
|
122
|
+
"311": "3.11",
|
|
123
|
+
"312": "3.12",
|
|
124
|
+
"313": "3.13",
|
|
125
|
+
"314": "3.14",
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
|
|
@@ -132,10 +134,11 @@ def get_python_dot_version(version):
|
|
|
132
134
|
|
|
133
135
|
|
|
134
136
|
ABIS_BY_PYTHON_VERSION = {
|
|
135
|
-
"37": ["cp37", "cp37m", "abi3"],
|
|
136
|
-
"38": ["cp38", "cp38m", "abi3"],
|
|
137
|
-
"39": ["cp39", "cp39m", "abi3"],
|
|
138
137
|
"310": ["cp310", "cp310m", "abi3"],
|
|
138
|
+
"311": ["cp311", "cp311m", "abi3"],
|
|
139
|
+
"312": ["cp312", "cp312m", "abi3"],
|
|
140
|
+
"313": ["cp313", "cp313m", "abi3"],
|
|
141
|
+
"314": ["cp314", "cp314m", "abi3"],
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
PLATFORMS_BY_OS = {
|
|
@@ -553,8 +556,7 @@ class Distribution(NameVer):
|
|
|
553
556
|
Download this distribution into `dest_dir` directory.
|
|
554
557
|
Return the fetched filename.
|
|
555
558
|
"""
|
|
556
|
-
|
|
557
|
-
raise ValueError(f"self.filename has no value but is required: {self.filename!r}")
|
|
559
|
+
assert self.filename
|
|
558
560
|
if TRACE_DEEP:
|
|
559
561
|
print(
|
|
560
562
|
f"Fetching distribution of {self.name}=={self.version}:",
|
|
@@ -822,9 +824,9 @@ class Distribution(NameVer):
|
|
|
822
824
|
"""
|
|
823
825
|
urls = LinksRepository.from_url(use_cached_index=use_cached_index).links
|
|
824
826
|
errors = []
|
|
825
|
-
extra_lic_names = [
|
|
827
|
+
extra_lic_names = [l.get("file") for l in self.extra_data.get("licenses", {})]
|
|
826
828
|
extra_lic_names += [self.extra_data.get("license_file")]
|
|
827
|
-
extra_lic_names = [
|
|
829
|
+
extra_lic_names = [ln for ln in extra_lic_names if ln]
|
|
828
830
|
lic_names = [f"{key}.LICENSE" for key in self.get_license_keys()]
|
|
829
831
|
for filename in lic_names + extra_lic_names:
|
|
830
832
|
floc = os.path.join(dest_dir, filename)
|
|
@@ -844,7 +846,7 @@ class Distribution(NameVer):
|
|
|
844
846
|
if TRACE:
|
|
845
847
|
print(f"Fetched license from remote: {lic_url}")
|
|
846
848
|
|
|
847
|
-
except
|
|
849
|
+
except:
|
|
848
850
|
try:
|
|
849
851
|
# try licensedb second
|
|
850
852
|
lic_url = f"{LICENSEDB_API_URL}/{filename}"
|
|
@@ -857,9 +859,8 @@ class Distribution(NameVer):
|
|
|
857
859
|
if TRACE:
|
|
858
860
|
print(f"Fetched license from licensedb: {lic_url}")
|
|
859
861
|
|
|
860
|
-
except
|
|
861
|
-
msg = f
|
|
862
|
-
f"{self.license_expression!r} from {self}"
|
|
862
|
+
except:
|
|
863
|
+
msg = f'No text for license {filename} in expression "{self.license_expression}" from {self}'
|
|
863
864
|
print(msg)
|
|
864
865
|
errors.append(msg)
|
|
865
866
|
|
|
@@ -999,7 +1000,7 @@ def get_license_link_for_filename(filename, urls):
|
|
|
999
1000
|
exception if no link is found or if there are more than one link for that
|
|
1000
1001
|
file name.
|
|
1001
1002
|
"""
|
|
1002
|
-
path_or_url = [
|
|
1003
|
+
path_or_url = [l for l in urls if l.endswith(f"/{filename}")]
|
|
1003
1004
|
if not path_or_url:
|
|
1004
1005
|
raise Exception(f"Missing link to file: {filename}")
|
|
1005
1006
|
if not len(path_or_url) == 1:
|
|
@@ -1288,7 +1289,7 @@ class Wheel(Distribution):
|
|
|
1288
1289
|
def is_pure_wheel(filename):
|
|
1289
1290
|
try:
|
|
1290
1291
|
return Wheel.from_filename(filename).is_pure()
|
|
1291
|
-
except
|
|
1292
|
+
except:
|
|
1292
1293
|
return False
|
|
1293
1294
|
|
|
1294
1295
|
|
|
@@ -1484,7 +1485,8 @@ class PypiPackage(NameVer):
|
|
|
1484
1485
|
"""
|
|
1485
1486
|
if self.sdist:
|
|
1486
1487
|
yield self.sdist
|
|
1487
|
-
|
|
1488
|
+
for wheel in self.wheels:
|
|
1489
|
+
yield wheel
|
|
1488
1490
|
|
|
1489
1491
|
def get_url_for_filename(self, filename):
|
|
1490
1492
|
"""
|
|
@@ -1613,8 +1615,7 @@ class PypiSimpleRepository:
|
|
|
1613
1615
|
type=dict,
|
|
1614
1616
|
default=attr.Factory(lambda: defaultdict(dict)),
|
|
1615
1617
|
metadata=dict(
|
|
1616
|
-
help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} "
|
|
1617
|
-
"available in this repo"
|
|
1618
|
+
help="Mapping of {name: {version: PypiPackage, version: PypiPackage, etc} available in this repo"
|
|
1618
1619
|
),
|
|
1619
1620
|
)
|
|
1620
1621
|
|
|
@@ -1628,8 +1629,7 @@ class PypiSimpleRepository:
|
|
|
1628
1629
|
type=bool,
|
|
1629
1630
|
default=False,
|
|
1630
1631
|
metadata=dict(
|
|
1631
|
-
help="If True, use any existing on-disk cached PyPI index files. "
|
|
1632
|
-
"Otherwise, fetch and cache."
|
|
1632
|
+
help="If True, use any existing on-disk cached PyPI index files. Otherwise, fetch and cache."
|
|
1633
1633
|
),
|
|
1634
1634
|
)
|
|
1635
1635
|
|
|
@@ -1638,8 +1638,7 @@ class PypiSimpleRepository:
|
|
|
1638
1638
|
Return a mapping of all available PypiPackage version for this package name.
|
|
1639
1639
|
The mapping may be empty. It is ordered by version from oldest to newest
|
|
1640
1640
|
"""
|
|
1641
|
-
|
|
1642
|
-
raise ValueError(f"name is required: {name!r}")
|
|
1641
|
+
assert name
|
|
1643
1642
|
normalized_name = NameVer.normalize_name(name)
|
|
1644
1643
|
versions = self.packages[normalized_name]
|
|
1645
1644
|
if not versions and normalized_name not in self.fetched_package_normalized_names:
|
|
@@ -1694,7 +1693,7 @@ class PypiSimpleRepository:
|
|
|
1694
1693
|
)
|
|
1695
1694
|
links = collect_urls(text)
|
|
1696
1695
|
# TODO: keep sha256
|
|
1697
|
-
links = [
|
|
1696
|
+
links = [l.partition("#sha256=") for l in links]
|
|
1698
1697
|
links = [url for url, _, _sha256 in links]
|
|
1699
1698
|
return links
|
|
1700
1699
|
|
|
@@ -1915,7 +1914,7 @@ def get_remote_file_content(
|
|
|
1915
1914
|
# several redirects and that we can ignore content there. A HEAD request may
|
|
1916
1915
|
# not get us this last header
|
|
1917
1916
|
print(f" DOWNLOADING: {url}")
|
|
1918
|
-
with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response:
|
|
1917
|
+
with requests.get(url, allow_redirects=True, stream=True, headers=headers) as response:
|
|
1919
1918
|
status = response.status_code
|
|
1920
1919
|
if status != requests.codes.ok: # NOQA
|
|
1921
1920
|
if status == 429 and _delay < 20:
|
|
@@ -2134,7 +2133,7 @@ def call(args, verbose=TRACE):
|
|
|
2134
2133
|
"""
|
|
2135
2134
|
if TRACE_DEEP:
|
|
2136
2135
|
print("Calling:", " ".join(args))
|
|
2137
|
-
with subprocess.Popen(
|
|
2136
|
+
with subprocess.Popen(
|
|
2138
2137
|
args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8"
|
|
2139
2138
|
) as process:
|
|
2140
2139
|
stdouts = []
|
|
@@ -2199,7 +2198,7 @@ def download_wheels_with_pip(
|
|
|
2199
2198
|
cli_args.extend(["--requirement", req_file])
|
|
2200
2199
|
|
|
2201
2200
|
if TRACE:
|
|
2202
|
-
print("Downloading wheels using command:", " ".join(cli_args))
|
|
2201
|
+
print(f"Downloading wheels using command:", " ".join(cli_args))
|
|
2203
2202
|
|
|
2204
2203
|
existing = set(os.listdir(dest_dir))
|
|
2205
2204
|
error = False
|
|
@@ -2232,7 +2231,7 @@ def download_wheels_with_pip(
|
|
|
2232
2231
|
|
|
2233
2232
|
def check_about(dest_dir=THIRDPARTY_DIR):
|
|
2234
2233
|
try:
|
|
2235
|
-
subprocess.check_output(f"venv/bin/about check {dest_dir}".split())
|
|
2234
|
+
subprocess.check_output(f"venv/bin/about check {dest_dir}".split())
|
|
2236
2235
|
except subprocess.CalledProcessError as cpe:
|
|
2237
2236
|
print()
|
|
2238
2237
|
print("Invalid ABOUT files:")
|
|
@@ -2283,5 +2282,5 @@ def get_license_expression(declared_licenses):
|
|
|
2283
2282
|
return get_only_expression_from_extracted_license(declared_licenses)
|
|
2284
2283
|
except ImportError:
|
|
2285
2284
|
# Scancode is not installed, clean and join all the licenses
|
|
2286
|
-
lics = [python_safe_name(
|
|
2285
|
+
lics = [python_safe_name(l).lower() for l in declared_licenses]
|
|
2287
2286
|
return " AND ".join(lics).lower()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
scancode-toolkit==32.4.1
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# from blint v2.3.2
|
|
2
2
|
# https://github.com/owasp-dep-scan/blint/blob/1e1250a4bf6c25eccba8970bd877901ee56070c7/poetry.lock
|
|
3
|
-
lief==0.
|
|
3
|
+
lief==0.17.0
|
|
4
4
|
symbolic==10.2.1
|
|
5
|
-
click==8.
|
|
6
|
-
|
|
7
|
-
commoncode==32.3.0
|
|
5
|
+
click==8.3.0
|
|
6
|
+
commoncode==32.4.0
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = binary-inspector
|
|
3
3
|
license = Apache-2.0 AND MIT
|
|
4
|
+
version = 0.2.0
|
|
4
5
|
description = binary-inspector is a library and tools to inspect binaries (elf, winpe, mach0) for symbols and other information, and models to store this.
|
|
5
6
|
long_description = file:README.rst
|
|
6
7
|
long_description_content_type = text/x-rst
|
|
@@ -31,14 +32,13 @@ packages = find:
|
|
|
31
32
|
include_package_data = true
|
|
32
33
|
zip_safe = false
|
|
33
34
|
setup_requires = setuptools_scm[toml] >= 4
|
|
34
|
-
python_requires = >=3.
|
|
35
|
+
python_requires = >=3.10
|
|
35
36
|
install_requires =
|
|
36
|
-
click >=
|
|
37
|
-
click >= 8.2.0;python_version>='3.10'
|
|
37
|
+
click >= 8.2.0
|
|
38
38
|
commoncode
|
|
39
39
|
plugincode
|
|
40
40
|
typecode
|
|
41
|
-
lief==0.
|
|
41
|
+
lief==0.17.0
|
|
42
42
|
symbolic==10.2.1
|
|
43
43
|
|
|
44
44
|
[options.entry_points]
|
|
@@ -326,12 +326,18 @@ def process_pe_resources(parsed_obj):
|
|
|
326
326
|
return {}
|
|
327
327
|
resources = {}
|
|
328
328
|
version_metadata = {}
|
|
329
|
-
|
|
330
|
-
if
|
|
329
|
+
|
|
330
|
+
version_info = rm.version if rm.has_version else None
|
|
331
|
+
if isinstance(version_info, list) and len(version_info):
|
|
332
|
+
if not isinstance(version_info[0], lief.lief_errors):
|
|
333
|
+
version_info = version_info[0]
|
|
334
|
+
if version_info and hasattr(version_info, "string_file_info"):
|
|
331
335
|
string_file_info: lief.PE.ResourceStringFileInfo = version_info.string_file_info
|
|
332
|
-
for lc_item in string_file_info.
|
|
333
|
-
if lc_item.
|
|
334
|
-
|
|
336
|
+
for lc_item in string_file_info.children:
|
|
337
|
+
if lc_item.entries:
|
|
338
|
+
for e in lc_item.entries:
|
|
339
|
+
version_metadata[e.key] = e.value
|
|
340
|
+
|
|
335
341
|
try:
|
|
336
342
|
resources = {
|
|
337
343
|
"has_accelerator": rm.has_accelerator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: binary-inspector
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: binary-inspector is a library and tools to inspect binaries (elf, winpe, mach0) for symbols and other information, and models to store this.
|
|
5
5
|
Home-page: https://github.com/aboutcode-org/binary-inspector
|
|
6
6
|
Author: nexB. Inc. and others
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
14
|
Classifier: Topic :: Software Development
|
|
15
15
|
Classifier: Topic :: Utilities
|
|
16
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/x-rst
|
|
18
18
|
License-File: apache-2.0.LICENSE
|
|
19
19
|
License-File: NOTICE
|
|
@@ -21,12 +21,11 @@ License-File: AUTHORS.rst
|
|
|
21
21
|
License-File: CHANGELOG.rst
|
|
22
22
|
License-File: CODE_OF_CONDUCT.rst
|
|
23
23
|
License-File: README.rst
|
|
24
|
-
Requires-Dist: click
|
|
25
|
-
Requires-Dist: click>=8.2.0; python_version >= "3.10"
|
|
24
|
+
Requires-Dist: click>=8.2.0
|
|
26
25
|
Requires-Dist: commoncode
|
|
27
26
|
Requires-Dist: plugincode
|
|
28
27
|
Requires-Dist: typecode
|
|
29
|
-
Requires-Dist: lief==0.
|
|
28
|
+
Requires-Dist: lief==0.17.0
|
|
30
29
|
Requires-Dist: symbolic==10.2.1
|
|
31
30
|
Provides-Extra: dev
|
|
32
31
|
Requires-Dist: scancode-toolkit; extra == "dev"
|
|
@@ -149,8 +148,8 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
149
148
|
:height: 30
|
|
150
149
|
:alt: AboutCode logo
|
|
151
150
|
|
|
152
|
-
.. |swiss| image:: https://www.sbfi.admin.ch/
|
|
153
|
-
:target: https://www.sbfi.admin.ch/
|
|
151
|
+
.. |swiss| image:: https://www.sbfi.admin.ch/images/swiss-logo-flag.svg
|
|
152
|
+
:target: https://www.sbfi.admin.ch/de
|
|
154
153
|
:height: 40
|
|
155
154
|
:alt: Swiss logo
|
|
156
155
|
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/requires.txt
RENAMED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
+
click>=8.2.0
|
|
1
2
|
commoncode
|
|
2
3
|
plugincode
|
|
3
4
|
typecode
|
|
4
|
-
lief==0.
|
|
5
|
+
lief==0.17.0
|
|
5
6
|
symbolic==10.2.1
|
|
6
7
|
|
|
7
|
-
[:python_version < "3.10"]
|
|
8
|
-
click!=7.0,>=6.7
|
|
9
|
-
|
|
10
|
-
[:python_version >= "3.10"]
|
|
11
|
-
click>=8.2.0
|
|
12
|
-
|
|
13
8
|
[dev]
|
|
14
9
|
scancode-toolkit
|
|
15
10
|
pytest>=7.0.1
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/macho/Lumen-symbols-plugin.json
RENAMED
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
"CFConstantStringClassReference",
|
|
10
10
|
"CFDataGetBytePtr",
|
|
11
11
|
"CFRelease",
|
|
12
|
+
"CFStringGetCStringPtr",
|
|
12
13
|
"CGDataProviderCopyData",
|
|
13
14
|
"CGDisplayCreateImage",
|
|
14
15
|
"CGImageGetDataProvider",
|
|
15
16
|
"CGImageGetHeight",
|
|
16
17
|
"CGImageGetWidth",
|
|
17
18
|
"CGMainDisplayID",
|
|
19
|
+
"DefaultRuneLocale",
|
|
18
20
|
"IODisplayGetFloatParameter",
|
|
19
21
|
"IODisplaySetFloatParameter",
|
|
20
22
|
"IOIteratorNext",
|
|
@@ -54,36 +56,100 @@
|
|
|
54
56
|
"NSUserDefaults",
|
|
55
57
|
"NSWindowController",
|
|
56
58
|
"NSWorkspace",
|
|
59
|
+
"abort",
|
|
60
|
+
"add",
|
|
61
|
+
"addMethod",
|
|
62
|
+
"addProperty",
|
|
63
|
+
"addProtocol",
|
|
64
|
+
"allocateClassPair",
|
|
65
|
+
"asprintf",
|
|
57
66
|
"assign",
|
|
67
|
+
"autoreleasePoolPush",
|
|
58
68
|
"autoreleaseReturnValue",
|
|
59
69
|
"binder",
|
|
70
|
+
"bzero",
|
|
71
|
+
"calloc",
|
|
72
|
+
"class",
|
|
73
|
+
"constructInstance",
|
|
74
|
+
"copy",
|
|
75
|
+
"copyAttributeList",
|
|
76
|
+
"copyClassNamesForImage",
|
|
77
|
+
"create",
|
|
60
78
|
"destroyWeak",
|
|
61
79
|
"dispatch",
|
|
62
80
|
"dispose",
|
|
63
81
|
"dyld",
|
|
64
82
|
"enumerationMutation",
|
|
65
83
|
"fail",
|
|
84
|
+
"for",
|
|
85
|
+
"free",
|
|
86
|
+
"func",
|
|
87
|
+
"getClass",
|
|
88
|
+
"getIndexedIvars",
|
|
89
|
+
"getInstanceMethod",
|
|
90
|
+
"getInstanceSize",
|
|
91
|
+
"getInstanceVariable",
|
|
92
|
+
"getIvar",
|
|
93
|
+
"getIvarLayout",
|
|
94
|
+
"getMetaClass",
|
|
95
|
+
"getMethodDescription",
|
|
96
|
+
"getName",
|
|
97
|
+
"getOffset",
|
|
98
|
+
"getProtocol",
|
|
99
|
+
"getRequiredClass",
|
|
100
|
+
"getSuperclass",
|
|
101
|
+
"getUid",
|
|
66
102
|
"guard",
|
|
103
|
+
"hash",
|
|
67
104
|
"header",
|
|
105
|
+
"image",
|
|
106
|
+
"initializeClassPair",
|
|
107
|
+
"isMetaClass",
|
|
108
|
+
"ivar",
|
|
68
109
|
"kCFAllocatorDefault",
|
|
110
|
+
"kCFCoreFoundationVersionNumber",
|
|
69
111
|
"kIOMasterPortDefault",
|
|
112
|
+
"loadClassref",
|
|
70
113
|
"loadWeakRetained",
|
|
114
|
+
"lock",
|
|
115
|
+
"lookUpClass",
|
|
71
116
|
"main",
|
|
117
|
+
"malloc",
|
|
118
|
+
"memcpy",
|
|
119
|
+
"method",
|
|
72
120
|
"mh",
|
|
73
121
|
"msgSend",
|
|
74
122
|
"msgSendSuper2",
|
|
123
|
+
"mutex",
|
|
75
124
|
"object",
|
|
76
125
|
"pow",
|
|
126
|
+
"property",
|
|
127
|
+
"protocol",
|
|
128
|
+
"pthread",
|
|
129
|
+
"readClassPair",
|
|
130
|
+
"register",
|
|
131
|
+
"registerClassPair",
|
|
77
132
|
"release",
|
|
133
|
+
"replaceMethod",
|
|
134
|
+
"respondsToSelector",
|
|
78
135
|
"retain",
|
|
79
136
|
"retainAutorelease",
|
|
80
137
|
"retainAutoreleaseReturnValue",
|
|
81
138
|
"retainAutoreleasedReturnValue",
|
|
139
|
+
"search",
|
|
140
|
+
"sel",
|
|
141
|
+
"setImplementation",
|
|
142
|
+
"setIvar",
|
|
82
143
|
"sleep",
|
|
83
144
|
"stack",
|
|
84
145
|
"storeStrong",
|
|
85
146
|
"storeWeak",
|
|
86
|
-
"
|
|
147
|
+
"strcmp",
|
|
148
|
+
"strlen",
|
|
149
|
+
"strncmp",
|
|
150
|
+
"stub",
|
|
151
|
+
"unlock",
|
|
152
|
+
"vtable"
|
|
87
153
|
],
|
|
88
154
|
"scan_errors": []
|
|
89
155
|
}
|
|
@@ -64,4 +64,4 @@ def test_can_parse_and_demangle_macho_binary_symbols():
|
|
|
64
64
|
winpe_binary = test_env.get_test_loc("winpe/TranslucentTB-setup.exe")
|
|
65
65
|
winpe_symbols = binary.collect_and_parse_winpe_symbols(winpe_binary)
|
|
66
66
|
expected = test_env.get_test_loc("winpe/TranslucentTB-symbols.json")
|
|
67
|
-
check_json(expected, winpe_symbols, regen=
|
|
67
|
+
check_json(expected, winpe_symbols, regen=REGEN_TEST_FIXTURES)
|
|
@@ -25,7 +25,7 @@ def test_scancode_plugin_with_winpe_symbol_option():
|
|
|
25
25
|
args = ["--winpe-symbol", test_file, "--json", result_file]
|
|
26
26
|
run_scan_click(args)
|
|
27
27
|
expected = test_env.get_test_loc("winpe/TranslucentTB-symbols-plugin.json")
|
|
28
|
-
check_json_scan(expected, result_file, regen=
|
|
28
|
+
check_json_scan(expected, result_file, regen=REGEN_TEST_FIXTURES)
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def test_scancode_plugin_with_macho_symbol_option():
|
|
@@ -34,4 +34,4 @@ def test_scancode_plugin_with_macho_symbol_option():
|
|
|
34
34
|
args = ["--macho-symbol", test_file, "--json", result_file]
|
|
35
35
|
run_scan_click(args)
|
|
36
36
|
expected = test_env.get_test_loc("macho/Lumen-symbols-plugin.json")
|
|
37
|
-
check_json_scan(expected, result_file, regen=
|
|
37
|
+
check_json_scan(expected, result_file, regen=REGEN_TEST_FIXTURES)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
scancode-toolkit==32.3.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pip_compatibility_tags.py
RENAMED
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/test_utils_pypi_supported_tags.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pip_compatibility_tags.py
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pip_compatibility_tags.py.ABOUT
RENAMED
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/etc/scripts/utils_pypi_supported_tags.py.ABOUT
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/blint_binary.py.ABOUT
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector/blint_binary.py.LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/src/binary_inspector.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/winpe/TranslucentTB-symbols-plugin.json
RENAMED
|
File without changes
|
{binary_inspector-0.1.2 → binary_inspector-0.2.0}/tests/data/winpe/TranslucentTB-symbols.json
RENAMED
|
File without changes
|