Skip to content

Commit 7926aaf

Browse files
Address review feedback
Signed-off-by: Ayan Sinha Mahapatra <asmahapatra@aboutcode.org>
1 parent 6b6a79b commit 7926aaf

18 files changed

Lines changed: 113 additions & 66 deletions

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ WORKDIR /scancode-toolkit
3838
COPY . /scancode-toolkit
3939

4040
# Initial configuration using ./configure, scancode-reindex-licenses to build
41-
# the base license index and scancode-cache-package-patterns to build the
41+
# the base license index and scancode-reindex-package-patterns to build the
4242
# package patterns cache
4343
RUN ./configure \
4444
&& ./venv/bin/scancode-reindex-licenses \
45-
&& ./venv/bin/scancode-cache-package-patterns
45+
&& ./venv/bin/scancode-reindex-package-patterns
4646

4747
# Add scancode to path
4848
ENV PATH=/scancode-toolkit:$PATH

docs/source/rst_snippets/basic_options.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ documenting a program's options. For example:
3333
--system-package Scan ``<input>`` for installed system package
3434
databases.
3535

36-
-b, --binary-package Scan <input> for package and dependency related
37-
data in binaries. Note that looking for packages
38-
in binaries makes package scan slower.
39-
Currently supported binaries: Go, Rust.
36+
--package-in-compiled Scan compiled executable binaries such as ELF,
37+
WinpE and Mach-O files, looking for structured
38+
package and dependency metadata. Note that looking for
39+
packages in binaries makes package scan slower.
40+
Currently supported compiled binaries: Go, Rust.
4041

4142
--package-only Scan ``<input>`` for system and application
4243
only for package metadata, without license/

etc/release/scancode-create-pypi-wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -e
1919

2020
./configure --dev
2121
venv/bin/scancode-reindex-licenses
22-
venv/bin/scancode-cache-package-patterns
22+
venv/bin/scancode-reindex-package-patterns
2323

2424
python_tag=$( python -c "import platform;print(f\"cp{''.join(platform.python_version_tuple()[:2])}\")" )
2525

etc/release/scancode-create-release-app-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cp -r etc/thirdparty $release_dir/etc
6565
# Build the wheel
6666
./configure --dev
6767
venv/bin/scancode-reindex-licenses
68-
venv/bin/scancode-cache-package-patterns
68+
venv/bin/scancode-reindex-package-patterns
6969
venv/bin/python setup.py --quiet bdist_wheel --python-tag cp$python_version
7070

7171
cp -r \

etc/release/scancode-create-release-app-macos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cp -r etc/thirdparty $release_dir/etc
6363
# Build the wheel
6464
./configure --dev
6565
venv/bin/scancode-reindex-licenses
66-
venv/bin/scancode-cache-package-patterns
66+
venv/bin/scancode-reindex-package-patterns
6767
venv/bin/python setup.py --quiet bdist_wheel --python-tag cp$python_version
6868

6969
cp -r \

etc/release/scancode-create-release-app-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cp -r etc/thirdparty $release_dir/etc
6262
# Build the wheel
6363
./configure --dev
6464
venv/bin/scancode-reindex-licenses
65-
venv/bin/scancode-cache-package-patterns
65+
venv/bin/scancode-reindex-package-patterns
6666
venv/bin/python setup.py --quiet bdist_wheel --python-tag cp$python_version
6767

6868
cp -r \

setup-mini.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ packages =
157157
console_scripts =
158158
scancode = scancode.cli:scancode
159159
scancode-reindex-licenses = licensedcode.reindex:reindex_licenses
160-
scancode-cache-package-patterns = packagedcode.cache:cache_package_patterns
160+
scancode-reindex-package-patterns = packagedcode.cache:cache_package_patterns
161161
scancode-license-data = licensedcode.license_db:dump_scancode_license_data
162162
regen-package-docs = packagedcode.regen_package_docs:regen_package_docs
163163
add-required-phrases = licensedcode.required_phrases:add_required_phrases

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ packages =
159159
console_scripts =
160160
scancode = scancode.cli:scancode
161161
scancode-reindex-licenses = licensedcode.reindex:reindex_licenses
162-
scancode-cache-package-patterns = packagedcode.cache:cache_package_patterns
162+
scancode-reindex-package-patterns = packagedcode.cache:cache_package_patterns
163163
scancode-license-data = licensedcode.license_db:dump_scancode_license_data
164164
regen-package-docs = packagedcode.regen_package_docs:regen_package_docs
165165
add-required-phrases = licensedcode.required_phrases:add_required_phrases

src/licensedcode/cache.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
LICENSE_INDEX_DIR = 'license_index'
3535
LICENSE_INDEX_FILENAME = 'index_cache'
3636
LICENSE_LOCKFILE_NAME = 'scancode_license_index_lockfile'
37-
LICENSE_CHECKSUM_FILE = 'scancode_license_index_tree_checksums'
3837

3938

4039
class LicenseCache:

src/packagedcode/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,30 +248,30 @@
248248

249249

250250
# These handlers are special as they use filetype to
251-
# detect these binaries instead of datafile path patterns
251+
# detect these compiled binaries instead of datafile path patterns
252252
# as these are optionally installed, we can skip checking
253253
# for filetype if these are not available
254-
BINARY_PACKAGE_DATAFILE_HANDLERS = []
254+
PACKAGE_IN_COMPILED_DATAFILE_HANDLERS = []
255255

256256
try:
257257
from go_inspector.binary import get_go_binary_handler
258258
handler = get_go_binary_handler()
259-
BINARY_PACKAGE_DATAFILE_HANDLERS.append(handler)
259+
PACKAGE_IN_COMPILED_DATAFILE_HANDLERS.append(handler)
260260
except ImportError:
261261
pass
262262

263263
try:
264264
from rust_inspector.packages import get_rust_binary_handler
265265
handler = get_rust_binary_handler()
266-
BINARY_PACKAGE_DATAFILE_HANDLERS.append(handler)
266+
PACKAGE_IN_COMPILED_DATAFILE_HANDLERS.append(handler)
267267
except ImportError:
268268
pass
269269

270270
ALL_DATAFILE_HANDLERS = (
271271
APPLICATION_PACKAGE_DATAFILE_HANDLERS + [
272272
p for p in SYSTEM_PACKAGE_DATAFILE_HANDLERS
273273
if p not in APPLICATION_PACKAGE_DATAFILE_HANDLERS
274-
] + BINARY_PACKAGE_DATAFILE_HANDLERS
274+
] + PACKAGE_IN_COMPILED_DATAFILE_HANDLERS
275275
)
276276

277277
# registry of all handler classes keyed by datasource_id

0 commit comments

Comments
 (0)