Skip to content

Commit

Permalink
Merge pull request #3894 from aboutcode-org/detect-go-binary-packages
Browse files Browse the repository at this point in the history
Detect go binary packages
  • Loading branch information
AyanSinhaMahapatra authored Oct 19, 2024
2 parents defe3a6 + 585a166 commit 9b3cf12
Show file tree
Hide file tree
Showing 9 changed files with 1,134 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ v33.0.0 (next next, roadmap)
- OpenWRT packages.
- Yocto/BitBake .bb recipes.


- Fallback packages for non-native dependencies of SCTK.
- Dependencies for
- Support for copyright detection objects.

- We can now collect packages from a Go binary using go-inspector (Linux-only)

- A new field in packages with the license category for the
detected license expression and also an API function to
compute license categories from license expressions.
Expand Down
1 change: 1 addition & 0 deletions requirements-linux.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packagedcode-msitools==0.101.210706
regipy==3.1.0
rpm-inspector-rpm==4.16.1.3.210404
go-inspector==0.3.1
1 change: 1 addition & 0 deletions setup-mini.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ packages =
rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux'
regipy >= 3.1.0; platform_system == 'Linux'
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
go-inspector >= 0.3.1; platform_system == 'Linux'


[options.entry_points]
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ packages =
rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux'
regipy >= 3.1.0; platform_system == 'Linux'
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
go-inspector >= 0.3.1; platform_system == 'Linux'


[options.entry_points]
Expand Down
6 changes: 6 additions & 0 deletions src/packagedcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@
win_reg.InstalledProgramFromDockerUtilityvmSoftwareHandler,
]

try:
from go_inspector.binary import get_go_binary_handler
APPLICATION_PACKAGE_DATAFILE_HANDLERS.append(get_go_binary_handler())
except ImportError:
pass

ALL_DATAFILE_HANDLERS = (
APPLICATION_PACKAGE_DATAFILE_HANDLERS + [
p for p in SYSTEM_PACKAGE_DATAFILE_HANDLERS
Expand Down
Loading

0 comments on commit 9b3cf12

Please sign in to comment.