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.
Files changed (87) hide show
  1. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.github/workflows/docs-ci.yml +7 -7
  2. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.github/workflows/pypi-release.yml +5 -2
  3. binary_inspector-0.1.2/.github/workflows/tests.yml +27 -0
  4. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.gitignore +2 -0
  5. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.readthedocs.yml +1 -1
  6. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/CHANGELOG.rst +16 -0
  7. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/MANIFEST.in +12 -2
  8. binary_inspector-0.1.2/Makefile +60 -0
  9. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/PKG-INFO +22 -24
  10. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/README.rst +4 -5
  11. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/configure +3 -4
  12. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/configure.bat +1 -5
  13. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/Makefile +1 -1
  14. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/conf.py +3 -2
  15. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/contribute/contrib_doc.rst +36 -82
  16. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/index.rst +2 -0
  17. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/check_thirdparty.py +2 -5
  18. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/fetch_thirdparty.py +17 -26
  19. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py +8 -11
  20. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_requirements.py +2 -2
  21. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_requirements_dev.py +2 -2
  22. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pip_compatibility_tags.py +6 -5
  23. binary_inspector-0.1.2/etc/scripts/update_skeleton.py +105 -0
  24. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_dejacode.py +11 -14
  25. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pip_compatibility_tags.py +11 -11
  26. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_requirements.py +17 -15
  27. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_thirdparty.py +54 -84
  28. binary_inspector-0.1.2/pyproject.toml +129 -0
  29. binary_inspector-0.1.2/requirements-dev.txt +1 -0
  30. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/requirements.txt +3 -0
  31. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/setup.cfg +6 -7
  32. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/binary.py +3 -7
  33. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py +60 -277
  34. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/config.py +1 -3
  35. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/plugin.py +1 -0
  36. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/PKG-INFO +22 -24
  37. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/SOURCES.txt +3 -1
  38. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/requires.txt +13 -12
  39. binary_inspector-0.1.2/src/binary_inspector.egg-info/top_level.txt +1 -0
  40. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/test_binary.py +0 -2
  41. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/test_plugin.py +1 -0
  42. binary_inspector-0.1.0/Makefile +0 -54
  43. binary_inspector-0.1.0/pyproject.toml +0 -52
  44. binary_inspector-0.1.0/requirements-dev.txt +0 -0
  45. binary_inspector-0.1.0/src/binary_inspector.egg-info/top_level.txt +0 -1
  46. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/.gitattributes +0 -0
  47. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/AUTHORS.rst +0 -0
  48. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/CODE_OF_CONDUCT.rst +0 -0
  49. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/NOTICE +0 -0
  50. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/apache-2.0.LICENSE +0 -0
  51. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/azure-pipelines.yml +0 -0
  52. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/make.bat +0 -0
  53. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/scripts/doc8_style_check.sh +0 -0
  54. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/scripts/sphinx_build_link_check.sh +0 -0
  55. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/docs/source/_static/theme_overrides.css +0 -0
  56. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-container-deb.yml +0 -0
  57. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-container-rpm.yml +0 -0
  58. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-posix.yml +0 -0
  59. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/azure-win.yml +0 -0
  60. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/install_sudo.sh +0 -0
  61. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/macports-ci +0 -0
  62. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/macports-ci.ABOUT +0 -0
  63. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/ci/mit.LICENSE +0 -0
  64. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/README.rst +0 -0
  65. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py.ABOUT +0 -0
  66. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/gen_pypi_simple.py.NOTICE +0 -0
  67. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/requirements.txt +0 -0
  68. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pip_compatibility_tags.py.ABOUT +0 -0
  69. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pypi_supported_tags.py +0 -0
  70. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/test_utils_pypi_supported_tags.py.ABOUT +0 -0
  71. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pip_compatibility_tags.py.ABOUT +0 -0
  72. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pypi_supported_tags.py +0 -0
  73. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_pypi_supported_tags.py.ABOUT +0 -0
  74. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/etc/scripts/utils_thirdparty.py.ABOUT +0 -0
  75. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/setup.py +0 -0
  76. /binary_inspector-0.1.0/src/binary_inspector/__init.py → /binary_inspector-0.1.2/src/binary_inspector/__init__.py +0 -0
  77. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py.ABOUT +0 -0
  78. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector/blint_binary.py.LICENSE +0 -0
  79. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/dependency_links.txt +0 -0
  80. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/entry_points.txt +0 -0
  81. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/src/binary_inspector.egg-info/not-zip-safe +0 -0
  82. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen +0 -0
  83. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen-symbols-plugin.json +0 -0
  84. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/macho/Lumen-symbols.json +0 -0
  85. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/winpe/TranslucentTB-setup.exe +0 -0
  86. {binary_inspector-0.1.0 → binary_inspector-0.1.2}/tests/data/winpe/TranslucentTB-symbols-plugin.json +0 -0
  87. {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: pip install -e .[docs]
24
+ run: ./configure --dev
25
25
 
26
- - name: Check Sphinx Documentation build minimally
27
- working-directory: ./docs
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 documentation style errors
31
- working-directory: ./docs
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 --user
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
@@ -72,3 +72,5 @@ tcl
72
72
 
73
73
  # Ignore Jupyter Notebook related temp files
74
74
  .ipynb_checkpoints/
75
+ /.ruff_cache/
76
+ .env
@@ -26,4 +26,4 @@ python:
26
26
  - method: pip
27
27
  path: .
28
28
  extra_requirements:
29
- - docs
29
+ - dev
@@ -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 .git*
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
- global-exclude *.py[co] __pycache__ *.*~
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.0
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
- Requires-Dist: click<8.2
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: testing
30
- Requires-Dist: scancode-toolkit; extra == "testing"
31
- Requires-Dist: pytest!=7.0.0,>=6; extra == "testing"
32
- Requires-Dist: pytest-xdist>=2; extra == "testing"
33
- Requires-Dist: aboutcode-toolkit>=7.0.2; extra == "testing"
34
- Requires-Dist: pycodestyle>=2.8.0; extra == "testing"
35
- Requires-Dist: twine; extra == "testing"
36
- Requires-Dist: black; extra == "testing"
37
- Requires-Dist: isort; extra == "testing"
38
- Provides-Extra: docs
39
- Requires-Dist: Sphinx>=5.0.2; extra == "docs"
40
- Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
41
- Requires-Dist: sphinx-reredirects>=0.1.2; extra == "docs"
42
- Requires-Dist: doc8>=0.11.2; extra == "docs"
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
- - Run ``pip install binary-inspector``
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.eu35
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: http://ec.europa.eu/index_en.htm
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
- - Run ``pip install binary-inspector``
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.eu35
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: http://ec.europa.eu/index_en.htm
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 .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
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 .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
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
  )
