mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
fix py globs to include partial matches (#101)
This commit is contained in:
parent
0a0bc68e95
commit
9ec5da24dd
@ -12,10 +12,13 @@ type Cataloger struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewCataloger() *Cataloger {
|
func NewCataloger() *Cataloger {
|
||||||
|
// we want to match on partial dir names
|
||||||
|
// /home/user/requests-2.10.0.dist-info/METADATA
|
||||||
|
// /home/user/requests-2.10.0/dist-info/METADATA
|
||||||
globParsers := map[string]common.ParserFn{
|
globParsers := map[string]common.ParserFn{
|
||||||
"**/egg-info/PKG-INFO": parseEggMetadata,
|
"**/*egg-info/PKG-INFO": parseEggMetadata,
|
||||||
"**/dist-info/METADATA": parseWheelMetadata,
|
"**/*dist-info/METADATA": parseWheelMetadata,
|
||||||
"**/requirements.txt": parseRequirementsTxt,
|
"**/requirements.txt": parseRequirementsTxt,
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Cataloger{
|
return &Cataloger{
|
||||||
|
|||||||
@ -57,6 +57,7 @@ var cases = []struct {
|
|||||||
pkgLanguage: pkg.Python,
|
pkgLanguage: pkg.Python,
|
||||||
pkgInfo: map[string]string{
|
pkgInfo: map[string]string{
|
||||||
"Pygments": "2.6.1",
|
"Pygments": "2.6.1",
|
||||||
|
"requests": "2.10.0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,6 +74,7 @@ var cases = []struct {
|
|||||||
pkgLanguage: pkg.Python,
|
pkgLanguage: pkg.Python,
|
||||||
pkgInfo: map[string]string{
|
pkgInfo: map[string]string{
|
||||||
"requests": "2.22.0",
|
"requests": "2.22.0",
|
||||||
|
"otherpkg": "2.19.0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
Metadata-Version: 2.1
|
||||||
|
Name: otherpkg
|
||||||
|
Version: 2.19.0
|
||||||
|
Summary: Python HTTP for Humans.
|
||||||
|
Home-page: http://python-requests.org
|
||||||
|
Author: Kenneth Reitz
|
||||||
|
Author-email: me@kennethreitz.org
|
||||||
|
License: Apache 2.0
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
Metadata-Version: 2.1
|
||||||
|
Name: requests
|
||||||
|
Version: 2.10.0
|
||||||
|
Summary: stuff
|
||||||
|
Home-page: stuff
|
||||||
|
Author: Georg Brandl
|
||||||
|
Author-email: georg@python.org
|
||||||
|
License: BSD License
|
||||||
|
Platform: any
|
||||||
|
Classifier: License :: OSI Approved :: BSD License
|
||||||
|
Classifier: Intended Audience :: Developers
|
||||||
|
Classifier: Intended Audience :: End Users/Desktop
|
||||||
|
Classifier: Intended Audience :: System Administrators
|
||||||
|
Classifier: Development Status :: 6 - Mature
|
||||||
|
Classifier: Programming Language :: Python
|
||||||
|
Classifier: Programming Language :: Python :: 3
|
||||||
|
Classifier: Programming Language :: Python :: 3.5
|
||||||
|
Classifier: Programming Language :: Python :: 3.6
|
||||||
|
Classifier: Programming Language :: Python :: 3.7
|
||||||
|
Classifier: Programming Language :: Python :: 3.8
|
||||||
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||||
|
Classifier: Operating System :: OS Independent
|
||||||
|
Classifier: Topic :: Text Processing :: Filters
|
||||||
|
Classifier: Topic :: Utilities
|
||||||
|
Requires-Python: >=3.5
|
||||||
Loading…
x
Reference in New Issue
Block a user