binary-inspector 0.1.0__tar.gz → 0.1.2__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.0 → binary_inspector-0.1.2}/.github/workflows/docs-ci.yml +7 -7
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.github/workflows/pypi-release.yml +5 -2
- binary_inspector-0.1.2/.github/workflows/tests.yml +27 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.gitignore +2 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.readthedocs.yml +1 -1
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/CHANGELOG.rst +16 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/MANIFEST.in +12 -2
- binary_inspector-0.1.2/Makefile +60 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/PKG-INFO +22 -24
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/README.rst +4 -5
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/configure +3 -4
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/configure.bat +1 -5
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/Makefile +1 -1
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/conf.py +3 -2
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/contribute/contrib_doc.rst +36 -82
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/index.rst +2 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/check_thirdparty.py +2 -5
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/fetch_thirdparty.py +17 -26
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py +8 -11
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_requirements.py +2 -2
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_requirements_dev.py +2 -2
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pip_compatibility_tags.py +6 -5
- binary_inspector-0.1.2/etc/scripts/update_skeleton.py +105 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_dejacode.py +11 -14
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pip_compatibility_tags.py +11 -11
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_requirements.py +17 -15
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_thirdparty.py +54 -84
- binary_inspector-0.1.2/pyproject.toml +129 -0
- binary_inspector-0.1.2/requirements-dev.txt +1 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/requirements.txt +3 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/setup.cfg +6 -7
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/binary.py +3 -7
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py +60 -277
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/config.py +1 -3
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/plugin.py +1 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/PKG-INFO +22 -24
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/SOURCES.txt +3 -1
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/requires.txt +13 -12
- binary_inspector-0.1.2/src/binary_inspector.egg-info/top_level.txt +1 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/test_binary.py +0 -2
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/test_plugin.py +1 -0
- binary_inspector-0.1.0/Makefile +0 -54
- binary_inspector-0.1.0/pyproject.toml +0 -52
- binary_inspector-0.1.0/requirements-dev.txt +0 -0
- binary_inspector-0.1.0/src/binary_inspector.egg-info/top_level.txt +0 -1
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.gitattributes +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/AUTHORS.rst +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/CODE_OF_CONDUCT.rst +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/NOTICE +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/apache-2.0.LICENSE +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/azure-pipelines.yml +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/make.bat +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/scripts/doc8_style_check.sh +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/scripts/sphinx_build_link_check.sh +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/_static/theme_overrides.css +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-container-deb.yml +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-container-rpm.yml +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-posix.yml +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-win.yml +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/install_sudo.sh +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/macports-ci +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/macports-ci.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/mit.LICENSE +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/README.rst +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py.NOTICE +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/requirements.txt +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pip_compatibility_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pypi_supported_tags.py +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pypi_supported_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pip_compatibility_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pypi_supported_tags.py +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pypi_supported_tags.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_thirdparty.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/setup.py +0 -0
- /binary_inspector-0.1.0/src/binary_inspector/__init.py → /binary_inspector-0.1.2/src/binary_inspector/__init__.py +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py.ABOUT +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py.LICENSE +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/dependency_links.txt +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/entry_points.txt +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/not-zip-safe +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen-symbols-plugin.json +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen-symbols.json +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/winpe/TranslucentTB-setup.exe +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/winpe/TranslucentTB-symbols-plugin.json +0 -0
- {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/winpe/TranslucentTB-symbols.json +0 -0
|
@@ -21,14 +21,14 @@ jobs:
|
|
|
21
21
|
python-version: ${{ matrix.python-version }}
|
|
22
22
|
|
|
23
23
|
- name: Install Dependencies
|
|
24
|
-
run:
|
|
24
|
+
run: ./configure --dev
|
|
25
25
|
|
|
26
|
-
- name: Check
|
|
27
|
-
|
|
28
|
-
run: sphinx-build -E -W source build
|
|
26
|
+
- name: Check documentation and HTML for errors and dead links
|
|
27
|
+
run: make docs-check
|
|
29
28
|
|
|
30
|
-
- name: Check for
|
|
31
|
-
|
|
32
|
-
run: ./scripts/doc8_style_check.sh
|
|
29
|
+
- name: Check documentation for style errors
|
|
30
|
+
run: make doc8
|
|
33
31
|
|
|
32
|
+
- name: Check code for style errors
|
|
33
|
+
run: make check
|
|
34
34
|
|
|
@@ -30,12 +30,15 @@ jobs:
|
|
|
30
30
|
with:
|
|
31
31
|
python-version: 3.12
|
|
32
32
|
|
|
33
|
-
- name: Install pypa/build
|
|
34
|
-
run: python -m pip install build
|
|
33
|
+
- name: Install pypa/build and twine
|
|
34
|
+
run: python -m pip install --user build twine
|
|
35
35
|
|
|
36
36
|
- name: Build a binary wheel and a source tarball
|
|
37
37
|
run: python -m build --sdist --wheel --outdir dist/
|
|
38
38
|
|
|
39
|
+
- name: Validate wheel and sdis for Pypi
|
|
40
|
+
run: python -m twine check dist/*
|
|
41
|
+
|
|
39
42
|
- name: Upload built archives
|
|
40
43
|
uses: actions/upload-artifact@v4
|
|
41
44
|
with:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Run tests on supported Python versions
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request, workflow_dispatch]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
extensive_tests:
|
|
7
|
+
name: Run tests on Python ${{ matrix.python }}
|
|
8
|
+
runs-on: ${{ matrix.os }}
|
|
9
|
+
defaults:
|
|
10
|
+
run:
|
|
11
|
+
shell: bash
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
16
|
+
os: ["ubuntu-latest"]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "${{ matrix.python }}"
|
|
25
|
+
|
|
26
|
+
- name: Run tests
|
|
27
|
+
run: make clean && make dev && make test
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
v0.1.2
|
|
5
|
+
------
|
|
6
|
+
|
|
7
|
+
Bugfix release to fix click compatibility issues:
|
|
8
|
+
|
|
9
|
+
* Update commoncode to latest v32.3.0 with click compatibility fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
v0.1.1
|
|
13
|
+
------
|
|
14
|
+
|
|
15
|
+
Bugfix release as the intial release had empty wheels:
|
|
16
|
+
|
|
17
|
+
* Fix binary-inspector wheels to have the necessary modules.
|
|
18
|
+
* Update to latest skeleton
|
|
19
|
+
|
|
4
20
|
|
|
5
21
|
v0.1.0
|
|
6
22
|
------
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
graft src
|
|
2
|
+
graft docs
|
|
3
|
+
graft etc
|
|
2
4
|
|
|
3
5
|
include *.LICENSE
|
|
4
6
|
include NOTICE
|
|
@@ -6,10 +8,18 @@ include *.ABOUT
|
|
|
6
8
|
include *.toml
|
|
7
9
|
include *.yml
|
|
8
10
|
include *.rst
|
|
11
|
+
include *.png
|
|
9
12
|
include setup.*
|
|
10
13
|
include configure*
|
|
11
14
|
include requirements*
|
|
12
|
-
include .
|
|
15
|
+
include .dockerignore
|
|
16
|
+
include .gitignore
|
|
17
|
+
include .readthedocs.yml
|
|
18
|
+
include manage.py
|
|
19
|
+
include Dockerfile*
|
|
20
|
+
include Makefile
|
|
21
|
+
include MANIFEST.in
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
include .VERSION
|
|
15
24
|
|
|
25
|
+
global-exclude *.py[co] __pycache__ *.*~
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
#
|
|
3
|
+
# Copyright (c) nexB Inc. and others. All rights reserved.
|
|
4
|
+
# ScanCode is a trademark of nexB Inc.
|
|
5
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
|
|
7
|
+
# See https://github.com/aboutcode-org/skeleton for support or download.
|
|
8
|
+
# See https://aboutcode.org for more information about nexB OSS projects.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
|
|
12
|
+
PYTHON_EXE?=python3
|
|
13
|
+
VENV=venv
|
|
14
|
+
ACTIVATE?=. ${VENV}/bin/activate;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
conf:
|
|
18
|
+
@echo "-> Install dependencies"
|
|
19
|
+
./configure
|
|
20
|
+
|
|
21
|
+
dev:
|
|
22
|
+
@echo "-> Configure and install development dependencies"
|
|
23
|
+
./configure --dev
|
|
24
|
+
|
|
25
|
+
doc8:
|
|
26
|
+
@echo "-> Run doc8 validation"
|
|
27
|
+
@${ACTIVATE} doc8 --quiet docs/ *.rst
|
|
28
|
+
|
|
29
|
+
valid:
|
|
30
|
+
@echo "-> Run Ruff format"
|
|
31
|
+
@${ACTIVATE} ruff format
|
|
32
|
+
@echo "-> Run Ruff linter"
|
|
33
|
+
@${ACTIVATE} ruff check --fix
|
|
34
|
+
|
|
35
|
+
check:
|
|
36
|
+
@echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)"
|
|
37
|
+
@${ACTIVATE} ruff check
|
|
38
|
+
@echo "-> Run Ruff format validation"
|
|
39
|
+
@${ACTIVATE} ruff format --check
|
|
40
|
+
@$(MAKE) doc8
|
|
41
|
+
@echo "-> Run ABOUT files validation"
|
|
42
|
+
@${ACTIVATE} about check etc/
|
|
43
|
+
|
|
44
|
+
clean:
|
|
45
|
+
@echo "-> Clean the Python env"
|
|
46
|
+
./configure --clean
|
|
47
|
+
|
|
48
|
+
test:
|
|
49
|
+
@echo "-> Run the test suite"
|
|
50
|
+
${VENV}/bin/pytest -vvs
|
|
51
|
+
|
|
52
|
+
docs:
|
|
53
|
+
rm -rf docs/_build/
|
|
54
|
+
@${ACTIVATE} sphinx-build docs/source docs/_build/
|
|
55
|
+
|
|
56
|
+
docs-check:
|
|
57
|
+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
|
|
58
|
+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
|
|
59
|
+
|
|
60
|
+
.PHONY: conf dev check valid clean test docs docs-check
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: binary-inspector
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
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
|
|
@@ -20,29 +20,28 @@ License-File: NOTICE
|
|
|
20
20
|
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!=7.0,>=6.7; python_version < "3.10"
|
|
25
|
+
Requires-Dist: click>=8.2.0; python_version >= "3.10"
|
|
24
26
|
Requires-Dist: commoncode
|
|
25
27
|
Requires-Dist: plugincode
|
|
26
28
|
Requires-Dist: typecode
|
|
27
29
|
Requires-Dist: lief==0.15.1
|
|
28
30
|
Requires-Dist: symbolic==10.2.1
|
|
29
|
-
Provides-Extra:
|
|
30
|
-
Requires-Dist: scancode-toolkit; extra == "
|
|
31
|
-
Requires-Dist: pytest
|
|
32
|
-
Requires-Dist: pytest-xdist>=2; extra == "
|
|
33
|
-
Requires-Dist: aboutcode-toolkit>=7.0.2; extra == "
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist:
|
|
38
|
-
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist: sphinx-
|
|
41
|
-
Requires-Dist: sphinx-
|
|
42
|
-
Requires-Dist:
|
|
43
|
-
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
44
|
-
Requires-Dist: sphinx-rtd-dark-mode>=1.3.0; extra == "docs"
|
|
45
|
-
Requires-Dist: sphinx-copybutton; extra == "docs"
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: scancode-toolkit; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest>=7.0.1; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-xdist>=2; extra == "dev"
|
|
35
|
+
Requires-Dist: aboutcode-toolkit>=7.0.2; extra == "dev"
|
|
36
|
+
Requires-Dist: twine; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff; extra == "dev"
|
|
38
|
+
Requires-Dist: Sphinx>=5.0.2; extra == "dev"
|
|
39
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: sphinx-reredirects>=0.1.2; extra == "dev"
|
|
41
|
+
Requires-Dist: doc8>=0.11.2; extra == "dev"
|
|
42
|
+
Requires-Dist: sphinx-autobuild; extra == "dev"
|
|
43
|
+
Requires-Dist: sphinx-rtd-dark-mode>=1.3.0; extra == "dev"
|
|
44
|
+
Requires-Dist: sphinx-copybutton; extra == "dev"
|
|
46
45
|
Dynamic: license-file
|
|
47
46
|
|
|
48
47
|
binary-inspector
|
|
@@ -52,10 +51,9 @@ binary-inspector is a utility to extract symbols from various kinds of binaries,
|
|
|
52
51
|
i.e. ELF, Mach-O, WinPE and other binary formats. It is designed to work as a ScanCode
|
|
53
52
|
Toolkit plugin and integrated in ScanCode.io pipelines.
|
|
54
53
|
|
|
55
|
-
To install and use
|
|
54
|
+
To install run ``pip install binary-inspector`` and use with::
|
|
56
55
|
|
|
57
|
-
-
|
|
58
|
-
- Use with ``scancode --json-pp - --macho-symbol --winpe-symbol --verbose <PATH to a tree or file with binaries>``
|
|
56
|
+
scancode --json-pp - --macho-symbol --winpe-symbol --verbose <PATH to a tree or file with binaries>
|
|
59
57
|
|
|
60
58
|
The JSON output will contain binary symbols found in binaries if any.
|
|
61
59
|
|
|
@@ -132,7 +130,7 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
132
130
|
:alt: NLnet foundation logo
|
|
133
131
|
|
|
134
132
|
.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png
|
|
135
|
-
:target: https://ngi.
|
|
133
|
+
:target: https://ngi.eu
|
|
136
134
|
:height: 50
|
|
137
135
|
:alt: NGI logo
|
|
138
136
|
|
|
@@ -142,7 +140,7 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
142
140
|
:alt: nexB logo
|
|
143
141
|
|
|
144
142
|
.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png
|
|
145
|
-
:target:
|
|
143
|
+
:target: https://commission.europa.eu/index_en
|
|
146
144
|
:height: 40
|
|
147
145
|
:alt: Europa logo
|
|
148
146
|
|
|
@@ -5,10 +5,9 @@ binary-inspector is a utility to extract symbols from various kinds of binaries,
|
|
|
5
5
|
i.e. ELF, Mach-O, WinPE and other binary formats. It is designed to work as a ScanCode
|
|
6
6
|
Toolkit plugin and integrated in ScanCode.io pipelines.
|
|
7
7
|
|
|
8
|
-
To install and use
|
|
8
|
+
To install run ``pip install binary-inspector`` and use with::
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
- Use with ``scancode --json-pp - --macho-symbol --winpe-symbol --verbose <PATH to a tree or file with binaries>``
|
|
10
|
+
scancode --json-pp - --macho-symbol --winpe-symbol --verbose <PATH to a tree or file with binaries>
|
|
12
11
|
|
|
13
12
|
The JSON output will contain binary symbols found in binaries if any.
|
|
14
13
|
|
|
@@ -85,7 +84,7 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
85
84
|
:alt: NLnet foundation logo
|
|
86
85
|
|
|
87
86
|
.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png
|
|
88
|
-
:target: https://ngi.
|
|
87
|
+
:target: https://ngi.eu
|
|
89
88
|
:height: 50
|
|
90
89
|
:alt: NGI logo
|
|
91
90
|
|
|
@@ -95,7 +94,7 @@ Communications Networks, Content and Technology under grant agreement No 1010695
|
|
|
95
94
|
:alt: nexB logo
|
|
96
95
|
|
|
97
96
|
.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png
|
|
98
|
-
:target:
|
|
97
|
+
:target: https://commission.europa.eu/index_en
|
|
99
98
|
:height: 40
|
|
100
99
|
:alt: Europa logo
|
|
101
100
|
|
|
@@ -29,14 +29,13 @@ CLI_ARGS=$1
|
|
|
29
29
|
|
|
30
30
|
# Requirement arguments passed to pip and used by default or with --dev.
|
|
31
31
|
REQUIREMENTS="--editable . --constraint requirements.txt"
|
|
32
|
-
DEV_REQUIREMENTS="--editable .[
|
|
33
|
-
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"
|
|
32
|
+
DEV_REQUIREMENTS="--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
|
|
34
33
|
|
|
35
34
|
# where we create a virtualenv
|
|
36
35
|
VIRTUALENV_DIR=venv
|
|
37
36
|
|
|
38
37
|
# Cleanable files and directories to delete with the --clean option
|
|
39
|
-
CLEANABLE="build dist venv .cache .eggs"
|
|
38
|
+
CLEANABLE="build dist venv .cache .eggs *.egg-info docs/_build/ pip-selfcheck.json"
|
|
40
39
|
|
|
41
40
|
# extra arguments passed to pip
|
|
42
41
|
PIP_EXTRA_ARGS=" "
|
|
@@ -168,6 +167,7 @@ clean() {
|
|
|
168
167
|
for cln in $CLEANABLE;
|
|
169
168
|
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
|
|
170
169
|
done
|
|
170
|
+
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
|
|
171
171
|
set +e
|
|
172
172
|
exit
|
|
173
173
|
}
|
|
@@ -185,7 +185,6 @@ while getopts :-: optchar; do
|
|
|
185
185
|
help ) cli_help;;
|
|
186
186
|
clean ) find_python && clean;;
|
|
187
187
|
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
|
|
188
|
-
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
|
|
189
188
|
esac;;
|
|
190
189
|
esac
|
|
191
190
|
done
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
@rem # Requirement arguments passed to pip and used by default or with --dev.
|
|
29
29
|
set "REQUIREMENTS=--editable . --constraint requirements.txt"
|
|
30
|
-
set "DEV_REQUIREMENTS=--editable .[
|
|
31
|
-
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"
|
|
30
|
+
set "DEV_REQUIREMENTS=--editable .[dev] --constraint requirements.txt --constraint requirements-dev.txt"
|
|
32
31
|
|
|
33
32
|
@rem # where we create a virtualenv
|
|
34
33
|
set "VIRTUALENV_DIR=venv"
|
|
@@ -76,9 +75,6 @@ if not "%1" == "" (
|
|
|
76
75
|
if "%1" EQU "--dev" (
|
|
77
76
|
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
|
|
78
77
|
)
|
|
79
|
-
if "%1" EQU "--docs" (
|
|
80
|
-
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
|
|
81
|
-
)
|
|
82
78
|
shift
|
|
83
79
|
goto again
|
|
84
80
|
)
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
# -- Project information -----------------------------------------------------
|
|
19
19
|
|
|
20
20
|
project = "nexb-skeleton"
|
|
21
|
-
copyright = "nexB Inc
|
|
21
|
+
copyright = "nexB Inc., AboutCode and others."
|
|
22
22
|
author = "AboutCode.org authors and contributors"
|
|
23
23
|
|
|
24
24
|
|
|
@@ -94,7 +94,8 @@ html_css_files = [
|
|
|
94
94
|
html_show_sphinx = True
|
|
95
95
|
|
|
96
96
|
# Define CSS and HTML abbreviations used in .rst files. These are examples.
|
|
97
|
-
# .. role:: is used to refer to styles defined in _static/theme_overrides.css
|
|
97
|
+
# .. role:: is used to refer to styles defined in _static/theme_overrides.css
|
|
98
|
+
# and is used like this: :red:`text`
|
|
98
99
|
rst_prolog = """
|
|
99
100
|
.. |psf| replace:: Python Software Foundation
|
|
100
101
|
|
|
@@ -8,109 +8,59 @@ Contributing to the Documentation
|
|
|
8
8
|
Setup Local Build
|
|
9
9
|
-----------------
|
|
10
10
|
|
|
11
|
-
To get started,
|
|
11
|
+
To get started, check out and configure the repository for development::
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
git clone https://github.com/aboutcode-org/<your-repo>.git
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
cd your-repo
|
|
16
|
+
./configure --dev
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
Now you can install the dependencies in a virtualenv::
|
|
19
|
-
|
|
20
|
-
cd skeleton
|
|
21
|
-
./configure --docs
|
|
18
|
+
(Or use "make dev")
|
|
22
19
|
|
|
23
20
|
.. note::
|
|
24
21
|
|
|
25
|
-
In case of windows, run ``configure --
|
|
26
|
-
|
|
27
|
-
Now, this will install the following prerequisites:
|
|
28
|
-
|
|
29
|
-
- Sphinx
|
|
30
|
-
- sphinx_rtd_theme (the format theme used by ReadTheDocs)
|
|
31
|
-
- docs8 (style linter)
|
|
22
|
+
In case of windows, run ``configure --dev``.
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
This will install and configure all requirements foer development including for docs development.
|
|
34
25
|
|
|
35
|
-
Now you can build the HTML
|
|
26
|
+
Now you can build the HTML documentation locally::
|
|
36
27
|
|
|
37
28
|
source venv/bin/activate
|
|
38
|
-
|
|
39
|
-
make html
|
|
40
|
-
|
|
41
|
-
Assuming that your Sphinx installation was successful, Sphinx should build a local instance of the
|
|
42
|
-
documentation .html files::
|
|
43
|
-
|
|
44
|
-
open build/html/index.html
|
|
29
|
+
make docs
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
In case this command did not work, for example on Ubuntu 18.04 you may get a message like “Couldn’t
|
|
49
|
-
get a file descriptor referring to the console”, try:
|
|
31
|
+
This will build a local instance of the ``docs/_build`` directory::
|
|
50
32
|
|
|
51
|
-
|
|
33
|
+
open docs/_build/index.html
|
|
52
34
|
|
|
53
|
-
see build/html/index.html
|
|
54
35
|
|
|
55
|
-
|
|
36
|
+
To validate the documentation style and content, use::
|
|
56
37
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
---------------------------
|
|
61
|
-
|
|
62
|
-
Ensure that you have the latest files::
|
|
63
|
-
|
|
64
|
-
git pull
|
|
65
|
-
git status
|
|
66
|
-
|
|
67
|
-
Before commiting changes run Continious Integration Scripts locally to run tests. Refer
|
|
68
|
-
:ref:`doc_ci` for instructions on the same.
|
|
69
|
-
|
|
70
|
-
Follow standard git procedures to upload your new and modified files. The following commands are
|
|
71
|
-
examples::
|
|
72
|
-
|
|
73
|
-
git status
|
|
74
|
-
git add source/index.rst
|
|
75
|
-
git add source/how-to-scan.rst
|
|
76
|
-
git status
|
|
77
|
-
git commit -m "New how-to document that explains how to scan"
|
|
78
|
-
git status
|
|
79
|
-
git push
|
|
80
|
-
git status
|
|
81
|
-
|
|
82
|
-
The Scancode-Toolkit webhook with ReadTheDocs should rebuild the documentation after your
|
|
83
|
-
Pull Request is Merged.
|
|
38
|
+
source venv/bin/activate
|
|
39
|
+
make doc8
|
|
40
|
+
make docs-check
|
|
84
41
|
|
|
85
|
-
Refer the `Pro Git Book <https://git-scm.com/book/en/v2/>`_ available online for Git tutorials
|
|
86
|
-
covering more complex topics on Branching, Merging, Rebasing etc.
|
|
87
42
|
|
|
88
43
|
.. _doc_ci:
|
|
89
44
|
|
|
90
45
|
Continuous Integration
|
|
91
46
|
----------------------
|
|
92
47
|
|
|
93
|
-
The documentations are checked on every new commit
|
|
94
|
-
|
|
95
|
-
of the documentation :
|
|
48
|
+
The documentations are checked on every new commit, so that common errors are avoided and
|
|
49
|
+
documentation standards are enforced. We checks for these aspects of the documentation:
|
|
96
50
|
|
|
97
51
|
1. Successful Builds (By using ``sphinx-build``)
|
|
98
|
-
2. No Broken Links (By Using ``
|
|
99
|
-
3. Linting Errors (By Using ``
|
|
52
|
+
2. No Broken Links (By Using ``linkcheck``)
|
|
53
|
+
3. Linting Errors (By Using ``doc8``)
|
|
100
54
|
|
|
101
|
-
|
|
55
|
+
You myst run these scripts locally before creating a pull request::
|
|
102
56
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
./scripts/doc8_style_check.sh
|
|
57
|
+
make doc8
|
|
58
|
+
make check-docs
|
|
106
59
|
|
|
107
|
-
If you don't have permission to run the scripts, run::
|
|
108
|
-
|
|
109
|
-
chmod u+x ./scripts/doc8_style_check.sh
|
|
110
60
|
|
|
111
61
|
.. _doc_style_docs8:
|
|
112
62
|
|
|
113
|
-
Style Checks Using ``
|
|
63
|
+
Style Checks Using ``doc8``
|
|
114
64
|
---------------------------
|
|
115
65
|
|
|
116
66
|
How To Run Style Tests
|
|
@@ -118,8 +68,7 @@ How To Run Style Tests
|
|
|
118
68
|
|
|
119
69
|
In the project root, run the following commands::
|
|
120
70
|
|
|
121
|
-
|
|
122
|
-
$ ./scripts/doc8_style_check.sh
|
|
71
|
+
make doc8
|
|
123
72
|
|
|
124
73
|
A sample output is::
|
|
125
74
|
|
|
@@ -147,7 +96,8 @@ What is Checked?
|
|
|
147
96
|
^^^^^^^^^^^^^^^^
|
|
148
97
|
|
|
149
98
|
PyCQA is an Organization for code quality tools (and plugins) for the Python programming language.
|
|
150
|
-
Doc8 is a sub-project of the same Organization. Refer this
|
|
99
|
+
Doc8 is a sub-project of the same Organization. Refer this
|
|
100
|
+
`README <https://github.com/PyCQA/doc8/blob/main/README.rst>`_ for more details.
|
|
151
101
|
|
|
152
102
|
What is checked:
|
|
153
103
|
|
|
@@ -169,11 +119,13 @@ What is checked:
|
|
|
169
119
|
Interspinx
|
|
170
120
|
----------
|
|
171
121
|
|
|
172
|
-
|
|
122
|
+
AboutCode documentation uses
|
|
123
|
+
`Intersphinx <https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html>`_
|
|
173
124
|
to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects.
|
|
174
125
|
|
|
175
126
|
To link sections in the same documentation, standart reST labels are used. Refer
|
|
176
|
-
`Cross-Referencing <
|
|
127
|
+
`Cross-Referencing <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html>`_
|
|
128
|
+
for more information.
|
|
177
129
|
|
|
178
130
|
For example::
|
|
179
131
|
|
|
@@ -230,7 +182,7 @@ Style Conventions for the Documentaion
|
|
|
230
182
|
|
|
231
183
|
1. Headings
|
|
232
184
|
|
|
233
|
-
(`Refer <
|
|
185
|
+
(`Refer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections>`_)
|
|
234
186
|
Normally, there are no heading levels assigned to certain characters as the structure is
|
|
235
187
|
determined from the succession of headings. However, this convention is used in Python’s Style
|
|
236
188
|
Guide for documenting which you may follow:
|
|
@@ -303,12 +255,14 @@ Style Conventions for the Documentaion
|
|
|
303
255
|
``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are
|
|
304
256
|
frequently used in multiple files.
|
|
305
257
|
|
|
258
|
+
|
|
306
259
|
Converting from Markdown
|
|
307
260
|
------------------------
|
|
308
261
|
|
|
309
|
-
If you want to convert a ``.md`` file to a ``.rst`` file, this
|
|
310
|
-
does it pretty well.
|
|
311
|
-
|
|
262
|
+
If you want to convert a ``.md`` file to a ``.rst`` file, this
|
|
263
|
+
`tool <https://github.com/chrissimpkins/md2rst>`_ does it pretty well.
|
|
264
|
+
You will still have to clean up and check for errors as this contains a lot of bugs. But this is
|
|
265
|
+
definitely better than converting everything by yourself.
|
|
312
266
|
|
|
313
267
|
This will be helpful in converting GitHub wiki's (Markdown Files) to reStructuredtext files for
|
|
314
268
|
Sphinx/ReadTheDocs hosting.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
#
|
|
4
3
|
# Copyright (c) nexB Inc. and others. All rights reserved.
|
|
5
4
|
# ScanCode is a trademark of nexB Inc.
|
|
@@ -17,8 +16,7 @@ import utils_thirdparty
|
|
|
17
16
|
@click.option(
|
|
18
17
|
"-d",
|
|
19
18
|
"--dest",
|
|
20
|
-
type=click.Path(exists=True, readable=True,
|
|
21
|
-
path_type=str, file_okay=False),
|
|
19
|
+
type=click.Path(exists=True, readable=True, path_type=str, file_okay=False),
|
|
22
20
|
required=True,
|
|
23
21
|
help="Path to the thirdparty directory to check.",
|
|
24
22
|
)
|
|
@@ -43,8 +41,7 @@ def check_thirdparty_dir(
|
|
|
43
41
|
"""
|
|
44
42
|
Check a thirdparty directory for problems and print these on screen.
|
|
45
43
|
"""
|
|
46
|
-
|
|
47
|
-
print(f"==> CHECK FOR PROBLEMS")
|
|
44
|
+
print("==> CHECK FOR PROBLEMS")
|
|
48
45
|
utils_thirdparty.find_problems(
|
|
49
46
|
dest_dir=dest,
|
|
50
47
|
report_missing_sources=sdists,
|