@@ -7,7 +7,7 @@ SPHINXOPTS ?=
7
7
  SPHINXBUILD ?= sphinx-build
8
8
  SPHINXAUTOBUILD = sphinx-autobuild
9
9
  SOURCEDIR = source
10
- BUILDDIR = build
10
+ BUILDDIR = _build
11
11
 
12
12
  # Put it first so that "make" without argument is like "make help".
13
13
  help:
@@ -18,7 +18,7 @@
18
18
  # -- Project information -----------------------------------------------------
19
19
 
20
20
  project = "nexb-skeleton"
21
- copyright = "nexB Inc. and others."
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 and is used like this: :red:`text`
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, create or identify a working directory on your local machine.
11
+ To get started, check out and configure the repository for development::
12
12
 
13
- Open that directory and execute the following command in a terminal session::
13
+ git clone https://github.com/aboutcode-org/<your-repo>.git
14
14
 
15
- git clone https://github.com/aboutcode-org/skeleton.git
15
+ cd your-repo
16
+ ./configure --dev
16
17
 
17
- That will create an ``/skeleton`` directory in your working directory.
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 --docs`` instead of this.
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
- These requirements are already present in setup.cfg and `./configure --docs` installs them.
24
+ This will install and configure all requirements foer development including for docs development.
34
25
 
35
- Now you can build the HTML documents locally::
26
+ Now you can build the HTML documentation locally::
36
27
 
37
28
  source venv/bin/activate
38
- cd docs
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
- .. note::
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
- You now have a local build of the AboutCode documents.
36
+ To validate the documentation style and content, use::
56
37
 
57
- .. _contrib_doc_share_improvements:
58
-
59
- Share Document Improvements
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 through Travis-CI, so that common errors are
94
- avoided and documentation standards are enforced. Travis-CI presently checks for these 3 aspects
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 ``link-check``)
99
- 3. Linting Errors (By Using ``Doc8``)
52
+ 2. No Broken Links (By Using ``linkcheck``)
53
+ 3. Linting Errors (By Using ``doc8``)
100
54
 
101
- So run these scripts at your local system before creating a Pull Request::
55
+ You myst run these scripts locally before creating a pull request::
102
56
 
103
- cd docs
104
- ./scripts/sphinx_build_link_check.sh
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 ``Doc8``
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
- $ cd docs
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 `README <https://github.com/PyCQA/doc8/blob/master/README.rst>`_ for more details.
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
- ScanCode toolkit documentation uses `Intersphinx <http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html>`_
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 <http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role>`_ for more information.
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 <http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections>`_)
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 `tool <https://github.com/chrissimpkins/md2rst>`_
310
- does it pretty well. You'd still have to clean up and check for errors as this contains a lot of
311
- bugs. But this is definitely better than converting everything by yourself.
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,6 +1,8 @@
1
1
  Welcome to binary-inspector's documentation!
2
2
  ============================================
3
3
 
4
+ .. include:: ../../README.rst
5
+
4
6
  .. toctree::
5
7
  :maxdepth: 2
6
8
  :caption: Contents:
@@ -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
- # check for problems
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,