diff --git a/syft/cataloger/python/cataloger.go b/syft/cataloger/python/cataloger.go index 396d7f28a..12675b3ed 100644 --- a/syft/cataloger/python/cataloger.go +++ b/syft/cataloger/python/cataloger.go @@ -20,7 +20,7 @@ func New() *Cataloger { globParsers := map[string]common.ParserFn{ "**/*egg-info/PKG-INFO": parseEggMetadata, "**/*dist-info/METADATA": parseWheelMetadata, - "**/requirements.txt": parseRequirementsTxt, + "**/*requirements*.txt": parseRequirementsTxt, "**/poetry.lock": parsePoetryLock, "**/setup.py": parseSetup, } diff --git a/test/integration/pkg_cases.go b/test/integration/pkg_cases.go index 35ce32a63..6981304d2 100644 --- a/test/integration/pkg_cases.go +++ b/test/integration/pkg_cases.go @@ -81,7 +81,13 @@ var cases = []struct { pkgType: pkg.PythonRequirementsPkg, pkgLanguage: pkg.Python, pkgInfo: map[string]string{ - "flask": "4.0.0", + "flask": "4.0.0", + "python-dateutil": "2.8.1", + "python-swiftclient": "3.8.1", + "pytz": "2019.3", + "jsonschema": "2.6.0", + "passlib": "1.7.2", + "pathlib": "1.0.1", }, }, { diff --git a/test/integration/test-fixtures/image-pkg-coverage/python/requires/requirements-dev.txt b/test/integration/test-fixtures/image-pkg-coverage/python/requires/requirements-dev.txt new file mode 100644 index 000000000..4b9365fe9 --- /dev/null +++ b/test/integration/test-fixtures/image-pkg-coverage/python/requires/requirements-dev.txt @@ -0,0 +1,3 @@ +jsonschema==2.6.0 +passlib==1.7.2 +pathlib==1.0.1 \ No newline at end of file diff --git a/test/integration/test-fixtures/image-pkg-coverage/python/requires/test-requirements.txt b/test/integration/test-fixtures/image-pkg-coverage/python/requires/test-requirements.txt new file mode 100644 index 000000000..6f32e8e00 --- /dev/null +++ b/test/integration/test-fixtures/image-pkg-coverage/python/requires/test-requirements.txt @@ -0,0 +1,3 @@ +python-dateutil==2.8.1 +python-swiftclient==3.8.1 +pytz==2019.3 \ No newline at end of file