diff --git a/src/packagedcode/__init__.py b/src/packagedcode/__init__.py index 5238dc36433..5f1f6f8bac3 100644 --- a/src/packagedcode/__init__.py +++ b/src/packagedcode/__init__.py @@ -20,6 +20,7 @@ from packagedcode import freebsd from packagedcode import golang from packagedcode import haxe +from packagedcode import jar_manifest from packagedcode import maven from packagedcode import models from packagedcode import msi @@ -38,73 +39,99 @@ # Note: the order matters: from the most to the least specific # Package classes MUST be added to this list to be active -PACKAGE_TYPES = [ - rpm.RpmPackage, +PACKAGE_MANIFEST_TYPES = [ + rpm.RpmManifest, debian.DebianPackage, models.JavaJar, + jar_manifest.JavaManifest, models.JavaEar, models.JavaWar, maven.MavenPomPackage, - models.IvyJar, + jar_manifest.IvyJar, models.JBossSar, models.Axis2Mar, - about.AboutPackage, - npm.NpmPackage, - phpcomposer.PHPComposerPackage, - haxe.HaxePackage, - cargo.RustCargoCrate, - cocoapods.CocoapodsPackage, - opam.OpamPackage, + about.Aboutfile, + npm.PackageJson, + npm.PackageLockJson, + npm.YarnLockJson, + phpcomposer.ComposerJson, + phpcomposer.ComposerLock, + haxe.HaxelibJson, + cargo.CargoToml, + cargo.CargoLock, + cocoapods.Podspec, + cocoapods.PodfileLock, + cocoapods.PodspecJson, + opam.OpamFile, models.MeteorPackage, - bower.BowerPackage, - freebsd.FreeBSDPackage, + bower.BowerJson, + freebsd.CompactManifest, models.CpanModule, - rubygems.RubyGem, + rubygems.GemArchive, + rubygems.GemArchiveExtracted, + rubygems.GemSpec, + rubygems.GemfileLock, models.AndroidApp, models.AndroidLibrary, models.MozillaExtension, models.ChromeExtension, models.IOSApp, - pypi.PythonPackage, - golang.GolangPackage, + pypi.MetadataFile, + pypi.BinaryDistArchive, + pypi.SourceDistArchive, + pypi.SetupPy, + pypi.DependencyFile, + pypi.PipfileLock, + pypi.RequirementsFile, + golang.GoMod, + golang.GoSum, models.CabPackage, models.InstallShieldPackage, models.NSISInstallerPackage, - nuget.NugetPackage, + nuget.Nuspec, models.SharPackage, models.AppleDmgPackage, models.IsoImagePackage, models.SquashfsPackage, - chef.ChefPackage, + chef.MetadataJson, + chef.Metadatarb, build.BazelPackage, build.BuckPackage, build.AutotoolsPackage, - conda.CondaPackage, - win_pe.WindowsExecutable, - readme.ReadmePackage, + conda.Condayml, + win_pe.WindowsExecutableManifest, + readme.ReadmeManifest, build.MetadataBzl, msi.MsiInstallerPackage, - windows.MicrosoftUpdateManifestPackage, - pubspec.PubspecPackage, + windows.MicrosoftUpdateManifest, + pubspec.PubspecYaml, + pubspec.PubspecLock ] -PACKAGES_BY_TYPE = {cls.default_type: cls for cls in PACKAGE_TYPES} - +PACKAGE_MANIFESTS_BY_TYPE = { + ( + cls.package_manifest_type + if isinstance(cls, models.PackageManifest) + else cls.default_type + ): cls + for cls in PACKAGE_MANIFEST_TYPES +} # We cannot have two package classes with the same type -if len(PACKAGES_BY_TYPE) != len(PACKAGE_TYPES): +if len(PACKAGE_MANIFESTS_BY_TYPE) != len(PACKAGE_MANIFEST_TYPES): seen_types = {} - for pt in PACKAGE_TYPES: - assert pt.default_type - seen = seen_types.get(pt.default_type) + for pmt in PACKAGE_MANIFEST_TYPES: + manifest = pmt() + assert manifest.package_manifest_type + seen = seen_types.get(manifest.package_manifest_type) if seen: msg = ('Invalid duplicated packagedcode.Package types: ' '"{}:{}" and "{}:{}" have the same type.' - .format(pt.default_type, pt.__name__, seen.default_type, seen.__name__,)) + .format(manifest.package_manifest_type, manifest.__name__, seen.package_manifest_type, seen.__name__,)) raise Exception(msg) else: - seen_types[pt.default_type] = pt + seen_types[manifest.package_manifest_type] = manifest def get_package_class(scan_data, default=models.Package): @@ -130,7 +157,7 @@ def get_package_class(scan_data, default=models.Package): if not ptype: # basic type for default package types return default - ptype_class = PACKAGES_BY_TYPE.get(ptype) + ptype_class = PACKAGE_MANIFESTS_BY_TYPE.get(ptype) return ptype_class or default diff --git a/src/packagedcode/about.py b/src/packagedcode/about.py index f377be77d9e..9144d6594fd 100644 --- a/src/packagedcode/about.py +++ b/src/packagedcode/about.py @@ -30,12 +30,8 @@ @attr.s() class AboutPackage(models.Package): - metafiles = ('*.ABOUT',) - default_type = 'about' - @classmethod - def recognize(cls, location): - yield parse(location) + default_type = 'about' def get_package_root(self, manifest_resource, codebase): about_resource = self.extra_data.get('about_resource') @@ -47,53 +43,54 @@ def get_package_root(self, manifest_resource, codebase): return manifest_resource -def is_about_file(location): - return (filetype.is_file(location) - and location.lower().endswith(('.about',))) - - -def parse(location): - """ - Return a Package object from an ABOUT file or None. - """ - if not is_about_file(location): - return - - with io.open(location, encoding='utf-8') as loc: - package_data = saneyaml.load(loc.read()) - - return build_package(package_data) - - -def build_package(package_data): - """ - Return a Package built from `package_data` obtained by an ABOUT file. - """ - name = package_data.get('name') - # FIXME: having no name may not be a problem See #1514 - if not name: - return - - version = package_data.get('version') - homepage_url = package_data.get('home_url') or package_data.get('homepage_url') - download_url = package_data.get('download_url') - declared_license = package_data.get('license_expression') - copyright_statement = package_data.get('copyright') - - owner = package_data.get('owner') - if not isinstance(owner, str): - owner = repr(owner) - parties = [models.Party(type=models.party_person, name=owner, role='owner')] - - about_package = AboutPackage( - type='about', - name=name, - version=version, - declared_license=declared_license, - copyright=copyright_statement, - parties=parties, - homepage_url=homepage_url, - download_url=download_url, - ) - about_package.extra_data['about_resource'] = package_data.get('about_resource') - return about_package +@attr.s() +class Aboutfile(AboutPackage, models.PackageManifest): + + file_patterns = ('*.ABOUT',) + extensions = ('.ABOUT',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.lower().endswith(('.about',)) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as loc: + package_data = saneyaml.load(loc.read()) + + name = package_data.get('name') + # FIXME: having no name may not be a problem See #1514 + if not name: + return + + version = package_data.get('version') + homepage_url = package_data.get('home_url') or package_data.get('homepage_url') + download_url = package_data.get('download_url') + declared_license = package_data.get('license_expression') + copyright_statement = package_data.get('copyright') + + owner = package_data.get('owner') + if not isinstance(owner, str): + owner = repr(owner) + parties = [models.Party(type=models.party_person, name=owner, role='owner')] + + about_package = cls( + type='about', + name=name, + version=version, + declared_license=declared_license, + copyright=copyright_statement, + parties=parties, + homepage_url=homepage_url, + download_url=download_url, + ) + + about_package.extra_data['about_resource'] = package_data.get('about_resource') + yield about_package diff --git a/src/packagedcode/alpine.py b/src/packagedcode/alpine.py index 2baf43b5756..0aebc907c78 100644 --- a/src/packagedcode/alpine.py +++ b/src/packagedcode/alpine.py @@ -27,7 +27,7 @@ @attr.s() -class AlpinePackage(models.Package): +class AlpinePackage(models.Package, models.PackageManifest): extensions = ('.apk', 'APKBUILD') default_type = 'alpine' diff --git a/src/packagedcode/bower.py b/src/packagedcode/bower.py index 7394aac1063..9dc36f8cedd 100644 --- a/src/packagedcode/bower.py +++ b/src/packagedcode/bower.py @@ -31,13 +31,9 @@ @attr.s() class BowerPackage(models.Package): - metafiles = ('bower.json', '.bower.json') + default_type = 'bower' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -46,107 +42,107 @@ def compute_normalized_license(self): return compute_normalized_license(self.declared_license) -def is_bower_json(location): - return (filetype.is_file(location) - and location.lower().endswith(('bower.json', '.bower.json'))) - - -def parse(location): - """ - Return a Package object from a bower.json file or None. - """ - if not is_bower_json(location): - return - - with io.open(location, encoding='utf-8') as loc: - package_data = json.load(loc) - - return build_package(package_data) +@attr.s() +class BowerJson(BowerPackage, models.PackageManifest): + file_patterns = ('bower.json', '.bower.json') + extensions = ('.json',) -def build_package(package_data): - """ - Return a Package built from Bower json `package_data`. - """ - name = package_data.get('name') - # FIXME: having no name may not be a problem See #1514 - if not name: - return + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.lower().endswith(('bower.json', '.bower.json')) - description = package_data.get('description') - version = package_data.get('version') - declared_license = package_data.get('license') - if declared_license: - if isinstance(declared_license, str): - declared_license = [declared_license] - elif isinstance(declared_license, (list, tuple)): - declared_license = [l for l in declared_license if l and l.strip()] - else: - declared_license = [repr(declared_license)] - - keywords = package_data.get('keywords') or [] - - parties = [] - - authors = package_data.get('authors') or [] - for author in authors: - if isinstance(author, dict): - name = author.get('name') - email = author.get('email') - url = author.get('homepage') - party = models.Party(name=name, role='author', email=email, url=url) - parties.append(party) - elif isinstance(author, str): - parties.append(models.Party(name=author, role='author')) - else: - parties.append(models.Party(name=repr(author), role='author')) - - homepage_url = package_data.get('homepage') - - repository = package_data.get('repository') or {} - repo_type = repository.get('type') - repo_url = repository.get('url') - - vcs_url = None - if repo_type and repo_url: - vcs_url = '{}+{}'.format(repo_type, repo_url) - - deps = package_data.get('dependencies') or {} - dependencies = [] - for dep_name, requirement in deps.items(): - dependencies.append( - models.DependentPackage( - purl=PackageURL(type='bower', name=dep_name).to_string(), - scope='dependencies', - requirement=requirement, - is_runtime=True, - is_optional=False, + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as loc: + package_data = json.load(loc) + + name = package_data.get('name') + # FIXME: having no name may not be a problem See #1514 + if not name: + return + + description = package_data.get('description') + version = package_data.get('version') + declared_license = package_data.get('license') + if declared_license: + if isinstance(declared_license, str): + declared_license = [declared_license] + elif isinstance(declared_license, (list, tuple)): + declared_license = [l for l in declared_license if l and l.strip()] + else: + declared_license = [repr(declared_license)] + + keywords = package_data.get('keywords') or [] + + parties = [] + + authors = package_data.get('authors') or [] + for author in authors: + if isinstance(author, dict): + name = author.get('name') + email = author.get('email') + url = author.get('homepage') + party = models.Party(name=name, role='author', email=email, url=url) + parties.append(party) + elif isinstance(author, str): + parties.append(models.Party(name=author, role='author')) + else: + parties.append(models.Party(name=repr(author), role='author')) + + homepage_url = package_data.get('homepage') + + repository = package_data.get('repository') or {} + repo_type = repository.get('type') + repo_url = repository.get('url') + + vcs_url = None + if repo_type and repo_url: + vcs_url = '{}+{}'.format(repo_type, repo_url) + + deps = package_data.get('dependencies') or {} + dependencies = [] + for dep_name, requirement in deps.items(): + dependencies.append( + models.DependentPackage( + purl=PackageURL(type='bower', name=dep_name).to_string(), + scope='dependencies', + requirement=requirement, + is_runtime=True, + is_optional=False, + ) ) - ) - dev_dependencies = package_data.get('devDependencies') or {} - for dep_name, requirement in dev_dependencies.items(): - dependencies.append( - models.DependentPackage( - purl=PackageURL(type='bower', name=dep_name).to_string(), - scope='devDependencies', - requirement=requirement, - is_runtime=False, - is_optional=True, + dev_dependencies = package_data.get('devDependencies') or {} + for dep_name, requirement in dev_dependencies.items(): + dependencies.append( + models.DependentPackage( + purl=PackageURL(type='bower', name=dep_name).to_string(), + scope='devDependencies', + requirement=requirement, + is_runtime=False, + is_optional=True, + ) ) - ) - return BowerPackage( - name=name, - description=description, - version=version, - declared_license=declared_license, - keywords=keywords, - parties=parties, - homepage_url=homepage_url, - vcs_url=vcs_url, - dependencies=dependencies - ) + yield cls( + name=name, + description=description, + version=version, + declared_license=declared_license, + keywords=keywords, + parties=parties, + homepage_url=homepage_url, + vcs_url=vcs_url, + dependencies=dependencies + ) def compute_normalized_license(declared_license): diff --git a/src/packagedcode/build.py b/src/packagedcode/build.py index c22326a8493..3733a4fa2d9 100644 --- a/src/packagedcode/build.py +++ b/src/packagedcode/build.py @@ -39,11 +39,11 @@ @attr.s() class BaseBuildManifestPackage(models.Package): - metafiles = tuple() + file_patterns = tuple() @classmethod def recognize(cls, location): - if not cls._is_build_manifest(location): + if not cls.is_manifest(location): return # we use the parent directory as a name @@ -63,17 +63,10 @@ def recognize(cls, location): def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) - @classmethod - def _is_build_manifest(cls, location): - if not filetype.is_file(location): - return False - fn = fileutils.file_name(location) - return any(fn == mf for mf in cls.metafiles) - @attr.s() -class AutotoolsPackage(BaseBuildManifestPackage): - metafiles = ('configure', 'configure.ac',) +class AutotoolsPackage(BaseBuildManifestPackage, models.PackageManifest): + file_patterns = ('configure', 'configure.ac',) default_type = 'autotools' @@ -96,10 +89,11 @@ def check_rule_name_ending(rule_name): @attr.s() -class StarlarkManifestPackage(BaseBuildManifestPackage): +class StarlarkManifestPackage(BaseBuildManifestPackage, models.PackageManifest): + @classmethod def recognize(cls, location): - if not cls._is_build_manifest(location): + if not cls.is_manifest(location): return # Thanks to Starlark being a Python dialect, we can use the `ast` @@ -175,26 +169,26 @@ def compute_normalized_license(self): @attr.s() class BazelPackage(StarlarkManifestPackage): - metafiles = ('BUILD',) + file_patterns = ('BUILD',) default_type = 'bazel' @attr.s() class BuckPackage(StarlarkManifestPackage): - metafiles = ('BUCK',) + file_patterns = ('BUCK',) default_type = 'buck' @attr.s() -class MetadataBzl(BaseBuildManifestPackage): - metafiles = ('METADATA.bzl',) +class MetadataBzl(BaseBuildManifestPackage, models.PackageManifest): + file_patterns = ('METADATA.bzl',) # TODO: Not sure what the default type should be, change this to something # more appropriate later default_type = 'METADATA.bzl' @classmethod def recognize(cls, location): - if not cls._is_build_manifest(location): + if not cls.is_manifest(location): return with open(location, 'rb') as f: diff --git a/src/packagedcode/cargo.py b/src/packagedcode/cargo.py index d36f7ed6ce2..908ec7d6f30 100644 --- a/src/packagedcode/cargo.py +++ b/src/packagedcode/cargo.py @@ -35,17 +35,12 @@ @attr.s() class RustCargoCrate(models.Package): - metafiles = ('Cargo.toml', 'Cargo.lock') default_type = 'cargo' default_primary_language = 'Rust' default_web_baseurl = 'https://crates.io' default_download_baseurl = 'https://crates.io/api/v1' default_api_baseurl = 'https://crates.io/api/v1' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -63,43 +58,91 @@ def api_data_url(self, baseurl=default_api_baseurl): return '{}/crates/{}'.format(baseurl, self.name) -def parse(location): - """ - Return a Package object from a Cargo.toml/Cargo.lock file. - """ - handlers = {'cargo.toml': build_cargo_toml_package, 'cargo.lock': build_cargo_lock_package} - filename = filetype.is_file(location) and fileutils.file_name(location).lower() - handler = handlers.get(filename) - if handler: - return handler and handler(toml.load(location, _dict=dict)) +@attr.s() +class CargoToml(RustCargoCrate, models.PackageManifest): + file_patterns = ('Cargo.toml',) + extensions = ('.toml',) -def build_cargo_toml_package(package_data): - """ - Return a Package object from a Cargo.toml package data mapping or None. - """ + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and fileutils.file_name(location).lower() == 'cargo.toml' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + package_data = toml.load(location, _dict=dict) - core_package_data = package_data.get('package', {}) - name = core_package_data.get('name') - version = core_package_data.get('version') - description = core_package_data.get('description') - if description: - description = description.strip() + core_package_data = package_data.get('package', {}) + name = core_package_data.get('name') + version = core_package_data.get('version') + description = core_package_data.get('description') + if description: + description = description.strip() - authors = core_package_data.get('authors') - parties = list(party_mapper(authors, party_role='author')) + authors = core_package_data.get('authors') + parties = list(party_mapper(authors, party_role='author')) - declared_license = core_package_data.get('license') + declared_license = core_package_data.get('license') - package = RustCargoCrate( - name=name, - version=version, - description=description, - parties=parties, - declared_license=declared_license - ) + package = cls( + name=name, + version=version, + description=description, + parties=parties, + declared_license=declared_license + ) - return package + yield package + + +@attr.s() +class CargoLock(RustCargoCrate, models.PackageManifest): + + file_patterns = ('Cargo.lock',) + extensions = ('.lock',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == 'cargo.lock') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + package_data = toml.load(location, _dict=dict) + + package_dependencies = [] + core_package_data = package_data.get('package', []) + for dep in core_package_data: + package_dependencies.append( + models.DependentPackage( + purl=PackageURL( + type='crates', + name=dep.get('name'), + version=dep.get('version') + ).to_string(), + requirement=dep.get('version'), + scope='dependency', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + yield cls(dependencies=package_dependencies) def party_mapper(party, party_role): @@ -159,29 +202,3 @@ def parse_person(person): person_parser_no_name = re.compile( r'(?P<([^>]+)>)?' ).match - - -def build_cargo_lock_package(package_data): - """ - Return a Package object from a Cargo.lock package data mapping or None. - """ - - package_dependencies = [] - core_package_data = package_data.get('package', []) - for dep in core_package_data: - package_dependencies.append( - models.DependentPackage( - purl=PackageURL( - type='crates', - name=dep.get('name'), - version=dep.get('version') - ).to_string(), - requirement=dep.get('version'), - scope='dependency', - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - return RustCargoCrate(dependencies=package_dependencies) diff --git a/src/packagedcode/chef.py b/src/packagedcode/chef.py index 03f8c23fe93..e76df9081be 100644 --- a/src/packagedcode/chef.py +++ b/src/packagedcode/chef.py @@ -39,7 +39,6 @@ @attr.s() class ChefPackage(models.Package): - metafiles = ('metadata.json', 'metadata.rb') filetypes = ('.tgz',) mimetypes = ('application/x-tar',) default_type = 'chef' @@ -48,10 +47,6 @@ class ChefPackage(models.Package): default_download_baseurl = 'https://supermarket.chef.io/cookbooks' default_api_baseurl = 'https://supermarket.chef.io/api/v1' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -90,25 +85,6 @@ def chef_api_url(name, version, registry='https://supermarket.chef.io/api/v1'): return '{registry}/cookbooks/{name}/versions/{version}'.format(**locals()) -def is_metadata_json(location): - """ - Return True if `location` path is for a Chef metadata.json file. - The metadata.json is also used in Python installed packages in a 'dist-info' - directory. - """ - return ( - filetype.is_file(location) - and fileutils.file_name(location).lower() == 'metadata.json' - and not fileutils.file_name(fileutils.parent_directory(location)) - .lower().endswith('dist-info') - ) - - -def is_metadata_rb(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'metadata.rb') - - class ChefMetadataFormatter(Formatter): def format(self, tokens, outfile): @@ -179,25 +155,68 @@ def format(self, tokens, outfile): json.dump(metadata, outfile) -def parse(location): - """ - Return a Package object from a metadata.json file or a metadata.rb file or None. - """ - if is_metadata_json(location): +@attr.s() +class MetadataJson(ChefPackage, models.PackageManifest): + + file_patterns = ('metadata.json',) + extensions = ('.json',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if `location` path is for a Chef metadata.json file. + The metadata.json is also used in Python installed packages in a 'dist-info' + directory. + """ + return ( + filetype.is_file(location) + and fileutils.file_name(location).lower() == 'metadata.json' + and not fileutils.file_name(fileutils.parent_directory(location)) + .lower().endswith('dist-info') + ) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ with io.open(location, encoding='utf-8') as loc: package_data = json.load(loc) - return build_package(package_data) + return build_package(cls, package_data) + + +@attr.s() +class Metadatarb(ChefPackage, models.PackageManifest): + + file_patterns = ('metadata.rb',) + extensions = ('.rb',) - if is_metadata_rb(location): + @classmethod + def is_manifest(cls, location): + """ + Return True if `location` path is for a Chef metadata.json file. + The metadata.json is also used in Python installed packages in a 'dist-info' + directory. + """ + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == 'metadata.rb') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ with io.open(location, encoding='utf-8') as loc: file_contents = loc.read() formatted_file_contents = highlight( file_contents, RubyLexer(), ChefMetadataFormatter()) package_data = json.loads(formatted_file_contents) - return build_package(package_data) + return build_package(cls, package_data) -def build_package(package_data): +def build_package(cls, package_data): """ Return a Package object from a package_data mapping (from a metadata.json or similar) or None. @@ -239,7 +258,7 @@ def build_package(package_data): ) ) - return ChefPackage( + yield cls( name=name, version=version, parties=parties, diff --git a/src/packagedcode/cocoapods.py b/src/packagedcode/cocoapods.py index 6eff6b1216e..a8e64d38181 100644 --- a/src/packagedcode/cocoapods.py +++ b/src/packagedcode/cocoapods.py @@ -44,25 +44,12 @@ @attr.s() class CocoapodsPackage(models.Package): - metafiles = ( - '*.podspec', - '*podfile.lock', - '*.podspec.json', - ) - extensions = ( - '.podspec', - '.lock', - ) default_type = 'pods' default_primary_language = 'Objective-C' default_web_baseurl = 'https://cocoapods.org' github_specs_repo_baseurl = 'https://raw.githubusercontent.com/CocoaPods/Specs/blob/master/Specs' default_cdn_baseurl='https://cdn.cocoapods.org/Specs' - @classmethod - def recognize(cls, location): - yield parse(location) - def repository_homepage_url(self, baseurl=default_web_baseurl): return f'{baseurl}/pods/{self.name}' @@ -102,7 +89,7 @@ def hashed_path(self): From https://github.com/CocoaPods/cdn.cocoapods.org: "There are a set of known prefixes for all Podspec paths, you take the name of the pod, - create a SHA (using md5) of it and take the first three characters." + create a hash (using md5) of it and take the first three characters." """ podname = self.get_podname_proper(self.name) if self.name != podname: @@ -129,109 +116,264 @@ def get_podname_proper(podname): return podname -def is_podspec(location): - """ - Checks if the file is actually a podspec file - """ - return (filetype.is_file(location) and location.endswith('.podspec')) +@attr.s() +class Podspec(CocoapodsPackage, models.PackageManifest): + file_patterns = ('*.podspec',) + extensions = ('.podspec',) -def is_podfile_lock(location): - """ - Checks if the file is actually a podfile.lock file - """ - return (filetype.is_file(location) and location.endswith(('podfile.lock', 'Podfile.lock'))) + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.podspec') -def is_podspec_json(location): - """ - Checks if the file is actually a podspec.json metadata file - """ - return (filetype.is_file(location) and location.endswith('.podspec.json')) + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + podspec_object = Spec() + data = podspec_object.parse_spec(location) + + name = data.get('name') + version = data.get('version') + declared_license = data.get('license') + summary = data.get('summary', '') + description = data.get('description', '') + homepage_url = data.get('homepage_url') + source = data.get('source') + authors = data.get('author') or [] + if summary and not description.startswith(summary): + desc = [summary] + if description: + desc += [description] + description = '\n'.join(desc) + + author_names = [] + author_email = [] + if authors: + for split_author in authors: + split_author = split_author.strip() + author, email = parse_person(split_author) + author_names.append(author) + author_email.append(email) + + parties = list(party_mapper(author_names, author_email)) + + yield cls( + name=name, + version=version, + vcs_url=source, + source_packages=list(source.split('\n')), + description=description, + declared_license=declared_license, + homepage_url=homepage_url, + parties=parties + ) -def read_podspec_json(location): - """ - Reads from podspec.json file at location as JSON. - """ - with open(location, "r") as file: - data = json.load(file) +@attr.s() +class PodfileLock(CocoapodsPackage, models.PackageManifest): - return data + file_patterns = ('*podfile.lock',) + extensions = ('.lock',) + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) and location.endswith(('podfile.lock', 'Podfile.lock'))) -def read_podfile_lock(location): - """ - Reads from podfile.lock file at location as YML. - """ - with open(location, 'r') as file: - data = saneyaml.load(file) + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + data = cls.read_podfile_lock(location) + + pods = data['PODS'] + pod_deps = [] + + for pod in pods: + + if isinstance(pod, dict): + for main_pod, _dep_pods in pod.items(): + + podname, namespace, version = get_data_from_pods(main_pod) + + purl = PackageURL( + type='pods', + namespace=namespace, + name=podname, + version=version, + ).to_string() + + pod_deps.append( + models.DependentPackage( + purl=purl, + scope='requires-dev', + requirement=version, + is_runtime=False, + is_optional=True, + is_resolved=True, + ) + ) - return data + elif isinstance(pod, str): + podname, namespace, version = get_data_from_pods(pod) + purl = PackageURL( + type='pods', + namespace=namespace, + name=podname, + version=version, + ).to_string() + pod_deps.append( + models.DependentPackage( + purl=purl, + scope='requires-dev', + requirement=version, + is_runtime=False, + is_optional=True, + is_resolved=True, + ) + ) -def parse(location): - """ - Return a Package object from: - 1. `.podspec` files - 2. `.podspec.json` files - 3. `podfile.lock` files - or returns None otherwise. - """ - if is_podspec(location): - podspec_object = Spec() - podspec_data = podspec_object.parse_spec(location) - return build_package(podspec_data) + yield cls( + dependencies=pod_deps, + declared_license=None, + ) - if is_podspec_json(location): - podspec_json_data = read_podspec_json(location) - return build_xcode_package(podspec_json_data) - if is_podfile_lock(location): - podfile_lock_data = read_podfile_lock(location) - return build_xcode_package_from_lockfile(podfile_lock_data) + @staticmethod + def read_podfile_lock(location): + """ + Reads from podfile.lock file at location as YML. + """ + with open(location, 'r') as file: + data = saneyaml.load(file) + return data -def build_package(podspec_data): - """ - Return a Package object from a podspec.json package data mapping. - """ - name = podspec_data.get('name') - version = podspec_data.get('version') - declared_license = podspec_data.get('license') - summary = podspec_data.get('summary', '') - description = podspec_data.get('description', '') - homepage_url = podspec_data.get('homepage_url') - source = podspec_data.get('source') - authors = podspec_data.get('author') or [] - if summary and not description.startswith(summary): - desc = [summary] - if description: - desc += [description] - description = '\n'.join(desc) - - author_names = [] - author_email = [] - if authors: - for split_author in authors: - split_author = split_author.strip() - author, email = parse_person(split_author) - author_names.append(author) - author_email.append(email) - - parties = list(party_mapper(author_names, author_email)) - - package = CocoapodsPackage( - name=name, - version=version, - vcs_url=source, - source_packages=list(source.split('\n')), - description=description, - declared_license=declared_license, - homepage_url=homepage_url, - parties=parties - ) - - return package + +@attr.s() +class PodspecJson(CocoapodsPackage, models.PackageManifest): + + file_patterns = ('*.podspec.json',) + extensions = ('.json',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.podspec.json') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + data = cls.read_podspec_json(location) + + name = data.get('name') + version = data.get('version') + summary = data.get('summary', '') + description = data.get('description', '') + homepage_url = data.get('homepage') + + license = data.get('license') + if isinstance(license, dict): + declared_license = ' '.join(list(license.values())) + else: + declared_license = license + + source = data.get('source') + vcs_url = None + download_url = None + + if isinstance(source, dict): + git_url = source.get('git', '') + http_url = source.get('http', '') + if git_url: + vcs_url = git_url + elif http_url: + download_url = http_url + + if not vcs_url: + vcs_url = source + + authors = data.get('authors') or {} + + license_matches = get_license_matches(query_string=declared_license) + if not license_matches: + license_expression = 'unknown' + else: + license_expression = get_license_expression_from_matches(license_matches) + + if summary and not description.startswith(summary): + desc = [summary] + if description: + desc += [description] + description = '. '.join(desc) + + parties = [] + if authors: + if isinstance(authors, dict): + for key, value in authors.items(): + party = models.Party( + type=models.party_org, + name=key, + url=value+'.com', + role='owner' + ) + parties.append(party) + else: + party = models.Party( + type=models.party_org, + name=authors, + role='owner' + ) + parties.append(party) + + extra_data = {} + extra_data['source'] = data['source'] + dependencies = data.get('dependencies', '') + if dependencies: + extra_data['dependencies'] = dependencies + extra_data['podspec.json'] = data + + package_manifest = cls( + name=name, + version=version, + vcs_url=vcs_url, + description=description, + declared_license=declared_license, + license_expression=license_expression, + homepage_url=homepage_url, + download_url=download_url, + parties=parties, + ) + + package_manifest.api_data_url = package_manifest.get_api_data_url() + + yield package_manifest + + @staticmethod + def read_podspec_json(location): + """ + Reads from podspec.json file at location as JSON. + """ + with open(location, "r") as file: + data = json.load(file) + + return data def party_mapper(author, email): @@ -297,94 +439,6 @@ def get_sha1_file(location): return hashlib.sha1(f.read()).hexdigest() -def build_xcode_package(podspec_json_data): - """ - Return a Package object from a podspec.json package data mapping. - """ - name = podspec_json_data.get('name') - version = podspec_json_data.get('version') - summary = podspec_json_data.get('summary', '') - description = podspec_json_data.get('description', '') - homepage_url = podspec_json_data.get('homepage') - - license = podspec_json_data.get('license') - if isinstance(license, dict): - declared_license = ' '.join(list(license.values())) - else: - declared_license = license - - source = podspec_json_data.get('source') - vcs_url = None - download_url = None - - if isinstance(source, dict): - git_url = source.get('git', '') - http_url = source.get('http', '') - if git_url: - vcs_url = git_url - elif http_url: - download_url = http_url - - if not vcs_url: - vcs_url = source - - authors = podspec_json_data.get('authors') or {} - - license_matches = get_license_matches(query_string=declared_license) - if not license_matches: - license_expression = 'unknown' - else: - license_expression = get_license_expression_from_matches(license_matches) - - if summary and not description.startswith(summary): - desc = [summary] - if description: - desc += [description] - description = '. '.join(desc) - - parties = [] - if authors: - if isinstance(authors, dict): - for key, value in authors.items(): - party = models.Party( - type=models.party_org, - name=key, - url=value+'.com', - role='owner' - ) - parties.append(party) - else: - party = models.Party( - type=models.party_org, - name=authors, - role='owner' - ) - parties.append(party) - - extra_data = {} - extra_data['source'] = podspec_json_data['source'] - dependencies = podspec_json_data.get('dependencies', '') - if dependencies: - extra_data['dependencies'] = dependencies - extra_data['podspec.json'] = podspec_json_data - - package = CocoapodsPackage( - name=name, - version=version, - vcs_url=vcs_url, - description=description, - declared_license=declared_license, - license_expression=license_expression, - homepage_url=homepage_url, - download_url=download_url, - parties=parties, - ) - - package.api_data_url = package.get_api_data_url() - - return package - - def get_data_from_pods(dep_pod_version): if '(' in dep_pod_version: @@ -399,61 +453,3 @@ def get_data_from_pods(dep_pod_version): namespace = None return podname, namespace, version - - -def build_xcode_package_from_lockfile(podfile_lock_data): - """ - Return a Package object from a data mapping obtained from a podfile.lock - """ - pods = podfile_lock_data['PODS'] - pod_deps = [] - - for pod in pods: - - if isinstance(pod, dict): - for main_pod, _dep_pods in pod.items(): - - podname, namespace, version = get_data_from_pods(main_pod) - - purl = PackageURL( - type='pods', - namespace=namespace, - name=podname, - version=version, - ).to_string() - - pod_deps.append( - models.DependentPackage( - purl=purl, - scope='requires-dev', - requirement=version, - is_runtime=False, - is_optional=True, - is_resolved=True, - ) - ) - - elif isinstance(pod, str): - podname, namespace, version = get_data_from_pods(pod) - purl = PackageURL( - type='pods', - namespace=namespace, - name=podname, - version=version, - ).to_string() - - pod_deps.append( - models.DependentPackage( - purl=purl, - scope='requires-dev', - requirement=version, - is_runtime=False, - is_optional=True, - is_resolved=True, - ) - ) - - yield CocoapodsPackage( - dependencies=pod_deps, - declared_license=None, - ) diff --git a/src/packagedcode/conda.py b/src/packagedcode/conda.py index ae6d5f0813b..e64d044221d 100644 --- a/src/packagedcode/conda.py +++ b/src/packagedcode/conda.py @@ -45,16 +45,11 @@ def logger_debug(*args): @attr.s() class CondaPackage(models.Package): - metafiles = ('meta.yaml', 'META.yml',) default_type = 'conda' default_web_baseurl = None default_download_baseurl = 'https://repo.continuum.io/pkgs/free' default_api_baseurl = None - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): if manifest_resource.name.lower().endswith(('.yaml', '.yml')): @@ -77,97 +72,99 @@ def extra_root_dirs(cls): def compute_normalized_license(self): return models.compute_normalized_license(self.declared_license) +@attr.s() +class Condayml(CondaPackage, models.PackageManifest): -def is_conda_yaml(location): - return (filetype.is_file(location) and fileutils.file_name(location).lower().endswith(('.yaml', '.yml'))) - - -def parse(location): - """ - Return a Package object from a meta.yaml file or None. - """ - if not is_conda_yaml(location): - return - - yaml_data = get_yaml_data(location) - return build_package(yaml_data) + file_patterns = ('meta.yaml', 'META.yml',) + extensions = ('.yml', '.yaml',) + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) + and fileutils.file_name(location).lower().endswith(('.yaml', '.yml'))) -def build_package(package_data): - """ - Return a Conda Package object from a dictionary yaml data. - """ - name = None - version = None - - # Handle the package element - package_element = package_data.get('package') - if package_element: - for key, value in package_element.items(): - if key == 'name': - name = value - elif key == 'version': - version = value - if not name: - return - - package = CondaPackage( - name=name, - version=version or None, - ) - - # Handle the source element - source_element = package_data.get('source') - if source_element: - for key, value in source_element.items(): - if key == 'url' and value: - package.download_url = value - elif key == 'sha256' and value: - package.sha256 = value - - # Handle the about element - about_element = package_data.get('about') - if about_element: - for key, value in about_element.items(): - if key == 'home' and value: - package.homepage_url = value - elif key == 'license' and value: - package.declared_license = value - elif key == 'summary' and value: - package.description = value - elif key == 'dev_url' and value: - package.vcs_url = value - - # Handle the about element - requirements_element = package_data.get('requirements') - if requirements_element: - for key, value in requirements_element.items(): - # Run element format is like: - # (u'run', [u'mccortex ==1.0', u'nextflow ==19.01.0', u'cortexpy ==0.45.7', u'kallisto ==0.44.0', u'bwa', u'pandas', u'progressbar2', u'python >=3.6'])]) - if key == 'run' and value and isinstance(value, (list, tuple)): - package_dependencies = [] - for dependency in value: - requirement = None - for splitter in ('==', '>=', '<=', '>', '<'): - if splitter in dependency: - splits = dependency.split(splitter) - # Replace the package name and keep the relationship and version - # For example: keep ==19.01.0 - requirement = dependency.replace(splits[0], '').strip() - dependency = splits[0].strip() - break - package_dependencies.append( - models.DependentPackage( - purl=PackageURL( - type='conda', name=dependency).to_string(), - requirement=requirement, - scope='dependencies', - is_runtime=True, - is_optional=False, + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + package_data = get_yaml_data(location) + + name = None + version = None + + # Handle the package element + package_element = package_data.get('package') + if package_element: + for key, value in package_element.items(): + if key == 'name': + name = value + elif key == 'version': + version = value + if not name: + return + + package_manifest = cls( + name=name, + version=version or None, + ) + + # Handle the source element + source_element = package_data.get('source') + if source_element: + for key, value in source_element.items(): + if key == 'url' and value: + package_manifest.download_url = value + elif key == 'sha256' and value: + package_manifest.sha256 = value + + # Handle the about element + about_element = package_data.get('about') + if about_element: + for key, value in about_element.items(): + if key == 'home' and value: + package_manifest.homepage_url = value + elif key == 'license' and value: + package_manifest.declared_license = value + elif key == 'summary' and value: + package_manifest.description = value + elif key == 'dev_url' and value: + package_manifest.vcs_url = value + + # Handle the about element + requirements_element = package_data.get('requirements') + if requirements_element: + for key, value in requirements_element.items(): + # Run element format is like: + # (u'run', [u'mccortex ==1.0', u'nextflow ==19.01.0', u'cortexpy ==0.45.7', u'kallisto ==0.44.0', u'bwa', u'pandas', u'progressbar2', u'python >=3.6'])]) + if key == 'run' and value and isinstance(value, (list, tuple)): + package_dependencies = [] + for dependency in value: + requirement = None + for splitter in ('==', '>=', '<=', '>', '<'): + if splitter in dependency: + splits = dependency.split(splitter) + # Replace the package name and keep the relationship and version + # For example: keep ==19.01.0 + requirement = dependency.replace(splits[0], '').strip() + dependency = splits[0].strip() + break + package_dependencies.append( + models.DependentPackage( + purl=PackageURL( + type='conda', name=dependency).to_string(), + requirement=requirement, + scope='dependencies', + is_runtime=True, + is_optional=False, + ) ) - ) - package.dependencies = package_dependencies - return package + package_manifest.dependencies = package_dependencies + yield package_manifest def get_yaml_data(location): diff --git a/src/packagedcode/cran.py b/src/packagedcode/cran.py index e1d17c99da7..58d36d67685 100644 --- a/src/packagedcode/cran.py +++ b/src/packagedcode/cran.py @@ -34,8 +34,8 @@ @attr.s() -class CranPackage(models.Package): - metafiles = ('DESCRIPTION',) +class CranPackage(models.Package, models.PackageManifest): + file_patterns = ('DESCRIPTION',) default_type = 'cran' default_web_baseurl = 'https://cran.r-project.org/package=' diff --git a/src/packagedcode/debian.py b/src/packagedcode/debian.py index f6665f1a56a..6b6da657e13 100644 --- a/src/packagedcode/debian.py +++ b/src/packagedcode/debian.py @@ -32,8 +32,8 @@ @attr.s() -class DebianPackage(models.Package): - metafiles = ('*.control',) +class DebianPackage(models.Package, models.PackageManifest): + file_patterns = ('*.control',) extensions = ('.deb',) filetypes = ('debian binary package',) mimetypes = ('application/x-archive', 'application/vnd.debian.binary-package',) diff --git a/src/packagedcode/freebsd.py b/src/packagedcode/freebsd.py index 42eed5d8685..2d44502c471 100644 --- a/src/packagedcode/freebsd.py +++ b/src/packagedcode/freebsd.py @@ -35,13 +35,9 @@ @attr.s() class FreeBSDPackage(models.Package): - metafiles = ('+COMPACT_MANIFEST',) + file_patterns = ('+COMPACT_MANIFEST',) default_type = 'freebsd' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -50,6 +46,76 @@ def compute_normalized_license(self): return compute_normalized_license(self.declared_license) +@attr.s() +class CompactManifest(FreeBSDPackage, models.PackageManifest): + + file_patterns = ('+COMPACT_MANIFEST',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == '+compact_manifest') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as loc: + freebsd_manifest = saneyaml.load(loc) + + # construct the package + package = cls() + + # add freebsd-specific package 'qualifiers' + qualifiers = dict([ + ('arch', freebsd_manifest.get('arch')), + ('origin', freebsd_manifest.get('origin')), + ]) + package.qualifiers = qualifiers + + # mapping of top level package.json items to the Package object field name + plain_fields = [ + ('name', 'name'), + ('version', 'version'), + ('www', 'homepage_url'), + ('desc', 'description'), + ('categories', 'keywords'), + ] + + for source, target in plain_fields: + value = freebsd_manifest.get(source) + if value: + if isinstance(value, str): + value = value.strip() + if value: + setattr(package, target, value) + + # mapping of top level +COMPACT_MANIFEST items to a function accepting as + # arguments the package.json element value and returning an iterable of key, + # values Package Object to update + field_mappers = [ + ('maintainer', maintainer_mapper), + ('origin', origin_mapper), + ('arch', arch_mapper), + ] + + for source, func in field_mappers: + logger.debug('parse: %(source)r, %(func)r' % locals()) + value = freebsd_manifest.get(source) or None + if value: + func(value, package) + + # license_mapper needs multiple fields + license_mapper(freebsd_manifest, package) + + yield package + + def compute_normalized_license(declared_license): """ Return a normalized license expression string detected from a list of @@ -78,77 +144,6 @@ def compute_normalized_license(declared_license): return combine_expressions(detected_licenses, relation) -def is_freebsd_manifest(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == '+compact_manifest') - - -def parse(location): - """ - Return a Package object from a +COMPACT_MANIFEST file or None. - """ - if not is_freebsd_manifest(location): - return - - with io.open(location, encoding='utf-8') as loc: - freebsd_manifest = saneyaml.load(loc) - - return build_package(freebsd_manifest) - - -def build_package(package_data): - """ - Return a Package object from a package_data mapping (from a - +COMPACT_MANIFEST file or similar) or None. - """ - # construct the package - package = FreeBSDPackage() - - # add freebsd-specific package 'qualifiers' - qualifiers = dict([ - ('arch', package_data.get('arch')), - ('origin', package_data.get('origin')), - ]) - package.qualifiers = qualifiers - - # mapping of top level package.json items to the Package object field name - plain_fields = [ - ('name', 'name'), - ('version', 'version'), - ('www', 'homepage_url'), - ('desc', 'description'), - ('categories', 'keywords'), - ] - - for source, target in plain_fields: - value = package_data.get(source) - if value: - if isinstance(value, str): - value = value.strip() - if value: - setattr(package, target, value) - - # mapping of top level +COMPACT_MANIFEST items to a function accepting as - # arguments the package.json element value and returning an iterable of key, - # values Package Object to update - field_mappers = [ - ('maintainer', maintainer_mapper), - ('origin', origin_mapper), - ('arch', arch_mapper), - ] - - for source, func in field_mappers: - logger.debug('parse: %(source)r, %(func)r' % locals()) - value = package_data.get(source) or None - if value: - func(value, package) - - # license_mapper needs multiple fields - license_mapper(package_data, package) - - return package - - def license_mapper(package_data, package): """ Update package licensing and return package. Licensing structure for FreeBSD diff --git a/src/packagedcode/golang.py b/src/packagedcode/golang.py index db0a6c94e75..faab14b6b8f 100644 --- a/src/packagedcode/golang.py +++ b/src/packagedcode/golang.py @@ -11,6 +11,7 @@ import attr from commoncode import fileutils +from commoncode import filetype from packagedcode import go_mod from packagedcode import models @@ -35,23 +36,12 @@ @attr.s() class GolangPackage(models.Package): - metafiles = ('go.mod', 'go.sum') default_type = 'golang' default_primary_language = 'Go' default_web_baseurl = 'https://pkg.go.dev' default_download_baseurl = None default_api_baseurl = None - @classmethod - def recognize(cls, location): - filename = fileutils.file_name(location).lower() - if filename == 'go.mod': - gomods = go_mod.parse_gomod(location) - yield build_gomod_package(gomods) - elif filename == 'go.sum': - gosums = go_mod.parse_gosum(location) - yield build_gosum_package(gosums) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -61,66 +51,102 @@ def repository_homepage_url(self, baseurl=default_web_baseurl): return '{}/{}/{}'.format(baseurl, self.namespace, self.name) -def build_gomod_package(gomods): - """ - Return a Package object from a go.mod file or None. - """ - package_dependencies = [] - require = gomods.require or [] - for gomod in require: - package_dependencies.append( - models.DependentPackage( - purl=gomod.purl(include_version=True), - requirement=gomod.version, - scope='require', - is_runtime=True, - is_optional=False, - is_resolved=False, +@attr.s() +class GoMod(GolangPackage, models.PackageManifest): + + file_patterns = ('go.mod',) + extensions = ('.mod',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + filename = fileutils.file_name(location).lower() + return filetype.is_file(location) and filename == 'go.mod' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + gomods = go_mod.parse_gomod(location) + + package_dependencies = [] + require = gomods.require or [] + for gomod in require: + package_dependencies.append( + models.DependentPackage( + purl=gomod.purl(include_version=True), + requirement=gomod.version, + scope='require', + is_runtime=True, + is_optional=False, + is_resolved=False, + ) ) - ) - exclude = gomods.exclude or [] - for gomod in exclude: - package_dependencies.append( - models.DependentPackage( - purl=gomod.purl(include_version=True), - requirement=gomod.version, - scope='exclude', - is_runtime=True, - is_optional=False, - is_resolved=False, + exclude = gomods.exclude or [] + for gomod in exclude: + package_dependencies.append( + models.DependentPackage( + purl=gomod.purl(include_version=True), + requirement=gomod.version, + scope='exclude', + is_runtime=True, + is_optional=False, + is_resolved=False, + ) ) + + name = gomods.name + namespace = gomods.namespace + homepage_url = 'https://pkg.go.dev/{}/{}'.format(gomods.namespace, gomods.name) + vcs_url = 'https://{}/{}.git'.format(gomods.namespace, gomods.name) + + yield cls( + name=name, + namespace=namespace, + vcs_url=vcs_url, + homepage_url=homepage_url, + dependencies=package_dependencies ) - name = gomods.name - namespace = gomods.namespace - homepage_url = 'https://pkg.go.dev/{}/{}'.format(gomods.namespace, gomods.name) - vcs_url = 'https://{}/{}.git'.format(gomods.namespace, gomods.name) - - return GolangPackage( - name=name, - namespace=namespace, - vcs_url=vcs_url, - homepage_url=homepage_url, - dependencies=package_dependencies - ) - - -def build_gosum_package(gosums): - """ - Return a Package object from a go.sum file. - """ - package_dependencies = [] - for gosum in gosums: - package_dependencies.append( - models.DependentPackage( - purl=gosum.purl(), - requirement=gosum.version, - scope='dependency', - is_runtime=True, - is_optional=False, - is_resolved=True, + +@attr.s() +class GoSum(GolangPackage, models.PackageManifest): + + file_patterns = ('go.sum',) + extensions = ('.sum',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + filename = fileutils.file_name(location).lower() + return filetype.is_file(location) and filename == 'go.sum' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + gosums = go_mod.parse_gosum(location) + + package_dependencies = [] + for gosum in gosums: + package_dependencies.append( + models.DependentPackage( + purl=gosum.purl(), + requirement=gosum.version, + scope='dependency', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) ) - ) - return GolangPackage(dependencies=package_dependencies) + yield cls(dependencies=package_dependencies) diff --git a/src/packagedcode/haxe.py b/src/packagedcode/haxe.py index 361f32e9cb5..ba6ddafdaa5 100644 --- a/src/packagedcode/haxe.py +++ b/src/packagedcode/haxe.py @@ -49,7 +49,7 @@ @attr.s() class HaxePackage(models.Package): - metafiles = ('haxelib.json',) + filetypes = tuple() mimetypes = tuple() default_type = 'haxe' @@ -57,10 +57,6 @@ class HaxePackage(models.Package): default_web_baseurl = 'https://lib.haxe.org/p/' default_download_baseurl = 'https://lib.haxe.org/p/' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -72,6 +68,73 @@ def repository_download_url(self, baseurl=default_download_baseurl): return haxelib_download_url(self.name, self.version, baseurl=baseurl) +@attr.s() +class HaxelibJson(HaxePackage, models.PackageManifest): + + file_patterns = ('haxelib.json',) + extensions = ('.json',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and fileutils.file_name(location).lower() == 'haxelib.json' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + + { + "name": "haxelib", + "url" : "https://lib.haxe.org/documentation/", + "license": "GPL", + "tags": ["haxelib", "core"], + "description": "The haxelib client", + "classPath": "src", + "version": "3.4.0", + "releasenote": " * Fix password input issue in Windows (#421).\n * ....", + "contributors": ["back2dos", "ncannasse", "jason", "Simn", "nadako", "andyli"] + } + """ + with io.open(location, encoding='utf-8') as loc: + package_data = json.load(loc) + + package = cls( + name=package_data.get('name'), + version=package_data.get('version'), + homepage_url=package_data.get('url'), + declared_license=package_data.get('license'), + keywords=package_data.get('tags'), + description=package_data.get('description'), + ) + + package.download_url = package.repository_download_url() + + for contrib in package_data.get('contributors', []): + party = models.Party( + type=models.party_person, + name=contrib, + role='contributor', + url='https://lib.haxe.org/u/{}'.format(contrib)) + package.parties.append(party) + + for dep_name, dep_version in package_data.get('dependencies', {}).items(): + dep_version = dep_version and dep_version.strip() + is_resolved = bool(dep_version) + dep_purl = PackageURL( + type='haxe', + name=dep_name, + version=dep_version + ).to_string() + dep = models.DependentPackage(purl=dep_purl, is_resolved=is_resolved,) + package.dependencies.append(dep) + + yield package + + def haxelib_homepage_url(name, baseurl='https://lib.haxe.org/p/'): """ Return an haxelib package homepage URL given a name and a base registry web @@ -97,73 +160,6 @@ def haxelib_download_url(name, version, baseurl='https://lib.haxe.org/p'): return '{baseurl}/{name}/{version}/download/'.format(**locals()) -def is_haxelib_json(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'haxelib.json') - - -def parse(location): - """ - Return a Package object from a haxelib.json file or None. - """ - if not is_haxelib_json(location): - return - - with io.open(location, encoding='utf-8') as loc: - package_data = json.load(loc) - return build_package(package_data) - - -def build_package(package_data): - """ - Return a Package object from a package_data mapping (from a - haxelib.json or similar) or None. - { - "name": "haxelib", - "url" : "https://lib.haxe.org/documentation/", - "license": "GPL", - "tags": ["haxelib", "core"], - "description": "The haxelib client", - "classPath": "src", - "version": "3.4.0", - "releasenote": " * Fix password input issue in Windows (#421).\n * ....", - "contributors": ["back2dos", "ncannasse", "jason", "Simn", "nadako", "andyli"] - } - - """ - package = HaxePackage( - name=package_data.get('name'), - version=package_data.get('version'), - homepage_url=package_data.get('url'), - declared_license=package_data.get('license'), - keywords=package_data.get('tags'), - description=package_data.get('description'), - ) - - package.download_url = package.repository_download_url() - - for contrib in package_data.get('contributors', []): - party = models.Party( - type=models.party_person, - name=contrib, - role='contributor', - url='https://lib.haxe.org/u/{}'.format(contrib)) - package.parties.append(party) - - for dep_name, dep_version in package_data.get('dependencies', {}).items(): - dep_version = dep_version and dep_version.strip() - is_resolved = bool(dep_version) - dep_purl = PackageURL( - type='haxe', - name=dep_name, - version=dep_version - ).to_string() - dep = models.DependentPackage(purl=dep_purl, is_resolved=is_resolved,) - package.dependencies.append(dep) - - return package - - def map_license(package): """ Update the license based on a mapping: diff --git a/src/packagedcode/jar_manifest.py b/src/packagedcode/jar_manifest.py index 46444945f21..1553c655c08 100644 --- a/src/packagedcode/jar_manifest.py +++ b/src/packagedcode/jar_manifest.py @@ -14,7 +14,7 @@ from commoncode.fileutils import as_posixpath from packagedcode.utils import normalize_vcs_url from packagedcode.maven import parse_scm_connection -from packagedcode.models import Package +from packagedcode import models """ @@ -28,19 +28,13 @@ @attr.s() -class JavaArchive(Package): - metafiles = ('META-INF/MANIFEST.MF',) - extensions = ('.jar', '.war', '.ear') +class JavaArchive(models.Package): + filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip',) default_type = 'jar' default_primary_language = 'Java' - @classmethod - def recognize(cls, location): - if is_manifest(location): - yield parse_manifest(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): if manifest_resource.path.lower().endswith('meta-inf/manifest.mf'): @@ -50,11 +44,29 @@ def get_package_root(cls, manifest_resource, codebase): return manifest_resource -def is_manifest(location): - """ - Return Trye if the file at location is a Manifest. - """ - return as_posixpath(location).lower().endswith('meta-inf/manifest.mf') +@attr.s() +class IvyJar(JavaArchive, models.PackageManifest): + file_patterns = ('ivy.xml',) + default_type = 'ivy' + default_primary_language = 'Java' + + +@attr.s() +class JavaManifest(JavaArchive, models.PackageManifest): + file_patterns = ('META-INF/MANIFEST.MF',) + extensions = ('.jar', '.war', '.ear') + + @classmethod + def get_manifest_data(cls, location): + if cls.is_manifest(location): + yield parse_manifest(location) + + @classmethod + def is_manifest(cls, location): + """ + Return Trye if the file at location is a Manifest. + """ + return as_posixpath(location).lower().endswith('meta-inf/manifest.mf') def parse_manifest(location): diff --git a/src/packagedcode/maven.py b/src/packagedcode/maven.py index f7cd17d3ab5..39e3e6fcf1c 100644 --- a/src/packagedcode/maven.py +++ b/src/packagedcode/maven.py @@ -47,8 +47,8 @@ @attr.s() -class MavenPomPackage(models.Package): - metafiles = ('*.pom', 'pom.xml',) +class MavenPomPackage(models.Package, models.PackageManifest): + file_patterns = ('*.pom', 'pom.xml',) extensions = ('.pom',) default_type = 'maven' default_primary_language = 'Java' diff --git a/src/packagedcode/models.py b/src/packagedcode/models.py index 275f34c7caa..c6d4cc02dc4 100644 --- a/src/packagedcode/models.py +++ b/src/packagedcode/models.py @@ -7,7 +7,9 @@ # See https://aboutcode.org for more information about nexB OSS projects. # +import fnmatch import logging +import os import sys import attr @@ -23,9 +25,16 @@ from commoncode.datautils import String from commoncode.datautils import TriBoolean +from commoncode import filetype +from commoncode.fileutils import file_name +from commoncode.fileutils import splitext_name +from typecode import contenttype + + """ -Data models for package information and dependencies, abstracting the -differences existing between package formats and tools. +Data models for package information and dependencies, and also data models +for package manifests for abstracting the differences existing between +package formats and tools. A package has a somewhat fuzzy definition and is code that can be consumed and provisioned by a package manager or can be installed. @@ -41,33 +50,59 @@ - in manifest file proper (such as a Maven POM, NPM package.json and many others) - in binaries (such as an Elf or LKM, Windows PE or RPM header). - in code (JavaDoc tags or Python __copyright__ magic) + There are collectively named "manifests" in ScanCode. We handle package information at two levels: -1.- package information collected in a "manifest" at a file level -2.- aggregated package information based on "manifest" at a directory or archive -level (or in some rarer cases file level) + +1. package manifest information collected in a "manifest" at a file level +2. package instances at the codebase level, where a package instance contains + one or more package manifests, and files for that package. The second requires the first to be computed. -The schema for these two is the same. + +These are case classes to extend: + +- Package: + Base class with shared package attributes and methods. +- PackageManifest: + Mixin class that represents a specific package manifest file. +- PackageInstance: + Mixin class that represents a package that's constructed from one or more + package manifests. It also tracks package files. + +Here is an example of the classes that would need to exist to support a new fictitious +package type or ecosystem `dummy`. + +- DummyPackage(Package): + This class provides type wide defaults and basic implementation for type specific methods. +- DummyManifest(DummyPackage, PackageManifest): + This class provides methods to recognize and parse a package manifest file format. +- DummyPackageInstance(DummyPackage, PackageInstance): + This class provides methods to create package instances for one or more manifests and to + collect package file paths. """ -TRACE = False +SCANCODE_DEBUG_PACKAGE_API = os.environ.get('SCANCODE_DEBUG_PACKAGE_API', False) +TRACE = False or SCANCODE_DEBUG_PACKAGE_API def logger_debug(*args): pass - logger = logging.getLogger(__name__) if TRACE: + import logging + logging.basicConfig(stream=sys.stdout) logger.setLevel(logging.DEBUG) def logger_debug(*args): return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) + logger_debug = print + class BaseModel(object): """ @@ -160,8 +195,9 @@ class BasePackage(BaseModel): filetypes = tuple() mimetypes = tuple() extensions = tuple() + # list of known metafiles for a package type - metafiles = [] + file_patterns = tuple() # Optional. Public default web base URL for package homepages of this # package type on the default repository. @@ -385,7 +421,9 @@ class PackageFile(BaseModel): @attr.s() class Package(BasePackage): """ - A package object as represented by its manifest data. + A package object as represented by either data from one of its different types of + package manifests or that of a package instance created from one or more of these + package manifests, and files for that package. """ # Optional. Public default type for a package class. @@ -515,16 +553,6 @@ def __attrs_post_init__(self, *args, **kwargs): if not self.primary_language and hasattr(self, 'default_primary_language'): self.primary_language = self.default_primary_language - @classmethod - def recognize(cls, location): - """ - Yield one or more Package objects given a file location pointing to a - package archive, manifest or similar. - - Sub-classes should override to implement their own package recognition. - """ - raise NotImplementedError - @classmethod def get_package_root(cls, manifest_resource, codebase): """ @@ -563,8 +591,8 @@ def ignore_resource(cls, resource, codebase): @staticmethod def is_ignored_package_resource(resource, codebase): - from packagedcode import PACKAGE_TYPES - return any(pt.ignore_resource(resource, codebase) for pt in PACKAGE_TYPES) + from packagedcode import PACKAGE_MANIFEST_TYPES + return any(pt.ignore_resource(resource, codebase) for pt in PACKAGE_MANIFEST_TYPES) def compute_normalized_license(self): """ @@ -644,14 +672,107 @@ def compute_normalized_license(declared_license, expression_symbols=None): # we never fail just for this return 'unknown' + +class PackageManifest: + """ + A mixin for package manifest that can be recognized. + + When creating a new package manifest, a class should be created that extends + both PackageManifest and Package. + """ + + # class-level attributes used to recognize a package + filetypes = tuple() + mimetypes = tuple() + extensions = tuple() + + # list of known file_patterns for a package manifest type + file_patterns = tuple() + + @property + def package_manifest_type(self): + """ + A tuple unique across package manifests, created from the default package type + and the manifest type. + """ + return self.default_type, self.manifest_type() + + @classmethod + def manifest_type(cls): + return f"{cls.__module__}.{cls.__qualname__}" + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + + Sub-classes should override to implement their own manifest recognition. + """ + if not filetype.is_file(location): + return + + filename = file_name(location) + + file_patterns = cls.file_patterns + if any(fnmatch.fnmatchcase(filename, metaf) for metaf in file_patterns): + return True + + T = contenttype.get_type(location) + ftype = T.filetype_file.lower() + mtype = T.mimetype_file + + _base_name, extension = splitext_name(location, is_file=True) + extension = extension.lower() + + if TRACE: + logger_debug( + 'is_manifest: ftype:', ftype, 'mtype:', mtype, + 'pygtype:', T.filetype_pygment, + 'fname:', filename, 'ext:', extension, + ) + + type_matched = False + if cls.filetypes: + type_matched = any(t in ftype for t in cls.filetypes) + + mime_matched = False + if cls.mimetypes: + mime_matched = any(m in mtype for m in cls.mimetypes) + + extension_matched = False + extensions = cls.extensions + if extensions: + extensions = (e.lower() for e in extensions) + extension_matched = any( + fnmatch.fnmatchcase(extension, ext_pat) + for ext_pat in extensions + ) + + if type_matched and mime_matched and extension_matched: + return True + + @classmethod + def recognize(cls, location): + """ + Yield one or more PackageManifest objects given a file at `location` + pointing to a package archive, manifest or similar. + + Sub-classes should override to implement their own package recognition and creation. + + This should be called on the file at `location` only if `is_manifest` function + of the same class returns True. + """ + raise NotImplementedError + + # Package types # NOTE: this is somewhat redundant with extractcode archive handlers # yet the purpose and semantics are rather different here @attr.s() -class JavaJar(Package): - metafiles = ('META-INF/MANIFEST.MF',) +class JavaJar(Package, PackageManifest): + file_patterns = ('META-INF/MANIFEST.MF',) extensions = ('.jar',) filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip',) @@ -660,8 +781,8 @@ class JavaJar(Package): @attr.s() -class JavaWar(Package): - metafiles = ('WEB-INF/web.xml',) +class JavaWar(Package, PackageManifest): + file_patterns = ('WEB-INF/web.xml',) extensions = ('.war',) filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip') @@ -670,8 +791,8 @@ class JavaWar(Package): @attr.s() -class JavaEar(Package): - metafiles = ('META-INF/application.xml', 'META-INF/ejb-jar.xml') +class JavaEar(Package, PackageManifest): + file_patterns = ('META-INF/application.xml', 'META-INF/ejb-jar.xml') extensions = ('.ear',) filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip') @@ -680,9 +801,9 @@ class JavaEar(Package): @attr.s() -class Axis2Mar(Package): +class Axis2Mar(Package, PackageManifest): """Apache Axis2 module""" - metafiles = ('META-INF/module.xml',) + file_patterns = ('META-INF/module.xml',) extensions = ('.mar',) filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip') @@ -691,8 +812,8 @@ class Axis2Mar(Package): @attr.s() -class JBossSar(Package): - metafiles = ('META-INF/jboss-service.xml',) +class JBossSar(Package, PackageManifest): + file_patterns = ('META-INF/jboss-service.xml',) extensions = ('.sar',) filetypes = ('java archive ', 'zip archive',) mimetypes = ('application/java-archive', 'application/zip') @@ -701,27 +822,8 @@ class JBossSar(Package): @attr.s() -class IvyJar(JavaJar): - metafiles = ('ivy.xml',) - default_type = 'ivy' - default_primary_language = 'Java' - - -# FIXME: move to bower.py -@attr.s() -class BowerPackage(Package): - metafiles = ('bower.json',) - default_type = 'bower' - default_primary_language = 'JavaScript' - - @classmethod - def get_package_root(cls, manifest_resource, codebase): - return manifest_resource.parent(codebase) - - -@attr.s() -class MeteorPackage(Package): - metafiles = ('package.js',) +class MeteorPackage(Package, PackageManifest): + file_patterns = ('package.js',) default_type = 'meteor' default_primary_language = 'JavaScript' @@ -731,9 +833,10 @@ def get_package_root(cls, manifest_resource, codebase): @attr.s() -class CpanModule(Package): - metafiles = ( +class CpanModule(Package, PackageManifest): + file_patterns = ( '*.pod', + # TODO: .pm is not a package manifest '*.pm', 'MANIFEST', 'Makefile.PL', @@ -750,8 +853,8 @@ class CpanModule(Package): # TODO: refine me: Go packages are a mess but something is emerging # TODO: move to and use godeps.py @attr.s() -class Godep(Package): - metafiles = ('Godeps',) +class Godep(Package, PackageManifest): + file_patterns = ('Godeps',) default_type = 'golang' default_primary_language = 'Go' @@ -761,7 +864,7 @@ def get_package_root(cls, manifest_resource, codebase): @attr.s() -class AndroidApp(Package): +class AndroidApp(Package, PackageManifest): filetypes = ('zip archive',) mimetypes = ('application/zip',) extensions = ('.apk',) @@ -771,7 +874,7 @@ class AndroidApp(Package): # see http://tools.android.com/tech-docs/new-build-system/aar-formats @attr.s() -class AndroidLibrary(Package): +class AndroidLibrary(Package, PackageManifest): filetypes = ('zip archive',) mimetypes = ('application/zip',) # note: Apache Axis also uses AAR extensions for plain Jars. @@ -782,7 +885,7 @@ class AndroidLibrary(Package): @attr.s() -class MozillaExtension(Package): +class MozillaExtension(Package, PackageManifest): filetypes = ('zip archive',) mimetypes = ('application/zip',) extensions = ('.xpi',) @@ -791,7 +894,7 @@ class MozillaExtension(Package): @attr.s() -class ChromeExtension(Package): +class ChromeExtension(Package, PackageManifest): filetypes = ('data',) mimetypes = ('application/octet-stream',) extensions = ('.crx',) @@ -800,7 +903,7 @@ class ChromeExtension(Package): @attr.s() -class IOSApp(Package): +class IOSApp(Package, PackageManifest): filetypes = ('zip archive',) mimetypes = ('application/zip',) extensions = ('.ipa',) @@ -809,7 +912,7 @@ class IOSApp(Package): @attr.s() -class CabPackage(Package): +class CabPackage(Package, PackageManifest): filetypes = ('microsoft cabinet',) mimetypes = ('application/vnd.ms-cab-compressed',) extensions = ('.cab',) @@ -817,7 +920,7 @@ class CabPackage(Package): @attr.s() -class InstallShieldPackage(Package): +class InstallShieldPackage(Package, PackageManifest): filetypes = ('installshield',) mimetypes = ('application/x-dosexec',) extensions = ('.exe',) @@ -825,7 +928,7 @@ class InstallShieldPackage(Package): @attr.s() -class NSISInstallerPackage(Package): +class NSISInstallerPackage(Package, PackageManifest): filetypes = ('nullsoft installer',) mimetypes = ('application/x-dosexec',) extensions = ('.exe',) @@ -833,7 +936,7 @@ class NSISInstallerPackage(Package): @attr.s() -class SharPackage(Package): +class SharPackage(Package, PackageManifest): filetypes = ('posix shell script',) mimetypes = ('text/x-shellscript',) extensions = ('.sha', '.shar', '.bin',) @@ -841,7 +944,7 @@ class SharPackage(Package): @attr.s() -class AppleDmgPackage(Package): +class AppleDmgPackage(Package, PackageManifest): filetypes = ('zlib compressed',) mimetypes = ('application/zlib',) extensions = ('.dmg', '.sparseimage',) @@ -849,7 +952,7 @@ class AppleDmgPackage(Package): @attr.s() -class IsoImagePackage(Package): +class IsoImagePackage(Package, PackageManifest): filetypes = ('iso 9660 cd-rom', 'high sierra cd-rom',) mimetypes = ('application/x-iso9660-image',) extensions = ('.iso', '.udf', '.img',) @@ -857,7 +960,7 @@ class IsoImagePackage(Package): @attr.s() -class SquashfsPackage(Package): +class SquashfsPackage(Package, PackageManifest): filetypes = ('squashfs',) default_type = 'squashfs' diff --git a/src/packagedcode/msi.py b/src/packagedcode/msi.py index ce804ea539e..3401ced488a 100644 --- a/src/packagedcode/msi.py +++ b/src/packagedcode/msi.py @@ -168,7 +168,7 @@ def msi_parse(location): @attr.s() -class MsiInstallerPackage(models.Package): +class MsiInstallerPackage(models.Package, models.PackageManifest): filetypes = ('msi installer',) mimetypes = ('application/x-msi',) extensions = ('.msi',) diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index 5d28e80238a..e08049643eb 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -56,13 +56,6 @@ def logger_debug(*args): @attr.s() class NpmPackage(models.Package): # TODO: add new lock files and yarn lock files - metafiles = ( - 'package.json', - 'npm-shrinkwrap.json', - 'package-lock.json', - 'yarn.lock', - ) - extensions = ('.tgz',) mimetypes = ('application/x-tar',) default_type = 'npm' default_primary_language = 'JavaScript' @@ -70,11 +63,6 @@ class NpmPackage(models.Package): default_download_baseurl = 'https://registry.npmjs.org' default_api_baseurl = 'https://registry.npmjs.org' - @classmethod - def recognize(cls, location): - for package in parse(location): - yield package - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -96,6 +84,382 @@ def compute_normalized_license(self): return compute_normalized_license(self.declared_license) +@attr.s() +class PackageJson(NpmPackage, models.PackageManifest): + + file_patterns = ('package.json',) + extensions = ('.tgz',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and fileutils.file_name(location).lower() == 'package.json' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as loc: + package_data = json.load(loc) + + name = package_data.get('name') + version = package_data.get('version') + homepage = package_data.get('homepage', '') + + if not name: + # a package.json without name and version is not a usable npm package + # FIXME: raise error? + return + + if isinstance(homepage, list): + if homepage: + homepage = homepage[0] + else: + homepage = '' + namespace, name = split_scoped_package_name(name) + package = NpmPackage( + namespace=namespace or None, + name=name, + version=version or None, + description=package_data.get('description', '').strip() or None, + homepage_url=homepage.strip() or None, + ) + vcs_revision = package_data.get('gitHead') or None + + # mapping of top level package.json items to a function accepting as + # arguments the package.json element value and returning an iterable of (key, + # values) to update on a package + field_mappers = [ + ('author', partial(party_mapper, party_type='author')), + ('contributors', partial(party_mapper, party_type='contributor')), + ('maintainers', partial(party_mapper, party_type='maintainer')), + + ('dependencies', partial(deps_mapper, field_name='dependencies')), + ('devDependencies', partial(deps_mapper, field_name='devDependencies')), + ('peerDependencies', partial(deps_mapper, field_name='peerDependencies')), + ('optionalDependencies', partial(deps_mapper, field_name='optionalDependencies')), + ('bundledDependencies', bundle_deps_mapper), + ('repository', partial(vcs_repository_mapper, vcs_revision=vcs_revision)), + ('keywords', keywords_mapper,), + ('bugs', bugs_mapper), + ('dist', dist_mapper), + ] + + for source, func in field_mappers: + if TRACE: logger.debug('parse: %(source)r, %(func)r' % locals()) + value = package_data.get(source) or None + if value: + if isinstance(value, str): + value = value.strip() + if value: + func(value, package) + + if not package.download_url: + # Only add a synthetic download URL if there is none from the dist mapping. + dnl_url = npm_download_url(package.namespace, package.name, package.version) + package.download_url = dnl_url.strip() + + # licenses are a tad special with many different data structures + lic = package_data.get('license') + lics = package_data.get('licenses') + package = licenses_mapper(lic, lics, package) + if TRACE: + declared_license = package.declared_license + logger.debug( + 'parse: license: {lic} licenses: {lics} ' + 'declared_license: {declared_license}'.format(locals())) + + yield package + + +@attr.s() +class PackageLockJson(NpmPackage, models.PackageManifest): + + file_patterns = ( + 'npm-shrinkwrap.json', + 'package-lock.json', + ) + extensions = ('.tgz',) + + @staticmethod + def is_package_lock(location): + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == 'package-lock.json') + + @staticmethod + def is_npm_shrinkwrap(location): + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == 'npm-shrinkwrap.json') + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return cls.is_package_lock(location) or cls.is_npm_shrinkwrap(location) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as loc: + package_data = json.load(loc) + + packages = [] + dev_packages = [] + for dependency, values in package_data.get('dependencies', {}).items(): + is_dev = values.get('dev', False) + dep_deps = [] + namespace = None + name = dependency + if '/' in dependency: + namespace, _slash, name = dependency.partition('/') + # Handle the case where an entry in `dependencies` from a + # package-lock.json file has `requires` + for dep, dep_req in values.get('requires', {}).items(): + purl = PackageURL(type='npm', name=dep, version=dep_req).to_string() + if is_dev: + dep_deps.append( + models.DependentPackage( + purl=purl, + scope='requires-dev', + requirement=dep_req, + is_runtime=False, + is_optional=True, + is_resolved=True, + ) + ) + else: + dep_deps.append( + models.DependentPackage( + purl=purl, + scope='requires', + requirement=dep_req, + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + # Handle the case where an entry in `dependencies` from a + # npm-shrinkwrap.json file has `dependencies` + for dep, dep_values in values.get('dependencies', {}).items(): + dep_version = dep_values.get('version') + requirement = None + split_requirement = dep_values.get('from', '').rsplit('@') + if len(split_requirement) == 2: + # requirement is in the form of "abbrev@>=1.0.0 <2.0.0", so we just want what is right of @ + _, requirement = split_requirement + dep_deps.append( + models.DependentPackage( + purl=PackageURL( + type='npm', + name=dep, + version=dep_version, + ).to_string(), + scope='dependencies', + requirement=requirement, + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + p = cls( + namespace=namespace, + name=name, + version=values.get('version'), + download_url=values.get('resolved'), + dependencies=dep_deps, + ) + if is_dev: + dev_packages.append(p) + else: + packages.append(p) + + package_deps = [] + for package in packages: + package_deps.append( + models.DependentPackage( + purl=package.purl, + scope='dependencies', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + dev_package_deps = [] + for dev_package in dev_packages: + dev_package_deps.append( + models.DependentPackage( + purl=dev_package.purl, + scope='dependencies-dev', + is_runtime=False, + is_optional=True, + is_resolved=True, + ) + ) + + yield cls( + name=package_data.get('name'), + version=package_data.get('version'), + dependencies=package_deps + dev_package_deps, + ) + + for package in packages + dev_packages: + yield package + + +@attr.s() +class YarnLockJson(NpmPackage, models.PackageManifest): + + file_patterns = ('yarn.lock',) + extensions = ('.tgz',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) + and fileutils.file_name(location).lower() == 'yarn.lock') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with io.open(location, encoding='utf-8') as yarn_lock_lines: + + packages = [] + packages_reqs = [] + current_package_data = {} + dependencies = False + for line in yarn_lock_lines: + # Check if this is not an empty line or comment + if line.strip() and not line.startswith('#'): + if line.startswith(' '): + if not dependencies: + if line.strip().startswith('version'): + current_package_data['version'] = line.partition('version')[2].strip().strip('\"') + elif line.strip().startswith('resolved'): + current_package_data['download_url'] = line.partition('resolved')[2].strip().strip('\"') + elif line.strip().startswith('dependencies'): + dependencies = True + else: + continue + else: + split_line = line.strip().split() + if len(split_line) == 2: + k, v = split_line + # Remove leading and following quotation marks on values + v = v[1:-1] + if 'dependencies' in current_package_data: + current_package_data['dependencies'].append((k, v)) + else: + current_package_data['dependencies'] = [(k, v)] + else: + dependencies = False + # Clean up dependency name and requirement strings + line = line.strip().replace('\"', '').replace(':', '') + split_line_for_name_req = line.split(',') + dep_names_and_reqs = defaultdict(list) + for segment in split_line_for_name_req: + segment = segment.strip() + dep_name_and_req = segment.rsplit('@', 1) + dep, req = dep_name_and_req + dep_names_and_reqs[dep].append(req) + # We should only have one key `dep_names_and_reqs`, where it is the + # current dependency we are looking at + if len(dep_names_and_reqs.keys()) == 1: + dep, req = list(dep_names_and_reqs.items())[0] + if '@' in dep and '/' in dep: + namespace, name = dep.split('/') + current_package_data['namespace'] = namespace + current_package_data['name'] = name + else: + current_package_data['name'] = dep + current_package_data['requirement'] = ', '.join(req) + else: + deps = [] + if current_package_data: + for dep, req in current_package_data.get('dependencies', []): + deps.append( + models.DependentPackage( + purl=PackageURL(type='npm', name=dep).to_string(), + scope='dependencies', + requirement=req, + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + packages.append( + cls( + namespace=current_package_data.get('namespace'), + name=current_package_data.get('name'), + version=current_package_data.get('version'), + download_url=current_package_data.get('download_url'), + dependencies=deps + ) + ) + packages_reqs.append(current_package_data.get('requirement')) + current_package_data = {} + + # Add the last element if it's not already added + if current_package_data: + for dep, req in current_package_data.get('dependencies', []): + deps.append( + models.DependentPackage( + purl=PackageURL(type='npm', name=dep).to_string(), + scope='dependencies', + requirement=req, + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + packages.append( + cls( + namespace=current_package_data.get('namespace'), + name=current_package_data.get('name'), + version=current_package_data.get('version'), + download_url=current_package_data.get('download_url'), + dependencies=deps + ) + ) + packages_reqs.append(current_package_data.get('requirement')) + + packages_dependencies = [] + for package, requirement in zip(packages, packages_reqs): + packages_dependencies.append( + models.DependentPackage( + purl=PackageURL( + type='npm', + name=package.name, + version=package.version + ).to_string(), + requirement=requirement, + scope='dependencies', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + yield cls(dependencies=packages_dependencies) + for package in packages: + yield package + + def compute_normalized_license(declared_license): """ Return a normalized license expression string detected from a list of @@ -214,123 +578,6 @@ def npm_api_url(namespace, name, version=None, registry='https://registry.npmjs. return '{registry}/{ns_name}{version}'.format(**locals()) -def is_package_json(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'package.json') - - -def is_package_lock(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'package-lock.json') - - -def is_npm_shrinkwrap(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'npm-shrinkwrap.json') - - -def is_yarn_lock(location): - return (filetype.is_file(location) - and fileutils.file_name(location).lower() == 'yarn.lock') - - -def parse(location): - """ - Return a Package object from a package.json file or None. - """ - if is_package_json(location): - with io.open(location, encoding='utf-8') as loc: - package_data = json.load(loc) - yield build_package(package_data) - - if is_package_lock(location) or is_npm_shrinkwrap(location): - with io.open(location, encoding='utf-8') as loc: - package_data = json.load(loc) - for package in build_packages_from_lockfile(package_data): - yield package - - if is_yarn_lock(location): - with io.open(location, encoding='utf-8') as loc: - for package in build_packages_from_yarn_lock(loc): - yield package - - -def build_package(package_data): - """ - Return a Package object from a package_data mapping (from a package.json or - similar) or None. - """ - - name = package_data.get('name') - version = package_data.get('version') - homepage = package_data.get('homepage', '') - - if not name: - # a package.json without name and version is not a usable npm package - # FIXME: raise error? - return - - if isinstance(homepage, list): - if homepage: - homepage = homepage[0] - else: - homepage = '' - namespace, name = split_scoped_package_name(name) - package = NpmPackage( - namespace=namespace or None, - name=name, - version=version or None, - description=package_data.get('description', '').strip() or None, - homepage_url=homepage.strip() or None, - ) - vcs_revision = package_data.get('gitHead') or None - - # mapping of top level package.json items to a function accepting as - # arguments the package.json element value and returning an iterable of (key, - # values) to update on a package - field_mappers = [ - ('author', partial(party_mapper, party_type='author')), - ('contributors', partial(party_mapper, party_type='contributor')), - ('maintainers', partial(party_mapper, party_type='maintainer')), - - ('dependencies', partial(deps_mapper, field_name='dependencies')), - ('devDependencies', partial(deps_mapper, field_name='devDependencies')), - ('peerDependencies', partial(deps_mapper, field_name='peerDependencies')), - ('optionalDependencies', partial(deps_mapper, field_name='optionalDependencies')), - ('bundledDependencies', bundle_deps_mapper), - ('repository', partial(vcs_repository_mapper, vcs_revision=vcs_revision)), - ('keywords', keywords_mapper,), - ('bugs', bugs_mapper), - ('dist', dist_mapper), - ] - - for source, func in field_mappers: - if TRACE: logger.debug('parse: %(source)r, %(func)r' % locals()) - value = package_data.get(source) or None - if value: - if isinstance(value, str): - value = value.strip() - if value: - func(value, package) - - if not package.download_url: - # Only add a synthetic download URL if there is none from the dist mapping. - dnl_url = npm_download_url(package.namespace, package.name, package.version) - package.download_url = dnl_url.strip() - - # licenses are a tad special with many different data structures - lic = package_data.get('license') - lics = package_data.get('licenses') - package = licenses_mapper(lic, lics, package) - if TRACE: - declared_license = package.declared_license - logger.debug( - 'parse: license: {lic} licenses: {lics} ' - 'declared_license: {declared_license}'.format(locals())) - - return package - - def is_scoped_package(name): """ Return True if name contains a namespace. @@ -807,239 +1054,3 @@ def keywords_mapper(keywords, package): package.keywords = keywords return package - - -def build_packages_from_lockfile(package_data): - """ - Yield `NpmPackage`s from a parsed package-lock.json or npm-shrinkwrap.json - file - """ - packages = [] - dev_packages = [] - for dependency, values in package_data.get('dependencies', {}).items(): - is_dev = values.get('dev', False) - dep_deps = [] - namespace = None - name = dependency - if '/' in dependency: - namespace, _slash, name = dependency.partition('/') - # Handle the case where an entry in `dependencies` from a - # package-lock.json file has `requires` - for dep, dep_req in values.get('requires', {}).items(): - purl = PackageURL(type='npm', name=dep, version=dep_req).to_string() - if is_dev: - dep_deps.append( - models.DependentPackage( - purl=purl, - scope='requires-dev', - requirement=dep_req, - is_runtime=False, - is_optional=True, - is_resolved=True, - ) - ) - else: - dep_deps.append( - models.DependentPackage( - purl=purl, - scope='requires', - requirement=dep_req, - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - # Handle the case where an entry in `dependencies` from a - # npm-shrinkwrap.json file has `dependencies` - for dep, dep_values in values.get('dependencies', {}).items(): - dep_version = dep_values.get('version') - requirement = None - split_requirement = dep_values.get('from', '').rsplit('@') - if len(split_requirement) == 2: - # requirement is in the form of "abbrev@>=1.0.0 <2.0.0", so we just want what is right of @ - _, requirement = split_requirement - dep_deps.append( - models.DependentPackage( - purl=PackageURL( - type='npm', - name=dep, - version=dep_version, - ).to_string(), - scope='dependencies', - requirement=requirement, - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - p = NpmPackage( - namespace=namespace, - name=name, - version=values.get('version'), - download_url=values.get('resolved'), - dependencies=dep_deps, - ) - if is_dev: - dev_packages.append(p) - else: - packages.append(p) - - package_deps = [] - for package in packages: - package_deps.append( - models.DependentPackage( - purl=package.purl, - scope='dependencies', - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - dev_package_deps = [] - for dev_package in dev_packages: - dev_package_deps.append( - models.DependentPackage( - purl=dev_package.purl, - scope='dependencies-dev', - is_runtime=False, - is_optional=True, - is_resolved=True, - ) - ) - - yield NpmPackage( - name=package_data.get('name'), - version=package_data.get('version'), - dependencies=package_deps + dev_package_deps, - ) - - for package in packages + dev_packages: - yield package - - -def build_packages_from_yarn_lock(yarn_lock_lines): - """ - Yield `NpmPackage`s from a list of lines of a yarn.lock file - """ - packages = [] - packages_reqs = [] - current_package_data = {} - dependencies = False - for line in yarn_lock_lines: - # Check if this is not an empty line or comment - if line.strip() and not line.startswith('#'): - if line.startswith(' '): - if not dependencies: - if line.strip().startswith('version'): - current_package_data['version'] = line.partition('version')[2].strip().strip('\"') - elif line.strip().startswith('resolved'): - current_package_data['download_url'] = line.partition('resolved')[2].strip().strip('\"') - elif line.strip().startswith('dependencies'): - dependencies = True - else: - continue - else: - split_line = line.strip().split() - if len(split_line) == 2: - k, v = split_line - # Remove leading and following quotation marks on values - v = v[1:-1] - if 'dependencies' in current_package_data: - current_package_data['dependencies'].append((k, v)) - else: - current_package_data['dependencies'] = [(k, v)] - else: - dependencies = False - # Clean up dependency name and requirement strings - line = line.strip().replace('\"', '').replace(':', '') - split_line_for_name_req = line.split(',') - dep_names_and_reqs = defaultdict(list) - for segment in split_line_for_name_req: - segment = segment.strip() - dep_name_and_req = segment.rsplit('@', 1) - dep, req = dep_name_and_req - dep_names_and_reqs[dep].append(req) - # We should only have one key `dep_names_and_reqs`, where it is the - # current dependency we are looking at - if len(dep_names_and_reqs.keys()) == 1: - dep, req = list(dep_names_and_reqs.items())[0] - if '@' in dep and '/' in dep: - namespace, name = dep.split('/') - current_package_data['namespace'] = namespace - current_package_data['name'] = name - else: - current_package_data['name'] = dep - current_package_data['requirement'] = ', '.join(req) - else: - deps = [] - if current_package_data: - for dep, req in current_package_data.get('dependencies', []): - deps.append( - models.DependentPackage( - purl=PackageURL(type='npm', name=dep).to_string(), - scope='dependencies', - requirement=req, - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - packages.append( - NpmPackage( - namespace=current_package_data.get('namespace'), - name=current_package_data.get('name'), - version=current_package_data.get('version'), - download_url=current_package_data.get('download_url'), - dependencies=deps - ) - ) - packages_reqs.append(current_package_data.get('requirement')) - current_package_data = {} - - # Add the last element if it's not already added - if current_package_data: - for dep, req in current_package_data.get('dependencies', []): - deps.append( - models.DependentPackage( - purl=PackageURL(type='npm', name=dep).to_string(), - scope='dependencies', - requirement=req, - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - packages.append( - NpmPackage( - namespace=current_package_data.get('namespace'), - name=current_package_data.get('name'), - version=current_package_data.get('version'), - download_url=current_package_data.get('download_url'), - dependencies=deps - ) - ) - packages_reqs.append(current_package_data.get('requirement')) - - packages_dependencies = [] - for package, requirement in zip(packages, packages_reqs): - packages_dependencies.append( - models.DependentPackage( - purl=PackageURL( - type='npm', - name=package.name, - version=package.version - ).to_string(), - requirement=requirement, - scope='dependencies', - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - yield NpmPackage(dependencies=packages_dependencies) - for package in packages: - yield package diff --git a/src/packagedcode/nuget.py b/src/packagedcode/nuget.py index 856663c2829..b0d2b7c950b 100644 --- a/src/packagedcode/nuget.py +++ b/src/packagedcode/nuget.py @@ -10,6 +10,7 @@ import attr import xmltodict +from commoncode import filetype from packagedcode import models from packagedcode.utils import build_description @@ -42,20 +43,16 @@ def logger_debug(*args): @attr.s() class NugetPackage(models.Package): - metafiles = ('[Content_Types].xml', '*.nuspec',) + # file_patterns = ('[Content_Types].xml', '*.nuspec',) filetypes = ('zip archive', 'microsoft ooxml',) mimetypes = ('application/zip', 'application/octet-stream',) - extensions = ('.nupkg',) + # extensions = ('.nupkg',) default_type = 'nuget' default_web_baseurl = 'https://www.nuget.org/packages/' default_download_baseurl = 'https://www.nuget.org/api/v2/package/' default_api_baseurl = 'https://api.nuget.org/v3/registration3/' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): if manifest_resource.name.endswith('.nupkg'): @@ -97,75 +94,78 @@ def api_data_url(self, baseurl=default_api_baseurl): ] -def _parse_nuspec(location): - """ - Return a dictionary of Nuget metadata from a .nuspec file at location. - Return None if this is not a parsable nuspec. - Raise Exceptions on errors. - """ - if not location.endswith('.nuspec'): - return - with open(location , 'rb') as loc: - return xmltodict.parse(loc) - - -def parse(location): - """ - Return a Nuget package from a nuspec XML file at `location`. - Return None if this is not a parsable nuspec. - """ - parsed = _parse_nuspec(location) - if TRACE: - logger_debug('parsed:', parsed) - if not parsed: - return - - pack = parsed.get('package', {}) or {} - nuspec = pack.get('metadata') - if not nuspec: - return - - name=nuspec.get('id') - version=nuspec.get('version') - - # Summary: A short description of the package for UI display. If omitted, a - # truncated version of description is used. - description = build_description(nuspec.get('summary') , nuspec.get('description')) - - # title: A human-friendly title of the package, typically used in UI - # displays as on nuget.org and the Package Manager in Visual Studio. If not - # specified, the package ID is used. - title = nuspec.get('title') - if title and title != name: - description = build_description(nuspec.get('title') , description) - - parties = [] - authors = nuspec.get('authors') - if authors: - parties.append(models.Party(name=authors, role='author')) - - owners = nuspec.get('owners') - if owners: - parties.append(models.Party(name=owners, role='owner')) - - repo = nuspec.get('repository') or {} - vcs_tool = repo.get('@type') or '' - vcs_repository = repo.get('@url') or '' - vcs_url =None - if vcs_repository: - if vcs_tool: - vcs_url = '{}+{}'.format(vcs_tool, vcs_repository) - else: - vcs_url = vcs_repository - - package = NugetPackage( - name=name, - version=version, - description=description or None, - homepage_url=nuspec.get('projectUrl') or None, - parties=parties, - declared_license=nuspec.get('licenseUrl') or None, - copyright=nuspec.get('copyright') or None, - vcs_url=vcs_url, - ) - return package +@attr.s() +class Nuspec(NugetPackage, models.PackageManifest): + + file_patterns = ('*.nuspec',) + extensions = ('.nuspec',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.nuspec') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location , 'rb') as loc: + parsed = xmltodict.parse(loc) + + if TRACE: + logger_debug('parsed:', parsed) + if not parsed: + return + + pack = parsed.get('package', {}) or {} + nuspec = pack.get('metadata') + if not nuspec: + return + + name=nuspec.get('id') + version=nuspec.get('version') + + # Summary: A short description of the package for UI display. If omitted, a + # truncated version of description is used. + description = build_description(nuspec.get('summary') , nuspec.get('description')) + + # title: A human-friendly title of the package, typically used in UI + # displays as on nuget.org and the Package Manager in Visual Studio. If not + # specified, the package ID is used. + title = nuspec.get('title') + if title and title != name: + description = build_description(nuspec.get('title') , description) + + parties = [] + authors = nuspec.get('authors') + if authors: + parties.append(models.Party(name=authors, role='author')) + + owners = nuspec.get('owners') + if owners: + parties.append(models.Party(name=owners, role='owner')) + + repo = nuspec.get('repository') or {} + vcs_tool = repo.get('@type') or '' + vcs_repository = repo.get('@url') or '' + vcs_url =None + if vcs_repository: + if vcs_tool: + vcs_url = '{}+{}'.format(vcs_tool, vcs_repository) + else: + vcs_url = vcs_repository + + yield cls( + name=name, + version=version, + description=description or None, + homepage_url=nuspec.get('projectUrl') or None, + parties=parties, + declared_license=nuspec.get('licenseUrl') or None, + copyright=nuspec.get('copyright') or None, + vcs_url=vcs_url, + ) diff --git a/src/packagedcode/opam.py b/src/packagedcode/opam.py index 6f990c733cd..5e0b28dc61c 100644 --- a/src/packagedcode/opam.py +++ b/src/packagedcode/opam.py @@ -14,6 +14,7 @@ import attr from packageurl import PackageURL +from commoncode import filetype from packagedcode import models @@ -33,18 +34,13 @@ @attr.s() class OpamPackage(models.Package): - metafiles = ('*opam',) - extensions = ('.opam',) + default_type = 'opam' default_primary_language = 'Ocaml' default_web_baseurl = 'https://opam.ocaml.org/packages' default_download_baseurl = None default_api_baseurl = 'https://github.com/ocaml/opam-repository/blob/master/packages' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -58,96 +54,98 @@ def api_data_url(self, baseurl=default_api_baseurl): return '{}/{}/{}.{}/opam'.format(baseurl, self.name, self.name, self.version) -def is_opam(location): - return location.endswith('opam') - - -def parse(location): - """ - Return a Package object from a opam file or None. - """ - if not is_opam(location): - return +@attr.s() +class OpamFile(OpamPackage, models.PackageManifest): - opams = parse_opam(location) - return build_opam_package(opams) + file_patterns = ('*opam',) + extensions = ('.opam',) + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('opam') -def build_opam_package(opams): - """ - Return a Package from a opam file or None. - """ - package_dependencies = [] - deps = opams.get('depends') or [] - for dep in deps: - package_dependencies.append( - models.DependentPackage( - purl=dep.purl, - requirement=dep.version, - scope='dependency', - is_runtime=True, - is_optional=False, - is_resolved=False, + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + opams = parse_opam(location) + + package_dependencies = [] + deps = opams.get('depends') or [] + for dep in deps: + package_dependencies.append( + models.DependentPackage( + purl=dep.purl, + requirement=dep.version, + scope='dependency', + is_runtime=True, + is_optional=False, + is_resolved=False, + ) ) - ) - name = opams.get('name') - version = opams.get('version') - homepage_url = opams.get('homepage') - download_url = opams.get('src') - vcs_url = opams.get('dev-repo') - bug_tracking_url = opams.get('bug-reports') - declared_license = opams.get('license') - sha1 = opams.get('sha1') - md5 = opams.get('md5') - sha256 = opams.get('sha256') - sha512 = opams.get('sha512') - - short_desc = opams.get('synopsis') or '' - long_desc = opams.get('description') or '' - if long_desc == short_desc: - long_desc = None - descriptions = [d for d in (short_desc, long_desc) if d and d.strip()] - description = '\n'.join(descriptions) - - parties = [] - authors = opams.get('authors') or [] - for author in authors: - parties.append( - models.Party( - type=models.party_person, - name=author, - role='author' + name = opams.get('name') + version = opams.get('version') + homepage_url = opams.get('homepage') + download_url = opams.get('src') + vcs_url = opams.get('dev-repo') + bug_tracking_url = opams.get('bug-reports') + declared_license = opams.get('license') + sha1 = opams.get('sha1') + md5 = opams.get('md5') + sha256 = opams.get('sha256') + sha512 = opams.get('sha512') + + short_desc = opams.get('synopsis') or '' + long_desc = opams.get('description') or '' + if long_desc == short_desc: + long_desc = None + descriptions = [d for d in (short_desc, long_desc) if d and d.strip()] + description = '\n'.join(descriptions) + + parties = [] + authors = opams.get('authors') or [] + for author in authors: + parties.append( + models.Party( + type=models.party_person, + name=author, + role='author' + ) ) - ) - maintainers = opams.get('maintainer') or [] - for maintainer in maintainers: - parties.append( - models.Party( - type=models.party_person, - email=maintainer, - role='maintainer' + maintainers = opams.get('maintainer') or [] + for maintainer in maintainers: + parties.append( + models.Party( + type=models.party_person, + email=maintainer, + role='maintainer' + ) ) + + package = cls( + name=name, + version=version, + vcs_url=vcs_url, + homepage_url=homepage_url, + download_url=download_url, + sha1=sha1, + md5=md5, + sha256=sha256, + sha512=sha512, + bug_tracking_url=bug_tracking_url, + declared_license=declared_license, + description=description, + parties=parties, + dependencies=package_dependencies ) - package = OpamPackage( - name=name, - version=version, - vcs_url=vcs_url, - homepage_url=homepage_url, - download_url=download_url, - sha1=sha1, - md5=md5, - sha256=sha256, - sha512=sha512, - bug_tracking_url=bug_tracking_url, - declared_license=declared_license, - description=description, - parties=parties, - dependencies=package_dependencies - ) - - return package + yield package """ Example:- diff --git a/src/packagedcode/phpcomposer.py b/src/packagedcode/phpcomposer.py index 1b94ae70d94..7b7375dcfe3 100644 --- a/src/packagedcode/phpcomposer.py +++ b/src/packagedcode/phpcomposer.py @@ -47,12 +47,8 @@ def logger_debug(*args): @attr.s() -class PHPComposerPackage(models.Package): - metafiles = ( - 'composer.json', - 'composer.lock', - ) - extensions = ('.json', '.lock',) +class PhpComposerPackage(models.Package): + mimetypes = ('application/json',) default_type = 'composer' @@ -61,11 +57,6 @@ class PHPComposerPackage(models.Package): default_download_baseurl = None default_api_baseurl = 'https://packagist.org/p' - @classmethod - def recognize(cls, location): - for package in parse(location): - yield package - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -89,68 +80,38 @@ def compute_normalized_license(self): return compute_normalized_license(self.declared_license) -def compute_normalized_license(declared_license): - """ - Return a normalized license expression string detected from a list of - declared license items or string type. - """ - if not declared_license: - return - - detected_licenses = [] - - if isinstance(declared_license, str): - if declared_license == 'proprietary': - return declared_license - if '(' in declared_license and ')' in declared_license and ' or ' in declared_license: - declared_license = declared_license.strip().rstrip(')').lstrip('(') - declared_license = declared_license.split(' or ') - else: - return models.compute_normalized_license(declared_license) - - if isinstance(declared_license, list): - for declared in declared_license: - detected_license = models.compute_normalized_license(declared) - detected_licenses.append(detected_license) - else: - declared_license = repr(declared_license) - detected_license = models.compute_normalized_license(declared_license) - - if detected_licenses: - # build a proper license expression: the defaultfor composer is OR - return combine_expressions(detected_licenses, 'OR') - - -def is_phpcomposer_json(location): - return filetype.is_file(location) and fileutils.file_name(location).lower() == 'composer.json' +@attr.s() +class ComposerJson(PhpComposerPackage, models.PackageManifest): + file_patterns = ( + 'composer.json', + ) + extensions = ('.json',) -def is_phpcomposer_lock(location): - return filetype.is_file(location) and fileutils.file_name(location).lower() == 'composer.lock' + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and fileutils.file_name(location).lower() == 'composer.json' + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. -def parse(location): - """ - Yield Package objects from a composer.json or composer.lock file. Note that - this is NOT exactly the packagist .json format (all are closely related of - course but have important (even if minor) differences. - """ - if is_phpcomposer_json(location): + Note that this is NOT exactly the packagist .json format (all are closely related of + course but have important (even if minor) differences. + """ with io.open(location, encoding='utf-8') as loc: package_data = json.load(loc) - yield build_package_from_json(package_data) - elif is_phpcomposer_lock(location): - with io.open(location, encoding='utf-8') as loc: - package_data = json.load(loc) - for package in build_packages_from_lock(package_data): - yield package + yield build_package_manifest(cls, package_data) -def build_package_from_json(package_data): - """ - Return a composer Package object from a package data mapping or None. - """ +def build_package_manifest(cls, package_data): + # A composer.json without name and description is not a usable PHP # composer package. Name and description fields are required but # only for published packages: @@ -168,7 +129,7 @@ def build_package_from_json(package_data): else: ns, _, name = ns_name.rpartition('/') - package = PHPComposerPackage( + package = cls( namespace=ns, name=name, ) @@ -217,6 +178,88 @@ def build_package_from_json(package_data): vendor_mapper(package) return package +@attr.s() +class ComposerLock(PhpComposerPackage, models.PackageManifest): + + file_patterns = ( + 'composer.lock', + ) + extensions = ('.lock',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and fileutils.file_name(location).lower() == 'composer.lock' + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + + Note that this is NOT exactly the packagist .json format (all are closely related of + course but have important (even if minor) differences. + """ + with io.open(location, encoding='utf-8') as loc: + package_data = json.load(loc) + + packages = [ + build_package_manifest(cls, p) + for p in package_data.get('packages', []) + ] + packages_dev = [ + build_package_manifest(cls, p) + for p in package_data.get('packages-dev', []) + ] + + required_deps = [ + build_dep_package(p, scope='require', is_runtime=True, is_optional=False) + for p in packages + ] + required_dev_deps = [ + build_dep_package(p, scope='require-dev', is_runtime=False, is_optional=True) + for p in packages_dev + ] + + yield cls(dependencies=required_deps + required_dev_deps) + + for package in packages + packages_dev: + yield package + + +def compute_normalized_license(declared_license): + """ + Return a normalized license expression string detected from a list of + declared license items or string type. + """ + if not declared_license: + return + + detected_licenses = [] + + if isinstance(declared_license, str): + if declared_license == 'proprietary': + return declared_license + if '(' in declared_license and ')' in declared_license and ' or ' in declared_license: + declared_license = declared_license.strip().rstrip(')').lstrip('(') + declared_license = declared_license.split(' or ') + else: + return models.compute_normalized_license(declared_license) + + if isinstance(declared_license, list): + for declared in declared_license: + detected_license = models.compute_normalized_license(declared) + detected_licenses.append(detected_license) + else: + declared_license = repr(declared_license) + detected_license = models.compute_normalized_license(declared_license) + + if detected_licenses: + # build a proper license expression: the defaultfor composer is OR + return combine_expressions(detected_licenses, 'OR') + def licensing_mapper(licenses, package, is_private=False): """ @@ -372,16 +415,3 @@ def build_dep_package(package, scope, is_runtime, is_optional): is_resolved=True, ) - -def build_packages_from_lock(package_data): - """ - Yield composer Package objects from a package data mapping that originated - from a composer.lock file - """ - packages = [build_package_from_json(p) for p in package_data.get('packages', [])] - packages_dev = [build_package_from_json(p) for p in package_data.get('packages-dev', [])] - required_deps = [build_dep_package(p, scope='require', is_runtime=True, is_optional=False) for p in packages] - required_dev_deps = [build_dep_package(p, scope='require-dev', is_runtime=False, is_optional=True) for p in packages_dev] - yield PHPComposerPackage(dependencies=required_deps + required_dev_deps) - for package in packages + packages_dev: - yield package diff --git a/src/packagedcode/plugin_package.py b/src/packagedcode/plugin_package.py index 07aea4d596f..e56bae2cd87 100644 --- a/src/packagedcode/plugin_package.py +++ b/src/packagedcode/plugin_package.py @@ -18,20 +18,20 @@ from commoncode.cliutils import SCAN_GROUP from packagedcode import get_package_instance -from packagedcode import PACKAGE_TYPES +from packagedcode import PACKAGE_MANIFEST_TYPES def print_packages(ctx, param, value): if not value or ctx.resilient_parsing: return - for package_cls in sorted(PACKAGE_TYPES, key=lambda pc: (pc.default_type)): + for package_cls in sorted(PACKAGE_MANIFEST_TYPES, key=lambda pc: (pc.default_type)): click.echo('--------------------------------------------') click.echo('Package: {self.default_type}'.format(self=package_cls)) click.echo( ' class: {self.__module__}:{self.__name__}'.format(self=package_cls)) - if package_cls.metafiles: - click.echo(' metafiles: ', nl=False) - click.echo(', '.join(package_cls.metafiles)) + if package_cls.file_patterns: + click.echo(' file_patterns: ', nl=False) + click.echo(', '.join(package_cls.file_patterns)) if package_cls.extensions: click.echo(' extensions: ', nl=False) click.echo(', '.join(package_cls.extensions)) diff --git a/src/packagedcode/pubspec.py b/src/packagedcode/pubspec.py index b7057847257..a2d2ba6abea 100644 --- a/src/packagedcode/pubspec.py +++ b/src/packagedcode/pubspec.py @@ -59,21 +59,12 @@ def logger_debug(*args): @attr.s() class PubspecPackage(models.Package): - metafiles = ('pubspec.yaml', 'pubspec.lock',) - extensions = ('.yaml', '.lock',) default_type = 'pubspec' default_primary_language = 'dart' default_web_baseurl = 'https://pub.dev/packages' default_download_baseurl = 'https://pub.dartlang.org/packages' default_api_baseurl = 'https://pub.dev/api/packages' - @classmethod - def recognize(cls, location): - if is_pubspec_yaml(location): - yield parse_pub(location) - elif is_pubspec_lock(location): - yield parse_lock(location) - def repository_homepage_url(self, baseurl=default_web_baseurl): return f'{baseurl}/{self.name}/versions/{self.version}' @@ -115,20 +106,32 @@ def compute_normalized_license(declared_license, location=None): return combine_expressions(detected_licenses) -def parse_pub(location, compute_normalized_license=False): - """ - Return a PubspecPackage constructed from the pubspec.yaml file at ``location`` - or None. - """ - if not is_pubspec_yaml(location): - return - with open(location) as inp: - package_data = saneyaml.load(inp.read()) +@attr.s() +class PubspecYaml(PubspecPackage, models.PackageManifest): - package = build_package(package_data) - if package and compute_normalized_license: - package.compute_normalized_license() - return package + file_patterns = ('pubspec.yaml',) + extensions = ('.yaml',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return file_endswith(location, 'pubspec.yaml') + + @classmethod + def recognize(cls, location, compute_normalized_license=False): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location) as inp: + package_data = saneyaml.load(inp.read()) + + package = build_package(cls, package_data) + if package and compute_normalized_license: + package.compute_normalized_license() + yield package def file_endswith(location, endswith): @@ -138,26 +141,29 @@ def file_endswith(location, endswith): return filetype.is_file(location) and location.endswith(endswith) -def is_pubspec_yaml(location): - return file_endswith(location, 'pubspec.yaml') - - -def is_pubspec_lock(location): - return file_endswith(location, 'pubspec.lock') +@attr.s() +class PubspecLock(PubspecPackage, models.PackageManifest): + file_patterns = ('pubspec.lock',) + extensions = ('.lock',) -def parse_lock(location): - """ - Yield PubspecPackages dependencies constructed from the pubspec.lock file at - ``location``. - """ - if not is_pubspec_lock(location): - return + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return file_endswith(location, 'pubspec.lock') - with open(location) as inp: - locks_data = saneyaml.load(inp.read()) + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location) as inp: + locks_data = saneyaml.load(inp.read()) - return PubspecPackage(dependencies=list(collect_locks(locks_data))) + yield cls(dependencies=list(collect_locks(locks_data))) def collect_locks(locks_data): @@ -299,7 +305,7 @@ def build_dep(name, version, scope, is_runtime=True, is_optional=False): return dep -def build_package(pubspec_data): +def build_package(cls, pubspec_data): """ Return a package object from a package data mapping or None """ @@ -364,7 +370,7 @@ def add_to_extra_if_present(_key): add_to_extra_if_present('executables') add_to_extra_if_present('publish_to') - package = PubspecPackage( + package = cls( name=name, version=version, vcs_url=vcs_url, diff --git a/src/packagedcode/pypi.py b/src/packagedcode/pypi.py index 95d93a80ab9..ca751cb7645 100644 --- a/src/packagedcode/pypi.py +++ b/src/packagedcode/pypi.py @@ -69,33 +69,12 @@ def logger_debug(*args): @attr.s() class PythonPackage(models.Package): - metafiles = ( - '*setup.py', - '*setup.cfg', - 'PKG-INFO', - 'METADATA', - # TODO: we are ignoing sdists such as tar.gz and pex, pyz, etc. - '*.whl', - '*.egg', - '*requirements*.txt', - '*requirements*.pip', - '*requirements*.in', - '*Pipfile.lock', - 'conda.yml', - '*setup.cfg', - 'tox.ini', - ) - extensions = ('.egg', '.whl', '.pyz', '.pex',) default_type = 'pypi' default_primary_language = 'Python' default_web_baseurl = 'https://pypi.org' default_download_baseurl = 'https://pypi.org/packages/source' default_api_baseurl = 'https://pypi.org/pypi' - @classmethod - def recognize(cls, location): - yield parse(location) - def compute_normalized_license(self): return compute_normalized_license(self.declared_license) @@ -117,50 +96,42 @@ def api_data_url(self, baseurl=default_api_baseurl): return f'{baseurl}/{self.name}/json' -def parse(location): - """ - Return a Package built from parsing a file or directory at 'location'. - """ - parsers = ( - parse_metadata, - parse_setup_py, - parse_pipfile_lock, - parse_dependency_file, - parse_archive, - parse_sdist, - ) +meta_dir_suffixes = '.dist-info', '.egg-info', 'EGG-INFO', +meta_file_names = 'PKG-INFO', 'METADATA', - # FIXME: this does not make sense - # try all available parser in a well defined order - for parser in parsers: - package = parser(location) - if package: - return package +@attr.s() +class MetadataFile(PythonPackage, models.PackageManifest): -meta_dir_suffixes = '.dist-info', '.egg-info', 'EGG-INFO', -meta_file_names = 'PKG-INFO', 'METADATA', + file_patterns = meta_file_names + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith(meta_file_names) + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + yield parse_metadata(cls, location) + -def parse_metadata(location): +def parse_metadata(cls, location): """ Return a PythonPackage from an PKG-INFO or METADATA file ``location`` string or pathlib.Path-like object. Looks in neighboring files as needed when an installed layout is found. """ - # FIXME: handle other_urls - - if not location: - return - path = location if not isinstance(location, (Path, ZipPath)): path = Path(location) - if not path.name.endswith(meta_file_names): - return - # build from dir if we are an installed distro parent = path.parent if parent.name.endswith(meta_dir_suffixes): @@ -168,10 +139,11 @@ def parse_metadata(location): dist = importlib_metadata.PathDistribution(path) + # FIXME: handle other_urls meta = dist.metadata urls, other_urls = get_urls(meta) - return PythonPackage( + return cls( name=get_attribute(meta, 'Name'), version=get_attribute(meta, 'Version'), description=get_description(meta, location), @@ -186,115 +158,220 @@ def parse_metadata(location): bdist_file_suffixes = '.whl', '.egg', -def parse_archive(location): - """ - Return a PythonPackage from a package archive wheel or egg file at - ``location``. - """ - if not location or not location.endswith(bdist_file_suffixes): - return +@attr.s() +class BinaryDistArchive(PythonPackage, models.PackageManifest): - with zipfile.ZipFile(location) as zf: - for path in ZipPath(zf).iterdir(): - if not path.name.endswith(meta_dir_suffixes): - continue - for metapath in path.iterdir(): - if metapath.name.endswith(meta_file_names): - return parse_metadata(metapath) + file_patterns = ('*.whl', '*.egg',) + extensions = bdist_file_suffixes + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith(bdist_file_suffixes) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with zipfile.ZipFile(location) as zf: + for path in ZipPath(zf).iterdir(): + if not path.name.endswith(meta_dir_suffixes): + continue + for metapath in path.iterdir(): + if metapath.name.endswith(meta_file_names): + yield parse_metadata(cls, metapath) sdist_file_suffixes = '.tar.gz', '.tar.bz2', '.zip', -def parse_sdist(location): - """ - Return a PythonPackage from an sdist source distribution file at - ``location`` such as a .zip, .tar.gz or .tar.bz2 (leagcy) file. - """ - # FIXME: add dependencies - # FIXME: handle other_urls +@attr.s() +class SourceDistArchive(PythonPackage, models.PackageManifest): + # TODO: we are ignoing sdists such as pex, pyz, etc. + file_patterns = ('*.tar.gz', '*.tar.bz2', '*.zip',) + extensions = sdist_file_suffixes - if not location or not location.endswith(sdist_file_suffixes): - return - sdist = SDist(location) - urls, other_urls = get_urls(sdist) - return PythonPackage( - name=sdist.name, - version=sdist.version, - description=get_description(sdist, location=location), - declared_license=get_declared_license(sdist), - keywords=get_keywords(sdist), - parties=get_parties(sdist), - **urls, - ) + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith(sdist_file_suffixes) + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ -def parse_setup_py(location): - """ - Return a PythonPackage built from setup.py data. - """ - # FIXME: handle other_urls + # FIXME: add dependencies + # FIXME: handle other_urls + + try: + sdist = SDist(location) + except ValueError: + return + urls, other_urls = get_urls(sdist) + yield cls( + name=sdist.name, + version=sdist.version, + description=get_description(sdist, location=location), + declared_license=get_declared_license(sdist), + keywords=get_keywords(sdist), + parties=get_parties(sdist), + **urls, + ) - if not location or not location.endswith('setup.py'): - return - setup_args = get_setup_py_args(location) - - # it may be legit to have a name-less package? - # in anycase we do not want to fail because of that - package_name = setup_args.get('name') - urls, other_urls = get_urls(setup_args) - - detected_version = setup_args.get('version') - if not detected_version: - # search for possible dunder versions here and elsewhere - detected_version = detect_version_attribute(location) - - return PythonPackage( - name=package_name, - version=detected_version, - description=get_description(setup_args), - parties=get_parties(setup_args), - declared_license=get_declared_license(setup_args), - dependencies=get_setup_py_dependencies(setup_args), - keywords=get_keywords(setup_args), - **urls, +@attr.s() +class SetupPy(PythonPackage, models.PackageManifest): + + file_patterns = ('setup.py',) + extensions = ('.py',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('setup.py') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + setup_args = get_setup_py_args(location) + + # it may be legit to have a name-less package? + # in anycase we do not want to fail because of that + package_name = setup_args.get('name') + urls, other_urls = get_urls(setup_args) + + detected_version = setup_args.get('version') + if not detected_version: + # search for possible dunder versions here and elsewhere + detected_version = detect_version_attribute(location) + + yield cls( + name=package_name, + version=detected_version, + description=get_description(setup_args), + parties=get_parties(setup_args), + declared_license=get_declared_license(setup_args), + dependencies=get_setup_py_dependencies(setup_args), + keywords=get_keywords(setup_args), + **urls, + ) + + +@attr.s() +class DependencyFile(PythonPackage, models.PackageManifest): + + file_patterns = ( + 'Pipfile', + 'conda.yml', + 'setup.cfg', + 'tox.ini', ) + @classmethod + def is_manifest(cls, location): + for file_pattern in cls.file_patterns: + if filetype.is_file(location) and location.endswith(file_pattern): + return True -def parse_dependency_file(location): - """ - Return a PythonPackage built from a dparse-supported dependency file at - location. - """ - if not location: - return + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + file_name = fileutils.file_name(location) - dt = get_dparse_dependency_type(fileutils.file_name(location)) - if dt: - dependent_packages = parse_with_dparse(location) - return PythonPackage(dependencies=dependent_packages) + dependency_type = get_dparse_dependency_type(file_name) + if not dependency_type: + return + dependent_packages = parse_with_dparse( + location=location, + dependency_type=dependency_type, + ) + yield cls(dependencies=dependent_packages) -def parse_pipfile_lock(location): - """ - Return a PythonPackage built from a Python Pipfile.lock file at location. - """ - if not location or not location.endswith('Pipfile.lock'): - return - with open(location) as f: - content = f.read() - data = json.loads(content) +@attr.s() +class PipfileLock(PythonPackage, models.PackageManifest): + + file_patterns = ('Pipfile.lock',) + extensions = ('.lock',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('Pipfile.lock') - sha256 = None - if '_meta' in data: - for name, meta in data['_meta'].items(): - if name == 'hash': - sha256 = meta.get('sha256') + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location) as f: + content = f.read() + + data = json.loads(content) + + sha256 = None + if '_meta' in data: + for name, meta in data['_meta'].items(): + if name == 'hash': + sha256 = meta.get('sha256') + + dependent_packages = parse_with_dparse( + location=location, + dependency_type=dparse.filetypes.pipfile_lock, + ) + yield cls(sha256=sha256, dependencies=dependent_packages) + + +@attr.s() +class RequirementsFile(PythonPackage, models.PackageManifest): + + file_patterns = ( + '*requirements*.txt', + '*requirements*.pip', + '*requirements*.in', + 'requires.txt', + ) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the ``location`` is likely a pip requirements file. + """ + return filetype.is_file(location) and is_requirements_file(location) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + dependent_packages = parse_with_dparse( + location=location, + dependency_type=dparse.filetypes.requirements_txt + ) + yield cls(dependencies=dependent_packages) - dependent_packages = parse_with_dparse(location) - return PythonPackage(sha256=sha256, dependencies=dependent_packages) def get_attribute(metainfo, name, multiple=False): @@ -661,30 +738,21 @@ def get_dparse_dependency_type(file_name): 'setup.cfg': dparse.filetypes.setup_cfg, 'tox.ini': dparse.filetypes.tox_ini, } - for extensions, dependency_type in filetype_by_name_end.items(): - if is_requirements_file(file_name): - return dparse.filetypes.requirements_txt + for extensions, dependency_type in filetype_by_name_end.items(): if file_name.endswith(extensions): return dependency_type + if is_requirements_file(file_name): + return dparse.filetypes.requirements_txt -def parse_with_dparse(location): + +def parse_with_dparse(location, dependency_type=None): """ Return a list of DependentPackage built from a dparse-supported dependency manifest such as requirements.txt, Conda manifest or Pipfile.lock files, or return an empty list. """ - is_dir = filetype.is_dir(location) - if is_dir: - return - - file_name = fileutils.file_name(location) - - dependency_type = get_dparse_dependency_type(file_name) - if not dependency_type: - return - with open(location) as f: content = f.read() diff --git a/src/packagedcode/readme.py b/src/packagedcode/readme.py index 8158b5f54f7..8d48ee2a0b2 100644 --- a/src/packagedcode/readme.py +++ b/src/packagedcode/readme.py @@ -40,19 +40,8 @@ @attr.s() class ReadmePackage(models.Package): - metafiles = ( - 'README.android', - 'README.chromium', - 'README.facebook', - 'README.google', - 'README.thirdparty', - ) default_type = 'readme' - @classmethod - def recognize(cls, location): - yield parse(location) - @classmethod def get_package_root(cls, manifest_resource, codebase): return manifest_resource.parent(codebase) @@ -60,46 +49,59 @@ def get_package_root(cls, manifest_resource, codebase): def compute_normalized_license(self): return models.compute_normalized_license(self.declared_license) +@attr.s() +class ReadmeManifest(ReadmePackage, models.PackageManifest): -def is_readme_manifest(location): - return (filetype.is_file(location) + file_patterns = ( + 'README.android', + 'README.chromium', + 'README.facebook', + 'README.google', + 'README.thirdparty', + ) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return (filetype.is_file(location) and fileutils.file_name(location).lower() in [ 'readme.android', 'readme.chromium', 'readme.facebook', 'readme.google', 'readme.thirdparty' - ]) - + ] + ) -def parse(location): - """ - Return a Package object from a README manifest file or None. - """ - if not is_readme_manifest(location): - return - - with open(location, encoding='utf-8') as loc: - readme_manifest = loc.read() + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location, encoding='utf-8') as loc: + readme_manifest = loc.read() - package = build_package(readme_manifest) + package = build_package(cls, readme_manifest) - if not package.name: - # If no name was detected for the Package, then we use the basename of - # the parent directory as the Package name - parent_dir = fileutils.parent_directory(location) - parent_dir_basename = fileutils.file_base_name(parent_dir) - package.name = parent_dir_basename + if not package.name: + # If no name was detected for the Package, then we use the basename of + # the parent directory as the Package name + parent_dir = fileutils.parent_directory(location) + parent_dir_basename = fileutils.file_base_name(parent_dir) + package.name = parent_dir_basename - return package + yield package -def build_package(readme_manifest): +def build_package(cls, readme_manifest): """ Return a Package object from a readme_manifest mapping (from a README.chromium file or similar) or None. """ - package = ReadmePackage() + package = cls() for line in readme_manifest.splitlines(): key, sep, value = line.partition(':') diff --git a/src/packagedcode/recognize.py b/src/packagedcode/recognize.py index 54df4cc79da..14cead63808 100644 --- a/src/packagedcode/recognize.py +++ b/src/packagedcode/recognize.py @@ -14,7 +14,7 @@ from commoncode import filetype from commoncode.fileutils import file_name from commoncode.fileutils import splitext_name -from packagedcode import PACKAGE_TYPES +from packagedcode import PACKAGE_MANIFEST_TYPES from typecode import contenttype SCANCODE_DEBUG_PACKAGE_API = os.environ.get('SCANCODE_DEBUG_PACKAGE_API', False) @@ -52,91 +52,50 @@ def recognize_package_manifests(location): if not filetype.is_file(location): return - T = contenttype.get_type(location) - ftype = T.filetype_file.lower() - mtype = T.mimetype_file - - _base_name, extension = splitext_name(location, is_file=True) - filename = file_name(location) - extension = extension.lower() - - if TRACE: - logger_debug( - 'recognize_packages: ftype:', ftype, 'mtype:', mtype, - 'pygtype:', T.filetype_pygment, - 'fname:', filename, 'ext:', extension, - ) - recognized_package_manifests = [] - for package_type in PACKAGE_TYPES: - # Note: default to True if there is nothing to match against - metafiles = package_type.metafiles - if any(fnmatch.fnmatchcase(filename, metaf) for metaf in metafiles): - for recognized in package_type.recognize(location): + for package_manifest_type in PACKAGE_MANIFEST_TYPES: + if not package_manifest_type.is_manifest(location): + continue + + try: + for recognized in package_manifest_type.recognize(location): if TRACE: logger_debug( - 'recognize_packages: metafile matching: recognized:', + 'recognize_package_manifests: metafile matching: recognized:', recognized, ) if recognized and not recognized.license_expression: # compute and set a normalized license expression - recognized.license_expression = recognized.compute_normalized_license() + try: + recognized.license_expression = recognized.compute_normalized_license() + except Exception: + if SCANCODE_DEBUG_PACKAGE_API: + raise + recognized.license_expression = 'unknown' + if TRACE: logger_debug( - 'recognize_packages: recognized.license_expression:', - recognized.license_expression, + 'recognize_package_manifests: recognized.license_expression:', + recognized.license_expression ) recognized_package_manifests.append(recognized) return recognized_package_manifests - type_matched = False - if package_type.filetypes: - type_matched = any(t in ftype for t in package_type.filetypes) - - mime_matched = False - if package_type.mimetypes: - mime_matched = any(m in mtype for m in package_type.mimetypes) - - extension_matched = False - extensions = package_type.extensions - if extensions: - extensions = (e.lower() for e in extensions) - extension_matched = any( - fnmatch.fnmatchcase(extension, ext_pat) - for ext_pat in extensions - ) - - if type_matched and mime_matched and extension_matched: + except NotImplementedError: + # build a plain package if recognize is not yet implemented + recognized = package_manifest_type() if TRACE: - logger_debug(f'recognize_packages: all matching for {package_type}') + logger_debug( + 'recognize_package_manifests: NotImplementedError: recognized', recognized + ) - try: - for recognized in package_type.recognize(location): - # compute and set a normalized license expression - if recognized and not recognized.license_expression: - try: - recognized.license_expression = recognized.compute_normalized_license() - except Exception: - if SCANCODE_DEBUG_PACKAGE_API: - raise - recognized.license_expression = 'unknown' + recognized_package_manifests.append(recognized) - if TRACE: - logger_debug('recognize_packages: recognized', recognized) - - recognized_package_manifests.append(recognized) + if SCANCODE_DEBUG_PACKAGE_API: + raise - except NotImplementedError: - # build a plain package if recognize is not yet implemented - recognized = package_type() - if TRACE: - logger_debug('recognize_packages: recognized', recognized) - - recognized_package_manifests.append(recognized) + return recognized_package_manifests - if SCANCODE_DEBUG_PACKAGE_API: - raise - - return recognized_package_manifests - - if TRACE: logger_debug('recognize_packages: no match for type:', package_type) + if TRACE: logger_debug( + 'recognize_package_manifests: no match for type:', package_manifest_type + ) diff --git a/src/packagedcode/rpm.py b/src/packagedcode/rpm.py index f1a0bcb16d1..6b843d833bf 100644 --- a/src/packagedcode/rpm.py +++ b/src/packagedcode/rpm.py @@ -15,6 +15,7 @@ import attr from license_expression import Licensing +from commoncode import filetype from packagedcode import models from packagedcode import nevra from packagedcode.pyrpm import RPM @@ -73,11 +74,6 @@ def get_rpm_tags(location, include_desc=False): Return an RPMtags object for the file at location or None. Include the long RPM description value if `include_desc` is True. """ - T = typecode.contenttype.get_type(location) - - if 'rpm' not in T.filetype_file.lower(): - return - with open(location, 'rb') as rpmf: rpm = RPM(rpmf) tags = {k: v for k, v in rpm.to_dict().items() if k in RPM_TAGS} @@ -116,9 +112,8 @@ def to_string(self): @attr.s() -class RpmPackage(models.Package): - metafiles = ('*.spec',) - extensions = ('.rpm', '.srpm', '.mvl', '.vip',) +class RpmPackage(models.Package, models.PackageManifest): + filetypes = ('rpm ',) mimetypes = ('application/x-rpm',) @@ -128,10 +123,6 @@ class RpmPackage(models.Package): default_download_baseurl = None default_api_baseurl = None - @classmethod - def recognize(cls, location): - yield parse(location) - def compute_normalized_license(self): _declared, detected = detect_declared_license(self.declared_license) return detected @@ -164,82 +155,102 @@ def get_installed_packages(root_dir, detect_licenses=False, **kwargs): return rpm_installed.parse_rpm_xmlish(xmlish_loc, detect_licenses=detect_licenses) -def parse(location): - """ - Return an RpmPackage object for the file at location or None if - the file is not an RPM. - """ - rpm_tags = get_rpm_tags(location, include_desc=True) - return build_from_tags(rpm_tags) +@attr.s() +class RpmManifest(RpmPackage, models.PackageManifest): + file_patterns = ('*.spec',) + extensions = ('.rpm', '.srpm', '.mvl', '.vip',) -def build_from_tags(rpm_tags): - """ - Return an RpmPackage object from an ``rpm_tags`` RPMtags object. - """ - if TRACE: logger_debug('build_from_tags: rpm_tags', rpm_tags) - if not rpm_tags: - return - - name = rpm_tags.name - - try: - epoch = rpm_tags.epoch and int(rpm_tags.epoch) or None - except ValueError: - epoch = None - - evr = EVR( - version=rpm_tags.version or None, - release=rpm_tags.release or None, - epoch=epoch).to_string() - - qualifiers = {} - os = rpm_tags.os - if os and os.lower() != 'linux': - qualifiers['os'] = os - - arch = rpm_tags.arch - if arch: - qualifiers['arch'] = arch - - source_packages = [] - if rpm_tags.source_rpm: - sepoch, sname, sversion, srel, sarch = nevra.from_name(rpm_tags.source_rpm) - src_evr = EVR(sversion, srel, sepoch).to_string() - src_qualifiers = {} - if sarch: - src_qualifiers['arch'] = sarch - - src_purl = models.PackageURL( - type=RpmPackage.default_type, - name=sname, - version=src_evr, - qualifiers=src_qualifiers - ).to_string() - - if TRACE: logger_debug('build_from_tags: source_rpm', src_purl) - source_packages = [src_purl] - - parties = [] - - # TODO: also use me to craft a namespace!!! - # TODO: assign a namepsace to Package URL based on distro names. - # CentOS - # Fedora Project - # OpenMandriva Lx - # openSUSE Tumbleweed - # Red Hat - - if rpm_tags.distribution: - parties.append(models.Party(name=rpm_tags.distribution, role='distributor')) - - if rpm_tags.vendor: - parties.append(models.Party(name=rpm_tags.vendor, role='vendor')) - - description = build_description(rpm_tags.summary, rpm_tags.description) - - if TRACE: - data = dict( + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + T = typecode.contenttype.get_type(location) + return (filetype.is_file(location) and 'rpm' in T.filetype_file.lower()) + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + rpm_tags = get_rpm_tags(location, include_desc=True) + + if TRACE: logger_debug('build_from_tags: rpm_tags', rpm_tags) + if not rpm_tags: + return + + name = rpm_tags.name + + try: + epoch = rpm_tags.epoch and int(rpm_tags.epoch) or None + except ValueError: + epoch = None + + evr = EVR( + version=rpm_tags.version or None, + release=rpm_tags.release or None, + epoch=epoch).to_string() + + qualifiers = {} + os = rpm_tags.os + if os and os.lower() != 'linux': + qualifiers['os'] = os + + arch = rpm_tags.arch + if arch: + qualifiers['arch'] = arch + + source_packages = [] + if rpm_tags.source_rpm: + sepoch, sname, sversion, srel, sarch = nevra.from_name(rpm_tags.source_rpm) + src_evr = EVR(sversion, srel, sepoch).to_string() + src_qualifiers = {} + if sarch: + src_qualifiers['arch'] = sarch + + src_purl = models.PackageURL( + type=RpmPackage.default_type, + name=sname, + version=src_evr, + qualifiers=src_qualifiers + ).to_string() + + if TRACE: logger_debug('build_from_tags: source_rpm', src_purl) + source_packages = [src_purl] + + parties = [] + + # TODO: also use me to craft a namespace!!! + # TODO: assign a namepsace to Package URL based on distro names. + # CentOS + # Fedora Project + # OpenMandriva Lx + # openSUSE Tumbleweed + # Red Hat + + if rpm_tags.distribution: + parties.append(models.Party(name=rpm_tags.distribution, role='distributor')) + + if rpm_tags.vendor: + parties.append(models.Party(name=rpm_tags.vendor, role='vendor')) + + description = build_description(rpm_tags.summary, rpm_tags.description) + + if TRACE: + data = dict( + name=name, + version=evr, + description=description or None, + homepage_url=rpm_tags.url or None, + parties=parties, + declared_license=rpm_tags.license or None, + source_packages=source_packages, + ) + logger_debug('build_from_tags: data to create a package:\n', data) + + package = cls( name=name, version=evr, description=description or None, @@ -248,22 +259,11 @@ def build_from_tags(rpm_tags): declared_license=rpm_tags.license or None, source_packages=source_packages, ) - logger_debug('build_from_tags: data to create a package:\n', data) - - package = RpmPackage( - name=name, - version=evr, - description=description or None, - homepage_url=rpm_tags.url or None, - parties=parties, - declared_license=rpm_tags.license or None, - source_packages=source_packages, - ) - - if TRACE: - logger_debug('build_from_tags: created package:\n', package) - - return package + + if TRACE: + logger_debug('build_from_tags: created package:\n', package) + + yield package ############################################################################ # FIXME: this license detection code is mostly copied from debian_copyright.py and alpine.py diff --git a/src/packagedcode/rubygems.py b/src/packagedcode/rubygems.py index 6f059add699..c1f1a312245 100644 --- a/src/packagedcode/rubygems.py +++ b/src/packagedcode/rubygems.py @@ -17,6 +17,7 @@ from packageurl import PackageURL from commoncode import archive +from commoncode import filetype from commoncode import fileutils from packagedcode import models from packagedcode.gemfile_lock import GemfileLockParser @@ -51,10 +52,8 @@ def logger_debug(*args): @attr.s() class RubyGem(models.Package): - metafiles = ('metadata.gz-extract', '*.gemspec', 'Gemfile', 'Gemfile.lock',) filetypes = ('.tar', 'tar archive',) mimetypes = ('application/x-tar',) - extensions = ('.gem',) default_type = 'gem' default_primary_language = 'Ruby' default_web_baseurl = 'https://rubygems.org/gems/' @@ -83,32 +82,6 @@ def get_package_root(cls, manifest_resource, codebase): def compute_normalized_license(self): return compute_normalized_license(self.declared_license) - @classmethod - def recognize(cls, location): - - # an unextracted .gen archive - if location.endswith('.gem'): - yield get_gem_package(location) - - # an extractcode-extracted .gen archive - if location.endswith('metadata.gz-extract'): - with open(location, 'rb') as met: - metadata = met.read() - metadata = saneyaml.load(metadata) - yield build_rubygem_package(metadata) - - if location.endswith('.gemspec'): - yield build_packages_from_gemspec(location) - - if location.endswith('Gemfile'): - # TODO: implement me - pass - - if location.endswith('Gemfile.lock'): - gemfile_lock = GemfileLockParser(location) - for package in build_packages_from_gemfile_lock(gemfile_lock): - yield package - def repository_homepage_url(self, baseurl=default_web_baseurl): return rubygems_homepage_url(self.name, self.version, repo=baseurl) @@ -129,6 +102,208 @@ def extra_root_dirs(cls): return ['data.tar.gz-extract', 'metadata.gz-extract'] +@attr.s() +class GemArchive(RubyGem, models.PackageManifest): + + file_patterns = ('*.gem',) + extensions = ('.gem',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.gem') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + metadata = get_gem_metadata(location) + metadata = saneyaml.load(metadata) + yield build_rubygem_package(cls, metadata, download_url=None, package_url=None) + + +@attr.s() +class GemArchiveExtracted(RubyGem, models.PackageManifest): + + file_patterns = ('metadata.gz-extract',) + extensions = ('.gz-extract',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.gz-extract') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location, 'rb') as met: + metadata = met.read() + metadata = saneyaml.load(metadata) + yield build_rubygem_package(cls, metadata) + + +@attr.s() +class GemSpec(RubyGem, models.PackageManifest): + + file_patterns = ('*.gemspec',) + extensions = ('.gemspec',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.gemspec') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + gemspec_object = Spec() + gemspec_data = gemspec_object.parse_spec(location) + + name = gemspec_data.get('name') + version = gemspec_data.get('version') + homepage_url = gemspec_data.get('homepage_url') + summary = gemspec_data.get('summary') + description = gemspec_data.get('description') + if len(summary) > len(description): + description = summary + + declared_license = gemspec_data.get('license') + if declared_license: + declared_license = declared_license.split(',') + + author = gemspec_data.get('author') or [] + email = gemspec_data.get('email') or [] + parties = list(party_mapper(author, email)) + + package_manifest = cls( + name=name, + version=version, + parties=parties, + homepage_url=homepage_url, + description=description, + declared_license=declared_license + ) + + dependencies = gemspec_data.get('dependencies', {}) or {} + package_dependencies = [] + for name, version in dependencies.items(): + package_dependencies.append( + models.DependentPackage( + purl=PackageURL( + type='gem', + name=name + ).to_string(), + requirement=', '.join(version), + scope='dependencies', + is_runtime=True, + is_optional=False, + is_resolved=False, + ) + ) + package_manifest.dependencies = package_dependencies + + yield package_manifest + + +@attr.s() +class Gemfile(RubyGem, models.PackageManifest): + + file_patterns = ('Gemfile',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('Gemfile') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + # TODO: Implement me + pass + +@attr.s() +class GemfileLock(RubyGem, models.PackageManifest): + + file_patterns = ('Gemfile.lock',) + extensions = ('.lock',) + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('Gemfile.lock') + + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + gemfile_lock = GemfileLockParser(location) + package_dependencies = [] + for _, gem in gemfile_lock.all_gems.items(): + package_dependencies.append( + models.DependentPackage( + purl=PackageURL( + type='gem', + name=gem.name, + version=gem.version + ).to_string(), + requirement=', '.join(gem.requirements), + scope='dependencies', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + yield cls(dependencies=package_dependencies) + + for _, gem in gemfile_lock.all_gems.items(): + deps = [] + for _dep_name, dep in gem.dependencies.items(): + deps.append( + models.DependentPackage( + purl=PackageURL( + type='gem', + name=dep.name, + version=dep.version + ).to_string(), + requirement=', '.join(dep.requirements), + scope='dependencies', + is_runtime=True, + is_optional=False, + is_resolved=True, + ) + ) + + yield cls( + name=gem.name, + version=gem.version, + dependencies=deps + ) + + def compute_normalized_license(declared_license): """ Return a normalized license expression string detected from a list of @@ -207,18 +382,6 @@ def rubygems_api_url(name, version=None, repo='https://rubygems.org/api'): return api_url.format(**locals()) -def get_gem_package(location, download_url=None, purl=None): - """ - Return a RubyGem Package built from the .gem file at `location` or None. - """ - if not location.endswith('.gem'): - return - - metadata = get_gem_metadata(location) - metadata = saneyaml.load(metadata) - return build_rubygem_package(metadata, download_url, purl) - - def get_gem_metadata(location): """ Return the string content of the metadata of a .gem archive file at @@ -253,7 +416,7 @@ def get_gem_metadata(location): fileutils.delete(extract_loc) -def build_rubygem_package(gem_data, download_url=None, package_url=None): +def build_rubygem_package(cls, gem_data, download_url=None, package_url=None): """ Return a Package built from a Gem `gem_data` mapping or None. The `gem_data can come from a .gemspec or .gem/gem_data. @@ -278,7 +441,7 @@ def build_rubygem_package(gem_data, download_url=None, package_url=None): licenses = gem_data.get('licenses') declared_license = licenses_mapper(lic, licenses) - package = RubyGem( + package_manifest = cls( name=name, description=description, homepage_url=gem_data.get('homepage'), @@ -295,7 +458,7 @@ def build_rubygem_package(gem_data, download_url=None, package_url=None): for author in authors: if author and author.strip(): party = models.Party(name=author, role='author') - package.parties.append(party) + package_manifest.parties.append(party) # TODO: we have a email that is either a string or a list of string @@ -303,34 +466,34 @@ def build_rubygem_package(gem_data, download_url=None, package_url=None): date = gem_data.get('date') if date and len(date) >= 10: date = date[:10] - package.release_date = date[:10] + package_manifest.release_date = date[:10] # there are two levels of nesting version1 = gem_data.get('version') or {} version = version1.get('version') or None - package.version = version - package.set_purl(package_url) + package_manifest.version = version + package_manifest.set_purl(package_url) metadata = gem_data.get('metadata') or {} if metadata: homepage_url = metadata.get('homepage_uri') if homepage_url: - if not package.homepage_url: - package.homepage_url = homepage_url - elif package.homepage_url == homepage_url: + if not package_manifest.homepage_url: + package_manifest.homepage_url = homepage_url + elif package_manifest.homepage_url == homepage_url: pass else: # we have both and one is wrong. # we prefer the existing one from the metadata pass - package.bug_tracking_url = metadata.get('bug_tracking_uri') + package_manifest.bug_tracking_url = metadata.get('bug_tracking_uri') source_code_url = metadata.get('source_code_uri') if source_code_url: - package.code_view_url = source_code_url - # TODO: infer purl and add purl to package.source_packages + package_manifest.code_view_url = source_code_url + # TODO: infer purl and add purl to package_manifest.source_packages # not used for now # "changelog_uri" => "https://example.com/user/bestgemever/CHANGELOG.md", @@ -341,26 +504,26 @@ def build_rubygem_package(gem_data, download_url=None, package_url=None): platform = gem_data.get('platform') if platform != 'ruby': qualifiers = dict(platform=platform) - if not package.qualifiers: - package.qualifiers = {} + if not package_manifest.qualifiers: + package_manifest.qualifiers = {} - package.qualifiers.update(qualifiers) + package_manifest.qualifiers.update(qualifiers) - package.dependencies = get_dependencies(gem_data.get('dependencies')) + package_manifest.dependencies = get_dependencies(gem_data.get('dependencies')) - if not package.download_url: - package.download_url = package.repository_download_url() + if not package_manifest.download_url: + package_manifest.download_url = package_manifest.repository_download_url() - if not package.homepage_url: - package.homepage_url = package.repository_homepage_url() + if not package_manifest.homepage_url: + package_manifest.homepage_url = package_manifest.repository_homepage_url() - return package + return package_manifest def licenses_mapper(lic, lics): """ Return a `declared_licenses` list based on the `lic` license and - `lics` licenses values found in a package. + `lics` licenses values found in a package_manifest. """ declared_licenses = [] if lic: @@ -600,59 +763,6 @@ def normalize(gem_data, known_fields=known_fields): ) -def build_packages_from_gemspec(location): - """ - Return RubyGem Package from gemspec file. - """ - gemspec_object = Spec() - gemspec_data = gemspec_object.parse_spec(location) - - name = gemspec_data.get('name') - version = gemspec_data.get('version') - homepage_url = gemspec_data.get('homepage_url') - summary = gemspec_data.get('summary') - description = gemspec_data.get('description') - if len(summary) > len(description): - description = summary - - declared_license = gemspec_data.get('license') - if declared_license: - declared_license = declared_license.split(',') - - author = gemspec_data.get('author') or [] - email = gemspec_data.get('email') or [] - parties = list(party_mapper(author, email)) - - package = RubyGem( - name=name, - version=version, - parties=parties, - homepage_url=homepage_url, - description=description, - declared_license=declared_license - ) - - dependencies = gemspec_data.get('dependencies', {}) or {} - package_dependencies = [] - for name, version in dependencies.items(): - package_dependencies.append( - models.DependentPackage( - purl=PackageURL( - type='gem', - name=name - ).to_string(), - requirement=', '.join(version), - scope='dependencies', - is_runtime=True, - is_optional=False, - is_resolved=False, - ) - ) - package.dependencies = package_dependencies - - return package - - def party_mapper(author, email): """ Yields a Party object with author and email. @@ -668,51 +778,3 @@ def party_mapper(author, email): type=models.party_person, email=person, role='email') - - -def build_packages_from_gemfile_lock(gemfile_lock): - """ - Yield RubyGem Packages from a given GemfileLockParser `gemfile_lock` - """ - package_dependencies = [] - for _, gem in gemfile_lock.all_gems.items(): - package_dependencies.append( - models.DependentPackage( - purl=PackageURL( - type='gem', - name=gem.name, - version=gem.version - ).to_string(), - requirement=', '.join(gem.requirements), - scope='dependencies', - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - yield RubyGem(dependencies=package_dependencies) - - for _, gem in gemfile_lock.all_gems.items(): - deps = [] - for _dep_name, dep in gem.dependencies.items(): - deps.append( - models.DependentPackage( - purl=PackageURL( - type='gem', - name=dep.name, - version=dep.version - ).to_string(), - requirement=', '.join(dep.requirements), - scope='dependencies', - is_runtime=True, - is_optional=False, - is_resolved=True, - ) - ) - - yield RubyGem( - name=gem.name, - version=gem.version, - dependencies=deps - ) diff --git a/src/packagedcode/win_pe.py b/src/packagedcode/win_pe.py index c828248ea88..778f0392d25 100644 --- a/src/packagedcode/win_pe.py +++ b/src/packagedcode/win_pe.py @@ -223,25 +223,7 @@ def pe_info(location): @attr.s() class WindowsExecutable(models.Package): - metafiles = () - extensions = ( - '.exe', - '.dll', - '.mui', - '.mun', - '.com', - '.winmd', - '.sys', - '.tlb', - '.exe_*', - '.dll_*', - '.mui_*', - '.mun_*', - '.com_*', - '.winmd_*', - '.sys_*', - '.tlb_*', - ) + filetypes = ('pe32', 'for ms windows',) mimetypes = ('application/x-dosexec',) @@ -251,10 +233,6 @@ class WindowsExecutable(models.Package): default_download_baseurl = None default_api_baseurl = None - @classmethod - def recognize(cls, location): - yield parse(location) - def get_first(mapping, *keys): """ @@ -279,75 +257,99 @@ def concat(mapping, *keys): return '\n'.join(values) -def parse(location): - """ - Return a WindowsExecutable package from the file at `location` or None. - """ - if not filetype.is_file(location): - return - - T = contenttype.get_type(location) - if not T.is_winexe: - return - - infos = pe_info(location) - - version = get_first( - infos, - 'Full Version', - 'ProductVersion', - 'FileVersion', - 'Assembly Version', - ) - release_date = get_first(infos, 'BuildDate') - if release_date: - if len(release_date) >= 10: - release_date = release_date[:10] - release_date = release_date.replace('/', '-') - - name = get_first( - infos, - 'ProductName', - 'OriginalFilename', - 'InternalName', +@attr.s() +class WindowsExecutableManifest(WindowsExecutable, models.PackageManifest): + extensions = ( + '.exe', + '.dll', + '.mui', + '.mun', + '.com', + '.winmd', + '.sys', + '.tlb', + '.exe_*', + '.dll_*', + '.mui_*', + '.mun_*', + '.com_*', + '.winmd_*', + '.sys_*', + '.tlb_*', ) - copyr = get_first(infos, 'LegalCopyright') - - LegalCopyright = copyr, - - LegalTrademarks = concat( - infos, - 'LegalTrademarks', - 'LegalTrademarks1', - 'LegalTrademarks2', - 'LegalTrademarks3') - License = get_first(infos, 'License') + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + T = contenttype.get_type(location) + return filetype.is_file(location) and T.is_winexe - declared_license = {} - if LegalCopyright or LegalTrademarks or License: - declared_license = dict( - LegalCopyright=copyr, - LegalTrademarks=LegalTrademarks, - License=License + @classmethod + def recognize(cls, location): + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + infos = pe_info(location) + + version = get_first( + infos, + 'Full Version', + 'ProductVersion', + 'FileVersion', + 'Assembly Version', + ) + release_date = get_first(infos, 'BuildDate') + if release_date: + if len(release_date) >= 10: + release_date = release_date[:10] + release_date = release_date.replace('/', '-') + + name = get_first( + infos, + 'ProductName', + 'OriginalFilename', + 'InternalName', + ) + copyr = get_first(infos, 'LegalCopyright') + + LegalCopyright = copyr, + + LegalTrademarks = concat( + infos, + 'LegalTrademarks', + 'LegalTrademarks1', + 'LegalTrademarks2', + 'LegalTrademarks3') + + License = get_first(infos, 'License') + + declared_license = {} + if LegalCopyright or LegalTrademarks or License: + declared_license = dict( + LegalCopyright=copyr, + LegalTrademarks=LegalTrademarks, + License=License + ) + + description = concat(infos, 'FileDescription', 'Comments') + + parties = [] + cname = get_first(infos, 'CompanyName', 'Company') + + if cname: + parties = [Party(type=party_org, role='author', name=cname)] + homepage_url = get_first(infos, 'URL', 'WWW') + + yield cls( + name=name, + version=version, + release_date=release_date, + copyright=copyr, + declared_license=declared_license, + description=description, + parties=parties, + homepage_url=homepage_url, ) - - description = concat(infos, 'FileDescription', 'Comments') - - parties = [] - cname = get_first(infos, 'CompanyName', 'Company') - - if cname: - parties = [Party(type=party_org, role='author', name=cname)] - homepage_url = get_first(infos, 'URL', 'WWW') - - return WindowsExecutable( - name=name, - version=version, - release_date=release_date, - copyright=copyr, - declared_license=declared_license, - description=description, - parties=parties, - homepage_url=homepage_url, - ) diff --git a/src/packagedcode/win_reg.py b/src/packagedcode/win_reg.py index 9030d6e83d8..14913178e09 100644 --- a/src/packagedcode/win_reg.py +++ b/src/packagedcode/win_reg.py @@ -309,7 +309,7 @@ def create_relative_file_path(file_path, root_dir, root_prefix=''): @attr.s() -class InstalledWindowsProgram(models.Package): +class InstalledWindowsProgram(models.Package, models.PackageManifest): default_type = 'windows-program' @classmethod diff --git a/src/packagedcode/windows.py b/src/packagedcode/windows.py index 1aaa76b1079..b15c81d9f33 100644 --- a/src/packagedcode/windows.py +++ b/src/packagedcode/windows.py @@ -11,6 +11,7 @@ import xmltodict from packagedcode import models +from commoncode import filetype # Tracing flags @@ -34,66 +35,63 @@ def logger_debug(*args): @attr.s() -class MicrosoftUpdateManifestPackage(models.Package): +class MicrosoftUpdatePackage(models.Package, models.PackageManifest): extensions = ('.mum',) filetypes = ('xml 1.0 document',) mimetypes = ('text/xml',) default_type = 'windows-update' + +@attr.s() +class MicrosoftUpdateManifest(MicrosoftUpdatePackage, models.PackageManifest): + + @classmethod + def is_manifest(cls, location): + """ + Return True if the file at ``location`` is likely a manifest of this type. + """ + return filetype.is_file(location) and location.endswith('.mum') + @classmethod def recognize(cls, location): - yield parse(location) - - -def parse_mum(location): - """ - Return a dictionary of Microsoft Update Manifest (mum) metadata from a .mum - file at `location`. Return None if this is not a parsable mum file. Raise - Exceptions on errors. - """ - if not location.endswith('.mum'): - return - with open(location , 'rb') as loc: - return xmltodict.parse(loc) - - -def parse(location): - """ - Return a MicrosoftUpdateManifestPackage from a .mum XML file at `location`. - Return None if this is not a parsable .mum file. - """ - parsed = parse_mum(location) - if TRACE: - logger_debug('parsed:', parsed) - if not parsed: - return - - assembly = parsed.get('assembly', {}) - description = assembly.get('@description', '') - company = assembly.get('@company', '') - copyright = assembly.get('@copyright', '') - support_url = assembly.get('@supportInformation', '') - - assembly_identity = assembly.get('assemblyIdentity', {}) - name = assembly_identity.get('@name', '') - version = assembly_identity.get('@version', '') - - parties = [] - if company: - parties.append( - models.Party( - name=company, - type=models.party_org, - role='owner', + """ + Yield one or more Package manifest objects given a file ``location`` pointing to a + package archive, manifest or similar. + """ + with open(location , 'rb') as loc: + parsed = xmltodict.parse(loc) + + if TRACE: + logger_debug('parsed:', parsed) + if not parsed: + return + + assembly = parsed.get('assembly', {}) + description = assembly.get('@description', '') + company = assembly.get('@company', '') + copyright = assembly.get('@copyright', '') + support_url = assembly.get('@supportInformation', '') + + assembly_identity = assembly.get('assemblyIdentity', {}) + name = assembly_identity.get('@name', '') + version = assembly_identity.get('@version', '') + + parties = [] + if company: + parties.append( + models.Party( + name=company, + type=models.party_org, + role='owner', + ) ) - ) - return MicrosoftUpdateManifestPackage( - name=name, - version=version, - description=description, - homepage_url=support_url, - parties=parties, - copyright=copyright, - ) + yield cls( + name=name, + version=version, + description=description, + homepage_url=support_url, + parties=parties, + copyright=copyright, + ) diff --git a/tests/packagedcode/data/about/apipkg.ABOUT-expected b/tests/packagedcode/data/about/apipkg.ABOUT-expected index 5d298682201..1def37b58fb 100644 --- a/tests/packagedcode/data/about/apipkg.ABOUT-expected +++ b/tests/packagedcode/data/about/apipkg.ABOUT-expected @@ -1,46 +1,48 @@ -{ - "type": "about", - "namespace": null, - "name": "apipkg", - "version": "1.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [ - { - "type": "person", - "role": "owner", - "name": "Holger Krekel", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "https://bitbucket.org/hpk42/apipkg", - "download_url": "https://pypi.python.org/packages/94/72/fd4f2e46ce7b0d388191c819ef691c8195fab09602bbf1a2f92aa5351444/apipkg-1.4-py2.py3-none-any.whl#md5=5644eb6aff3f19e13430251a820e987f", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Copyright (c) 2009 holger krekel", - "license_expression": "mit", - "declared_license": "mit", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": { - "about_resource": "apipkg-1.4-py2.py3-none-any.whl" - }, - "purl": "pkg:about/apipkg@1.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "about", + "namespace": null, + "name": "apipkg", + "version": "1.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [ + { + "type": "person", + "role": "owner", + "name": "Holger Krekel", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "https://bitbucket.org/hpk42/apipkg", + "download_url": "https://pypi.python.org/packages/94/72/fd4f2e46ce7b0d388191c819ef691c8195fab09602bbf1a2f92aa5351444/apipkg-1.4-py2.py3-none-any.whl#md5=5644eb6aff3f19e13430251a820e987f", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Copyright (c) 2009 holger krekel", + "license_expression": "mit", + "declared_license": "mit", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": { + "about_resource": "apipkg-1.4-py2.py3-none-any.whl" + }, + "purl": "pkg:about/apipkg@1.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/about/appdirs.ABOUT-expected b/tests/packagedcode/data/about/appdirs.ABOUT-expected index 6e647bf4808..705ec038085 100644 --- a/tests/packagedcode/data/about/appdirs.ABOUT-expected +++ b/tests/packagedcode/data/about/appdirs.ABOUT-expected @@ -1,46 +1,48 @@ -{ - "type": "about", - "namespace": null, - "name": "appdirs", - "version": "1.4.3", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [ - { - "type": "person", - "role": "owner", - "name": "ActiveState", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "https://pypi.python.org/pypi/appdirs", - "download_url": "https://pypi.python.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl#md5=9ed4b51c9611775c3078b3831072e153", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Copyright (c) 2010 ActiveState Software Inc.", - "license_expression": "mit", - "declared_license": "mit", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": { - "about_resource": "appdirs-1.4.3-py2.py3-none-any.whl" - }, - "purl": "pkg:about/appdirs@1.4.3", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "about", + "namespace": null, + "name": "appdirs", + "version": "1.4.3", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [ + { + "type": "person", + "role": "owner", + "name": "ActiveState", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "https://pypi.python.org/pypi/appdirs", + "download_url": "https://pypi.python.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl#md5=9ed4b51c9611775c3078b3831072e153", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Copyright (c) 2010 ActiveState Software Inc.", + "license_expression": "mit", + "declared_license": "mit", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": { + "about_resource": "appdirs-1.4.3-py2.py3-none-any.whl" + }, + "purl": "pkg:about/appdirs@1.4.3", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/bower/author-objects/expected.json b/tests/packagedcode/data/bower/author-objects/expected.json index 63a87393e61..ba986c806d2 100644 --- a/tests/packagedcode/data/bower/author-objects/expected.json +++ b/tests/packagedcode/data/bower/author-objects/expected.json @@ -1,84 +1,86 @@ -{ - "type": "bower", - "namespace": null, - "name": "John Doe", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Physics-like animations for pretty particles", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Betty Beta ", - "email": null, - "url": null - }, - { - "type": null, - "role": "author", - "name": "John Doe", - "email": "john@doe.com", - "url": "http://johndoe.com" - } - ], - "keywords": [ - "motion", - "physics", - "particles" - ], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit AND apache-2.0 AND bsd-new", - "declared_license": [ - "MIT", - "Apache 2.0", - "BSD-3-Clause" - ], - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:bower/get-size", - "requirement": "~1.2.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/eventEmitter", - "requirement": "~4.2.11", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/qunit", - "requirement": "~1.16.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:bower/John%20Doe", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "bower", + "namespace": null, + "name": "John Doe", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Physics-like animations for pretty particles", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Betty Beta ", + "email": null, + "url": null + }, + { + "type": null, + "role": "author", + "name": "John Doe", + "email": "john@doe.com", + "url": "http://johndoe.com" + } + ], + "keywords": [ + "motion", + "physics", + "particles" + ], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit AND apache-2.0 AND bsd-new", + "declared_license": [ + "MIT", + "Apache 2.0", + "BSD-3-Clause" + ], + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:bower/get-size", + "requirement": "~1.2.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/eventEmitter", + "requirement": "~4.2.11", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/qunit", + "requirement": "~1.16.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:bower/John%20Doe", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/bower/basic/expected.json b/tests/packagedcode/data/bower/basic/expected.json index c438c92442d..bbe2d3850b0 100644 --- a/tests/packagedcode/data/bower/basic/expected.json +++ b/tests/packagedcode/data/bower/basic/expected.json @@ -1,75 +1,77 @@ -{ - "type": "bower", - "namespace": null, - "name": "blue-leaf", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Physics-like animations for pretty particles", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Betty Beta ", - "email": null, - "url": null - } - ], - "keywords": [ - "motion", - "physics", - "particles" - ], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": [ - "MIT" - ], - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:bower/get-size", - "requirement": "~1.2.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/eventEmitter", - "requirement": "~4.2.11", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/qunit", - "requirement": "~1.16.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:bower/blue-leaf", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "bower", + "namespace": null, + "name": "blue-leaf", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Physics-like animations for pretty particles", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Betty Beta ", + "email": null, + "url": null + } + ], + "keywords": [ + "motion", + "physics", + "particles" + ], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": [ + "MIT" + ], + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:bower/get-size", + "requirement": "~1.2.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/eventEmitter", + "requirement": "~4.2.11", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/qunit", + "requirement": "~1.16.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:bower/blue-leaf", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/bower/list-of-licenses/expected.json b/tests/packagedcode/data/bower/list-of-licenses/expected.json index 0f4993ec739..aee81229c6a 100644 --- a/tests/packagedcode/data/bower/list-of-licenses/expected.json +++ b/tests/packagedcode/data/bower/list-of-licenses/expected.json @@ -1,77 +1,79 @@ -{ - "type": "bower", - "namespace": null, - "name": "blue-leaf", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Physics-like animations for pretty particles", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Betty Beta ", - "email": null, - "url": null - } - ], - "keywords": [ - "motion", - "physics", - "particles" - ], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit AND apache-2.0 AND bsd-new", - "declared_license": [ - "MIT", - "Apache 2.0", - "BSD-3-Clause" - ], - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:bower/get-size", - "requirement": "~1.2.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/eventEmitter", - "requirement": "~4.2.11", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:bower/qunit", - "requirement": "~1.16.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:bower/blue-leaf", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "bower", + "namespace": null, + "name": "blue-leaf", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Physics-like animations for pretty particles", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Betty Beta ", + "email": null, + "url": null + } + ], + "keywords": [ + "motion", + "physics", + "particles" + ], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit AND apache-2.0 AND bsd-new", + "declared_license": [ + "MIT", + "Apache 2.0", + "BSD-3-Clause" + ], + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:bower/get-size", + "requirement": "~1.2.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/eventEmitter", + "requirement": "~4.2.11", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:bower/qunit", + "requirement": "~1.16.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:bower/blue-leaf", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_lock/sample1/output.expected.json b/tests/packagedcode/data/cargo/cargo_lock/sample1/output.expected.json index 7d2252251b8..1c0aab4a4f6 100644 --- a/tests/packagedcode/data/cargo/cargo_lock/sample1/output.expected.json +++ b/tests/packagedcode/data/cargo/cargo_lock/sample1/output.expected.json @@ -1,61 +1,63 @@ -{ - "type": "cargo", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:crates/autocfg@1.0.0", - "requirement": "1.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/cargo-lock@4.0.1", - "requirement": "4.0.1", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/gumdrop@0.7.0", - "requirement": "0.7.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:crates/autocfg@1.0.0", + "requirement": "1.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/cargo-lock@4.0.1", + "requirement": "4.0.1", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/gumdrop@0.7.0", + "requirement": "0.7.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_lock/sample2/output.expected.json b/tests/packagedcode/data/cargo/cargo_lock/sample2/output.expected.json index b66339e7acd..f9bed6a3585 100644 --- a/tests/packagedcode/data/cargo/cargo_lock/sample2/output.expected.json +++ b/tests/packagedcode/data/cargo/cargo_lock/sample2/output.expected.json @@ -1,53 +1,55 @@ -{ - "type": "cargo", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:crates/autocfg@1.0.0", - "requirement": "1.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/fixedbitset@0.2.0", - "requirement": "0.2.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:crates/autocfg@1.0.0", + "requirement": "1.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/fixedbitset@0.2.0", + "requirement": "0.2.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_lock/sample3/output.expected.json b/tests/packagedcode/data/cargo/cargo_lock/sample3/output.expected.json index d00def405fc..751c98888b6 100644 --- a/tests/packagedcode/data/cargo/cargo_lock/sample3/output.expected.json +++ b/tests/packagedcode/data/cargo/cargo_lock/sample3/output.expected.json @@ -1,53 +1,55 @@ -{ - "type": "cargo", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:crates/gumdrop@0.7.0", - "requirement": "0.7.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/gumdrop_derive@0.7.0", - "requirement": "0.7.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:crates/gumdrop@0.7.0", + "requirement": "0.7.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/gumdrop_derive@0.7.0", + "requirement": "0.7.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_lock/sample4/output.expected.json b/tests/packagedcode/data/cargo/cargo_lock/sample4/output.expected.json index d7247c18d38..3d140c24b7b 100644 --- a/tests/packagedcode/data/cargo/cargo_lock/sample4/output.expected.json +++ b/tests/packagedcode/data/cargo/cargo_lock/sample4/output.expected.json @@ -1,69 +1,71 @@ -{ - "type": "cargo", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:crates/idna@0.2.0", - "requirement": "0.2.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/indexmap@1.3.2", - "requirement": "1.3.2", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/matches@0.1.8", - "requirement": "0.1.8", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/percent-encoding@2.1.0", - "requirement": "2.1.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:crates/idna@0.2.0", + "requirement": "0.2.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/indexmap@1.3.2", + "requirement": "1.3.2", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/matches@0.1.8", + "requirement": "0.1.8", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/percent-encoding@2.1.0", + "requirement": "2.1.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_lock/sample5/output.expected.json b/tests/packagedcode/data/cargo/cargo_lock/sample5/output.expected.json index da310d75218..d661d1180ac 100644 --- a/tests/packagedcode/data/cargo/cargo_lock/sample5/output.expected.json +++ b/tests/packagedcode/data/cargo/cargo_lock/sample5/output.expected.json @@ -1,69 +1,71 @@ -{ - "type": "cargo", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:crates/indexmap@1.3.2", - "requirement": "1.3.2", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/matches@0.1.8", - "requirement": "0.1.8", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/semver@0.10.0", - "requirement": "0.10.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:crates/semver-parser@0.7.0", - "requirement": "0.7.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:crates/indexmap@1.3.2", + "requirement": "1.3.2", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/matches@0.1.8", + "requirement": "0.1.8", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/semver@0.10.0", + "requirement": "0.10.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:crates/semver-parser@0.7.0", + "requirement": "0.7.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected index 13ff40424e0..04b38baeb76 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/clap/Cargo.toml.expected @@ -1,44 +1,46 @@ -{ - "type": "cargo", - "namespace": null, - "name": "clap", - "version": "2.32.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": "A simple to use, efficient, and full featured Command Line Argument Parser", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Kevin K.", - "email": "kbknapp@gmail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:cargo/clap@2.32.0", - "repository_homepage_url": "https://crates.io/crates/clap", - "repository_download_url": "https://crates.io/api/v1/crates/clap/2.32.0/download", - "api_data_url": "https://crates.io/api/v1/crates/clap" -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": "clap", + "version": "2.32.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": "A simple to use, efficient, and full featured Command Line Argument Parser", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Kevin K.", + "email": "kbknapp@gmail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:cargo/clap@2.32.0", + "repository_homepage_url": "https://crates.io/crates/clap", + "repository_download_url": "https://crates.io/api/v1/crates/clap/2.32.0/download", + "api_data_url": "https://crates.io/api/v1/crates/clap" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected index b474fdc11f0..73ecde5460a 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/clippy/Cargo.toml.expected @@ -1,72 +1,74 @@ -{ - "type": "cargo", - "namespace": null, - "name": "clippy", - "version": "0.0.212", - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": "A bunch of helpful lints to avoid common pitfalls in Rust", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Manish Goregaokar", - "email": "manishsmail@gmail.com", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Andre Bogus", - "email": "bogusandre@gmail.com", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Georg Brandl", - "email": "georg@python.org", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Martin Carton", - "email": "cartonmartin@gmail.com", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Oliver Schneider", - "email": "clippy-iethah7aipeen8neex1a@oli-obk.de", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit OR apache-2.0", - "declared_license": "MIT/Apache-2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:cargo/clippy@0.0.212", - "repository_homepage_url": "https://crates.io/crates/clippy", - "repository_download_url": "https://crates.io/api/v1/crates/clippy/0.0.212/download", - "api_data_url": "https://crates.io/api/v1/crates/clippy" -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": "clippy", + "version": "0.0.212", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": "A bunch of helpful lints to avoid common pitfalls in Rust", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Manish Goregaokar", + "email": "manishsmail@gmail.com", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Andre Bogus", + "email": "bogusandre@gmail.com", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Georg Brandl", + "email": "georg@python.org", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Martin Carton", + "email": "cartonmartin@gmail.com", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Oliver Schneider", + "email": "clippy-iethah7aipeen8neex1a@oli-obk.de", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit OR apache-2.0", + "declared_license": "MIT/Apache-2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:cargo/clippy@0.0.212", + "repository_homepage_url": "https://crates.io/crates/clippy", + "repository_download_url": "https://crates.io/api/v1/crates/clippy/0.0.212/download", + "api_data_url": "https://crates.io/api/v1/crates/clippy" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected index 4280d06b048..ea962125e0e 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/mdbook/Cargo.toml.expected @@ -1,58 +1,60 @@ -{ - "type": "cargo", - "namespace": null, - "name": "mdbook", - "version": "0.2.4-alpha.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": "Create books from markdown files", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Mathieu David", - "email": "mathieudavid@mathieudavid.org", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Michael-F-Bryan", - "email": "michaelfbryan@gmail.com", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Matt Ickstadt", - "email": "mattico8@gmail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mpl-2.0", - "declared_license": "MPL-2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:cargo/mdbook@0.2.4-alpha.0", - "repository_homepage_url": "https://crates.io/crates/mdbook", - "repository_download_url": "https://crates.io/api/v1/crates/mdbook/0.2.4-alpha.0/download", - "api_data_url": "https://crates.io/api/v1/crates/mdbook" -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": "mdbook", + "version": "0.2.4-alpha.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": "Create books from markdown files", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Mathieu David", + "email": "mathieudavid@mathieudavid.org", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Michael-F-Bryan", + "email": "michaelfbryan@gmail.com", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Matt Ickstadt", + "email": "mattico8@gmail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mpl-2.0", + "declared_license": "MPL-2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:cargo/mdbook@0.2.4-alpha.0", + "repository_homepage_url": "https://crates.io/crates/mdbook", + "repository_download_url": "https://crates.io/api/v1/crates/mdbook/0.2.4-alpha.0/download", + "api_data_url": "https://crates.io/api/v1/crates/mdbook" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected index 6ea061d82c9..448ddf84152 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/rustfmt/Cargo.toml.expected @@ -1,51 +1,53 @@ -{ - "type": "cargo", - "namespace": null, - "name": "rustfmt-nightly", - "version": "1.0.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": "Tool to find and fix Rust formatting issues", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Nicholas Cameron", - "email": "ncameron@mozilla.com", - "url": null - }, - { - "type": "person", - "role": "author", - "name": "The Rustfmt developers", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0 OR mit", - "declared_license": "Apache-2.0/MIT", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:cargo/rustfmt-nightly@1.0.3", - "repository_homepage_url": "https://crates.io/crates/rustfmt-nightly", - "repository_download_url": "https://crates.io/api/v1/crates/rustfmt-nightly/1.0.3/download", - "api_data_url": "https://crates.io/api/v1/crates/rustfmt-nightly" -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": "rustfmt-nightly", + "version": "1.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": "Tool to find and fix Rust formatting issues", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Nicholas Cameron", + "email": "ncameron@mozilla.com", + "url": null + }, + { + "type": "person", + "role": "author", + "name": "The Rustfmt developers", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0 OR mit", + "declared_license": "Apache-2.0/MIT", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:cargo/rustfmt-nightly@1.0.3", + "repository_homepage_url": "https://crates.io/crates/rustfmt-nightly", + "repository_download_url": "https://crates.io/api/v1/crates/rustfmt-nightly/1.0.3/download", + "api_data_url": "https://crates.io/api/v1/crates/rustfmt-nightly" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected b/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected index 5f52815b8b8..328c2474c20 100644 --- a/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected +++ b/tests/packagedcode/data/cargo/cargo_toml/rustup/Cargo.toml.expected @@ -1,44 +1,46 @@ -{ - "type": "cargo", - "namespace": null, - "name": "rustup", - "version": "1.17.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Rust", - "description": "Manage multiple rust installations with ease", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Diggory Blake", - "email": "diggsey@googlemail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit OR apache-2.0", - "declared_license": "MIT OR Apache-2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:cargo/rustup@1.17.0", - "repository_homepage_url": "https://crates.io/crates/rustup", - "repository_download_url": "https://crates.io/api/v1/crates/rustup/1.17.0/download", - "api_data_url": "https://crates.io/api/v1/crates/rustup" -} \ No newline at end of file +[ + { + "type": "cargo", + "namespace": null, + "name": "rustup", + "version": "1.17.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Rust", + "description": "Manage multiple rust installations with ease", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Diggory Blake", + "email": "diggsey@googlemail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit OR apache-2.0", + "declared_license": "MIT OR Apache-2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:cargo/rustup@1.17.0", + "repository_homepage_url": "https://crates.io/crates/rustup", + "repository_download_url": "https://crates.io/api/v1/crates/rustup/1.17.0/download", + "api_data_url": "https://crates.io/api/v1/crates/rustup" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/metadata.json.expected b/tests/packagedcode/data/chef/basic/metadata.json.expected index e5c68e885c4..76996fc56e2 100644 --- a/tests/packagedcode/data/chef/basic/metadata.json.expected +++ b/tests/packagedcode/data/chef/basic/metadata.json.expected @@ -1,53 +1,55 @@ -{ - "type": "chef", - "namespace": null, - "name": "301", - "version": "0.1.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "Installs/Configures 301", - "release_date": null, - "parties": [ - { - "type": null, - "role": "maintainer", - "name": "Mark Wilkerson", - "email": "mark@segfawlt.net", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:chef/nodejs", - "requirement": ">= 0.0.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/301@0.1.0", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/301/versions/0.1.0" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "301", + "version": "0.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "Installs/Configures 301", + "release_date": null, + "parties": [ + { + "type": null, + "role": "maintainer", + "name": "Mark Wilkerson", + "email": "mark@segfawlt.net", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:chef/nodejs", + "requirement": ">= 0.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/301@0.1.0", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/301/versions/0.1.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/metadata.rb.expected b/tests/packagedcode/data/chef/basic/metadata.rb.expected index 26fb6ce9f6d..3cf8ea0f15b 100644 --- a/tests/packagedcode/data/chef/basic/metadata.rb.expected +++ b/tests/packagedcode/data/chef/basic/metadata.rb.expected @@ -1,53 +1,55 @@ -{ - "type": "chef", - "namespace": null, - "name": "301", - "version": "0.1.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "Installs/Configures 301", - "release_date": null, - "parties": [ - { - "type": null, - "role": "maintainer", - "name": "Mark Wilkerson", - "email": "mark@segfawlt.net", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:chef/nodejs", - "requirement": null, - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/301@0.1.0", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/301/versions/0.1.0" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "301", + "version": "0.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "Installs/Configures 301", + "release_date": null, + "parties": [ + { + "type": null, + "role": "maintainer", + "name": "Mark Wilkerson", + "email": "mark@segfawlt.net", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:chef/nodejs", + "requirement": null, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/301@0.1.0", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/301/versions/0.1.0/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/301/versions/0.1.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/test_package.json.expected b/tests/packagedcode/data/chef/basic/test_package.json.expected index 2605ed0a9bb..42adac8b81c 100644 --- a/tests/packagedcode/data/chef/basic/test_package.json.expected +++ b/tests/packagedcode/data/chef/basic/test_package.json.expected @@ -1,36 +1,38 @@ -{ - "type": "chef", - "namespace": null, - "name": "test", - "version": "0.01", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "test package", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "public-domain", - "declared_license": "public-domain", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/test@0.01", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "test", + "version": "0.01", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "test package", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "public-domain", + "declared_license": "public-domain", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/test@0.01", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/test_package_code_view_url_and_bug_tracking_url.json.expected b/tests/packagedcode/data/chef/basic/test_package_code_view_url_and_bug_tracking_url.json.expected index 16ddfcf1f12..b7c4ec9885f 100644 --- a/tests/packagedcode/data/chef/basic/test_package_code_view_url_and_bug_tracking_url.json.expected +++ b/tests/packagedcode/data/chef/basic/test_package_code_view_url_and_bug_tracking_url.json.expected @@ -1,36 +1,38 @@ -{ - "type": "chef", - "namespace": null, - "name": "test", - "version": "0.01", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "test package", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "example.com/issues", - "code_view_url": "example.com", - "vcs_url": null, - "copyright": null, - "license_expression": "public-domain", - "declared_license": "public-domain", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/test@0.01", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "test", + "version": "0.01", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "test package", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "example.com/issues", + "code_view_url": "example.com", + "vcs_url": null, + "copyright": null, + "license_expression": "public-domain", + "declared_license": "public-domain", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/test@0.01", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/test_package_dependencies.json.expected b/tests/packagedcode/data/chef/basic/test_package_dependencies.json.expected index 2fda7e50462..d9e17b64314 100644 --- a/tests/packagedcode/data/chef/basic/test_package_dependencies.json.expected +++ b/tests/packagedcode/data/chef/basic/test_package_dependencies.json.expected @@ -1,45 +1,47 @@ -{ - "type": "chef", - "namespace": null, - "name": "test", - "version": "0.01", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "test package", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "public-domain", - "declared_license": "public-domain", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:chef/test%20dependency", - "requirement": "0.01", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/test@0.01", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "test", + "version": "0.01", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "test package", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "public-domain", + "declared_license": "public-domain", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:chef/test%20dependency", + "requirement": "0.01", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/test@0.01", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/basic/test_package_parties.json.expected b/tests/packagedcode/data/chef/basic/test_package_parties.json.expected index 0a0ed8fe13d..265bb08539a 100644 --- a/tests/packagedcode/data/chef/basic/test_package_parties.json.expected +++ b/tests/packagedcode/data/chef/basic/test_package_parties.json.expected @@ -1,44 +1,46 @@ -{ - "type": "chef", - "namespace": null, - "name": "test", - "version": "0.01", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "test package", - "release_date": null, - "parties": [ - { - "type": null, - "role": "maintainer", - "name": "test maintainer", - "email": "test_maintainer@example.com", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "public-domain", - "declared_license": "public-domain", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/test@0.01", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "test", + "version": "0.01", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "test package", + "release_date": null, + "parties": [ + { + "type": null, + "role": "maintainer", + "name": "test maintainer", + "email": "test_maintainer@example.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "public-domain", + "declared_license": "public-domain", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/test@0.01", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/test/versions/0.01/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/test/versions/0.01" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/chef/dependencies/metadata.rb.expected b/tests/packagedcode/data/chef/dependencies/metadata.rb.expected index 42399fd762d..05f5b6c9db0 100644 --- a/tests/packagedcode/data/chef/dependencies/metadata.rb.expected +++ b/tests/packagedcode/data/chef/dependencies/metadata.rb.expected @@ -1,61 +1,63 @@ -{ - "type": "chef", - "namespace": null, - "name": "build-essential", - "version": "8.2.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ruby", - "description": "Installs C compiler / build tools", - "release_date": null, - "parties": [ - { - "type": null, - "role": "maintainer", - "name": "Chef Software, Inc.", - "email": "cookbooks@chef.io", - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": "https://supermarket.chef.io/cookbooks/build-essential/versions/8.2.1/download", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/chef-cookbooks/build-essential/issues", - "code_view_url": "https://github.com/chef-cookbooks/build-essential", - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache-2.0", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:chef/seven_zip", - "requirement": null, - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:chef/mingw", - "requirement": ">= 1.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:chef/build-essential@8.2.1", - "repository_homepage_url": null, - "repository_download_url": "https://supermarket.chef.io/cookbooks/build-essential/versions/8.2.1/download", - "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/8.2.1" -} \ No newline at end of file +[ + { + "type": "chef", + "namespace": null, + "name": "build-essential", + "version": "8.2.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ruby", + "description": "Installs C compiler / build tools", + "release_date": null, + "parties": [ + { + "type": null, + "role": "maintainer", + "name": "Chef Software, Inc.", + "email": "cookbooks@chef.io", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://supermarket.chef.io/cookbooks/build-essential/versions/8.2.1/download", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/chef-cookbooks/build-essential/issues", + "code_view_url": "https://github.com/chef-cookbooks/build-essential", + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache-2.0", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:chef/seven_zip", + "requirement": null, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:chef/mingw", + "requirement": ">= 1.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:chef/build-essential@8.2.1", + "repository_homepage_url": null, + "repository_download_url": "https://supermarket.chef.io/cookbooks/build-essential/versions/8.2.1/download", + "api_data_url": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/8.2.1" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec.json/FirebaseAnalytics.podspec.json.expected.json b/tests/packagedcode/data/cocoapods/podspec.json/FirebaseAnalytics.podspec.json.expected.json index 8b4c345fb64..7e7d7e52392 100644 --- a/tests/packagedcode/data/cocoapods/podspec.json/FirebaseAnalytics.podspec.json.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec.json/FirebaseAnalytics.podspec.json.expected.json @@ -1,46 +1,48 @@ -{ - "type": "pods", - "namespace": null, - "name": "FirebaseAnalytics", - "version": "8.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "Firebase Analytics for iOS. Firebase Analytics is a free, out-of-the-box analytics solution that inspires actionable insights based on app usage and user engagement.", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "owner", - "name": "Google, Inc.", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "https://firebase.google.com/features/analytics/", - "download_url": "https://dl.google.com/firebase/ios/analytics/19ed8dba01e90708/FirebaseAnalytics-8.1.1.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": { - "http": "https://dl.google.com/firebase/ios/analytics/19ed8dba01e90708/FirebaseAnalytics-8.1.1.tar.gz" - }, - "copyright": null, - "license_expression": "unknown", - "declared_license": "Copyright 2021 Google Copyright", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pods/FirebaseAnalytics@8.1.1", - "repository_homepage_url": "https://cocoapods.org/pods/FirebaseAnalytics", - "repository_download_url": "https://firebase.google.com/features/analytics//archive/8.1.1.zip", - "api_data_url": "https://raw.githubusercontent.com/CocoaPods/Specs/blob/master/Specs/e/2/1/FirebaseAnalytics/8.1.1/FirebaseAnalytics.podspec.json" -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "FirebaseAnalytics", + "version": "8.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "Firebase Analytics for iOS. Firebase Analytics is a free, out-of-the-box analytics solution that inspires actionable insights based on app usage and user engagement.", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "owner", + "name": "Google, Inc.", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "https://firebase.google.com/features/analytics/", + "download_url": "https://dl.google.com/firebase/ios/analytics/19ed8dba01e90708/FirebaseAnalytics-8.1.1.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": { + "http": "https://dl.google.com/firebase/ios/analytics/19ed8dba01e90708/FirebaseAnalytics-8.1.1.tar.gz" + }, + "copyright": null, + "license_expression": "unknown", + "declared_license": "Copyright 2021 Google Copyright", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pods/FirebaseAnalytics@8.1.1", + "repository_homepage_url": "https://cocoapods.org/pods/FirebaseAnalytics", + "repository_download_url": "https://firebase.google.com/features/analytics//archive/8.1.1.zip", + "api_data_url": "https://raw.githubusercontent.com/CocoaPods/Specs/blob/master/Specs/e/2/1/FirebaseAnalytics/8.1.1/FirebaseAnalytics.podspec.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec/BadgeHub.podspec.expected.json b/tests/packagedcode/data/cocoapods/podspec/BadgeHub.podspec.expected.json index 645e96ef8ad..c420d8b9e1f 100644 --- a/tests/packagedcode/data/cocoapods/podspec/BadgeHub.podspec.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec/BadgeHub.podspec.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pods", - "namespace": null, - "name": "BadgeHub", - "version": "0.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "A way to quickly add a notification bedge icon to any view.\n Make any UIView a full fledged animated notification center. It is a way to quickly add a notification badge icon to a UIView. It make very easy to add badge to any view.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "jogendra", - "email": null, - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "imjog24@gmail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/jogendra/BadgeHub", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/jogendra/BadgeHub.git", - "copyright": null, - "license_expression": "mit AND unknown", - "declared_license": ":type => MIT, :file => LICENSE", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [ - "https://github.com/jogendra/BadgeHub.git" - ], - "extra_data": {}, - "purl": "pkg:pods/BadgeHub@0.1.1", - "repository_homepage_url": "https://cocoapods.org/pods/BadgeHub", - "repository_download_url": "https://github.com/jogendra/BadgeHub/archive/0.1.1.zip", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "BadgeHub", + "version": "0.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "A way to quickly add a notification bedge icon to any view.\n Make any UIView a full fledged animated notification center. It is a way to quickly add a notification badge icon to a UIView. It make very easy to add badge to any view.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "jogendra", + "email": null, + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "imjog24@gmail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/jogendra/BadgeHub", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/jogendra/BadgeHub.git", + "copyright": null, + "license_expression": "mit AND unknown", + "declared_license": ":type => MIT, :file => LICENSE", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [ + "https://github.com/jogendra/BadgeHub.git" + ], + "extra_data": {}, + "purl": "pkg:pods/BadgeHub@0.1.1", + "repository_homepage_url": "https://cocoapods.org/pods/BadgeHub", + "repository_download_url": "https://github.com/jogendra/BadgeHub/archive/0.1.1.zip", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec/LoadingShimmer.podspec.expected.json b/tests/packagedcode/data/cocoapods/podspec/LoadingShimmer.podspec.expected.json index d3094a35419..b9d897fe23c 100644 --- a/tests/packagedcode/data/cocoapods/podspec/LoadingShimmer.podspec.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec/LoadingShimmer.podspec.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pods", - "namespace": null, - "name": "LoadingShimmer", - "version": "1.0.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.\n An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. This is a network request waiting for the framework, the framework to increase the dynamic effect, convenient and fast, a line of code can be used.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "jogendra", - "email": null, - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "jogendrafx@gmail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/jogendra/LoadingShimmer", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/jogendra/LoadingShimmer.git", - "copyright": null, - "license_expression": "mit AND unknown", - "declared_license": ":type => MIT, :file => LICENSE", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [ - "https://github.com/jogendra/LoadingShimmer.git" - ], - "extra_data": {}, - "purl": "pkg:pods/LoadingShimmer@1.0.3", - "repository_homepage_url": "https://cocoapods.org/pods/LoadingShimmer", - "repository_download_url": "https://github.com/jogendra/LoadingShimmer/archive/1.0.3.zip", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "LoadingShimmer", + "version": "1.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.\n An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. This is a network request waiting for the framework, the framework to increase the dynamic effect, convenient and fast, a line of code can be used.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "jogendra", + "email": null, + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "jogendrafx@gmail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/jogendra/LoadingShimmer", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/jogendra/LoadingShimmer.git", + "copyright": null, + "license_expression": "mit AND unknown", + "declared_license": ":type => MIT, :file => LICENSE", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [ + "https://github.com/jogendra/LoadingShimmer.git" + ], + "extra_data": {}, + "purl": "pkg:pods/LoadingShimmer@1.0.3", + "repository_homepage_url": "https://cocoapods.org/pods/LoadingShimmer", + "repository_download_url": "https://github.com/jogendra/LoadingShimmer/archive/1.0.3.zip", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec/Starscream.podspec.expected.json b/tests/packagedcode/data/cocoapods/podspec/Starscream.podspec.expected.json index a1558b389ac..64da3832b79 100644 --- a/tests/packagedcode/data/cocoapods/podspec/Starscream.podspec.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec/Starscream.podspec.expected.json @@ -1,67 +1,69 @@ -{ - "type": "pods", - "namespace": null, - "name": "Starscream", - "version": "4.0.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "A conforming WebSocket RFC 6455 client library in Swift.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Dalton Cherry", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Austin Cherry", - "email": null, - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "http://daltoniam.com", - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "http://austincherry.me", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/daltoniam/Starscream", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/daltoniam/Starscream.git", - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache License, Version 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [ - "https://github.com/daltoniam/Starscream.git" - ], - "extra_data": {}, - "purl": "pkg:pods/Starscream@4.0.3", - "repository_homepage_url": "https://cocoapods.org/pods/Starscream", - "repository_download_url": "https://github.com/daltoniam/Starscream/archive/4.0.3.zip", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "Starscream", + "version": "4.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "A conforming WebSocket RFC 6455 client library in Swift.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Dalton Cherry", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Austin Cherry", + "email": null, + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "http://daltoniam.com", + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "http://austincherry.me", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/daltoniam/Starscream", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/daltoniam/Starscream.git", + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache License, Version 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [ + "https://github.com/daltoniam/Starscream.git" + ], + "extra_data": {}, + "purl": "pkg:pods/Starscream@4.0.3", + "repository_homepage_url": "https://cocoapods.org/pods/Starscream", + "repository_download_url": "https://github.com/daltoniam/Starscream/archive/4.0.3.zip", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec/SwiftLib.podspec.expected.json b/tests/packagedcode/data/cocoapods/podspec/SwiftLib.podspec.expected.json index 24e25067f61..10d080e8dfa 100644 --- a/tests/packagedcode/data/cocoapods/podspec/SwiftLib.podspec.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec/SwiftLib.podspec.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pods", - "namespace": null, - "name": "SwiftLib", - "version": "0.0.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "A CocoaPods library written in Swift\n This CocoaPods library helps you perform calculation.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "alizainprasla", - "email": null, - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "alizainprasla@gmail.com", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/alizainprasla/swiftlib", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/alizainprasla/swiftlib.git", - "copyright": null, - "license_expression": "mit AND unknown", - "declared_license": ":type => MIT, :file => LICENSE", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [ - "https://github.com/alizainprasla/swiftlib.git" - ], - "extra_data": {}, - "purl": "pkg:pods/SwiftLib@0.0.1", - "repository_homepage_url": "https://cocoapods.org/pods/SwiftLib", - "repository_download_url": "https://github.com/alizainprasla/swiftlib/archive/0.0.1.zip", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "SwiftLib", + "version": "0.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "A CocoaPods library written in Swift\n This CocoaPods library helps you perform calculation.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "alizainprasla", + "email": null, + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "alizainprasla@gmail.com", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/alizainprasla/swiftlib", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/alizainprasla/swiftlib.git", + "copyright": null, + "license_expression": "mit AND unknown", + "declared_license": ":type => MIT, :file => LICENSE", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [ + "https://github.com/alizainprasla/swiftlib.git" + ], + "extra_data": {}, + "purl": "pkg:pods/SwiftLib@0.0.1", + "repository_homepage_url": "https://cocoapods.org/pods/SwiftLib", + "repository_download_url": "https://github.com/alizainprasla/swiftlib/archive/0.0.1.zip", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/cocoapods/podspec/nanopb.podspec.expected.json b/tests/packagedcode/data/cocoapods/podspec/nanopb.podspec.expected.json index ca4cfa3ecf2..531373fe4f2 100644 --- a/tests/packagedcode/data/cocoapods/podspec/nanopb.podspec.expected.json +++ b/tests/packagedcode/data/cocoapods/podspec/nanopb.podspec.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pods", - "namespace": null, - "name": "nanopb", - "version": "1.30905.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Objective-C", - "description": "Protocol buffers with small code size.\n Nanopb is a small code-size Protocol Buffers implementation Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in Nanopb is a small code-size Protocol Buffers implementation Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Petteri Aimonen", - "email": null, - "url": null - }, - { - "type": "person", - "role": "email", - "name": null, - "email": "jpa@nanopb.mail.kapsi.fi", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/nanopb/nanopb", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/nanopb/nanopb.git", - "copyright": null, - "license_expression": "unknown", - "declared_license": ":type => zlib, :file => LICENSE.txt", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [ - "https://github.com/nanopb/nanopb.git" - ], - "extra_data": {}, - "purl": "pkg:pods/nanopb@1.30905.0", - "repository_homepage_url": "https://cocoapods.org/pods/nanopb", - "repository_download_url": "https://github.com/nanopb/nanopb/archive/1.30905.0.zip", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pods", + "namespace": null, + "name": "nanopb", + "version": "1.30905.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Objective-C", + "description": "Protocol buffers with small code size.\n Nanopb is a small code-size Protocol Buffers implementation Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in Nanopb is a small code-size Protocol Buffers implementation Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Petteri Aimonen", + "email": null, + "url": null + }, + { + "type": "person", + "role": "email", + "name": null, + "email": "jpa@nanopb.mail.kapsi.fi", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/nanopb/nanopb", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/nanopb/nanopb.git", + "copyright": null, + "license_expression": "unknown", + "declared_license": ":type => zlib, :file => LICENSE.txt", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [ + "https://github.com/nanopb/nanopb.git" + ], + "extra_data": {}, + "purl": "pkg:pods/nanopb@1.30905.0", + "repository_homepage_url": "https://cocoapods.org/pods/nanopb", + "repository_download_url": "https://github.com/nanopb/nanopb/archive/1.30905.0.zip", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/conda/meta.yaml.expected.json b/tests/packagedcode/data/conda/meta.yaml.expected.json index 0685bc80647..ef807d5b2e1 100644 --- a/tests/packagedcode/data/conda/meta.yaml.expected.json +++ b/tests/packagedcode/data/conda/meta.yaml.expected.json @@ -1,101 +1,103 @@ -{ - "type": "conda", - "namespace": null, - "name": "abeona", - "version": "0.45.0", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "A simple transcriptome assembler based on kallisto and Cortex graphs.", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/winni2k/abeona", - "download_url": "https://pypi.io/packages/source/a/abeona/abeona-0.45.0.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": "bc7512f2eef785b037d836f4cc6faded457ac277f75c6e34eccd12da7c85258f", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/winni2k/abeona", - "copyright": null, - "license_expression": "unknown", - "declared_license": "Apache Software", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:conda/mccortex", - "requirement": "==1.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/nextflow", - "requirement": "==19.01.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/cortexpy", - "requirement": "==0.45.7", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/kallisto", - "requirement": "==0.44.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/bwa", - "requirement": null, - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/pandas", - "requirement": null, - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/progressbar2", - "requirement": null, - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:conda/python", - "requirement": ">=3.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:conda/abeona@0.45.0", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "conda", + "namespace": null, + "name": "abeona", + "version": "0.45.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "A simple transcriptome assembler based on kallisto and Cortex graphs.", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/winni2k/abeona", + "download_url": "https://pypi.io/packages/source/a/abeona/abeona-0.45.0.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": "bc7512f2eef785b037d836f4cc6faded457ac277f75c6e34eccd12da7c85258f", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/winni2k/abeona", + "copyright": null, + "license_expression": "unknown", + "declared_license": "Apache Software", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:conda/mccortex", + "requirement": "==1.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/nextflow", + "requirement": "==19.01.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/cortexpy", + "requirement": "==0.45.7", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/kallisto", + "requirement": "==0.44.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/bwa", + "requirement": null, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/pandas", + "requirement": null, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/progressbar2", + "requirement": null, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:conda/python", + "requirement": ">=3.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:conda/abeona@0.45.0", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/basic/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/basic/+COMPACT_MANIFEST.expected index d1473dfc72e..a319fb37022 100644 --- a/tests/packagedcode/data/freebsd/basic/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/basic/+COMPACT_MANIFEST.expected @@ -1,54 +1,56 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "dmidecode", - "version": "2.12", - "qualifiers": { - "arch": "freebsd:10:x86:64", - "origin": "sysutils/dmidecode" - }, - "subpath": null, - "primary_language": null, - "description": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "anders@FreeBSD.org", - "url": null - } - ], - "keywords": [ - "sysutils" - ], - "homepage_url": "http://www.nongnu.org/dmidecode/", - "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/dmidecode-2.12.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/sysutils/dmidecode", - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-2.0", - "declared_license": { - "licenses": [ - "GPLv2" +[ + { + "type": "freebsd", + "namespace": null, + "name": "dmidecode", + "version": "2.12", + "qualifiers": { + "arch": "freebsd:10:x86:64", + "origin": "sysutils/dmidecode" + }, + "subpath": null, + "primary_language": null, + "description": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "anders@FreeBSD.org", + "url": null + } ], - "licenselogic": "single" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/dmidecode@2.12?arch=freebsd:10:x86:64&origin=sysutils/dmidecode", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file + "keywords": [ + "sysutils" + ], + "homepage_url": "http://www.nongnu.org/dmidecode/", + "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/dmidecode-2.12.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/sysutils/dmidecode", + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-2.0", + "declared_license": { + "licenses": [ + "GPLv2" + ], + "licenselogic": "single" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/dmidecode@2.12?arch=freebsd:10:x86:64&origin=sysutils/dmidecode", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/basic2/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/basic2/+COMPACT_MANIFEST.expected index 909ae56b9ff..368e6d6ec0c 100644 --- a/tests/packagedcode/data/freebsd/basic2/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/basic2/+COMPACT_MANIFEST.expected @@ -1,54 +1,56 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "0d1n", - "version": "2.3", - "qualifiers": { - "arch": "freebsd:10:x86:64", - "origin": "security/0d1n" - }, - "subpath": null, - "primary_language": null, - "description": "0d1n is a tool for automating customized attacks against web applications.\nSome of its features:\n\n - Brute force login names and passwords in authentication forms\n - Directory disclosure (brute over PATH list and find HTTP status codes)\n - Tests to find SQL injection and XSS vulnerabilities\n - Options to load ANTI-CSRF token for each request\n - Options to use random proxy per request\n\nWWW: https://github.com/CoolerVoid/0d1n", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "zackj901@yandex.com", - "url": null - } - ], - "keywords": [ - "security" - ], - "homepage_url": "https://github.com/CoolerVoid/0d1n", - "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/0d1n-2.3.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/security/0d1n", - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-3.0", - "declared_license": { - "licenses": [ - "GPLv3" +[ + { + "type": "freebsd", + "namespace": null, + "name": "0d1n", + "version": "2.3", + "qualifiers": { + "arch": "freebsd:10:x86:64", + "origin": "security/0d1n" + }, + "subpath": null, + "primary_language": null, + "description": "0d1n is a tool for automating customized attacks against web applications.\nSome of its features:\n\n - Brute force login names and passwords in authentication forms\n - Directory disclosure (brute over PATH list and find HTTP status codes)\n - Tests to find SQL injection and XSS vulnerabilities\n - Options to load ANTI-CSRF token for each request\n - Options to use random proxy per request\n\nWWW: https://github.com/CoolerVoid/0d1n", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "zackj901@yandex.com", + "url": null + } ], - "licenselogic": "single" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/0d1n@2.3?arch=freebsd:10:x86:64&origin=security/0d1n", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file + "keywords": [ + "security" + ], + "homepage_url": "https://github.com/CoolerVoid/0d1n", + "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/0d1n-2.3.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/security/0d1n", + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-3.0", + "declared_license": { + "licenses": [ + "GPLv3" + ], + "licenselogic": "single" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/0d1n@2.3?arch=freebsd:10:x86:64&origin=security/0d1n", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/dual_license/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/dual_license/+COMPACT_MANIFEST.expected index dd071fe7c25..f9ea7624183 100644 --- a/tests/packagedcode/data/freebsd/dual_license/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/dual_license/+COMPACT_MANIFEST.expected @@ -1,56 +1,58 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "rubygem-facets", - "version": "3.1.0", - "qualifiers": { - "arch": "freebsd:10:*", - "origin": "devel/rubygem-facets" - }, - "subpath": null, - "primary_language": null, - "description": "Facets is a large collection of core extension methods and module\nadditions for the Ruby programming language. The core extensions\nare unique by virtue of their atomicity. Methods are stored in their\nown files, allowing for highly granular control of requirements.\nThe modules include a variety of useful classes, mixins and\nmicroframeworks, from the Functor to a full-blown SI Units system.\n\nWWW: http://rubyworks.github.io/facets/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "ruby@FreeBSD.org", - "url": null - } - ], - "keywords": [ - "devel", - "rubygems" - ], - "homepage_url": "http://rubyworks.github.io/facets/", - "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/rubygem-facets-3.1.0.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/devel/rubygem-facets", - "vcs_url": null, - "copyright": null, - "license_expression": "ruby OR gpl-2.0", - "declared_license": { - "licenses": [ - "RUBY", - "GPLv2" +[ + { + "type": "freebsd", + "namespace": null, + "name": "rubygem-facets", + "version": "3.1.0", + "qualifiers": { + "arch": "freebsd:10:*", + "origin": "devel/rubygem-facets" + }, + "subpath": null, + "primary_language": null, + "description": "Facets is a large collection of core extension methods and module\nadditions for the Ruby programming language. The core extensions\nare unique by virtue of their atomicity. Methods are stored in their\nown files, allowing for highly granular control of requirements.\nThe modules include a variety of useful classes, mixins and\nmicroframeworks, from the Functor to a full-blown SI Units system.\n\nWWW: http://rubyworks.github.io/facets/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "ruby@FreeBSD.org", + "url": null + } ], - "licenselogic": "or" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/rubygem-facets@3.1.0?arch=freebsd:10:%2A&origin=devel/rubygem-facets", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file + "keywords": [ + "devel", + "rubygems" + ], + "homepage_url": "http://rubyworks.github.io/facets/", + "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/rubygem-facets-3.1.0.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/devel/rubygem-facets", + "vcs_url": null, + "copyright": null, + "license_expression": "ruby OR gpl-2.0", + "declared_license": { + "licenses": [ + "RUBY", + "GPLv2" + ], + "licenselogic": "or" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/rubygem-facets@3.1.0?arch=freebsd:10:%2A&origin=devel/rubygem-facets", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/dual_license2/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/dual_license2/+COMPACT_MANIFEST.expected index b254b80134a..4b2bcd6a500 100644 --- a/tests/packagedcode/data/freebsd/dual_license2/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/dual_license2/+COMPACT_MANIFEST.expected @@ -1,57 +1,59 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "rubygem-ttfunk", - "version": "1.5.1", - "qualifiers": { - "arch": "freebsd:10:*", - "origin": "print/rubygem-ttfunk" - }, - "subpath": null, - "primary_language": null, - "description": "Font Metrics Parser for Prawn\n\nWWW: https://github.com/prawnpdf/ttfunk", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "ruby@FreeBSD.org", - "url": null - } - ], - "keywords": [ - "print", - "rubygems" - ], - "homepage_url": "https://github.com/prawnpdf/ttfunk", - "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/rubygem-ttfunk-1.5.1.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/print/rubygem-ttfunk", - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-3.0 OR ruby OR gpl-2.0", - "declared_license": { - "licenses": [ - "GPLv3", - "RUBY", - "GPLv2" +[ + { + "type": "freebsd", + "namespace": null, + "name": "rubygem-ttfunk", + "version": "1.5.1", + "qualifiers": { + "arch": "freebsd:10:*", + "origin": "print/rubygem-ttfunk" + }, + "subpath": null, + "primary_language": null, + "description": "Font Metrics Parser for Prawn\n\nWWW: https://github.com/prawnpdf/ttfunk", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "ruby@FreeBSD.org", + "url": null + } ], - "licenselogic": "or" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/rubygem-ttfunk@1.5.1?arch=freebsd:10:%2A&origin=print/rubygem-ttfunk", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file + "keywords": [ + "print", + "rubygems" + ], + "homepage_url": "https://github.com/prawnpdf/ttfunk", + "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/rubygem-ttfunk-1.5.1.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/print/rubygem-ttfunk", + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-3.0 OR ruby OR gpl-2.0", + "declared_license": { + "licenses": [ + "GPLv3", + "RUBY", + "GPLv2" + ], + "licenselogic": "or" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/rubygem-ttfunk@1.5.1?arch=freebsd:10:%2A&origin=print/rubygem-ttfunk", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/invalid/invalid_metafile b/tests/packagedcode/data/freebsd/invalid/invalid_metafile deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/packagedcode/data/freebsd/multi_license/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/multi_license/+COMPACT_MANIFEST.expected index ed529a6c5be..a6c80da653a 100644 --- a/tests/packagedcode/data/freebsd/multi_license/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/multi_license/+COMPACT_MANIFEST.expected @@ -1,56 +1,58 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "py27-idna", - "version": "2.6", - "qualifiers": { - "arch": "freebsd:10:*", - "origin": "dns/py-idna" - }, - "subpath": null, - "primary_language": null, - "description": "A library to support the Internationalised Domain Names in Applications\n(IDNA) protocol as specified in RFC 5891. This version of the protocol\nis often referred to as \"IDNA2008\" and can produce different res\nlts from the earlier standard from 2003.\n\nThe library is also intended to act as a suitable drop-in replacement\nfor the \"encodings.idna\" module that comes with the Python standard\nlibrary but currently only supports the older 2003 specification.\n\nWWW: https://github.com/kjd/idna", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "koobs@FreeBSD.org", - "url": null - } - ], - "keywords": [ - "python", - "dns" - ], - "homepage_url": "https://github.com/kjd/idna", - "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/py27-idna-2.6.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/dns/py-idna", - "vcs_url": null, - "copyright": null, - "license_expression": "python AND bsd-new", - "declared_license": { - "licenses": [ - "PSFL", - "BSD3CLAUSE" +[ + { + "type": "freebsd", + "namespace": null, + "name": "py27-idna", + "version": "2.6", + "qualifiers": { + "arch": "freebsd:10:*", + "origin": "dns/py-idna" + }, + "subpath": null, + "primary_language": null, + "description": "A library to support the Internationalised Domain Names in Applications\n(IDNA) protocol as specified in RFC 5891. This version of the protocol\nis often referred to as \"IDNA2008\" and can produce different res\nlts from the earlier standard from 2003.\n\nThe library is also intended to act as a suitable drop-in replacement\nfor the \"encodings.idna\" module that comes with the Python standard\nlibrary but currently only supports the older 2003 specification.\n\nWWW: https://github.com/kjd/idna", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "koobs@FreeBSD.org", + "url": null + } ], - "licenselogic": "and" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/py27-idna@2.6?arch=freebsd:10:%2A&origin=dns/py-idna", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file + "keywords": [ + "python", + "dns" + ], + "homepage_url": "https://github.com/kjd/idna", + "download_url": "https://pkg.freebsd.org/freebsd:10:*/latest/All/py27-idna-2.6.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/dns/py-idna", + "vcs_url": null, + "copyright": null, + "license_expression": "python AND bsd-new", + "declared_license": { + "licenses": [ + "PSFL", + "BSD3CLAUSE" + ], + "licenselogic": "and" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/py27-idna@2.6?arch=freebsd:10:%2A&origin=dns/py-idna", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/freebsd/no_licenses/+COMPACT_MANIFEST.expected b/tests/packagedcode/data/freebsd/no_licenses/+COMPACT_MANIFEST.expected index f427167b605..76288bb4ee9 100644 --- a/tests/packagedcode/data/freebsd/no_licenses/+COMPACT_MANIFEST.expected +++ b/tests/packagedcode/data/freebsd/no_licenses/+COMPACT_MANIFEST.expected @@ -1,49 +1,51 @@ -{ - "type": "freebsd", - "namespace": null, - "name": "dmidecode", - "version": "2.12", - "qualifiers": { - "arch": "freebsd:10:x86:64", - "origin": "sysutils/dmidecode" - }, - "subpath": null, - "primary_language": null, - "description": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "anders@FreeBSD.org", - "url": null - } - ], - "keywords": [ - "sysutils" - ], - "homepage_url": "http://www.nongnu.org/dmidecode/", - "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/dmidecode-2.12.txz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "https://svnweb.freebsd.org/ports/head/sysutils/dmidecode", - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:freebsd/dmidecode@2.12?arch=freebsd:10:x86:64&origin=sysutils/dmidecode", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "freebsd", + "namespace": null, + "name": "dmidecode", + "version": "2.12", + "qualifiers": { + "arch": "freebsd:10:x86:64", + "origin": "sysutils/dmidecode" + }, + "subpath": null, + "primary_language": null, + "description": "Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table\ncontents in a human-readable format. The output contains a description of the\nsystem's hardware components, as well as other useful pieces of information\nsuch as serial numbers and BIOS revision.\n\nWWW: http://www.nongnu.org/dmidecode/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "anders@FreeBSD.org", + "url": null + } + ], + "keywords": [ + "sysutils" + ], + "homepage_url": "http://www.nongnu.org/dmidecode/", + "download_url": "https://pkg.freebsd.org/freebsd:10:x86:64/latest/All/dmidecode-2.12.txz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "https://svnweb.freebsd.org/ports/head/sysutils/dmidecode", + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:freebsd/dmidecode@2.12?arch=freebsd:10:x86:64&origin=sysutils/dmidecode", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/haxe/basic/haxelib.json.expected b/tests/packagedcode/data/haxe/basic/haxelib.json.expected index 2d7e0db684c..c2b90cf8294 100644 --- a/tests/packagedcode/data/haxe/basic/haxelib.json.expected +++ b/tests/packagedcode/data/haxe/basic/haxelib.json.expected @@ -1,82 +1,84 @@ -{ - "type": "haxe", - "namespace": null, - "name": "haxelib", - "version": "3.4.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Haxe", - "description": "The haxelib client", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "contributor", - "name": "back2dos", - "email": null, - "url": "https://lib.haxe.org/u/back2dos" - }, - { - "type": "person", - "role": "contributor", - "name": "ncannasse", - "email": null, - "url": "https://lib.haxe.org/u/ncannasse" - }, - { - "type": "person", - "role": "contributor", - "name": "jason", - "email": null, - "url": "https://lib.haxe.org/u/jason" - }, - { - "type": "person", - "role": "contributor", - "name": "Simn", - "email": null, - "url": "https://lib.haxe.org/u/Simn" - }, - { - "type": "person", - "role": "contributor", - "name": "nadako", - "email": null, - "url": "https://lib.haxe.org/u/nadako" - }, - { - "type": "person", - "role": "contributor", - "name": "andyli", - "email": null, - "url": "https://lib.haxe.org/u/andyli" - } - ], - "keywords": [ - "haxelib", - "core" - ], - "homepage_url": "https://lib.haxe.org/documentation/", - "download_url": "https://lib.haxe.org/p/haxelib/3.4.0/download/", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-1.0-plus", - "declared_license": "GPL", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:haxe/haxelib@3.4.0", - "repository_homepage_url": "https://lib.haxe.org/p/haxelib", - "repository_download_url": "https://lib.haxe.org/p/haxelib/3.4.0/download/", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "haxe", + "namespace": null, + "name": "haxelib", + "version": "3.4.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Haxe", + "description": "The haxelib client", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "contributor", + "name": "back2dos", + "email": null, + "url": "https://lib.haxe.org/u/back2dos" + }, + { + "type": "person", + "role": "contributor", + "name": "ncannasse", + "email": null, + "url": "https://lib.haxe.org/u/ncannasse" + }, + { + "type": "person", + "role": "contributor", + "name": "jason", + "email": null, + "url": "https://lib.haxe.org/u/jason" + }, + { + "type": "person", + "role": "contributor", + "name": "Simn", + "email": null, + "url": "https://lib.haxe.org/u/Simn" + }, + { + "type": "person", + "role": "contributor", + "name": "nadako", + "email": null, + "url": "https://lib.haxe.org/u/nadako" + }, + { + "type": "person", + "role": "contributor", + "name": "andyli", + "email": null, + "url": "https://lib.haxe.org/u/andyli" + } + ], + "keywords": [ + "haxelib", + "core" + ], + "homepage_url": "https://lib.haxe.org/documentation/", + "download_url": "https://lib.haxe.org/p/haxelib/3.4.0/download/", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-1.0-plus", + "declared_license": "GPL", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:haxe/haxelib@3.4.0", + "repository_homepage_url": "https://lib.haxe.org/p/haxelib", + "repository_download_url": "https://lib.haxe.org/p/haxelib/3.4.0/download/", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/haxe/basic2/haxelib.json.expected b/tests/packagedcode/data/haxe/basic2/haxelib.json.expected index 540d3ea7e53..986da2d6c9f 100644 --- a/tests/packagedcode/data/haxe/basic2/haxelib.json.expected +++ b/tests/packagedcode/data/haxe/basic2/haxelib.json.expected @@ -1,49 +1,51 @@ -{ - "type": "haxe", - "namespace": null, - "name": "hxsocketio", - "version": "0.1.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Haxe", - "description": "Externs for socket.io", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "contributor", - "name": "gogoprog", - "email": null, - "url": "https://lib.haxe.org/u/gogoprog" - } - ], - "keywords": [ - "js", - "node", - "socketio", - "socket.io" - ], - "homepage_url": "https://github.com/gogoprog/hxsocketio/", - "download_url": "https://lib.haxe.org/p/hxsocketio/0.1.0/download/", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:haxe/hxsocketio@0.1.0", - "repository_homepage_url": "https://lib.haxe.org/p/hxsocketio", - "repository_download_url": "https://lib.haxe.org/p/hxsocketio/0.1.0/download/", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "haxe", + "namespace": null, + "name": "hxsocketio", + "version": "0.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Haxe", + "description": "Externs for socket.io", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "contributor", + "name": "gogoprog", + "email": null, + "url": "https://lib.haxe.org/u/gogoprog" + } + ], + "keywords": [ + "js", + "node", + "socketio", + "socket.io" + ], + "homepage_url": "https://github.com/gogoprog/hxsocketio/", + "download_url": "https://lib.haxe.org/p/hxsocketio/0.1.0/download/", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:haxe/hxsocketio@0.1.0", + "repository_homepage_url": "https://lib.haxe.org/p/hxsocketio", + "repository_download_url": "https://lib.haxe.org/p/hxsocketio/0.1.0/download/", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/haxe/deps/haxelib.json.expected b/tests/packagedcode/data/haxe/deps/haxelib.json.expected index f310b5b8902..c2cace03511 100644 --- a/tests/packagedcode/data/haxe/deps/haxelib.json.expected +++ b/tests/packagedcode/data/haxe/deps/haxelib.json.expected @@ -1,74 +1,76 @@ -{ - "type": "haxe", - "namespace": null, - "name": "selecthxml", - "version": "0.5.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Haxe", - "description": "Allows type-safe CSS-style selection on Xml objects.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "contributor", - "name": "simn", - "email": null, - "url": "https://lib.haxe.org/u/simn" - }, - { - "type": "person", - "role": "contributor", - "name": "jason", - "email": null, - "url": "https://lib.haxe.org/u/jason" - } - ], - "keywords": [ - "cross", - "xml", - "utility", - "css", - "macro" - ], - "homepage_url": "https://github.com/jasononeil/selecthxml", - "download_url": "https://lib.haxe.org/p/selecthxml/0.5.1/download/", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "BSD", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:haxe/tink_core", - "requirement": null, - "scope": null, - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:haxe/tink_macro@3.23", - "requirement": null, - "scope": null, - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:haxe/selecthxml@0.5.1", - "repository_homepage_url": "https://lib.haxe.org/p/selecthxml", - "repository_download_url": "https://lib.haxe.org/p/selecthxml/0.5.1/download/", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "haxe", + "namespace": null, + "name": "selecthxml", + "version": "0.5.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Haxe", + "description": "Allows type-safe CSS-style selection on Xml objects.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "contributor", + "name": "simn", + "email": null, + "url": "https://lib.haxe.org/u/simn" + }, + { + "type": "person", + "role": "contributor", + "name": "jason", + "email": null, + "url": "https://lib.haxe.org/u/jason" + } + ], + "keywords": [ + "cross", + "xml", + "utility", + "css", + "macro" + ], + "homepage_url": "https://github.com/jasononeil/selecthxml", + "download_url": "https://lib.haxe.org/p/selecthxml/0.5.1/download/", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "BSD", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:haxe/tink_core", + "requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:haxe/tink_macro@3.23", + "requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:haxe/selecthxml@0.5.1", + "repository_homepage_url": "https://lib.haxe.org/p/selecthxml", + "repository_download_url": "https://lib.haxe.org/p/selecthxml/0.5.1/download/", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/haxe/tags/haxelib.json.expected b/tests/packagedcode/data/haxe/tags/haxelib.json.expected index 6c60619edb4..89aaedd3e60 100644 --- a/tests/packagedcode/data/haxe/tags/haxelib.json.expected +++ b/tests/packagedcode/data/haxe/tags/haxelib.json.expected @@ -1,54 +1,56 @@ -{ - "type": "haxe", - "namespace": null, - "name": "tink_core", - "version": "1.18.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Haxe", - "description": "Tinkerbell Core", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "contributor", - "name": "back2dos", - "email": null, - "url": "https://lib.haxe.org/u/back2dos" - } - ], - "keywords": [ - "tink", - "cross", - "utility", - "reactive", - "functional", - "async", - "lazy", - "signal", - "event" - ], - "homepage_url": "http://haxetink.org/tink_core", - "download_url": "https://lib.haxe.org/p/tink_core/1.18.0/download/", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:haxe/tink_core@1.18.0", - "repository_homepage_url": "https://lib.haxe.org/p/tink_core", - "repository_download_url": "https://lib.haxe.org/p/tink_core/1.18.0/download/", - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "haxe", + "namespace": null, + "name": "tink_core", + "version": "1.18.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Haxe", + "description": "Tinkerbell Core", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "contributor", + "name": "back2dos", + "email": null, + "url": "https://lib.haxe.org/u/back2dos" + } + ], + "keywords": [ + "tink", + "cross", + "utility", + "reactive", + "functional", + "async", + "lazy", + "signal", + "event" + ], + "homepage_url": "http://haxetink.org/tink_core", + "download_url": "https://lib.haxe.org/p/tink_core/1.18.0/download/", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:haxe/tink_core@1.18.0", + "repository_homepage_url": "https://lib.haxe.org/p/tink_core", + "repository_download_url": "https://lib.haxe.org/p/tink_core/1.18.0/download/", + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected b/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected index 74eeb22f65e..33691812d11 100644 --- a/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/Castle.Core.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "Castle.Core", - "version": "4.2.1", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Castle Core, including DynamicProxy, Logging Abstractions and DictionaryAdapter", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Castle Project Contributors", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "Castle Project Contributors", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://www.castleproject.org/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "git+https://github.com/castleproject/Core", - "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", - "license_expression": "apache-2.0", - "declared_license": "http://www.apache.org/licenses/LICENSE-2.0.html", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/Castle.Core@4.2.1", - "repository_homepage_url": "https://www.nuget.org/packages/Castle.Core/4.2.1", - "repository_download_url": "https://www.nuget.org/api/v2/package/Castle.Core/4.2.1", - "api_data_url": "https://api.nuget.org/v3/registration3/castle.core/4.2.1.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "Castle.Core", + "version": "4.2.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Castle Core, including DynamicProxy, Logging Abstractions and DictionaryAdapter", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Castle Project Contributors", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "Castle Project Contributors", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://www.castleproject.org/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "git+https://github.com/castleproject/Core", + "copyright": "Copyright (c) 2004-2017 Castle Project - http://www.castleproject.org/", + "license_expression": "apache-2.0", + "declared_license": "http://www.apache.org/licenses/LICENSE-2.0.html", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/Castle.Core@4.2.1", + "repository_homepage_url": "https://www.nuget.org/packages/Castle.Core/4.2.1", + "repository_download_url": "https://www.nuget.org/api/v2/package/Castle.Core/4.2.1", + "api_data_url": "https://api.nuget.org/v3/registration3/castle.core/4.2.1.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/EntityFramework.nuspec.json.expected b/tests/packagedcode/data/nuget/EntityFramework.nuspec.json.expected index 8c1cb38b5ae..f2120f5b45f 100644 --- a/tests/packagedcode/data/nuget/EntityFramework.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/EntityFramework.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "EntityFramework", - "version": "6.1.3", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Entity Framework is Microsoft's recommended data access technology for new applications.", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Microsoft", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "Microsoft", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://go.microsoft.com/fwlink/?LinkID=320540", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "ms-net-library", - "declared_license": "http://go.microsoft.com/fwlink/?LinkID=320539", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/EntityFramework@6.1.3", - "repository_homepage_url": "https://www.nuget.org/packages/EntityFramework/6.1.3", - "repository_download_url": "https://www.nuget.org/api/v2/package/EntityFramework/6.1.3", - "api_data_url": "https://api.nuget.org/v3/registration3/entityframework/6.1.3.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "EntityFramework", + "version": "6.1.3", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Entity Framework is Microsoft's recommended data access technology for new applications.", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Microsoft", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "Microsoft", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://go.microsoft.com/fwlink/?LinkID=320540", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "ms-net-library", + "declared_license": "http://go.microsoft.com/fwlink/?LinkID=320539", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/EntityFramework@6.1.3", + "repository_homepage_url": "https://www.nuget.org/packages/EntityFramework/6.1.3", + "repository_download_url": "https://www.nuget.org/api/v2/package/EntityFramework/6.1.3", + "api_data_url": "https://api.nuget.org/v3/registration3/entityframework/6.1.3.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/Microsoft.AspNet.Mvc.nuspec.json.expected b/tests/packagedcode/data/nuget/Microsoft.AspNet.Mvc.nuspec.json.expected index f5ce8536bfa..2b2c36d1918 100644 --- a/tests/packagedcode/data/nuget/Microsoft.AspNet.Mvc.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/Microsoft.AspNet.Mvc.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "Microsoft.AspNet.Mvc", - "version": "6.0.0-beta7", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "ASP.NET MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and Web APIs. ASP.NET MVC enables a clean separation of concerns and gives you full control over markup.", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Microsoft", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "Microsoft", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://www.asp.net/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Copyright \u00a9 Microsoft Corporation", - "license_expression": "ms-net-library", - "declared_license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/Microsoft.AspNet.Mvc@6.0.0-beta7", - "repository_homepage_url": "https://www.nuget.org/packages/Microsoft.AspNet.Mvc/6.0.0-beta7", - "repository_download_url": "https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/6.0.0-beta7", - "api_data_url": "https://api.nuget.org/v3/registration3/microsoft.aspnet.mvc/6.0.0-beta7.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "Microsoft.AspNet.Mvc", + "version": "6.0.0-beta7", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "ASP.NET MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and Web APIs. ASP.NET MVC enables a clean separation of concerns and gives you full control over markup.", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Microsoft", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "Microsoft", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://www.asp.net/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Copyright \u00a9 Microsoft Corporation", + "license_expression": "ms-net-library", + "declared_license": "http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/Microsoft.AspNet.Mvc@6.0.0-beta7", + "repository_homepage_url": "https://www.nuget.org/packages/Microsoft.AspNet.Mvc/6.0.0-beta7", + "repository_download_url": "https://www.nuget.org/api/v2/package/Microsoft.AspNet.Mvc/6.0.0-beta7", + "api_data_url": "https://api.nuget.org/v3/registration3/microsoft.aspnet.mvc/6.0.0-beta7.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/Microsoft.Net.Http.nuspec.json.expected b/tests/packagedcode/data/nuget/Microsoft.Net.Http.nuspec.json.expected index 409b3e0d9ca..0c559069e5f 100644 --- a/tests/packagedcode/data/nuget/Microsoft.Net.Http.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/Microsoft.Net.Http.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "Microsoft.Net.Http", - "version": "2.2.29", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Microsoft HTTP Client Libraries\nThis package provides a programming interface for modern HTTP/REST based applications.\nThis package includes HttpClient for sending requests over HTTP, as well as HttpRequestMessage and HttpResponseMessage for processing HTTP messages.\n\nThis package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5, Windows 8, or Windows Phone 8.1 when consuming a library that uses this package.\n\nSupported Platforms:\n- .NET Framework 4\n- Windows 8\n- Windows Phone 8.1\n- Windows Phone Silverlight 7.5\n- Silverlight 4\n- Portable Class Libraries", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Microsoft", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "Microsoft", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://go.microsoft.com/fwlink/?LinkID=280055", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Copyright \u00a9 Microsoft Corporation", - "license_expression": "ms-net-library-2018-11", - "declared_license": "http://go.microsoft.com/fwlink/?LinkId=329770", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/Microsoft.Net.Http@2.2.29", - "repository_homepage_url": "https://www.nuget.org/packages/Microsoft.Net.Http/2.2.29", - "repository_download_url": "https://www.nuget.org/api/v2/package/Microsoft.Net.Http/2.2.29", - "api_data_url": "https://api.nuget.org/v3/registration3/microsoft.net.http/2.2.29.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "Microsoft.Net.Http", + "version": "2.2.29", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Microsoft HTTP Client Libraries\nThis package provides a programming interface for modern HTTP/REST based applications.\nThis package includes HttpClient for sending requests over HTTP, as well as HttpRequestMessage and HttpResponseMessage for processing HTTP messages.\n\nThis package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5, Windows 8, or Windows Phone 8.1 when consuming a library that uses this package.\n\nSupported Platforms:\n- .NET Framework 4\n- Windows 8\n- Windows Phone 8.1\n- Windows Phone Silverlight 7.5\n- Silverlight 4\n- Portable Class Libraries", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Microsoft", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "Microsoft", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://go.microsoft.com/fwlink/?LinkID=280055", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Copyright \u00a9 Microsoft Corporation", + "license_expression": "ms-net-library-2018-11", + "declared_license": "http://go.microsoft.com/fwlink/?LinkId=329770", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/Microsoft.Net.Http@2.2.29", + "repository_homepage_url": "https://www.nuget.org/packages/Microsoft.Net.Http/2.2.29", + "repository_download_url": "https://www.nuget.org/api/v2/package/Microsoft.Net.Http/2.2.29", + "api_data_url": "https://api.nuget.org/v3/registration3/microsoft.net.http/2.2.29.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/bootstrap.nuspec.json.expected b/tests/packagedcode/data/nuget/bootstrap.nuspec.json.expected index f140fbcd50f..a87cfe9334b 100644 --- a/tests/packagedcode/data/nuget/bootstrap.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/bootstrap.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "bootstrap", - "version": "4.0.0-alpha", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Bootstrap CSS\nBootstrap framework in CSS. Includes fonts and JavaScript\nThe most popular front-end framework for developing responsive, mobile first projects on the web.", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "Twitter, Inc.", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "bootstrap", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://getbootstrap.com", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Copyright 2015", - "license_expression": "mit", - "declared_license": "https://github.com/twbs/bootstrap/blob/master/LICENSE", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/bootstrap@4.0.0-alpha", - "repository_homepage_url": "https://www.nuget.org/packages/bootstrap/4.0.0-alpha", - "repository_download_url": "https://www.nuget.org/api/v2/package/bootstrap/4.0.0-alpha", - "api_data_url": "https://api.nuget.org/v3/registration3/bootstrap/4.0.0-alpha.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "bootstrap", + "version": "4.0.0-alpha", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Bootstrap CSS\nBootstrap framework in CSS. Includes fonts and JavaScript\nThe most popular front-end framework for developing responsive, mobile first projects on the web.", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "Twitter, Inc.", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "bootstrap", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://getbootstrap.com", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Copyright 2015", + "license_expression": "mit", + "declared_license": "https://github.com/twbs/bootstrap/blob/master/LICENSE", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/bootstrap@4.0.0-alpha", + "repository_homepage_url": "https://www.nuget.org/packages/bootstrap/4.0.0-alpha", + "repository_download_url": "https://www.nuget.org/api/v2/package/bootstrap/4.0.0-alpha", + "api_data_url": "https://api.nuget.org/v3/registration3/bootstrap/4.0.0-alpha.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/nuget/jQuery.UI.Combined.nuspec.json.expected b/tests/packagedcode/data/nuget/jQuery.UI.Combined.nuspec.json.expected index 6096bde1e33..fa06b1e0758 100644 --- a/tests/packagedcode/data/nuget/jQuery.UI.Combined.nuspec.json.expected +++ b/tests/packagedcode/data/nuget/jQuery.UI.Combined.nuspec.json.expected @@ -1,51 +1,53 @@ -{ - "type": "nuget", - "namespace": null, - "name": "jQuery.UI.Combined", - "version": "1.11.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "jQuery UI (Combined Library)\nThe full jQuery UI library as a single combined file. Includes the base theme.\njQuery UI is an open source library of interface components \u2014 interactions, full-featured widgets, and animation effects \u2014 based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code.\n NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at http://nugetpackages.codeplex.com/", - "release_date": null, - "parties": [ - { - "type": null, - "role": "author", - "name": "jQuery UI Team", - "email": null, - "url": null - }, - { - "type": null, - "role": "owner", - "name": "jQuery UI Team", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://jqueryui.com/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "http://jquery.org/license", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:nuget/jQuery.UI.Combined@1.11.4", - "repository_homepage_url": "https://www.nuget.org/packages/jQuery.UI.Combined/1.11.4", - "repository_download_url": "https://www.nuget.org/api/v2/package/jQuery.UI.Combined/1.11.4", - "api_data_url": "https://api.nuget.org/v3/registration3/jquery.ui.combined/1.11.4.json" -} \ No newline at end of file +[ + { + "type": "nuget", + "namespace": null, + "name": "jQuery.UI.Combined", + "version": "1.11.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "jQuery UI (Combined Library)\nThe full jQuery UI library as a single combined file. Includes the base theme.\njQuery UI is an open source library of interface components \u2014 interactions, full-featured widgets, and animation effects \u2014 based on the stellar jQuery javascript library . Each component is built according to jQuery's event-driven architecture (find something, manipulate it) and is themeable, making it easy for developers of any skill level to integrate and extend into their own code.\n NOTE: This package is maintained on behalf of the library owners by the NuGet Community Packages project at http://nugetpackages.codeplex.com/", + "release_date": null, + "parties": [ + { + "type": null, + "role": "author", + "name": "jQuery UI Team", + "email": null, + "url": null + }, + { + "type": null, + "role": "owner", + "name": "jQuery UI Team", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://jqueryui.com/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "http://jquery.org/license", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:nuget/jQuery.UI.Combined@1.11.4", + "repository_homepage_url": "https://www.nuget.org/packages/jQuery.UI.Combined/1.11.4", + "repository_download_url": "https://www.nuget.org/api/v2/package/jQuery.UI.Combined/1.11.4", + "api_data_url": "https://api.nuget.org/v3/registration3/jquery.ui.combined/1.11.4.json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample1/output.opam.expected b/tests/packagedcode/data/opam/sample1/output.opam.expected index 97633b601ec..1255edc5423 100644 --- a/tests/packagedcode/data/opam/sample1/output.opam.expected +++ b/tests/packagedcode/data/opam/sample1/output.opam.expected @@ -1,202 +1,204 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "The MirageOS library operating system\nMirageOS is a library operating system that constructs unikernels for secure, high-performance network applications across a variety of cloud computing and mobile platforms. Code can be developed on a normal OS such as Linux or MacOS X, and then compiled into a fully-standalone, specialised unikernel that runs under the Xen hypervisor. Since Xen powers most public cloud computing infrastructure such as Amazon EC2 or Rackspace, this lets your servers run more cheaply, securely and with finer control than with a full software stack.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Thomas Gazagnaire", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Anil Madhavapeddy", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Gabriel Radanne", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Mindy Preston", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Thomas Leonard", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Nicolas Ojeda Bar", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Dave Scott", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "David Kaloper", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Hannes Mehnert", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Richard Mortier", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "anil@recoil.org", - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "thomas@gazagnaire.org", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/mirage/mirage", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/mirage/mirage/issues/", - "code_view_url": null, - "vcs_url": "git+https://github.com/mirage/mirage.git", - "copyright": null, - "license_expression": "isc", - "declared_license": "ISC", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": ">= 4.06.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/dune", - "requirement": ">= 2.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ipaddr", - "requirement": ">= 3.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/functoria", - "requirement": ">= 3.0.2", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/bos", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/astring", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/logs", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/stdlib-shims", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/mirage-runtime", - "requirement": ">= 3.7.0 & <= version", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/alcotest", - "requirement": "with-test", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "The MirageOS library operating system\nMirageOS is a library operating system that constructs unikernels for secure, high-performance network applications across a variety of cloud computing and mobile platforms. Code can be developed on a normal OS such as Linux or MacOS X, and then compiled into a fully-standalone, specialised unikernel that runs under the Xen hypervisor. Since Xen powers most public cloud computing infrastructure such as Amazon EC2 or Rackspace, this lets your servers run more cheaply, securely and with finer control than with a full software stack.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Thomas Gazagnaire", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Anil Madhavapeddy", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Gabriel Radanne", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Mindy Preston", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Thomas Leonard", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Nicolas Ojeda Bar", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Dave Scott", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "David Kaloper", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Hannes Mehnert", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Richard Mortier", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "anil@recoil.org", + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "thomas@gazagnaire.org", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/mirage/mirage", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/mirage/mirage/issues/", + "code_view_url": null, + "vcs_url": "git+https://github.com/mirage/mirage.git", + "copyright": null, + "license_expression": "isc", + "declared_license": "ISC", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": ">= 4.06.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/dune", + "requirement": ">= 2.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ipaddr", + "requirement": ">= 3.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/functoria", + "requirement": ">= 3.0.2", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/bos", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/astring", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/logs", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/stdlib-shims", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/mirage-runtime", + "requirement": ">= 3.7.0 & <= version", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/alcotest", + "requirement": "with-test", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample2/output.opam.expected b/tests/packagedcode/data/opam/sample2/output.opam.expected index 3c2d3043111..d0a4516102e 100644 --- a/tests/packagedcode/data/opam/sample2/output.opam.expected +++ b/tests/packagedcode/data/opam/sample2/output.opam.expected @@ -1,100 +1,102 @@ -{ - "type": "opam", - "namespace": null, - "name": "js_of_ocaml", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Compiler from OCaml bytecode to Javascript\nJs_of_ocaml is a compiler from OCaml bytecode to JavaScript. It makes it possible to run pure OCaml programs in JavaScript environment like browsers and Node.js", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ocsigen team", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "dev@ocsigen.org", - "url": null - } - ], - "keywords": [], - "homepage_url": "http://ocsigen.github.io/js_of_ocaml", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/ocsigen/js_of_ocaml/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/ocsigen/js_of_ocaml.git", - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": ">= 4.02.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/dune", - "requirement": ">= 1.11.1", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocaml-migrate-parsetree", - "requirement": ">= 1.4", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ppx_tools_versioned", - "requirement": ">= 5.2.3", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/uchar", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/js_of_ocaml-compiler", - "requirement": "= version", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:opam/js_of_ocaml", - "repository_homepage_url": "https://opam.ocaml.org/packages/js_of_ocaml", - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": "js_of_ocaml", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Compiler from OCaml bytecode to Javascript\nJs_of_ocaml is a compiler from OCaml bytecode to JavaScript. It makes it possible to run pure OCaml programs in JavaScript environment like browsers and Node.js", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Ocsigen team", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "dev@ocsigen.org", + "url": null + } + ], + "keywords": [], + "homepage_url": "http://ocsigen.github.io/js_of_ocaml", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/ocsigen/js_of_ocaml/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/ocsigen/js_of_ocaml.git", + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": ">= 4.02.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/dune", + "requirement": ">= 1.11.1", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocaml-migrate-parsetree", + "requirement": ">= 1.4", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ppx_tools_versioned", + "requirement": ">= 5.2.3", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/uchar", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/js_of_ocaml-compiler", + "requirement": "= version", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:opam/js_of_ocaml", + "repository_homepage_url": "https://opam.ocaml.org/packages/js_of_ocaml", + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample3/output.opam.expected b/tests/packagedcode/data/opam/sample3/output.opam.expected index 4581799aadf..ec9cfae4ed7 100644 --- a/tests/packagedcode/data/opam/sample3/output.opam.expected +++ b/tests/packagedcode/data/opam/sample3/output.opam.expected @@ -1,90 +1,92 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Interactive theorem prover based on lambda-tree syntax", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Andrew Gacek", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Yuting Wang", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Kaustuv Chaudhuri", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "kaustuv@chaudhuri.info", - "url": null - } - ], - "keywords": [], - "homepage_url": "http://abella-prover.org", - "download_url": "https://codeload.github.com/abella-prover/abella/tar.gz/v2.0.2", - "size": null, - "sha1": null, - "md5": "d7d94e62e9c0a0dbeeded9fa0104e18f", - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-3.0", - "declared_license": "GPL-3.0-only", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": ">= 4.01.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlfind", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlbuild", - "requirement": "build", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Interactive theorem prover based on lambda-tree syntax", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Andrew Gacek", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Yuting Wang", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Kaustuv Chaudhuri", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "kaustuv@chaudhuri.info", + "url": null + } + ], + "keywords": [], + "homepage_url": "http://abella-prover.org", + "download_url": "https://codeload.github.com/abella-prover/abella/tar.gz/v2.0.2", + "size": null, + "sha1": null, + "md5": "d7d94e62e9c0a0dbeeded9fa0104e18f", + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-3.0", + "declared_license": "GPL-3.0-only", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": ">= 4.01.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlfind", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlbuild", + "requirement": "build", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample4/output.opam.expected b/tests/packagedcode/data/opam/sample4/output.opam.expected index a31d55b28a6..19ad99d5ba1 100644 --- a/tests/packagedcode/data/opam/sample4/output.opam.expected +++ b/tests/packagedcode/data/opam/sample4/output.opam.expected @@ -1,91 +1,93 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Basic control of ANSI compliant terminals and the windows shell.\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Christophe Troestler", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Vincent Hugot", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Christophe.Troestler@umons.ac.be", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/Chris00/ANSITerminal", - "download_url": "https://download.ocamlcore.org/ansiterminal/ansiterminal/0.6.2/ANSITerminal-0.6.2.tar.gz", - "size": null, - "sha1": null, - "md5": "b7a7b7cce64eabf224d05ed9f2b9d471", - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", - "copyright": null, - "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", - "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": "< 4.05.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/base-unix", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlbuild", - "requirement": "build", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlfind", - "requirement": "build", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Basic control of ANSI compliant terminals and the windows shell.\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Christophe Troestler", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Vincent Hugot", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "Christophe.Troestler@umons.ac.be", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/Chris00/ANSITerminal", + "download_url": "https://download.ocamlcore.org/ansiterminal/ansiterminal/0.6.2/ANSITerminal-0.6.2.tar.gz", + "size": null, + "sha1": null, + "md5": "b7a7b7cce64eabf224d05ed9f2b9d471", + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", + "copyright": null, + "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", + "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": "< 4.05.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/base-unix", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlbuild", + "requirement": "build", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlfind", + "requirement": "build", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample5/output.opam.expected b/tests/packagedcode/data/opam/sample5/output.opam.expected index 60de56123a1..7e8ad848b00 100644 --- a/tests/packagedcode/data/opam/sample5/output.opam.expected +++ b/tests/packagedcode/data/opam/sample5/output.opam.expected @@ -1,92 +1,94 @@ -{ - "type": "opam", - "namespace": null, - "name": "bap-elf", - "version": "1.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "BAP ELF parser and loader written in native OCaml", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "BAP Team", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Ivan Gotovchits ", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/BinaryAnalysisPlatform/bap/", - "download_url": "https://github.com/BinaryAnalysisPlatform/bap/archive/v1.0.0.tar.gz", - "size": null, - "sha1": null, - "md5": "07dce66dd871e448652d8885283c6631", - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/BinaryAnalysisPlatform/bap/issues", - "code_view_url": null, - "vcs_url": "git://github.com/BinaryAnalysisPlatform/bap/", - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/bap-std", - "requirement": "= 1.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/bap-dwarf", - "requirement": "= 1.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/camlp4", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/bitstring", - "requirement": "< 3.0.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:opam/bap-elf@1.0.0", - "repository_homepage_url": "https://opam.ocaml.org/packages/bap-elf", - "repository_download_url": null, - "api_data_url": "https://github.com/ocaml/opam-repository/blob/master/packages/bap-elf/bap-elf.1.0.0/opam" -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": "bap-elf", + "version": "1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "BAP ELF parser and loader written in native OCaml", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "BAP Team", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "Ivan Gotovchits ", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/BinaryAnalysisPlatform/bap/", + "download_url": "https://github.com/BinaryAnalysisPlatform/bap/archive/v1.0.0.tar.gz", + "size": null, + "sha1": null, + "md5": "07dce66dd871e448652d8885283c6631", + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/BinaryAnalysisPlatform/bap/issues", + "code_view_url": null, + "vcs_url": "git://github.com/BinaryAnalysisPlatform/bap/", + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/bap-std", + "requirement": "= 1.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/bap-dwarf", + "requirement": "= 1.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/camlp4", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/bitstring", + "requirement": "< 3.0.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:opam/bap-elf@1.0.0", + "repository_homepage_url": "https://opam.ocaml.org/packages/bap-elf", + "repository_download_url": null, + "api_data_url": "https://github.com/ocaml/opam-repository/blob/master/packages/bap-elf/bap-elf.1.0.0/opam" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample6/output.opam.expected b/tests/packagedcode/data/opam/sample6/output.opam.expected index c8621f8aef9..09be13bd330 100644 --- a/tests/packagedcode/data/opam/sample6/output.opam.expected +++ b/tests/packagedcode/data/opam/sample6/output.opam.expected @@ -1,60 +1,62 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Library to make OCaml program act as a Windows service", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Romain Beauxis \"] license: \"GPL-2.0\" homepage: \"https://github.com/savonet/ocaml-winsvc\" bug-reports: \"https://github.com/savonet/ocaml-winsvc/issues\" depends: [ \"dune\" {> \"2.0\"}", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "The Savonet Team ", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/savonet/ocaml-winsvc", - "download_url": "https://github.com/savonet/ocaml-winsvc/archive/v1.0.0.tar.gz", - "size": null, - "sha1": null, - "md5": "86d48dc11dd66adac6daadbecb5f6888", - "sha256": null, - "sha512": "30e208d35ed7eb30e90d5fd4f0dde3ff4f527155df90e2d9cffadec15513b65b72503fc223bd784203f2b9081f68bedd5a2b157ffb0b2d9b765546dac1094875", - "bug_tracking_url": "https://github.com/savonet/ocaml-winsvc/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/savonet/ocaml-winsvc.git", - "copyright": null, - "license_expression": "gpl-2.0", - "declared_license": "GPL-2.0", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/dune", - "requirement": "> 2.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Library to make OCaml program act as a Windows service", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Romain Beauxis \"] license: \"GPL-2.0\" homepage: \"https://github.com/savonet/ocaml-winsvc\" bug-reports: \"https://github.com/savonet/ocaml-winsvc/issues\" depends: [ \"dune\" {> \"2.0\"}", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "The Savonet Team ", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/savonet/ocaml-winsvc", + "download_url": "https://github.com/savonet/ocaml-winsvc/archive/v1.0.0.tar.gz", + "size": null, + "sha1": null, + "md5": "86d48dc11dd66adac6daadbecb5f6888", + "sha256": null, + "sha512": "30e208d35ed7eb30e90d5fd4f0dde3ff4f527155df90e2d9cffadec15513b65b72503fc223bd784203f2b9081f68bedd5a2b157ffb0b2d9b765546dac1094875", + "bug_tracking_url": "https://github.com/savonet/ocaml-winsvc/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/savonet/ocaml-winsvc.git", + "copyright": null, + "license_expression": "gpl-2.0", + "declared_license": "GPL-2.0", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/dune", + "requirement": "> 2.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample7/output.opam.expected b/tests/packagedcode/data/opam/sample7/output.opam.expected index 1dc86bf2912..da13bae6bec 100644 --- a/tests/packagedcode/data/opam/sample7/output.opam.expected +++ b/tests/packagedcode/data/opam/sample7/output.opam.expected @@ -1,91 +1,93 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Basic control of ANSI compliant terminals and the windows shell\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Christophe Troestler", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Vincent Hugot", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Christophe Troestler ", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/Chris00/ANSITerminal", - "download_url": "https://github.com/Chris00/ANSITerminal/releases/download/0.8/ANSITerminal-0.8.tbz", - "size": null, - "sha1": null, - "md5": "b3fc33f17823e85c86a4d9cf4498c40e", - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", - "copyright": null, - "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", - "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/jbuilder", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/base-bytes", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/base-unix", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Basic control of ANSI compliant terminals and the windows shell\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Christophe Troestler", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Vincent Hugot", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "Christophe Troestler ", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/Chris00/ANSITerminal", + "download_url": "https://github.com/Chris00/ANSITerminal/releases/download/0.8/ANSITerminal-0.8.tbz", + "size": null, + "sha1": null, + "md5": "b3fc33f17823e85c86a4d9cf4498c40e", + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", + "copyright": null, + "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", + "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/jbuilder", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/base-bytes", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/base-unix", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/opam/sample8/output.opam.expected b/tests/packagedcode/data/opam/sample8/output.opam.expected index a31d55b28a6..19ad99d5ba1 100644 --- a/tests/packagedcode/data/opam/sample8/output.opam.expected +++ b/tests/packagedcode/data/opam/sample8/output.opam.expected @@ -1,91 +1,93 @@ -{ - "type": "opam", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Ocaml", - "description": "Basic control of ANSI compliant terminals and the windows shell.\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Christophe Troestler", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Vincent Hugot", - "email": null, - "url": null - }, - { - "type": "person", - "role": "maintainer", - "name": null, - "email": "Christophe.Troestler@umons.ac.be", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/Chris00/ANSITerminal", - "download_url": "https://download.ocamlcore.org/ansiterminal/ansiterminal/0.6.2/ANSITerminal-0.6.2.tar.gz", - "size": null, - "sha1": null, - "md5": "b7a7b7cce64eabf224d05ed9f2b9d471", - "sha256": null, - "sha512": null, - "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", - "code_view_url": null, - "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", - "copyright": null, - "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", - "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:opam/ocaml", - "requirement": "< 4.05.0", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/base-unix", - "requirement": "", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlbuild", - "requirement": "build", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:opam/ocamlfind", - "requirement": "build", - "scope": "dependency", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "opam", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Ocaml", + "description": "Basic control of ANSI compliant terminals and the windows shell.\nANSITerminal is a module allowing to use the colors and cursor movements on ANSI terminals. It also works on the windows shell (but this part is currently work in progress).", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Christophe Troestler", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Vincent Hugot", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": null, + "email": "Christophe.Troestler@umons.ac.be", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/Chris00/ANSITerminal", + "download_url": "https://download.ocamlcore.org/ansiterminal/ansiterminal/0.6.2/ANSITerminal-0.6.2.tar.gz", + "size": null, + "sha1": null, + "md5": "b7a7b7cce64eabf224d05ed9f2b9d471", + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/Chris00/ANSITerminal/issues", + "code_view_url": null, + "vcs_url": "git+https://github.com/Chris00/ANSITerminal.git", + "copyright": null, + "license_expression": "lgpl-3.0 WITH ocaml-lgpl-linking-exception", + "declared_license": "LGPL-3.0-only with OCaml-LGPL-linking-exception", + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:opam/ocaml", + "requirement": "< 4.05.0", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/base-unix", + "requirement": "", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlbuild", + "requirement": "build", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:opam/ocamlfind", + "requirement": "build", + "scope": "dependency", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/plugin/help.txt b/tests/packagedcode/data/plugin/help.txt index 56596240262..aeba1ea4c1c 100644 --- a/tests/packagedcode/data/plugin/help.txt +++ b/tests/packagedcode/data/plugin/help.txt @@ -1,12 +1,13 @@ -------------------------------------------- Package: METADATA.bzl class: packagedcode.build:MetadataBzl - metafiles: METADATA.bzl + file_patterns: METADATA.bzl -------------------------------------------- Package: about - class: packagedcode.about:AboutPackage - metafiles: *.ABOUT + class: packagedcode.about:Aboutfile + file_patterns: *.ABOUT + extensions: .ABOUT -------------------------------------------- Package: android @@ -23,29 +24,30 @@ Package: android-lib -------------------------------------------- Package: autotools class: packagedcode.build:AutotoolsPackage - metafiles: configure, configure.ac + file_patterns: configure, configure.ac -------------------------------------------- Package: axis2 class: packagedcode.models:Axis2Mar - metafiles: META-INF/module.xml + file_patterns: META-INF/module.xml extensions: .mar filetypes: java archive , zip archive -------------------------------------------- Package: bazel class: packagedcode.build:BazelPackage - metafiles: BUILD + file_patterns: BUILD -------------------------------------------- Package: bower - class: packagedcode.bower:BowerPackage - metafiles: bower.json, .bower.json + class: packagedcode.bower:BowerJson + file_patterns: bower.json, .bower.json + extensions: .json -------------------------------------------- Package: buck class: packagedcode.build:BuckPackage - metafiles: BUCK + file_patterns: BUCK -------------------------------------------- Package: cab @@ -55,13 +57,28 @@ Package: cab -------------------------------------------- Package: cargo - class: packagedcode.cargo:RustCargoCrate - metafiles: Cargo.toml, Cargo.lock + class: packagedcode.cargo:CargoToml + file_patterns: Cargo.toml + extensions: .toml + +-------------------------------------------- +Package: cargo + class: packagedcode.cargo:CargoLock + file_patterns: Cargo.lock + extensions: .lock -------------------------------------------- Package: chef - class: packagedcode.chef:ChefPackage - metafiles: metadata.json, metadata.rb + class: packagedcode.chef:MetadataJson + file_patterns: metadata.json + extensions: .json + filetypes: .tgz + +-------------------------------------------- +Package: chef + class: packagedcode.chef:Metadatarb + file_patterns: metadata.rb + extensions: .rb filetypes: .tgz -------------------------------------------- @@ -72,25 +89,32 @@ Package: chrome -------------------------------------------- Package: composer - class: packagedcode.phpcomposer:PHPComposerPackage - metafiles: composer.json, composer.lock - extensions: .json, .lock + class: packagedcode.phpcomposer:ComposerJson + file_patterns: composer.json + extensions: .json + +-------------------------------------------- +Package: composer + class: packagedcode.phpcomposer:ComposerLock + file_patterns: composer.lock + extensions: .lock -------------------------------------------- Package: conda - class: packagedcode.conda:CondaPackage - metafiles: meta.yaml, META.yml + class: packagedcode.conda:Condayml + file_patterns: meta.yaml, META.yml + extensions: .yml, .yaml -------------------------------------------- Package: cpan class: packagedcode.models:CpanModule - metafiles: *.pod, *.pm, MANIFEST, Makefile.PL, META.yml, META.json, *.meta, dist.ini + file_patterns: *.pod, *.pm, MANIFEST, Makefile.PL, META.yml, META.json, *.meta, dist.ini extensions: .tar.gz -------------------------------------------- Package: deb class: packagedcode.debian:DebianPackage - metafiles: *.control + file_patterns: *.control extensions: .deb filetypes: debian binary package @@ -103,31 +127,60 @@ Package: dmg -------------------------------------------- Package: ear class: packagedcode.models:JavaEar - metafiles: META-INF/application.xml, META-INF/ejb-jar.xml + file_patterns: META-INF/application.xml, META-INF/ejb-jar.xml extensions: .ear filetypes: java archive , zip archive -------------------------------------------- Package: freebsd - class: packagedcode.freebsd:FreeBSDPackage - metafiles: +COMPACT_MANIFEST + class: packagedcode.freebsd:CompactManifest + file_patterns: +COMPACT_MANIFEST -------------------------------------------- Package: gem - class: packagedcode.rubygems:RubyGem - metafiles: metadata.gz-extract, *.gemspec, Gemfile, Gemfile.lock + class: packagedcode.rubygems:GemArchive + file_patterns: *.gem extensions: .gem filetypes: .tar, tar archive +-------------------------------------------- +Package: gem + class: packagedcode.rubygems:GemArchiveExtracted + file_patterns: metadata.gz-extract + extensions: .gz-extract + filetypes: .tar, tar archive + +-------------------------------------------- +Package: gem + class: packagedcode.rubygems:GemSpec + file_patterns: *.gemspec + extensions: .gemspec + filetypes: .tar, tar archive + +-------------------------------------------- +Package: gem + class: packagedcode.rubygems:GemfileLock + file_patterns: Gemfile.lock + extensions: .lock + filetypes: .tar, tar archive + +-------------------------------------------- +Package: golang + class: packagedcode.golang:GoMod + file_patterns: go.mod + extensions: .mod + -------------------------------------------- Package: golang - class: packagedcode.golang:GolangPackage - metafiles: go.mod, go.sum + class: packagedcode.golang:GoSum + file_patterns: go.sum + extensions: .sum -------------------------------------------- Package: haxe - class: packagedcode.haxe:HaxePackage - metafiles: haxelib.json + class: packagedcode.haxe:HaxelibJson + file_patterns: haxelib.json + extensions: .json -------------------------------------------- Package: installshield @@ -149,35 +202,41 @@ Package: iso -------------------------------------------- Package: ivy - class: packagedcode.models:IvyJar - metafiles: ivy.xml - extensions: .jar + class: packagedcode.jar_manifest:IvyJar + file_patterns: ivy.xml filetypes: java archive , zip archive -------------------------------------------- Package: jar class: packagedcode.models:JavaJar - metafiles: META-INF/MANIFEST.MF + file_patterns: META-INF/MANIFEST.MF extensions: .jar filetypes: java archive , zip archive +-------------------------------------------- +Package: jar + class: packagedcode.jar_manifest:JavaManifest + file_patterns: META-INF/MANIFEST.MF + extensions: .jar, .war, .ear + filetypes: java archive , zip archive + -------------------------------------------- Package: jboss class: packagedcode.models:JBossSar - metafiles: META-INF/jboss-service.xml + file_patterns: META-INF/jboss-service.xml extensions: .sar filetypes: java archive , zip archive -------------------------------------------- Package: maven class: packagedcode.maven:MavenPomPackage - metafiles: *.pom, pom.xml + file_patterns: *.pom, pom.xml extensions: .pom -------------------------------------------- Package: meteor class: packagedcode.models:MeteorPackage - metafiles: package.js + file_patterns: package.js -------------------------------------------- Package: mozilla @@ -193,8 +252,20 @@ Package: msi -------------------------------------------- Package: npm - class: packagedcode.npm:NpmPackage - metafiles: package.json, npm-shrinkwrap.json, package-lock.json, yarn.lock + class: packagedcode.npm:PackageJson + file_patterns: package.json + extensions: .tgz + +-------------------------------------------- +Package: npm + class: packagedcode.npm:PackageLockJson + file_patterns: npm-shrinkwrap.json, package-lock.json + extensions: .tgz + +-------------------------------------------- +Package: npm + class: packagedcode.npm:YarnLockJson + file_patterns: yarn.lock extensions: .tgz -------------------------------------------- @@ -205,44 +276,95 @@ Package: nsis -------------------------------------------- Package: nuget - class: packagedcode.nuget:NugetPackage - metafiles: [Content_Types].xml, *.nuspec - extensions: .nupkg + class: packagedcode.nuget:Nuspec + file_patterns: *.nuspec + extensions: .nuspec filetypes: zip archive, microsoft ooxml -------------------------------------------- Package: opam - class: packagedcode.opam:OpamPackage - metafiles: *opam + class: packagedcode.opam:OpamFile + file_patterns: *opam extensions: .opam -------------------------------------------- Package: pods - class: packagedcode.cocoapods:CocoapodsPackage - metafiles: *.podspec, *podfile.lock, *.podspec.json - extensions: .podspec, .lock + class: packagedcode.cocoapods:Podspec + file_patterns: *.podspec + extensions: .podspec + +-------------------------------------------- +Package: pods + class: packagedcode.cocoapods:PodfileLock + file_patterns: *podfile.lock + extensions: .lock + +-------------------------------------------- +Package: pods + class: packagedcode.cocoapods:PodspecJson + file_patterns: *.podspec.json + extensions: .json + +-------------------------------------------- +Package: pubspec + class: packagedcode.pubspec:PubspecYaml + file_patterns: pubspec.yaml + extensions: .yaml -------------------------------------------- Package: pubspec - class: packagedcode.pubspec:PubspecPackage - metafiles: pubspec.yaml, pubspec.lock - extensions: .yaml, .lock + class: packagedcode.pubspec:PubspecLock + file_patterns: pubspec.lock + extensions: .lock + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:MetadataFile + file_patterns: PKG-INFO, METADATA + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:BinaryDistArchive + file_patterns: *.whl, *.egg + extensions: .whl, .egg + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:SourceDistArchive + file_patterns: *.tar.gz, *.tar.bz2, *.zip + extensions: .tar.gz, .tar.bz2, .zip + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:SetupPy + file_patterns: setup.py + extensions: .py + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:DependencyFile + file_patterns: Pipfile, conda.yml, setup.cfg, tox.ini + +-------------------------------------------- +Package: pypi + class: packagedcode.pypi:PipfileLock + file_patterns: Pipfile.lock + extensions: .lock -------------------------------------------- Package: pypi - class: packagedcode.pypi:PythonPackage - metafiles: *setup.py, *setup.cfg, PKG-INFO, METADATA, *.whl, *.egg, *requirements*.txt, *requirements*.pip, *requirements*.in, *Pipfile.lock, conda.yml, *setup.cfg, tox.ini - extensions: .egg, .whl, .pyz, .pex + class: packagedcode.pypi:RequirementsFile + file_patterns: *requirements*.txt, *requirements*.pip, *requirements*.in, requires.txt -------------------------------------------- Package: readme - class: packagedcode.readme:ReadmePackage - metafiles: README.android, README.chromium, README.facebook, README.google, README.thirdparty + class: packagedcode.readme:ReadmeManifest + file_patterns: README.android, README.chromium, README.facebook, README.google, README.thirdparty -------------------------------------------- Package: rpm - class: packagedcode.rpm:RpmPackage - metafiles: *.spec + class: packagedcode.rpm:RpmManifest + file_patterns: *.spec extensions: .rpm, .srpm, .mvl, .vip filetypes: rpm @@ -260,19 +382,19 @@ Package: squashfs -------------------------------------------- Package: war class: packagedcode.models:JavaWar - metafiles: WEB-INF/web.xml + file_patterns: WEB-INF/web.xml extensions: .war filetypes: java archive , zip archive -------------------------------------------- Package: windows-update - class: packagedcode.windows:MicrosoftUpdateManifestPackage + class: packagedcode.windows:MicrosoftUpdateManifest extensions: .mum filetypes: xml 1.0 document -------------------------------------------- Package: winexe - class: packagedcode.win_pe:WindowsExecutable + class: packagedcode.win_pe:WindowsExecutableManifest extensions: .exe, .dll, .mui, .mun, .com, .winmd, .sys, .tlb, .exe_*, .dll_*, .mui_*, .mun_*, .com_*, .winmd_*, .sys_*, .tlb_* filetypes: pe32, for ms windows diff --git a/tests/packagedcode/data/plugin/pubspec-lock-expected.json b/tests/packagedcode/data/plugin/pubspec-lock-expected.json index e8c28009241..d4c785fc4da 100644 --- a/tests/packagedcode/data/plugin/pubspec-lock-expected.json +++ b/tests/packagedcode/data/plugin/pubspec-lock-expected.json @@ -10,7 +10,7 @@ "--strip-root": true }, "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.", - "output_format_version": "1.0.0", + "output_format_version": "2.0.0", "message": null, "errors": [], "extra_data": { @@ -19,12 +19,1000 @@ } } ], - "packages": [], + "packages": [ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", + "requirement": "22.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/analyzer@1.7.1", + "requirement": "1.7.1", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/args@2.1.1", + "requirement": "2.1.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/async@2.7.0", + "requirement": "2.7.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/boolean_selector@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/charcode@1.3.1", + "requirement": "1.3.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cli_util@0.3.2", + "requirement": "0.3.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/collection@1.15.0", + "requirement": "1.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/convert@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/coverage@1.0.3", + "requirement": "1.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/crypto@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/csslib@0.17.0", + "requirement": "0.17.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/dartdoc@1.0.0", + "requirement": "1.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/file@6.1.2", + "requirement": "6.1.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/frontend_server_client@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/glob@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/html@0.15.0", + "requirement": "0.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http@0.13.3", + "requirement": "0.13.3", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_multi_server@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_parser@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/io@1.0.2", + "requirement": "1.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/js@0.6.3", + "requirement": "0.6.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/json_annotation@4.0.1", + "requirement": "4.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/logging@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/markdown@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/matcher@0.12.10", + "requirement": "0.12.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta@1.3.0", + "requirement": "1.3.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/mime@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/node_preamble@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/package_config@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path@1.8.0", + "requirement": "1.8.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pedantic@1.11.1", + "requirement": "1.11.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pool@1.5.0", + "requirement": "1.5.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_dartdoc_data@0.0.0", + "requirement": "0.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_semver@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf@1.1.4", + "requirement": "1.1.4", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_packages_handler@3.0.0", + "requirement": "3.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_static@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_web_socket@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_map_stack_trace@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_maps@0.10.10", + "requirement": "0.10.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_span@1.8.1", + "requirement": "1.8.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stack_trace@1.10.0", + "requirement": "1.10.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/string_scanner@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/tar@0.4.0", + "requirement": "0.4.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/term_glyph@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test@1.17.9", + "requirement": "1.17.9", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_api@0.4.1", + "requirement": "0.4.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_core@0.3.29", + "requirement": "0.3.29", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/typed_data@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/vm_service@7.1.0", + "requirement": "7.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/watcher@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/web_socket_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/webkit_inspection_protocol@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/yaml@3.1.0", + "requirement": "3.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } + ], "files": [ { "path": "dart-pubspec.lock", "type": "file", - "package_manifests": [], + "package_manifests": [ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", + "requirement": "22.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/analyzer@1.7.1", + "requirement": "1.7.1", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/args@2.1.1", + "requirement": "2.1.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/async@2.7.0", + "requirement": "2.7.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/boolean_selector@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/charcode@1.3.1", + "requirement": "1.3.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cli_util@0.3.2", + "requirement": "0.3.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/collection@1.15.0", + "requirement": "1.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/convert@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/coverage@1.0.3", + "requirement": "1.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/crypto@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/csslib@0.17.0", + "requirement": "0.17.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/dartdoc@1.0.0", + "requirement": "1.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/file@6.1.2", + "requirement": "6.1.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/frontend_server_client@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/glob@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/html@0.15.0", + "requirement": "0.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http@0.13.3", + "requirement": "0.13.3", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_multi_server@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_parser@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/io@1.0.2", + "requirement": "1.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/js@0.6.3", + "requirement": "0.6.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/json_annotation@4.0.1", + "requirement": "4.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/logging@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/markdown@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/matcher@0.12.10", + "requirement": "0.12.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta@1.3.0", + "requirement": "1.3.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/mime@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/node_preamble@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/package_config@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path@1.8.0", + "requirement": "1.8.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pedantic@1.11.1", + "requirement": "1.11.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pool@1.5.0", + "requirement": "1.5.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_dartdoc_data@0.0.0", + "requirement": "0.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_semver@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf@1.1.4", + "requirement": "1.1.4", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_packages_handler@3.0.0", + "requirement": "3.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_static@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_web_socket@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_map_stack_trace@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_maps@0.10.10", + "requirement": "0.10.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_span@1.8.1", + "requirement": "1.8.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stack_trace@1.10.0", + "requirement": "1.10.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/string_scanner@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/tar@0.4.0", + "requirement": "0.4.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/term_glyph@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test@1.17.9", + "requirement": "1.17.9", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_api@0.4.1", + "requirement": "0.4.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_core@0.3.29", + "requirement": "0.3.29", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/typed_data@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/vm_service@7.1.0", + "requirement": "7.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/watcher@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/web_socket_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/webkit_inspection_protocol@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/yaml@3.1.0", + "requirement": "3.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } + ], "scan_errors": [] } ] diff --git a/tests/packagedcode/data/pubspec/locks/dart-pubspec.lock-expected.json b/tests/packagedcode/data/pubspec/locks/dart-pubspec.lock-expected.json index b11d9f5d81b..58e7fc39661 100644 --- a/tests/packagedcode/data/pubspec/locks/dart-pubspec.lock-expected.json +++ b/tests/packagedcode/data/pubspec/locks/dart-pubspec.lock-expected.json @@ -1,493 +1,495 @@ -{ - "type": "pubspec", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/dart", - "requirement": ">=2.12.0 <3.0.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", - "requirement": "22.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/analyzer@1.7.1", - "requirement": "1.7.1", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/args@2.1.1", - "requirement": "2.1.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/async@2.7.0", - "requirement": "2.7.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/boolean_selector@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/charcode@1.3.1", - "requirement": "1.3.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/cli_util@0.3.2", - "requirement": "0.3.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/collection@1.15.0", - "requirement": "1.15.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/convert@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/coverage@1.0.3", - "requirement": "1.0.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/crypto@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/csslib@0.17.0", - "requirement": "0.17.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/dartdoc@1.0.0", - "requirement": "1.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/file@6.1.2", - "requirement": "6.1.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/frontend_server_client@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/glob@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/html@0.15.0", - "requirement": "0.15.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http@0.13.3", - "requirement": "0.13.3", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http_multi_server@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http_parser@4.0.0", - "requirement": "4.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/io@1.0.2", - "requirement": "1.0.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/js@0.6.3", - "requirement": "0.6.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/json_annotation@4.0.1", - "requirement": "4.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/logging@1.0.1", - "requirement": "1.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/markdown@4.0.0", - "requirement": "4.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/matcher@0.12.10", - "requirement": "0.12.10", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/meta@1.3.0", - "requirement": "1.3.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/mime@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/node_preamble@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/package_config@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/path@1.8.0", - "requirement": "1.8.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pedantic@1.11.1", - "requirement": "1.11.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pool@1.5.0", - "requirement": "1.5.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pub_dartdoc_data@0.0.0", - "requirement": "0.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pub_semver@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf@1.1.4", - "requirement": "1.1.4", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf_packages_handler@3.0.0", - "requirement": "3.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf_static@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf_web_socket@1.0.1", - "requirement": "1.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_map_stack_trace@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_maps@0.10.10", - "requirement": "0.10.10", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_span@1.8.1", - "requirement": "1.8.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stack_trace@1.10.0", - "requirement": "1.10.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stream_channel@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/string_scanner@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/tar@0.4.0", - "requirement": "0.4.0", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/term_glyph@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/test@1.17.9", - "requirement": "1.17.9", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/test_api@0.4.1", - "requirement": "0.4.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/test_core@0.3.29", - "requirement": "0.3.29", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/typed_data@1.3.0", - "requirement": "1.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/vm_service@7.1.0", - "requirement": "7.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/watcher@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/web_socket_channel@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/webkit_inspection_protocol@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/yaml@3.1.0", - "requirement": "3.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": "https://pub.dev/packages/None/versions/None", - "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", - "api_data_url": "https://pub.dev/api/packages/None/versions/None" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", + "requirement": "22.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/analyzer@1.7.1", + "requirement": "1.7.1", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/args@2.1.1", + "requirement": "2.1.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/async@2.7.0", + "requirement": "2.7.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/boolean_selector@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/charcode@1.3.1", + "requirement": "1.3.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cli_util@0.3.2", + "requirement": "0.3.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/collection@1.15.0", + "requirement": "1.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/convert@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/coverage@1.0.3", + "requirement": "1.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/crypto@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/csslib@0.17.0", + "requirement": "0.17.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/dartdoc@1.0.0", + "requirement": "1.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/file@6.1.2", + "requirement": "6.1.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/frontend_server_client@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/glob@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/html@0.15.0", + "requirement": "0.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http@0.13.3", + "requirement": "0.13.3", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_multi_server@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_parser@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/io@1.0.2", + "requirement": "1.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/js@0.6.3", + "requirement": "0.6.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/json_annotation@4.0.1", + "requirement": "4.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/logging@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/markdown@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/matcher@0.12.10", + "requirement": "0.12.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta@1.3.0", + "requirement": "1.3.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/mime@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/node_preamble@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/package_config@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path@1.8.0", + "requirement": "1.8.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pedantic@1.11.1", + "requirement": "1.11.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pool@1.5.0", + "requirement": "1.5.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_dartdoc_data@0.0.0", + "requirement": "0.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_semver@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf@1.1.4", + "requirement": "1.1.4", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_packages_handler@3.0.0", + "requirement": "3.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_static@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_web_socket@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_map_stack_trace@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_maps@0.10.10", + "requirement": "0.10.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_span@1.8.1", + "requirement": "1.8.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stack_trace@1.10.0", + "requirement": "1.10.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/string_scanner@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/tar@0.4.0", + "requirement": "0.4.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/term_glyph@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test@1.17.9", + "requirement": "1.17.9", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_api@0.4.1", + "requirement": "0.4.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_core@0.3.29", + "requirement": "0.3.29", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/typed_data@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/vm_service@7.1.0", + "requirement": "7.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/watcher@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/web_socket_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/webkit_inspection_protocol@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/yaml@3.1.0", + "requirement": "3.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/locks/stock-pubspec.lock-expected.json b/tests/packagedcode/data/pubspec/locks/stock-pubspec.lock-expected.json index 2db590a08b3..16e8f34f96b 100644 --- a/tests/packagedcode/data/pubspec/locks/stock-pubspec.lock-expected.json +++ b/tests/packagedcode/data/pubspec/locks/stock-pubspec.lock-expected.json @@ -1,381 +1,383 @@ -{ - "type": "pubspec", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/dart", - "requirement": ">=2.12.0 <3.0.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/flutter", - "requirement": ">=1.24.0-7.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/async@2.6.1", - "requirement": "2.6.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/boolean_selector@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/characters@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/charcode@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/clock@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/collection@1.15.0", - "requirement": "1.15.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/cupertino_icons@1.0.3", - "requirement": "1.0.3", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/equatable@2.0.3", - "requirement": "2.0.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/fake_async@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_auth@2.0.0", - "requirement": "2.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_auth_platform_interface@5.0.0", - "requirement": "5.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_auth_web@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_core@1.3.0", - "requirement": "1.3.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_core_platform_interface@4.0.1", - "requirement": "4.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_core_web@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/fl_chart@0.36.2", - "requirement": "0.36.2", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter@0.0.0", - "requirement": "0.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter_svg@0.22.0", - "requirement": "0.22.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter_test@0.0.0", - "requirement": "0.0.0", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter_web_plugins@0.0.0", - "requirement": "0.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http_parser@4.0.0", - "requirement": "4.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/intl@0.17.0", - "requirement": "0.17.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/js@0.6.3", - "requirement": "0.6.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/matcher@0.12.10", - "requirement": "0.12.10", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/meta@1.3.0", - "requirement": "1.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/path@1.8.0", - "requirement": "1.8.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/path_drawing@0.5.1", - "requirement": "0.5.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/path_parsing@0.2.1", - "requirement": "0.2.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pedantic@1.11.1", - "requirement": "1.11.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/petitparser@4.1.0", - "requirement": "4.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/plugin_platform_interface@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/sky_engine@0.0.99", - "requirement": "0.0.99", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_span@1.8.1", - "requirement": "1.8.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stack_trace@1.10.0", - "requirement": "1.10.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stream_channel@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/string_scanner@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/term_glyph@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/test_api@0.3.0", - "requirement": "0.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/typed_data@1.3.0", - "requirement": "1.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/vector_math@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/xml@5.1.2", - "requirement": "5.1.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": "https://pub.dev/packages/None/versions/None", - "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", - "api_data_url": "https://pub.dev/api/packages/None/versions/None" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/flutter", + "requirement": ">=1.24.0-7.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/async@2.6.1", + "requirement": "2.6.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/boolean_selector@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/characters@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/charcode@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/clock@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/collection@1.15.0", + "requirement": "1.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cupertino_icons@1.0.3", + "requirement": "1.0.3", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/equatable@2.0.3", + "requirement": "2.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/fake_async@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_auth@2.0.0", + "requirement": "2.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_auth_platform_interface@5.0.0", + "requirement": "5.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_auth_web@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_core@1.3.0", + "requirement": "1.3.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_core_platform_interface@4.0.1", + "requirement": "4.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_core_web@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/fl_chart@0.36.2", + "requirement": "0.36.2", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter@0.0.0", + "requirement": "0.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter_svg@0.22.0", + "requirement": "0.22.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter_test@0.0.0", + "requirement": "0.0.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter_web_plugins@0.0.0", + "requirement": "0.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_parser@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/intl@0.17.0", + "requirement": "0.17.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/js@0.6.3", + "requirement": "0.6.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/matcher@0.12.10", + "requirement": "0.12.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path@1.8.0", + "requirement": "1.8.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path_drawing@0.5.1", + "requirement": "0.5.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path_parsing@0.2.1", + "requirement": "0.2.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pedantic@1.11.1", + "requirement": "1.11.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/petitparser@4.1.0", + "requirement": "4.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/plugin_platform_interface@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/sky_engine@0.0.99", + "requirement": "0.0.99", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_span@1.8.1", + "requirement": "1.8.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stack_trace@1.10.0", + "requirement": "1.10.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/string_scanner@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/term_glyph@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_api@0.3.0", + "requirement": "0.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/typed_data@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/vector_math@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/xml@5.1.2", + "requirement": "5.1.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/locks/weather-pubspec.lock-expected.json b/tests/packagedcode/data/pubspec/locks/weather-pubspec.lock-expected.json index 712879d5eb8..1ddcf9f2410 100644 --- a/tests/packagedcode/data/pubspec/locks/weather-pubspec.lock-expected.json +++ b/tests/packagedcode/data/pubspec/locks/weather-pubspec.lock-expected.json @@ -1,597 +1,599 @@ -{ - "type": "pubspec", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/dart", - "requirement": ">=2.12.0 <3.0.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", - "requirement": "22.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/analyzer@1.7.1", - "requirement": "1.7.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/args@2.1.1", - "requirement": "2.1.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/async@2.6.1", - "requirement": "2.6.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/boolean_selector@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build@2.0.2", - "requirement": "2.0.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build_config@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build_daemon@3.0.0", - "requirement": "3.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build_resolvers@2.0.3", - "requirement": "2.0.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build_runner@2.0.5", - "requirement": "2.0.5", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/build_runner_core@7.0.0", - "requirement": "7.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/built_collection@5.1.0", - "requirement": "5.1.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/built_value@8.1.0", - "requirement": "8.1.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/built_value_generator@8.1.0", - "requirement": "8.1.0", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/characters@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/charcode@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/checked_yaml@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/cli_util@0.3.2", - "requirement": "0.3.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/clock@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/code_builder@4.0.0", - "requirement": "4.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/collection@1.15.0", - "requirement": "1.15.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/convert@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/crypto@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/cupertino_icons@1.0.3", - "requirement": "1.0.3", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/dart_style@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/fake_async@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/file@6.1.2", - "requirement": "6.1.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/fixnum@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter@0.0.0", - "requirement": "0.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter_redux@0.8.2", - "requirement": "0.8.2", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/flutter_test@0.0.0", - "requirement": "0.0.0", - "scope": "direct dev", - "is_runtime": false, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/frontend_server_client@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/glob@2.0.1", - "requirement": "2.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/graphs@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http@0.13.3", - "requirement": "0.13.3", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http_multi_server@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/http_parser@4.0.0", - "requirement": "4.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/io@1.0.2", - "requirement": "1.0.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/js@0.6.3", - "requirement": "0.6.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/json_annotation@4.0.1", - "requirement": "4.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/logging@1.0.1", - "requirement": "1.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/matcher@0.12.10", - "requirement": "0.12.10", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/meta@1.3.0", - "requirement": "1.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/mime@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/package_config@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/path@1.8.0", - "requirement": "1.8.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pedantic@1.11.1", - "requirement": "1.11.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pool@1.5.0", - "requirement": "1.5.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pub_semver@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/pubspec_parse@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/quiver@3.0.1", - "requirement": "3.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/redux@5.0.0", - "requirement": "5.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf@1.1.4", - "requirement": "1.1.4", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/shelf_web_socket@1.0.1", - "requirement": "1.0.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/sky_engine@0.0.99", - "requirement": "0.0.99", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_gen@1.0.2", - "requirement": "1.0.2", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/source_span@1.8.1", - "requirement": "1.8.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stack_trace@1.10.0", - "requirement": "1.10.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stream_channel@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/stream_transform@2.0.0", - "requirement": "2.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/string_scanner@1.1.0", - "requirement": "1.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/term_glyph@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/test_api@0.3.0", - "requirement": "0.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/timing@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/typed_data@1.3.0", - "requirement": "1.3.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/vector_math@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/watcher@1.0.0", - "requirement": "1.0.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/web_socket_channel@2.1.0", - "requirement": "2.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/yaml@3.1.0", - "requirement": "3.1.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": "https://pub.dev/packages/None/versions/None", - "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", - "api_data_url": "https://pub.dev/api/packages/None/versions/None" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/_fe_analyzer_shared@22.0.0", + "requirement": "22.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/analyzer@1.7.1", + "requirement": "1.7.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/args@2.1.1", + "requirement": "2.1.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/async@2.6.1", + "requirement": "2.6.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/boolean_selector@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build@2.0.2", + "requirement": "2.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build_config@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build_daemon@3.0.0", + "requirement": "3.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build_resolvers@2.0.3", + "requirement": "2.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build_runner@2.0.5", + "requirement": "2.0.5", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/build_runner_core@7.0.0", + "requirement": "7.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/built_collection@5.1.0", + "requirement": "5.1.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/built_value@8.1.0", + "requirement": "8.1.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/built_value_generator@8.1.0", + "requirement": "8.1.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/characters@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/charcode@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/checked_yaml@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cli_util@0.3.2", + "requirement": "0.3.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/clock@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/code_builder@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/collection@1.15.0", + "requirement": "1.15.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/convert@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/crypto@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cupertino_icons@1.0.3", + "requirement": "1.0.3", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/dart_style@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/fake_async@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/file@6.1.2", + "requirement": "6.1.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/fixnum@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter@0.0.0", + "requirement": "0.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter_redux@0.8.2", + "requirement": "0.8.2", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/flutter_test@0.0.0", + "requirement": "0.0.0", + "scope": "direct dev", + "is_runtime": false, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/frontend_server_client@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/glob@2.0.1", + "requirement": "2.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/graphs@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http@0.13.3", + "requirement": "0.13.3", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_multi_server@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/http_parser@4.0.0", + "requirement": "4.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/io@1.0.2", + "requirement": "1.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/js@0.6.3", + "requirement": "0.6.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/json_annotation@4.0.1", + "requirement": "4.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/logging@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/matcher@0.12.10", + "requirement": "0.12.10", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/mime@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/package_config@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/path@1.8.0", + "requirement": "1.8.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pedantic@1.11.1", + "requirement": "1.11.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pool@1.5.0", + "requirement": "1.5.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pub_semver@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/pubspec_parse@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/quiver@3.0.1", + "requirement": "3.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/redux@5.0.0", + "requirement": "5.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf@1.1.4", + "requirement": "1.1.4", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/shelf_web_socket@1.0.1", + "requirement": "1.0.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/sky_engine@0.0.99", + "requirement": "0.0.99", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_gen@1.0.2", + "requirement": "1.0.2", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/source_span@1.8.1", + "requirement": "1.8.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stack_trace@1.10.0", + "requirement": "1.10.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/stream_transform@2.0.0", + "requirement": "2.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/string_scanner@1.1.0", + "requirement": "1.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/term_glyph@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/test_api@0.3.0", + "requirement": "0.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/timing@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/typed_data@1.3.0", + "requirement": "1.3.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/vector_math@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/watcher@1.0.0", + "requirement": "1.0.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/web_socket_channel@2.1.0", + "requirement": "2.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/yaml@3.1.0", + "requirement": "3.1.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/mini-pubspec.lock-expected.json b/tests/packagedcode/data/pubspec/mini-pubspec.lock-expected.json index 2c1b23c1728..3cf68f7d26e 100644 --- a/tests/packagedcode/data/pubspec/mini-pubspec.lock-expected.json +++ b/tests/packagedcode/data/pubspec/mini-pubspec.lock-expected.json @@ -1,93 +1,95 @@ -{ - "type": "pubspec", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/dart", - "requirement": ">=2.12.0 <3.0.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/flutter", - "requirement": ">=1.24.0-7.0", - "scope": "sdk", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/async@2.6.1", - "requirement": "2.6.1", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/cupertino_icons@1.0.3", - "requirement": "1.0.3", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/equatable@2.0.3", - "requirement": "2.0.3", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/fake_async@1.2.0", - "requirement": "1.2.0", - "scope": "transitive", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pubspec/firebase_auth@2.0.0", - "requirement": "2.0.0", - "scope": "direct main", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": "https://pub.dev/packages/None/versions/None", - "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", - "api_data_url": "https://pub.dev/api/packages/None/versions/None" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/dart", + "requirement": ">=2.12.0 <3.0.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/flutter", + "requirement": ">=1.24.0-7.0", + "scope": "sdk", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/async@2.6.1", + "requirement": "2.6.1", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/cupertino_icons@1.0.3", + "requirement": "1.0.3", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/equatable@2.0.3", + "requirement": "2.0.3", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/fake_async@1.2.0", + "requirement": "1.2.0", + "scope": "transitive", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/firebase_auth@2.0.0", + "requirement": "2.0.0", + "scope": "direct main", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": "https://pub.dev/packages/None/versions/None", + "repository_download_url": "https://pub.dartlang.org/packages/None/versions/None.tar.gz", + "api_data_url": "https://pub.dev/api/packages/None/versions/None" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/authors-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/authors-pubspec.yaml-expected.json index a0544230168..b524f6c8ae5 100644 --- a/tests/packagedcode/data/pubspec/specs/authors-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/authors-pubspec.yaml-expected.json @@ -1,76 +1,78 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "openapi", - "version": "1.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": "OpenAPI API client", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "John Does", - "email": null, - "url": null - }, - { - "type": "person", - "role": "author", - "name": "Author ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "homepage", - "download_url": "https://pub.dartlang.org/packages/openapi/versions/1.0.0.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/http", - "requirement": ">=0.12.0 <0.13.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/test", - "requirement": "^1.3.0", - "scope": "dev_dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=2.0.0 <3.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pubspec/openapi@1.0.0", - "repository_homepage_url": "https://pub.dev/packages/openapi/versions/1.0.0", - "repository_download_url": "https://pub.dartlang.org/packages/openapi/versions/1.0.0.tar.gz", - "api_data_url": "https://pub.dev/api/packages/openapi/versions/1.0.0" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": "openapi", + "version": "1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": "OpenAPI API client", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "John Does", + "email": null, + "url": null + }, + { + "type": "person", + "role": "author", + "name": "Author ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "homepage", + "download_url": "https://pub.dartlang.org/packages/openapi/versions/1.0.0.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/http", + "requirement": ">=0.12.0 <0.13.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/test", + "requirement": "^1.3.0", + "scope": "dev_dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=2.0.0 <3.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pubspec/openapi@1.0.0", + "repository_homepage_url": "https://pub.dev/packages/openapi/versions/1.0.0", + "repository_download_url": "https://pub.dartlang.org/packages/openapi/versions/1.0.0.tar.gz", + "api_data_url": "https://pub.dev/api/packages/openapi/versions/1.0.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/deps-versions-dict-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/deps-versions-dict-pubspec.yaml-expected.json index 8344b19567c..973da62112a 100644 --- a/tests/packagedcode/data/pubspec/specs/deps-versions-dict-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/deps-versions-dict-pubspec.yaml-expected.json @@ -1,77 +1,79 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "foobar", - "version": "1.0.0+1", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": "https://pub.dartlang.org/packages/foobar/versions/1.0.0+1.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/flutter", - "requirement": "sdk: flutter", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/rxdart", - "requirement": "^0.18.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/cupertino_icons", - "requirement": "^0.1.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/flutter_test", - "requirement": "sdk: flutter", - "scope": "dev_dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=2.0.0-dev.68.0 <3.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pubspec/foobar@1.0.0%2B1", - "repository_homepage_url": "https://pub.dev/packages/foobar/versions/1.0.0+1", - "repository_download_url": "https://pub.dartlang.org/packages/foobar/versions/1.0.0+1.tar.gz", - "api_data_url": "https://pub.dev/api/packages/foobar/versions/1.0.0+1" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": "foobar", + "version": "1.0.0+1", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://pub.dartlang.org/packages/foobar/versions/1.0.0+1.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/flutter", + "requirement": "sdk: flutter", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/rxdart", + "requirement": "^0.18.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/cupertino_icons", + "requirement": "^0.1.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/flutter_test", + "requirement": "sdk: flutter", + "scope": "dev_dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=2.0.0-dev.68.0 <3.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pubspec/foobar@1.0.0%2B1", + "repository_homepage_url": "https://pub.dev/packages/foobar/versions/1.0.0+1", + "repository_download_url": "https://pub.dartlang.org/packages/foobar/versions/1.0.0+1.tar.gz", + "api_data_url": "https://pub.dev/api/packages/foobar/versions/1.0.0+1" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/many-deps-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/many-deps-pubspec.yaml-expected.json index ce0924df3d0..7e5dab089ad 100644 --- a/tests/packagedcode/data/pubspec/specs/many-deps-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/many-deps-pubspec.yaml-expected.json @@ -1,61 +1,63 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "built_collection", - "version": "5.1.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": "Immutable collections based on the SDK collections. Each SDK collection class is split into a new immutable collection class and a corresponding mutable builder class.\n", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/google/built_collection.dart", - "download_url": "https://pub.dartlang.org/packages/built_collection/versions/5.1.0.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/pedantic", - "requirement": "^1.4.0", - "scope": "dev_dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/test", - "requirement": "^1.16.0-nullsafety", - "scope": "dev_dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=2.12.0-0 <3.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pubspec/built_collection@5.1.0", - "repository_homepage_url": "https://pub.dev/packages/built_collection/versions/5.1.0", - "repository_download_url": "https://pub.dartlang.org/packages/built_collection/versions/5.1.0.tar.gz", - "api_data_url": "https://pub.dev/api/packages/built_collection/versions/5.1.0" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": "built_collection", + "version": "5.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": "Immutable collections based on the SDK collections. Each SDK collection class is split into a new immutable collection class and a corresponding mutable builder class.\n", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/google/built_collection.dart", + "download_url": "https://pub.dartlang.org/packages/built_collection/versions/5.1.0.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/pedantic", + "requirement": "^1.4.0", + "scope": "dev_dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/test", + "requirement": "^1.16.0-nullsafety", + "scope": "dev_dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=2.12.0-0 <3.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pubspec/built_collection@5.1.0", + "repository_homepage_url": "https://pub.dev/packages/built_collection/versions/5.1.0", + "repository_download_url": "https://pub.dartlang.org/packages/built_collection/versions/5.1.0.tar.gz", + "api_data_url": "https://pub.dev/api/packages/built_collection/versions/5.1.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/mini-deps-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/mini-deps-pubspec.yaml-expected.json index 25e2abfedb4..34c0b3e23e2 100644 --- a/tests/packagedcode/data/pubspec/specs/mini-deps-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/mini-deps-pubspec.yaml-expected.json @@ -1,73 +1,75 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "flutter_oss_licenses", - "version": "1.0.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": "A tool for generating detail and better OSS license list using pubspec.lock.", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/espresso3389/flutter_oss_licenses", - "download_url": "https://pub.dartlang.org/packages/flutter_oss_licenses/versions/1.0.1.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/path@1.7.0", - "requirement": "1.7.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true +[ + { + "type": "pubspec", + "namespace": null, + "name": "flutter_oss_licenses", + "version": "1.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": "A tool for generating detail and better OSS license list using pubspec.lock.", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/espresso3389/flutter_oss_licenses", + "download_url": "https://pub.dartlang.org/packages/flutter_oss_licenses/versions/1.0.1.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/path@1.7.0", + "requirement": "1.7.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pubspec/meta", + "requirement": "^1.2.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/yaml", + "requirement": "^3.1.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=2.12.0 <3.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": { + "executables": { + "generate": "" + } }, - { - "purl": "pkg:pubspec/meta", - "requirement": "^1.2.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/yaml", - "requirement": "^3.1.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=2.12.0 <3.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": { - "executables": { - "generate": "" - } - }, - "purl": "pkg:pubspec/flutter_oss_licenses@1.0.1", - "repository_homepage_url": "https://pub.dev/packages/flutter_oss_licenses/versions/1.0.1", - "repository_download_url": "https://pub.dartlang.org/packages/flutter_oss_licenses/versions/1.0.1.tar.gz", - "api_data_url": "https://pub.dev/api/packages/flutter_oss_licenses/versions/1.0.1" -} \ No newline at end of file + "purl": "pkg:pubspec/flutter_oss_licenses@1.0.1", + "repository_homepage_url": "https://pub.dev/packages/flutter_oss_licenses/versions/1.0.1", + "repository_download_url": "https://pub.dartlang.org/packages/flutter_oss_licenses/versions/1.0.1.tar.gz", + "api_data_url": "https://pub.dev/api/packages/flutter_oss_licenses/versions/1.0.1" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/publish-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/publish-pubspec.yaml-expected.json index e3ebc31633c..20e9f4de57b 100644 --- a/tests/packagedcode/data/pubspec/specs/publish-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/publish-pubspec.yaml-expected.json @@ -1,90 +1,92 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "mock_name", - "version": "1.1.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": "mock description", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Mock Author ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/Workiva/mock_name", - "download_url": "https://pub.dartlang.org/packages/mock_name/versions/1.1.0.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/yaml", - "requirement": "^2.1.12", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pubspec", + "namespace": null, + "name": "mock_name", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": "mock description", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Mock Author ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/Workiva/mock_name", + "download_url": "https://pub.dartlang.org/packages/mock_name/versions/1.1.0.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/yaml", + "requirement": "^2.1.12", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/args", + "requirement": ">=0.13.0 <2.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/resource", + "requirement": "^2.1.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/mockito", + "requirement": "^0.11.0", + "scope": "dev_dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=1.23.0 <2.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": { + "executables": { + "abide": "" + }, + "publish_to": "https://pub.workiva.org" }, - { - "purl": "pkg:pubspec/args", - "requirement": ">=0.13.0 <2.0.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/resource", - "requirement": "^2.1.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/mockito", - "requirement": "^0.11.0", - "scope": "dev_dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=1.23.0 <2.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": { - "executables": { - "abide": "" - }, - "publish_to": "https://pub.workiva.org" - }, - "purl": "pkg:pubspec/mock_name@1.1.0", - "repository_homepage_url": "https://pub.dev/packages/mock_name/versions/1.1.0", - "repository_download_url": "https://pub.dartlang.org/packages/mock_name/versions/1.1.0.tar.gz", - "api_data_url": "https://pub.dev/api/packages/mock_name/versions/1.1.0" -} \ No newline at end of file + "purl": "pkg:pubspec/mock_name@1.1.0", + "repository_homepage_url": "https://pub.dev/packages/mock_name/versions/1.1.0", + "repository_download_url": "https://pub.dartlang.org/packages/mock_name/versions/1.1.0.tar.gz", + "api_data_url": "https://pub.dev/api/packages/mock_name/versions/1.1.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json b/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json index 3f135a30fa2..36803994bb9 100644 --- a/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json +++ b/tests/packagedcode/data/pubspec/specs/simple-pubspec.yaml-expected.json @@ -1,61 +1,63 @@ -{ - "type": "pubspec", - "namespace": null, - "name": "painter", - "version": "2.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "dart", - "description": "A simple widget to paint with your fingers. Supports setting a background color, undo and export to png!", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": "https://pub.dartlang.org/packages/painter/versions/2.0.0.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/EPNW/painter", - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pubspec/flutter", - "requirement": "sdk: flutter", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/sdk", - "requirement": ">=2.12.0 <3.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pubspec/flutter", - "requirement": ">=2.0.0", - "scope": "environment", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pubspec/painter@2.0.0", - "repository_homepage_url": "https://pub.dev/packages/painter/versions/2.0.0", - "repository_download_url": "https://pub.dartlang.org/packages/painter/versions/2.0.0.tar.gz", - "api_data_url": "https://pub.dev/api/packages/painter/versions/2.0.0" -} \ No newline at end of file +[ + { + "type": "pubspec", + "namespace": null, + "name": "painter", + "version": "2.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "dart", + "description": "A simple widget to paint with your fingers. Supports setting a background color, undo and export to png!", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://pub.dartlang.org/packages/painter/versions/2.0.0.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/EPNW/painter", + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pubspec/flutter", + "requirement": "sdk: flutter", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/sdk", + "requirement": ">=2.12.0 <3.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pubspec/flutter", + "requirement": ">=2.0.0", + "scope": "environment", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pubspec/painter@2.0.0", + "repository_homepage_url": "https://pub.dev/packages/painter/versions/2.0.0", + "repository_download_url": "https://pub.dartlang.org/packages/painter/versions/2.0.0.tar.gz", + "api_data_url": "https://pub.dev/api/packages/painter/versions/2.0.0" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json b/tests/packagedcode/data/pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json index be6c5f434ab..d808442e598 100644 --- a/tests/packagedcode/data/pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json +++ b/tests/packagedcode/data/pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "atomicwrites", - "version": "1.2.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "===================\npython-atomicwrites\n===================\nAtomic file writes.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Markus Unterwaditzer", - "email": "markus@unterwaditzer.net", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: Implementation :: CPython" - ], - "homepage_url": "https://github.com/untitaker/python-atomicwrites", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/atomicwrites@1.2.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/a/atomicwrites/atomicwrites-1.2.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/atomicwrites/1.2.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "atomicwrites", + "version": "1.2.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "===================\npython-atomicwrites\n===================\nAtomic file writes.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Markus Unterwaditzer", + "email": "markus@unterwaditzer.net", + "url": null + } + ], + "keywords": [ + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: Implementation :: CPython" + ], + "homepage_url": "https://github.com/untitaker/python-atomicwrites", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/atomicwrites@1.2.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/a/atomicwrites/atomicwrites-1.2.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/atomicwrites/1.2.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/archive/commoncode-21.5.12-py3.9.egg-expected.json b/tests/packagedcode/data/pypi/archive/commoncode-21.5.12-py3.9.egg-expected.json index a146dda6f72..72c676d97e4 100644 --- a/tests/packagedcode/data/pypi/archive/commoncode-21.5.12-py3.9.egg-expected.json +++ b/tests/packagedcode/data/pypi/archive/commoncode-21.5.12-py3.9.egg-expected.json @@ -1,160 +1,162 @@ -{ - "type": "pypi", - "namespace": null, - "name": "commoncode", - "version": "21.5.12", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Set of common utilities, originally split from ScanCode\nCommonCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/commoncode\n- keywords: utilities, scancode-toolkit, commoncode\n\nCommoncode provides a set of common functions and utilities for handling various things like paths,\ndates, files and hashes. It started as library in scancode-toolkit.\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\n\nTo install this package use::\n\n pip install commoncode\n\n\n\nAlternatively, to set up a development environment::\n\n source configure --dev\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "nexB. Inc. and others", - "email": "info@aboutcode.org", - "url": null - } - ], - "keywords": [ - "utilities", - "scancode-toolkit", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/nexB/commoncode", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache-2.0" - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/attrs", - "requirement": "!=20.1.0,>=18.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "commoncode", + "version": "21.5.12", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Set of common utilities, originally split from ScanCode\nCommonCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/commoncode\n- keywords: utilities, scancode-toolkit, commoncode\n\nCommoncode provides a set of common functions and utilities for handling various things like paths,\ndates, files and hashes. It started as library in scancode-toolkit.\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\n\nTo install this package use::\n\n pip install commoncode\n\n\n\nAlternatively, to set up a development environment::\n\n source configure --dev\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "nexB. Inc. and others", + "email": "info@aboutcode.org", + "url": null + } + ], + "keywords": [ + "utilities", + "scancode-toolkit", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/nexB/commoncode", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache-2.0" }, - { - "purl": "pkg:pypi/click", - "requirement": ">=6.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/text-unidecode", - "requirement": ">=1.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/beautifulsoup4", - "requirement": "<5.0.0,>=4.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/requests", - "requirement": "<3.0.0,>=2.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/intbitset", - "requirement": "<3.0,>=2.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/saneyaml", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/typing", - "requirement": "<3.7,>=3.6", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/sphinx", - "requirement": ">=3.3.1", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/sphinx-rtd-theme", - "requirement": ">=0.5.0", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/doc8", - "requirement": ">=0.8.1", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest", - "requirement": ">=6", - "scope": "testing", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest-xdist", - "requirement": ">=2", - "scope": "testing", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/commoncode@21.5.12", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/c/commoncode/commoncode-21.5.12.tar.gz", - "api_data_url": "https://pypi.org/pypi/commoncode/21.5.12/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/attrs", + "requirement": "!=20.1.0,>=18.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/click", + "requirement": ">=6.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/text-unidecode", + "requirement": ">=1.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/beautifulsoup4", + "requirement": "<5.0.0,>=4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/requests", + "requirement": "<3.0.0,>=2.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/intbitset", + "requirement": "<3.0,>=2.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/saneyaml", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/typing", + "requirement": "<3.7,>=3.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/sphinx", + "requirement": ">=3.3.1", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/sphinx-rtd-theme", + "requirement": ">=0.5.0", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/doc8", + "requirement": ">=0.8.1", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest", + "requirement": ">=6", + "scope": "testing", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest-xdist", + "requirement": ">=2", + "scope": "testing", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/commoncode@21.5.12", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/c/commoncode/commoncode-21.5.12.tar.gz", + "api_data_url": "https://pypi.org/pypi/commoncode/21.5.12/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/develop/scancode_toolkit.egg-info-expected.json b/tests/packagedcode/data/pypi/develop/scancode_toolkit.egg-info-expected.json index 74cc6bb2d7b..74c028314a2 100644 --- a/tests/packagedcode/data/pypi/develop/scancode_toolkit.egg-info-expected.json +++ b/tests/packagedcode/data/pypi/develop/scancode_toolkit.egg-info-expected.json @@ -1,499 +1,501 @@ -{ - "type": "pypi", - "namespace": null, - "name": "scancode-toolkit", - "version": "21.3.31", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "ScanCode is a tool to scan code for license, copyright, package and their documented dependencies and other interesting facts.\nScanCode toolkit", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "ScanCode", - "email": "info@aboutcode.org", - "url": null - } - ], - "keywords": [ - "open source", - "scan", - "license", - "package", - "dependency", - "copyright", - "filetype", - "author", - "extract", - "licensing", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/nexB/scancode-toolkit", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0 AND cc-by-4.0 AND other-permissive AND other-copyleft", - "declared_license": { - "license": "Apache-2.0 AND CC-BY-4.0 AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft" - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/attrs", - "requirement": "!=20.1.0,>=18.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/beautifulsoup4", - "requirement": "<5.0.0,>=4.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/bitarray", - "requirement": "<1.0.0,>=0.8.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/boolean-py", - "requirement": "<4.0,>=3.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/chardet", - "requirement": ">=3.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/click", - "requirement": "!=7.0,>=6.7", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/colorama", - "requirement": ">=0.3.9", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/commoncode", - "requirement": ">=21.1.21", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/debian-inspector", - "requirement": ">=0.9.10", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/dparse", - "requirement": ">=0.5.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/fasteners", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/fingerprints", - "requirement": ">=0.6.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/ftfy", - "requirement": "<5.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/gemfileparser", - "requirement": ">=0.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/html5lib", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/intbitset", - "requirement": "<3.0,>=2.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/jaraco-functools", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/javaproperties", - "requirement": ">=0.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/jinja2", - "requirement": "<3.0.0,>=2.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/jsonstreams", - "requirement": ">=0.5.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/license-expression", - "requirement": ">=0.99", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/lxml", - "requirement": "<5.0.0,>=4.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/markupsafe", - "requirement": ">=0.23", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nltk", - "requirement": "!=3.6,<4.0,>=3.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/packageurl-python", - "requirement": ">=0.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pdfminer-six", - "requirement": ">=20170720", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pefile", - "requirement": ">=2018.8.8", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pkginfo", - "requirement": ">=1.5.0.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pluggy", - "requirement": "<1.0,>=0.4.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/plugincode", - "requirement": ">=21.1.21", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/publicsuffix2", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pyahocorasick", - "requirement": "<1.5,>=1.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pycryptodome", - "requirement": ">=3.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pygments", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pymaven-patch", - "requirement": ">=0.2.8", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/requests", - "requirement": "<3.0.0,>=2.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/saneyaml", - "requirement": ">=0.5.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/spdx-tools", - "requirement": ">=0.6.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/text-unidecode", - "requirement": "<2.0,>=1.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/toml", - "requirement": ">=0.10.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/urlpy", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/xmltodict", - "requirement": ">=0.11.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/extractcode", - "requirement": ">=21.2.24", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/typecode", - "requirement": ">=21.2.24", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/typing", - "requirement": "<3.7,>=3.6", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest-cov", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest-xdist", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest-rerunfailures", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/aboutcode-toolkit", - "requirement": ">=6.0.0", - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/bump2version", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/codecov", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/coverage", - "requirement": null, - "scope": "dev", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/rpm-inspector-rpm", - "requirement": ">=4.16.1.3", - "scope": "packages", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/scancode-toolkit@21.3.31", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/s/scancode-toolkit/scancode-toolkit-21.3.31.tar.gz", - "api_data_url": "https://pypi.org/pypi/scancode-toolkit/21.3.31/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "scancode-toolkit", + "version": "21.3.31", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "ScanCode is a tool to scan code for license, copyright, package and their documented dependencies and other interesting facts.\nScanCode toolkit", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "ScanCode", + "email": "info@aboutcode.org", + "url": null + } + ], + "keywords": [ + "open source", + "scan", + "license", + "package", + "dependency", + "copyright", + "filetype", + "author", + "extract", + "licensing", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/nexB/scancode-toolkit", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0 AND cc-by-4.0 AND other-permissive AND other-copyleft", + "declared_license": { + "license": "Apache-2.0 AND CC-BY-4.0 AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft" + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/attrs", + "requirement": "!=20.1.0,>=18.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/beautifulsoup4", + "requirement": "<5.0.0,>=4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/bitarray", + "requirement": "<1.0.0,>=0.8.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/boolean-py", + "requirement": "<4.0,>=3.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/chardet", + "requirement": ">=3.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/click", + "requirement": "!=7.0,>=6.7", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/colorama", + "requirement": ">=0.3.9", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/commoncode", + "requirement": ">=21.1.21", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/debian-inspector", + "requirement": ">=0.9.10", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/dparse", + "requirement": ">=0.5.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/fasteners", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/fingerprints", + "requirement": ">=0.6.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/ftfy", + "requirement": "<5.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/gemfileparser", + "requirement": ">=0.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/html5lib", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/intbitset", + "requirement": "<3.0,>=2.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/jaraco-functools", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/javaproperties", + "requirement": ">=0.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/jinja2", + "requirement": "<3.0.0,>=2.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/jsonstreams", + "requirement": ">=0.5.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/license-expression", + "requirement": ">=0.99", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/lxml", + "requirement": "<5.0.0,>=4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/markupsafe", + "requirement": ">=0.23", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nltk", + "requirement": "!=3.6,<4.0,>=3.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/packageurl-python", + "requirement": ">=0.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pdfminer-six", + "requirement": ">=20170720", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pefile", + "requirement": ">=2018.8.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pkginfo", + "requirement": ">=1.5.0.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pluggy", + "requirement": "<1.0,>=0.4.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/plugincode", + "requirement": ">=21.1.21", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/publicsuffix2", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pyahocorasick", + "requirement": "<1.5,>=1.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pycryptodome", + "requirement": ">=3.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pygments", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pymaven-patch", + "requirement": ">=0.2.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/requests", + "requirement": "<3.0.0,>=2.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/saneyaml", + "requirement": ">=0.5.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/spdx-tools", + "requirement": ">=0.6.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/text-unidecode", + "requirement": "<2.0,>=1.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/toml", + "requirement": ">=0.10.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/urlpy", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/xmltodict", + "requirement": ">=0.11.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/extractcode", + "requirement": ">=21.2.24", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/typecode", + "requirement": ">=21.2.24", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/typing", + "requirement": "<3.7,>=3.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest-cov", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest-xdist", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest-rerunfailures", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/aboutcode-toolkit", + "requirement": ">=6.0.0", + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/bump2version", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/codecov", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/coverage", + "requirement": null, + "scope": "dev", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/rpm-inspector-rpm", + "requirement": ">=4.16.1.3", + "scope": "packages", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/scancode-toolkit@21.3.31", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/s/scancode-toolkit/scancode-toolkit-21.3.31.tar.gz", + "api_data_url": "https://pypi.org/pypi/scancode-toolkit/21.3.31/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/METADATA-expected.json b/tests/packagedcode/data/pypi/metadata/METADATA-expected.json index 5542bf48bdb..d04a30a7b0a 100644 --- a/tests/packagedcode/data/pypi/metadata/METADATA-expected.json +++ b/tests/packagedcode/data/pypi/metadata/METADATA-expected.json @@ -1,55 +1,57 @@ -{ - "type": "pypi", - "namespace": null, - "name": "six", - "version": "1.10.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python 2 and 3 compatibility utilities\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports every Python version since 2.6. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://pythonhosted.org/six/.\n\nBugs can be reported to https://bitbucket.org/gutworth/six. The code can also\nbe found there.\n\nFor questions about six or porting in general, email the python-porting mailing\nlist: https://mail.python.org/mailman/listinfo/python-porting", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Benjamin Peterson", - "email": "benjamin@python.org", - "url": null - } - ], - "keywords": [ - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "http://pypi.python.org/pypi/six/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/six@1.10.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/s/six/six-1.10.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/six/1.10.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "six", + "version": "1.10.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python 2 and 3 compatibility utilities\nSix is a Python 2 and 3 compatibility library. It provides utility functions\nfor smoothing over the differences between the Python versions with the goal of\nwriting Python code that is compatible on both Python versions. See the\ndocumentation for more information on what is provided.\n\nSix supports every Python version since 2.6. It is contained in only one Python\nfile, so it can be easily copied into your project. (The copyright and license\nnotice must be retained.)\n\nOnline documentation is at https://pythonhosted.org/six/.\n\nBugs can be reported to https://bitbucket.org/gutworth/six. The code can also\nbe found there.\n\nFor questions about six or porting in general, email the python-porting mailing\nlist: https://mail.python.org/mailman/listinfo/python-porting", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Benjamin Peterson", + "email": "benjamin@python.org", + "url": null + } + ], + "keywords": [ + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" + ], + "homepage_url": "http://pypi.python.org/pypi/six/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/six@1.10.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/s/six/six-1.10.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/six/1.10.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/PKG-INFO-expected.json index d2cd8d860e4..e8004b3d6d9 100644 --- a/tests/packagedcode/data/pypi/metadata/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/PKG-INFO-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "python-mimeparse", - "version": "1.6.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "DB Tsai", - "email": "dbtsai@dbtsai.com", - "url": null - } - ], - "keywords": [ - "mime-type", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/dbtsai/python-mimeparse", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", - "copyright": null, - "license_expression": "mit", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/python-mimeparse@1.6.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "python-mimeparse", + "version": "1.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "DB Tsai", + "email": "dbtsai@dbtsai.com", + "url": null + } + ], + "keywords": [ + "mime-type", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Python Modules" + ], + "homepage_url": "https://github.com/dbtsai/python-mimeparse", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", + "copyright": null, + "license_expression": "mit", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/python-mimeparse@1.6.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/v10/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/v10/PKG-INFO-expected.json index bbf28098312..019066c7af6 100644 --- a/tests/packagedcode/data/pypi/metadata/v10/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/v10/PKG-INFO-expected.json @@ -1,46 +1,48 @@ -{ - "type": "pypi", - "namespace": null, - "name": "prompt-toolkit", - "version": "0.53.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Library for building powerful interactive command lines in Python\nPython Prompt Toolkit\n=====================\n\n|Build Status| |PyPI|\n\n``prompt_toolkit`` is a library for building powerful interactive command lines\nin Python.\n\nLooking for ptpython, the Python REPL?\n**************************************\n\nAre you looking for ``ptpython``, the interactive Python Shell? We moved the\n``ptpython`` source code to a separate repository. This way we are sure not to\npollute the ``prompt_toolkit`` library with any ``ptpython``-specific stuff and\n``ptpython`` can be developed independently. You will now have to install it\nthrough::\n\n pip install ptpython\n\n`Go to ptpython... `_\n\n.. image :: https://github.com/jonathanslenders/python-prompt-toolkit/raw/master/docs/images/ptpython.png\n\nprompt-toolkit features\n***********************\n\n``prompt_toolkit`` could be a replacement for `GNU readline\n`_, but it can be much\nmore than that.\n\nSome features:\n\n- Pure Python.\n- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)\n- Multi-line input editing.\n- Advanced code completion.\n- Both Emacs and Vi key bindings. (Similar to readline.)\n- Reverse and forward incremental search.\n- Runs on all Python versions from 2.6 up to 3.4.\n- Works well with Unicode double width characters. (Chinese input.)\n- Selecting text for copy/paste. (Both Emacs and Vi style.)\n- Mouse support for cursor positioning and scrolling.\n- Auto suggestions. (Like `fish shell `_.)\n- Multiple input buffers.\n- No global state.\n- Lightweight, the only dependencies are Pygments, six and wcwidth.\n- Code written with love.\n- Runs on Linux, OS X, OpenBSD and Windows systems.\n\nFeel free to create tickets for bugs and feature requests, and create pull\nrequests if you have nice patches that you would like to share with others.\n\n\nAbout Windows support\n*********************\n\n``prompt_toolkit`` is cross platform, and everything that you build on top\nshould run fine on both Unix and Windows systems. On Windows, it uses a\ndifferent event loop (``WaitForMultipleObjects`` instead of ``select``), and\nanother input and output system. (Win32 APIs instead of pseudo-terminals and\nVT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is\npossible\". Both Unix and Windows terminals have their limitations. But in\ngeneral, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either `cmder\n`_ or `conemu `_.\n\n\nInstallation\n************\n\n::\n\n pip install prompt-toolkit\n\n\nGetting started\n***************\n\nThe most simple example of the library would look like this:\n\n.. code:: python\n\n from prompt_toolkit import prompt\n\n if __name__ == '__main__':\n answer = prompt('Give me some input: ')\n print('You said: %s' % answer)\n\nFor more complex examples, have a look in the ``examples`` directory. All\nexamples are chosen to demonstrate only one thing. Also, don't be afraid to\nlook at the source code. The implementation of the ``prompt`` function could be\na good start.\n\nNote: For Python 2, you need to add ``from __future__ import unicode_literals``\nto the above example. All strings are expected to be unicode strings.\n\n\nProjects using prompt-toolkit\n*****************************\n\n- `ptpython `_: Python REPL\n- `ptpdb `_: Python debugger (pdb replacement)\n- `pgcli `_: Postgres client.\n- `mycli `_: MySql client.\n- `pyvim `_: A Vim clone in pure Python\n- `wharfee `_: A Docker command line.\n- `xonsh `_: A Python-ish, BASHwards-compatible shell.\n- `saws `_: A Supercharged AWS Command Line Interface.\n\n\n(Want your own project to be listed here? Please create a GitHub issue.)\n\n\nPhilosophy\n**********\n\nThe source code of ``prompt_toolkit`` should be readable, concise and\nefficient. We prefer short functions focussing each on one task and for which\nthe input and output types are clearly specified. We mostly prefer composition\nover inheritance, because inheritance can result in too much functionality in\nthe same object. We prefer immutable objects where possible (objects don't\nchange after initialisation). Reusability is important. We absolutely refrain\nfrom having a changing global state, it should be possible to have multiple\nindependent instances of the same code in the same process. The architecture\nshould be layered: the lower levels operate on primitive operations and data\nstructures giving -- when correctly combined -- all the possible flexibility;\nwhile at the higher level, there should be a simpler API, ready-to-use and\nsufficient for most use cases. Thinking about algorithms and efficiency is\nimportant, but avoid premature optimization.\n\n\nSpecial thanks to\n*****************\n\n- `Pygments `_: Syntax highlighter.\n- `wcwidth `_: Determine columns needed for a wide characters.\n\n.. |Build Status| image:: https://api.travis-ci.org/jonathanslenders/python-prompt-toolkit.svg?branch=master\n :target: https://travis-ci.org/jonathanslenders/python-prompt-toolkit#\n\n.. |PyPI| image:: https://pypip.in/version/prompt-toolkit/badge.svg\n :target: https://pypi.python.org/pypi/prompt-toolkit/\n :alt: Latest Version", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Jonathan Slenders", - "email": "UNKNOWN", - "url": null - } - ], - "keywords": [], - "homepage_url": "https://github.com/jonathanslenders/python-prompt-toolkit", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": { - "license": "LICENSE.txt" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/prompt-toolkit@0.53.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/prompt-toolkit/prompt-toolkit-0.53.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/prompt-toolkit/0.53.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "prompt-toolkit", + "version": "0.53.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Library for building powerful interactive command lines in Python\nPython Prompt Toolkit\n=====================\n\n|Build Status| |PyPI|\n\n``prompt_toolkit`` is a library for building powerful interactive command lines\nin Python.\n\nLooking for ptpython, the Python REPL?\n**************************************\n\nAre you looking for ``ptpython``, the interactive Python Shell? We moved the\n``ptpython`` source code to a separate repository. This way we are sure not to\npollute the ``prompt_toolkit`` library with any ``ptpython``-specific stuff and\n``ptpython`` can be developed independently. You will now have to install it\nthrough::\n\n pip install ptpython\n\n`Go to ptpython... `_\n\n.. image :: https://github.com/jonathanslenders/python-prompt-toolkit/raw/master/docs/images/ptpython.png\n\nprompt-toolkit features\n***********************\n\n``prompt_toolkit`` could be a replacement for `GNU readline\n`_, but it can be much\nmore than that.\n\nSome features:\n\n- Pure Python.\n- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)\n- Multi-line input editing.\n- Advanced code completion.\n- Both Emacs and Vi key bindings. (Similar to readline.)\n- Reverse and forward incremental search.\n- Runs on all Python versions from 2.6 up to 3.4.\n- Works well with Unicode double width characters. (Chinese input.)\n- Selecting text for copy/paste. (Both Emacs and Vi style.)\n- Mouse support for cursor positioning and scrolling.\n- Auto suggestions. (Like `fish shell `_.)\n- Multiple input buffers.\n- No global state.\n- Lightweight, the only dependencies are Pygments, six and wcwidth.\n- Code written with love.\n- Runs on Linux, OS X, OpenBSD and Windows systems.\n\nFeel free to create tickets for bugs and feature requests, and create pull\nrequests if you have nice patches that you would like to share with others.\n\n\nAbout Windows support\n*********************\n\n``prompt_toolkit`` is cross platform, and everything that you build on top\nshould run fine on both Unix and Windows systems. On Windows, it uses a\ndifferent event loop (``WaitForMultipleObjects`` instead of ``select``), and\nanother input and output system. (Win32 APIs instead of pseudo-terminals and\nVT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is\npossible\". Both Unix and Windows terminals have their limitations. But in\ngeneral, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either `cmder\n`_ or `conemu `_.\n\n\nInstallation\n************\n\n::\n\n pip install prompt-toolkit\n\n\nGetting started\n***************\n\nThe most simple example of the library would look like this:\n\n.. code:: python\n\n from prompt_toolkit import prompt\n\n if __name__ == '__main__':\n answer = prompt('Give me some input: ')\n print('You said: %s' % answer)\n\nFor more complex examples, have a look in the ``examples`` directory. All\nexamples are chosen to demonstrate only one thing. Also, don't be afraid to\nlook at the source code. The implementation of the ``prompt`` function could be\na good start.\n\nNote: For Python 2, you need to add ``from __future__ import unicode_literals``\nto the above example. All strings are expected to be unicode strings.\n\n\nProjects using prompt-toolkit\n*****************************\n\n- `ptpython `_: Python REPL\n- `ptpdb `_: Python debugger (pdb replacement)\n- `pgcli `_: Postgres client.\n- `mycli `_: MySql client.\n- `pyvim `_: A Vim clone in pure Python\n- `wharfee `_: A Docker command line.\n- `xonsh `_: A Python-ish, BASHwards-compatible shell.\n- `saws `_: A Supercharged AWS Command Line Interface.\n\n\n(Want your own project to be listed here? Please create a GitHub issue.)\n\n\nPhilosophy\n**********\n\nThe source code of ``prompt_toolkit`` should be readable, concise and\nefficient. We prefer short functions focussing each on one task and for which\nthe input and output types are clearly specified. We mostly prefer composition\nover inheritance, because inheritance can result in too much functionality in\nthe same object. We prefer immutable objects where possible (objects don't\nchange after initialisation). Reusability is important. We absolutely refrain\nfrom having a changing global state, it should be possible to have multiple\nindependent instances of the same code in the same process. The architecture\nshould be layered: the lower levels operate on primitive operations and data\nstructures giving -- when correctly combined -- all the possible flexibility;\nwhile at the higher level, there should be a simpler API, ready-to-use and\nsufficient for most use cases. Thinking about algorithms and efficiency is\nimportant, but avoid premature optimization.\n\n\nSpecial thanks to\n*****************\n\n- `Pygments `_: Syntax highlighter.\n- `wcwidth `_: Determine columns needed for a wide characters.\n\n.. |Build Status| image:: https://api.travis-ci.org/jonathanslenders/python-prompt-toolkit.svg?branch=master\n :target: https://travis-ci.org/jonathanslenders/python-prompt-toolkit#\n\n.. |PyPI| image:: https://pypip.in/version/prompt-toolkit/badge.svg\n :target: https://pypi.python.org/pypi/prompt-toolkit/\n :alt: Latest Version", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Jonathan Slenders", + "email": "UNKNOWN", + "url": null + } + ], + "keywords": [], + "homepage_url": "https://github.com/jonathanslenders/python-prompt-toolkit", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": { + "license": "LICENSE.txt" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/prompt-toolkit@0.53.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/prompt-toolkit/prompt-toolkit-0.53.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/prompt-toolkit/0.53.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/v11/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/v11/PKG-INFO-expected.json index d2cd8d860e4..e8004b3d6d9 100644 --- a/tests/packagedcode/data/pypi/metadata/v11/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/v11/PKG-INFO-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "python-mimeparse", - "version": "1.6.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "DB Tsai", - "email": "dbtsai@dbtsai.com", - "url": null - } - ], - "keywords": [ - "mime-type", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/dbtsai/python-mimeparse", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", - "copyright": null, - "license_expression": "mit", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/python-mimeparse@1.6.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "python-mimeparse", + "version": "1.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "DB Tsai", + "email": "dbtsai@dbtsai.com", + "url": null + } + ], + "keywords": [ + "mime-type", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Python Modules" + ], + "homepage_url": "https://github.com/dbtsai/python-mimeparse", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", + "copyright": null, + "license_expression": "mit", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/python-mimeparse@1.6.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/v12/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/v12/PKG-INFO-expected.json index 26704134194..f38865d6e88 100644 --- a/tests/packagedcode/data/pypi/metadata/v12/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/v12/PKG-INFO-expected.json @@ -1,70 +1,72 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pyldap", - "version": "2.4.45", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python modules for implementing LDAP clients\npyldap:\n pyldap is a fork of python-ldap, and provides an object-oriented API to access LDAP\n directory servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose.\n Additionally the package contains modules for other LDAP-related stuff\n (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations\n and controls, etc.).", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "pyldap project", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: C", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Topic :: Database", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP" - ], - "homepage_url": "https://github.com/pyldap/pyldap/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://pypi.python.org/pypi/pyldap/", - "copyright": null, - "license_expression": "unknown AND python", - "declared_license": { - "license": "Python style", - "classifiers": [ - "License :: OSI Approved :: Python Software Foundation License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pyldap@2.4.45", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pyldap/pyldap-2.4.45.tar.gz", - "api_data_url": "https://pypi.org/pypi/pyldap/2.4.45/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pyldap", + "version": "2.4.45", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python modules for implementing LDAP clients\npyldap:\n pyldap is a fork of python-ldap, and provides an object-oriented API to access LDAP\n directory servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose.\n Additionally the package contains modules for other LDAP-related stuff\n (e.g. processing LDIF, LDAPURLs, LDAPv3 schema, LDAPv3 extended operations\n and controls, etc.).", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "pyldap project", + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: C", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Topic :: Database", + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP" + ], + "homepage_url": "https://github.com/pyldap/pyldap/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://pypi.python.org/pypi/pyldap/", + "copyright": null, + "license_expression": "unknown AND python", + "declared_license": { + "license": "Python style", + "classifiers": [ + "License :: OSI Approved :: Python Software Foundation License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pyldap@2.4.45", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pyldap/pyldap-2.4.45.tar.gz", + "api_data_url": "https://pypi.org/pypi/pyldap/2.4.45/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/v20/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/v20/PKG-INFO-expected.json index b717274923b..c57b074900d 100644 --- a/tests/packagedcode/data/pypi/metadata/v20/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/v20/PKG-INFO-expected.json @@ -1,95 +1,97 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pymongo", - "version": "3.6.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python driver for MongoDB \n=======\nPyMongo\n=======\n:Info: See `the mongo site `_ for more information. See `github `_ for the latest source.\n:Author: Mike Dirolf\n:Maintainer: Bernie Hackett \n\nAbout\n=====\n\nThe PyMongo distribution contains tools for interacting with MongoDB\ndatabase from Python. The ``bson`` package is an implementation of\nthe `BSON format `_ for Python. The ``pymongo``\npackage is a native Python driver for MongoDB. The ``gridfs`` package\nis a `gridfs\n`_\nimplementation on top of ``pymongo``.\n\nPyMongo supports MongoDB 2.6, 3.0, 3.2, 3.4, and 3.6.\n\nSupport / Feedback\n==================\n\nFor issues with, questions about, or feedback for PyMongo, please look into\nour `support channels `_. Please\ndo not email any of the PyMongo developers directly with issues or\nquestions - you're more likely to get an answer on the `mongodb-user\n`_ list on Google Groups.\n\nBugs / Feature Requests\n=======================\n\nThink you\u2019ve found a bug? Want to see a new feature in PyMongo? Please open a\ncase in our issue management tool, JIRA:\n\n- `Create an account and login `_.\n- Navigate to `the PYTHON project `_.\n- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.\n\nBug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the\nCore Server (i.e. SERVER) project are **public**.\n\nHow To Ask For Help\n-------------------\n\nPlease include all of the following information when opening an issue:\n\n- Detailed steps to reproduce the problem, including full traceback, if possible.\n- The exact python version used, with patch level::\n\n $ python -c \"import sys; print(sys.version)\"\n\n- The exact version of PyMongo used, with patch level::\n\n $ python -c \"import pymongo; print(pymongo.version); print(pymongo.has_c())\"\n\n- The operating system and version (e.g. Windows 7, OSX 10.8, ...)\n- Web framework or asynchronous network library used, if any, with version (e.g.\n Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)\n\nSecurity Vulnerabilities\n------------------------\n\nIf you\u2019ve identified a security vulnerability in a driver or any other\nMongoDB project, please report it according to the `instructions here\n`_.\n\nInstallation\n============\n\nPyMongo can be installed with `pip `_::\n\n $ python -m pip install pymongo\n\nOr ``easy_install`` from\n`setuptools `_::\n\n $ python -m easy_install pymongo\n\nYou can also download the project source and do::\n\n $ python setup.py install\n\nDo **not** install the \"bson\" package from pypi. PyMongo comes with its own\nbson package; doing \"easy_install bson\" installs a third-party package that\nis incompatible with PyMongo.\n\nDependencies\n============\n\nPyMongo supports CPython 2.6, 2.7, 3.4+, PyPy, and PyPy3.\n\nOptional dependencies:\n\nGSSAPI authentication requires `pykerberos\n`_ on Unix or `WinKerberos\n`_ on Windows. The correct\ndependency can be installed automatically along with PyMongo::\n\n $ python -m pip install pymongo[gssapi]\n\nSupport for mongodb+srv:// URIs requires `dnspython\n`_::\n\n $ python -m pip install pymongo[srv]\n\nTLS / SSL support may require `ipaddress\n`_ and `certifi\n`_ or `wincertstore\n`_ depending on the Python\nversion in use. The necessary dependencies can be installed along with\nPyMongo::\n\n $ python -m pip install pymongo[tls]\n\nYou can install all dependencies automatically with the following\ncommand::\n\n $ python -m pip install pymongo[gssapi,srv,tls]\n\nOther optional packages:\n\n- `backports.pbkdf2 `_,\n improves authentication performance with SCRAM-SHA-1, the default\n authentication mechanism for MongoDB 3.0+. It especially improves\n performance on Python versions older than 2.7.8.\n- `monotonic `_ adds support for\n a monotonic clock, which improves reliability in environments\n where clock adjustments are frequent. Not needed in Python 3.\n\n\nAdditional dependencies are:\n\n- (to generate documentation) sphinx_\n- (to run the tests under Python 2.6) unittest2_\n\nExamples\n========\nHere's a basic example (for more see the *examples* section of the docs):\n\n.. code-block:: python\n\n >>> import pymongo\n >>> client = pymongo.MongoClient(\"localhost\", 27017)\n >>> db = client.test\n >>> db.name\n u'test'\n >>> db.my_collection\n Collection(Database(MongoClient('localhost', 27017), u'test'), u'my_collection')\n >>> db.my_collection.insert_one({\"x\": 10}).inserted_id\n ObjectId('4aba15ebe23f6b53b0000000')\n >>> db.my_collection.insert_one({\"x\": 8}).inserted_id\n ObjectId('4aba160ee23f6b543e000000')\n >>> db.my_collection.insert_one({\"x\": 11}).inserted_id\n ObjectId('4aba160ee23f6b543e000002')\n >>> db.my_collection.find_one()\n {u'x': 10, u'_id': ObjectId('4aba15ebe23f6b53b0000000')}\n >>> for item in db.my_collection.find():\n ... print(item[\"x\"])\n ...\n 10\n 8\n 11\n >>> db.my_collection.create_index(\"x\")\n u'x_1'\n >>> for item in db.my_collection.find().sort(\"x\", pymongo.ASCENDING):\n ... print(item[\"x\"])\n ...\n 8\n 10\n 11\n >>> [item[\"x\"] for item in db.my_collection.find().limit(2).skip(1)]\n [8, 11]\n\nDocumentation\n=============\n\nYou will need sphinx_ installed to generate the\ndocumentation. Documentation can be generated by running **python\nsetup.py doc**. Generated documentation can be found in the\n*doc/build/html/* directory.\n\nTesting\n=======\n\nThe easiest way to run the tests is to run **python setup.py test** in\nthe root of the distribution. Note that you will need unittest2_ to\nrun the tests under Python 2.6.\n\nTo verify that PyMongo works with Gevent's monkey-patching::\n\n $ python green_framework_test.py gevent\n\nOr with Eventlet's::\n\n $ python green_framework_test.py eventlet\n\n.. _sphinx: http://sphinx.pocoo.org/\n.. _unittest2: https://pypi.python.org/pypi/unittest2", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Bernie Hackett", - "email": "bernie@mongodb.com", - "url": null - } - ], - "keywords": [ - "mongo", - "mongodb", - "pymongo", - "gridfs", - "bson", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Database" - ], - "homepage_url": "http://github.com/mongodb/mongo-python-driver", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache License, Version 2.0", - "classifiers": [ - "License :: OSI Approved :: Apache Software License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pykerberos", - "requirement": null, - "scope": "gssapi", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "pymongo", + "version": "3.6.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python driver for MongoDB \n=======\nPyMongo\n=======\n:Info: See `the mongo site `_ for more information. See `github `_ for the latest source.\n:Author: Mike Dirolf\n:Maintainer: Bernie Hackett \n\nAbout\n=====\n\nThe PyMongo distribution contains tools for interacting with MongoDB\ndatabase from Python. The ``bson`` package is an implementation of\nthe `BSON format `_ for Python. The ``pymongo``\npackage is a native Python driver for MongoDB. The ``gridfs`` package\nis a `gridfs\n`_\nimplementation on top of ``pymongo``.\n\nPyMongo supports MongoDB 2.6, 3.0, 3.2, 3.4, and 3.6.\n\nSupport / Feedback\n==================\n\nFor issues with, questions about, or feedback for PyMongo, please look into\nour `support channels `_. Please\ndo not email any of the PyMongo developers directly with issues or\nquestions - you're more likely to get an answer on the `mongodb-user\n`_ list on Google Groups.\n\nBugs / Feature Requests\n=======================\n\nThink you\u2019ve found a bug? Want to see a new feature in PyMongo? Please open a\ncase in our issue management tool, JIRA:\n\n- `Create an account and login `_.\n- Navigate to `the PYTHON project `_.\n- Click **Create Issue** - Please provide as much information as possible about the issue type and how to reproduce it.\n\nBug reports in JIRA for all driver projects (i.e. PYTHON, CSHARP, JAVA) and the\nCore Server (i.e. SERVER) project are **public**.\n\nHow To Ask For Help\n-------------------\n\nPlease include all of the following information when opening an issue:\n\n- Detailed steps to reproduce the problem, including full traceback, if possible.\n- The exact python version used, with patch level::\n\n $ python -c \"import sys; print(sys.version)\"\n\n- The exact version of PyMongo used, with patch level::\n\n $ python -c \"import pymongo; print(pymongo.version); print(pymongo.has_c())\"\n\n- The operating system and version (e.g. Windows 7, OSX 10.8, ...)\n- Web framework or asynchronous network library used, if any, with version (e.g.\n Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)\n\nSecurity Vulnerabilities\n------------------------\n\nIf you\u2019ve identified a security vulnerability in a driver or any other\nMongoDB project, please report it according to the `instructions here\n`_.\n\nInstallation\n============\n\nPyMongo can be installed with `pip `_::\n\n $ python -m pip install pymongo\n\nOr ``easy_install`` from\n`setuptools `_::\n\n $ python -m easy_install pymongo\n\nYou can also download the project source and do::\n\n $ python setup.py install\n\nDo **not** install the \"bson\" package from pypi. PyMongo comes with its own\nbson package; doing \"easy_install bson\" installs a third-party package that\nis incompatible with PyMongo.\n\nDependencies\n============\n\nPyMongo supports CPython 2.6, 2.7, 3.4+, PyPy, and PyPy3.\n\nOptional dependencies:\n\nGSSAPI authentication requires `pykerberos\n`_ on Unix or `WinKerberos\n`_ on Windows. The correct\ndependency can be installed automatically along with PyMongo::\n\n $ python -m pip install pymongo[gssapi]\n\nSupport for mongodb+srv:// URIs requires `dnspython\n`_::\n\n $ python -m pip install pymongo[srv]\n\nTLS / SSL support may require `ipaddress\n`_ and `certifi\n`_ or `wincertstore\n`_ depending on the Python\nversion in use. The necessary dependencies can be installed along with\nPyMongo::\n\n $ python -m pip install pymongo[tls]\n\nYou can install all dependencies automatically with the following\ncommand::\n\n $ python -m pip install pymongo[gssapi,srv,tls]\n\nOther optional packages:\n\n- `backports.pbkdf2 `_,\n improves authentication performance with SCRAM-SHA-1, the default\n authentication mechanism for MongoDB 3.0+. It especially improves\n performance on Python versions older than 2.7.8.\n- `monotonic `_ adds support for\n a monotonic clock, which improves reliability in environments\n where clock adjustments are frequent. Not needed in Python 3.\n\n\nAdditional dependencies are:\n\n- (to generate documentation) sphinx_\n- (to run the tests under Python 2.6) unittest2_\n\nExamples\n========\nHere's a basic example (for more see the *examples* section of the docs):\n\n.. code-block:: python\n\n >>> import pymongo\n >>> client = pymongo.MongoClient(\"localhost\", 27017)\n >>> db = client.test\n >>> db.name\n u'test'\n >>> db.my_collection\n Collection(Database(MongoClient('localhost', 27017), u'test'), u'my_collection')\n >>> db.my_collection.insert_one({\"x\": 10}).inserted_id\n ObjectId('4aba15ebe23f6b53b0000000')\n >>> db.my_collection.insert_one({\"x\": 8}).inserted_id\n ObjectId('4aba160ee23f6b543e000000')\n >>> db.my_collection.insert_one({\"x\": 11}).inserted_id\n ObjectId('4aba160ee23f6b543e000002')\n >>> db.my_collection.find_one()\n {u'x': 10, u'_id': ObjectId('4aba15ebe23f6b53b0000000')}\n >>> for item in db.my_collection.find():\n ... print(item[\"x\"])\n ...\n 10\n 8\n 11\n >>> db.my_collection.create_index(\"x\")\n u'x_1'\n >>> for item in db.my_collection.find().sort(\"x\", pymongo.ASCENDING):\n ... print(item[\"x\"])\n ...\n 8\n 10\n 11\n >>> [item[\"x\"] for item in db.my_collection.find().limit(2).skip(1)]\n [8, 11]\n\nDocumentation\n=============\n\nYou will need sphinx_ installed to generate the\ndocumentation. Documentation can be generated by running **python\nsetup.py doc**. Generated documentation can be found in the\n*doc/build/html/* directory.\n\nTesting\n=======\n\nThe easiest way to run the tests is to run **python setup.py test** in\nthe root of the distribution. Note that you will need unittest2_ to\nrun the tests under Python 2.6.\n\nTo verify that PyMongo works with Gevent's monkey-patching::\n\n $ python green_framework_test.py gevent\n\nOr with Eventlet's::\n\n $ python green_framework_test.py eventlet\n\n.. _sphinx: http://sphinx.pocoo.org/\n.. _unittest2: https://pypi.python.org/pypi/unittest2", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Bernie Hackett", + "email": "bernie@mongodb.com", + "url": null + } + ], + "keywords": [ + "mongo", + "mongodb", + "pymongo", + "gridfs", + "bson", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Database" + ], + "homepage_url": "http://github.com/mongodb/mongo-python-driver", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache License, Version 2.0", + "classifiers": [ + "License :: OSI Approved :: Apache Software License" + ] }, - { - "purl": "pkg:pypi/dnspython", - "requirement": "<2.0.0,>=1.8.0", - "scope": "srv", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/ipaddress", - "requirement": null, - "scope": "tls", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pymongo@3.6.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pymongo/pymongo-3.6.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/pymongo/3.6.1/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pykerberos", + "requirement": null, + "scope": "gssapi", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/dnspython", + "requirement": "<2.0.0,>=1.8.0", + "scope": "srv", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/ipaddress", + "requirement": null, + "scope": "tls", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pymongo@3.6.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pymongo/pymongo-3.6.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/pymongo/3.6.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/metadata/v21/PKG-INFO-expected.json b/tests/packagedcode/data/pypi/metadata/v21/PKG-INFO-expected.json index e86f816a12d..96b88098257 100644 --- a/tests/packagedcode/data/pypi/metadata/v21/PKG-INFO-expected.json +++ b/tests/packagedcode/data/pypi/metadata/v21/PKG-INFO-expected.json @@ -1,62 +1,64 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pbr", - "version": "4.0.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python Build Reasonableness\nIntroduction\n============\n\n.. image:: https://img.shields.io/pypi/v/pbr.svg\n :target: https://pypi.python.org/pypi/pbr/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/dm/pbr.svg\n :target: https://pypi.python.org/pypi/pbr/\n :alt: Downloads\n\nPBR is a library that injects some useful and sensible default behaviors\ninto your setuptools run. It started off life as the chunks of code that\nwere copied between all of the `OpenStack`_ projects. Around the time that\nOpenStack hit 18 different projects each with at least 3 active branches,\nit seemed like a good time to make that code into a proper reusable library.\n\nPBR is only mildly configurable. The basic idea is that there's a decent\nway to run things and if you do, you should reap the rewards, because then\nit's simple and repeatable. If you want to do things differently, cool! But\nyou've already got the power of Python at your fingertips, so you don't\nreally need PBR.\n\nPBR builds on top of the work that `d2to1`_ started to provide for declarative\nconfiguration. `d2to1`_ is itself an implementation of the ideas behind\n`distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards\n`PEP 426`_ and Metadata 2.0, declarative config is still a great idea and\nspecifically important in trying to distribute setup code as a library\nwhen that library itself will alter how the setup is processed. As Metadata\n2.0 and other modern Python packaging PEPs come out, PBR aims to support\nthem as quickly as possible.\n\n* License: Apache License, Version 2.0\n* Documentation: https://docs.openstack.org/pbr/latest/\n* Source: https://git.openstack.org/cgit/openstack-dev/pbr\n* Bugs: https://bugs.launchpad.net/pbr\n* Change Log: https://docs.openstack.org/pbr/latest/user/history.html\n\n.. _d2to1: https://pypi.python.org/pypi/d2to1\n.. _distutils2: https://pypi.python.org/pypi/Distutils2\n.. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/\n.. _OpenStack: https://www.openstack.org/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "OpenStack", - "email": "openstack-dev@lists.openstack.org", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Environment :: OpenStack", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" - ], - "homepage_url": "https://docs.openstack.org/pbr/latest/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "Bug Tracker, https://bugs.launchpad.net/pbr/", - "code_view_url": "Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/", - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: Apache Software License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pbr@4.0.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pbr/pbr-4.0.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/pbr/4.0.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pbr", + "version": "4.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python Build Reasonableness\nIntroduction\n============\n\n.. image:: https://img.shields.io/pypi/v/pbr.svg\n :target: https://pypi.python.org/pypi/pbr/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/dm/pbr.svg\n :target: https://pypi.python.org/pypi/pbr/\n :alt: Downloads\n\nPBR is a library that injects some useful and sensible default behaviors\ninto your setuptools run. It started off life as the chunks of code that\nwere copied between all of the `OpenStack`_ projects. Around the time that\nOpenStack hit 18 different projects each with at least 3 active branches,\nit seemed like a good time to make that code into a proper reusable library.\n\nPBR is only mildly configurable. The basic idea is that there's a decent\nway to run things and if you do, you should reap the rewards, because then\nit's simple and repeatable. If you want to do things differently, cool! But\nyou've already got the power of Python at your fingertips, so you don't\nreally need PBR.\n\nPBR builds on top of the work that `d2to1`_ started to provide for declarative\nconfiguration. `d2to1`_ is itself an implementation of the ideas behind\n`distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards\n`PEP 426`_ and Metadata 2.0, declarative config is still a great idea and\nspecifically important in trying to distribute setup code as a library\nwhen that library itself will alter how the setup is processed. As Metadata\n2.0 and other modern Python packaging PEPs come out, PBR aims to support\nthem as quickly as possible.\n\n* License: Apache License, Version 2.0\n* Documentation: https://docs.openstack.org/pbr/latest/\n* Source: https://git.openstack.org/cgit/openstack-dev/pbr\n* Bugs: https://bugs.launchpad.net/pbr\n* Change Log: https://docs.openstack.org/pbr/latest/user/history.html\n\n.. _d2to1: https://pypi.python.org/pypi/d2to1\n.. _distutils2: https://pypi.python.org/pypi/Distutils2\n.. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/\n.. _OpenStack: https://www.openstack.org/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "OpenStack", + "email": "openstack-dev@lists.openstack.org", + "url": null + } + ], + "keywords": [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Environment :: OpenStack", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5" + ], + "homepage_url": "https://docs.openstack.org/pbr/latest/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "Bug Tracker, https://bugs.launchpad.net/pbr/", + "code_view_url": "Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/", + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: Apache Software License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pbr@4.0.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pbr/pbr-4.0.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/pbr/4.0.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/pipfile.lock/sample1/Pipfile.lock-expected.json b/tests/packagedcode/data/pypi/pipfile.lock/sample1/Pipfile.lock-expected.json index 897f56a58f6..56f852605f1 100644 --- a/tests/packagedcode/data/pypi/pipfile.lock/sample1/Pipfile.lock-expected.json +++ b/tests/packagedcode/data/pypi/pipfile.lock/sample1/Pipfile.lock-expected.json @@ -1,109 +1,111 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": "813f8e1b624fd42eee7d681228d7aca1fce209e1d60bf21c3eb33a73f7268d57", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/django@1.7.1", - "requirement": "==1.7.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/feedparser@5.1.1", - "requirement": "==5.1.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pyasn1@0.4.2", - "requirement": "==0.4.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pycrypto@2.4", - "requirement": "==2.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pyjwt@0.4.2", - "requirement": "==0.4.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/raven@1.9.4", - "requirement": "==1.9.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/requests@2.2.1", - "requirement": "==2.2.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/rsa@3.4", - "requirement": "==3.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/simplejson@2.4.0", - "requirement": "==2.4.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": "813f8e1b624fd42eee7d681228d7aca1fce209e1d60bf21c3eb33a73f7268d57", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/django@1.7.1", + "requirement": "==1.7.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/feedparser@5.1.1", + "requirement": "==5.1.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pyasn1@0.4.2", + "requirement": "==0.4.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pycrypto@2.4", + "requirement": "==2.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pyjwt@0.4.2", + "requirement": "==0.4.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/raven@1.9.4", + "requirement": "==1.9.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/requests@2.2.1", + "requirement": "==2.2.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/rsa@3.4", + "requirement": "==3.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/simplejson@2.4.0", + "requirement": "==2.4.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/pipfile.lock/sample2/Pipfile.lock-expected.json b/tests/packagedcode/data/pypi/pipfile.lock/sample2/Pipfile.lock-expected.json index 438a8846788..89f27259e52 100644 --- a/tests/packagedcode/data/pypi/pipfile.lock/sample2/Pipfile.lock-expected.json +++ b/tests/packagedcode/data/pypi/pipfile.lock/sample2/Pipfile.lock-expected.json @@ -1,173 +1,175 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": "6e45251662433bf51f96fb3d2204b65416fece329d60e6235c0f0edc416cfe24", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/atomicwrites@1.1.5", - "requirement": "==1.1.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/attrs@18.1.0", - "requirement": "==18.1.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/contextlib2@0.5.5", - "requirement": "==0.5.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/coverage@4.5.1", - "requirement": "==4.5.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/funcsigs@1.0.2", - "requirement": "==1.0.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/mock@2.0.0", - "requirement": "==2.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/more-itertools@4.2.0", - "requirement": "==4.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pbr@4.2.0", - "requirement": "==4.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pluggy@0.6.0", - "requirement": "==0.6.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/py@1.5.4", - "requirement": "==1.5.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pytest@3.6.3", - "requirement": "==3.6.3", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pytest-cov@2.5.1", - "requirement": "==2.5.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pytest-vcr@0.3.0", - "requirement": "==0.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pyyaml@3.13", - "requirement": "==3.13", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/six@1.11.0", - "requirement": "==1.11.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/vcrpy@1.13.0", - "requirement": "==1.13.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/wrapt@1.10.11", - "requirement": "==1.10.11", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": "6e45251662433bf51f96fb3d2204b65416fece329d60e6235c0f0edc416cfe24", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/atomicwrites@1.1.5", + "requirement": "==1.1.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/attrs@18.1.0", + "requirement": "==18.1.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/contextlib2@0.5.5", + "requirement": "==0.5.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/coverage@4.5.1", + "requirement": "==4.5.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/funcsigs@1.0.2", + "requirement": "==1.0.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/mock@2.0.0", + "requirement": "==2.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/more-itertools@4.2.0", + "requirement": "==4.2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pbr@4.2.0", + "requirement": "==4.2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pluggy@0.6.0", + "requirement": "==0.6.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/py@1.5.4", + "requirement": "==1.5.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pytest@3.6.3", + "requirement": "==3.6.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pytest-cov@2.5.1", + "requirement": "==2.5.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pytest-vcr@0.3.0", + "requirement": "==0.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pyyaml@3.13", + "requirement": "==3.13", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/six@1.11.0", + "requirement": "==1.11.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/vcrpy@1.13.0", + "requirement": "==1.13.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/wrapt@1.10.11", + "requirement": "==1.10.11", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/pipfile.lock/sample3/Pipfile.lock-expected.json b/tests/packagedcode/data/pypi/pipfile.lock/sample3/Pipfile.lock-expected.json index 93161fd24ab..249549f8f3a 100644 --- a/tests/packagedcode/data/pypi/pipfile.lock/sample3/Pipfile.lock-expected.json +++ b/tests/packagedcode/data/pypi/pipfile.lock/sample3/Pipfile.lock-expected.json @@ -1,45 +1,47 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": "98012973e54d083ef515d6438e1fcd8218aefac3da6adde13a26ee32af0b7e6f", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/python-baseconv@1.2.2", - "requirement": "==1.2.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": "98012973e54d083ef515d6438e1fcd8218aefac3da6adde13a26ee32af0b7e6f", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/python-baseconv@1.2.2", + "requirement": "==1.2.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/pipfile.lock/sample4/Pipfile.lock-expected.json b/tests/packagedcode/data/pypi/pipfile.lock/sample4/Pipfile.lock-expected.json index 53a049141a7..fadb7acd69a 100644 --- a/tests/packagedcode/data/pypi/pipfile.lock/sample4/Pipfile.lock-expected.json +++ b/tests/packagedcode/data/pypi/pipfile.lock/sample4/Pipfile.lock-expected.json @@ -1,141 +1,143 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": "24931cad8ca14fb20d62933a3be5a0544d1dc47f4c3bce54f17ce74037fc7c23", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/functools32@3.2.3.post2", - "requirement": "==3.2.3.post2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/urllib3@1.24.2", - "requirement": "==1.24.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/alabaster@0.7.12", - "requirement": "==0.7.12", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/attrs@19.3.0", - "requirement": "==19.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/certifi@2019.9.11", - "requirement": "==2019.9.11", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/markupsafe@1.1.1", - "requirement": "==1.1.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/packaging@19.2", - "requirement": "==19.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/parver@0.2.0", - "requirement": "==0.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pkginfo@1.5.0.1", - "requirement": "==1.5.0.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pygments@2.4.2", - "requirement": "==2.4.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/six@1.12.0", - "requirement": "==1.12.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/toml@0.10.0", - "requirement": "==0.10.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/wheel@0.32.3", - "requirement": "==0.32.3", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": "24931cad8ca14fb20d62933a3be5a0544d1dc47f4c3bce54f17ce74037fc7c23", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/functools32@3.2.3.post2", + "requirement": "==3.2.3.post2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/urllib3@1.24.2", + "requirement": "==1.24.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/alabaster@0.7.12", + "requirement": "==0.7.12", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/attrs@19.3.0", + "requirement": "==19.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/certifi@2019.9.11", + "requirement": "==2019.9.11", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/markupsafe@1.1.1", + "requirement": "==1.1.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/packaging@19.2", + "requirement": "==19.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/parver@0.2.0", + "requirement": "==0.2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pkginfo@1.5.0.1", + "requirement": "==1.5.0.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pygments@2.4.2", + "requirement": "==2.4.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/six@1.12.0", + "requirement": "==1.12.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/toml@0.10.0", + "requirement": "==0.10.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/wheel@0.32.3", + "requirement": "==0.32.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/pipfile.lock/sample5/Pipfile.lock-expected.json b/tests/packagedcode/data/pypi/pipfile.lock/sample5/Pipfile.lock-expected.json index 897f56a58f6..56f852605f1 100644 --- a/tests/packagedcode/data/pypi/pipfile.lock/sample5/Pipfile.lock-expected.json +++ b/tests/packagedcode/data/pypi/pipfile.lock/sample5/Pipfile.lock-expected.json @@ -1,109 +1,111 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": "813f8e1b624fd42eee7d681228d7aca1fce209e1d60bf21c3eb33a73f7268d57", - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/django@1.7.1", - "requirement": "==1.7.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/feedparser@5.1.1", - "requirement": "==5.1.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pyasn1@0.4.2", - "requirement": "==0.4.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pycrypto@2.4", - "requirement": "==2.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/pyjwt@0.4.2", - "requirement": "==0.4.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/raven@1.9.4", - "requirement": "==1.9.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/requests@2.2.1", - "requirement": "==2.2.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/rsa@3.4", - "requirement": "==3.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/simplejson@2.4.0", - "requirement": "==2.4.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": "813f8e1b624fd42eee7d681228d7aca1fce209e1d60bf21c3eb33a73f7268d57", + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/django@1.7.1", + "requirement": "==1.7.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/feedparser@5.1.1", + "requirement": "==5.1.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pyasn1@0.4.2", + "requirement": "==0.4.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pycrypto@2.4", + "requirement": "==2.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/pyjwt@0.4.2", + "requirement": "==0.4.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/raven@1.9.4", + "requirement": "==1.9.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/requests@2.2.1", + "requirement": "==2.2.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/rsa@3.4", + "requirement": "==3.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/simplejson@2.4.0", + "requirement": "==2.4.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/basic/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/basic/output.expected.json index a5bd1068e28..8bf60fb3903 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/basic/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/basic/output.expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/setuptools", - "requirement": ">=32.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nose", - "requirement": ">=1.3.7", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/chardet", - "requirement": ">=3.0.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/setuptools", + "requirement": ">=32.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nose", + "requirement": ">=1.3.7", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/chardet", + "requirement": ">=3.0.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/comments_and_empties/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/comments_and_empties/output.expected.json index cf75d0c7a01..fdf77c6cbb0 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/comments_and_empties/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/comments_and_empties/output.expected.json @@ -1,45 +1,47 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/distutils2@1.0a3", - "requirement": "==1.0a3", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/distutils2@1.0a3", + "requirement": "==1.0a3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/complex/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/complex/output.expected.json index 82faebaf896..e0f38dcf3d0 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/complex/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/complex/output.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/babel@0.9.6", - "requirement": "==0.9.6", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/django-uuidfield@0.2", - "requirement": "==0.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/babel@0.9.6", + "requirement": "==0.9.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/django-uuidfield@0.2", + "requirement": "==0.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/dev/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/dev/output.expected.json index 0962066d53d..371b77d0938 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/dev/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/dev/output.expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/prompt-toolkit", - "requirement": ">=1.0.14", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pygments@2.2.0", - "requirement": "==2.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/regex", - "requirement": "regex", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/prompt-toolkit", + "requirement": ">=1.0.14", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pygments@2.2.0", + "requirement": "==2.2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/regex", + "requirement": "regex", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/double_extras/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/double_extras/output.expected.json index 596eb192581..0a03741f31b 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/double_extras/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/double_extras/output.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/mypackage@3.0", - "requirement": "==3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/fizzy", - "requirement": "Fizzy", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/mypackage@3.0", + "requirement": "==3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/fizzy", + "requirement": "Fizzy", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/editable/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/editable/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/editable/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/editable/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/eol_comment/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/eol_comment/output.expected.json index 1551016c007..c801c3bf8c2 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/eol_comment/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/eol_comment/output.expected.json @@ -1,45 +1,47 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/req@1.0", - "requirement": "==1.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/req@1.0", + "requirement": "==1.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/local_paths_and_files/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/local_paths_and_files/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/local_paths_and_files/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/local_paths_and_files/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/many_specs/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/many_specs/output.expected.json index ba97046f96a..b6b84171724 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/many_specs/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/many_specs/output.expected.json @@ -1,45 +1,47 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pickything", - "requirement": "!=1.9.6,<1.6,<2.0a0,==2.4c1,>1.9", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pickything", + "requirement": "!=1.9.6,<1.6,<2.0a0,==2.4c1,>1.9", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/mixed/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/mixed/output.expected.json index 33d11d6c068..bb3eed7c738 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/mixed/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/mixed/output.expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/django", - "requirement": "<1.6,>=1.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/numpy", - "requirement": "numpy", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/docparser", - "requirement": "DocParser", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/django", + "requirement": "<1.6,>=1.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/numpy", + "requirement": "numpy", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/docparser", + "requirement": "DocParser", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/pinned/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/pinned/output.expected.json index 11414a540a9..0e832734044 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/pinned/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/pinned/output.expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/aiohttp@3.6.2", - "requirement": "==3.6.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/async-timeout@3.0.1", - "requirement": "==3.0.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - }, - { - "purl": "pkg:pypi/attrs@19.3.0", - "requirement": "==19.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/aiohttp@3.6.2", + "requirement": "==3.6.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/async-timeout@3.0.1", + "requirement": "==3.0.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + }, + { + "purl": "pkg:pypi/attrs@19.3.0", + "requirement": "==19.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/requirements_in/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/requirements_in/output.expected.json index 64fcbaedbdf..8c9085cd96b 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/requirements_in/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/requirements_in/output.expected.json @@ -1,53 +1,55 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/setuptools", - "requirement": "setuptools", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nose", - "requirement": "nose", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/setuptools", + "requirement": "setuptools", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nose", + "requirement": "nose", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/urls_wth_checksums/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/urls_wth_checksums/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/urls_wth_checksums/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/urls_wth_checksums/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/vcs-git/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/vcs-git/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/vcs-git/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/vcs-git/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/vcs_editable/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/vcs_editable/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/vcs_editable/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/vcs_editable/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/vcs_eggs/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/vcs_eggs/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/vcs_eggs/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/vcs_eggs/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/requirements_txt/vcs_extras_require/output.expected.json b/tests/packagedcode/data/pypi/requirements_txt/vcs_extras_require/output.expected.json index 4f520fc7d68..015165d0cbb 100644 --- a/tests/packagedcode/data/pypi/requirements_txt/vcs_extras_require/output.expected.json +++ b/tests/packagedcode/data/pypi/requirements_txt/vcs_extras_require/output.expected.json @@ -1,36 +1,38 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/arpy_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/arpy_setup.py-expected.json index 9b93fc3266e..6e4b2563799 100644 --- a/tests/packagedcode/data/pypi/setup.py/arpy_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/arpy_setup.py-expected.json @@ -1,46 +1,48 @@ -{ - "type": "pypi", - "namespace": null, - "name": "arpy", - "version": "0.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Library for accessing \"ar\" files", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stanis\u0142aw Pitucha", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://bitbucket.org/viraptor/arpy", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "bsd-simplified", - "declared_license": { - "license": "Simplified BSD" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/arpy@0.1.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/a/arpy/arpy-0.1.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/arpy/0.1.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "arpy", + "version": "0.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Library for accessing \"ar\" files", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Stanis\u0142aw Pitucha", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://bitbucket.org/viraptor/arpy", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "bsd-simplified", + "declared_license": { + "license": "Simplified BSD" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/arpy@0.1.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/a/arpy/arpy-0.1.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/arpy/0.1.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/boolean2_py_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/boolean2_py_setup.py-expected.json index 38989d3db9e..1c6e1d44727 100644 --- a/tests/packagedcode/data/pypi/setup.py/boolean2_py_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/boolean2_py_setup.py-expected.json @@ -1,64 +1,66 @@ -{ - "type": "pypi", - "namespace": null, - "name": "boolean.py", - "version": "1.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Boolean Algreba", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Sebastian Kraemer", - "email": null, - "url": null - } - ], - "keywords": [ - "boolean expression", - "boolean algebra", - "logic", - "expression parser", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Software Development :: Compilers", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/bastikr/boolean.py", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "bsd-new", - "declared_license": { - "license": "revised BSD license", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/boolean.py@1.2", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/b/boolean.py/boolean.py-1.2.tar.gz", - "api_data_url": "https://pypi.org/pypi/boolean.py/1.2/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "boolean.py", + "version": "1.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Boolean Algreba", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Sebastian Kraemer", + "email": null, + "url": null + } + ], + "keywords": [ + "boolean expression", + "boolean algebra", + "logic", + "expression parser", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Software Development :: Compilers", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/bastikr/boolean.py", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "bsd-new", + "declared_license": { + "license": "revised BSD license", + "classifiers": [ + "License :: OSI Approved :: BSD License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/boolean.py@1.2", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/b/boolean.py/boolean.py-1.2.tar.gz", + "api_data_url": "https://pypi.org/pypi/boolean.py/1.2/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/container_check_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/container_check_setup.py-expected.json index 888531f1c5e..b02cf08abd2 100644 --- a/tests/packagedcode/data/pypi/setup.py/container_check_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/container_check_setup.py-expected.json @@ -1,60 +1,62 @@ -{ - "type": "pypi", - "namespace": null, - "name": "container-check", - "version": "1.0.6", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Tool for checking and updating rpm based containers.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ian Main", - "email": null, - "url": null - } - ], - "keywords": [ - "containers update rpm yum", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Topic :: System :: Archiving :: Packaging", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" - ], - "homepage_url": "https://github.com/imain/container-check", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache Software License", - "classifiers": [ - "License :: OSI Approved :: Apache Software License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/container-check@1.0.6", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/c/container-check/container-check-1.0.6.tar.gz", - "api_data_url": "https://pypi.org/pypi/container-check/1.0.6/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "container-check", + "version": "1.0.6", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Tool for checking and updating rpm based containers.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Ian Main", + "email": null, + "url": null + } + ], + "keywords": [ + "containers update rpm yum", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Topic :: System :: Archiving :: Packaging", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5" + ], + "homepage_url": "https://github.com/imain/container-check", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache Software License", + "classifiers": [ + "License :: OSI Approved :: Apache Software License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/container-check@1.0.6", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/c/container-check/container-check-1.0.6.tar.gz", + "api_data_url": "https://pypi.org/pypi/container-check/1.0.6/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/fb303_py_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/fb303_py_setup.py-expected.json index cecb4e657b9..79587e01695 100644 --- a/tests/packagedcode/data/pypi/setup.py/fb303_py_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/fb303_py_setup.py-expected.json @@ -1,56 +1,58 @@ -{ - "type": "pypi", - "namespace": null, - "name": "thrift_fb303", - "version": "0.10.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python bindings for the Apache Thrift FB303", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": [ - "Thrift Developers" - ], - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Networking" - ], - "homepage_url": "http://thrift.apache.org", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache License 2.0" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/thrift-fb303@0.10.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/t/thrift_fb303/thrift_fb303-0.10.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/thrift_fb303/0.10.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "thrift_fb303", + "version": "0.10.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python bindings for the Apache Thrift FB303", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": [ + "Thrift Developers" + ], + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Topic :: Software Development :: Libraries", + "Topic :: System :: Networking" + ], + "homepage_url": "http://thrift.apache.org", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache License 2.0" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/thrift-fb303@0.10.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/t/thrift_fb303/thrift_fb303-0.10.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/thrift_fb303/0.10.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/frell_src_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/frell_src_setup.py-expected.json index 003a6a939e8..1797b05c890 100644 --- a/tests/packagedcode/data/pypi/setup.py/frell_src_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/frell_src_setup.py-expected.json @@ -1,46 +1,48 @@ -{ - "type": "pypi", - "namespace": null, - "name": "@NAME@", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python module @MODULE@", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Brett Smith", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache License 2.0" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/%40name%40", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/@NAME@/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "@NAME@", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python module @MODULE@", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Brett Smith", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache License 2.0" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/%40name%40", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/@NAME@/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/gyp_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/gyp_setup.py-expected.json index f0a878af49a..aa3d526f1fa 100644 --- a/tests/packagedcode/data/pypi/setup.py/gyp_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/gyp_setup.py-expected.json @@ -1,44 +1,46 @@ -{ - "type": "pypi", - "namespace": null, - "name": "gyp", - "version": "0.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Generate Your Projects", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Chromium Authors", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://code.google.com/p/gyp", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": {}, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/gyp@0.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/g/gyp/gyp-0.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/gyp/0.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "gyp", + "version": "0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Generate Your Projects", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Chromium Authors", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://code.google.com/p/gyp", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": {}, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/gyp@0.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/g/gyp/gyp-0.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/gyp/0.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/interlap_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/interlap_setup.py-expected.json index 8a7796fd9e8..cff4c470ea9 100644 --- a/tests/packagedcode/data/pypi/setup.py/interlap_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/interlap_setup.py-expected.json @@ -1,60 +1,62 @@ -{ - "type": "pypi", - "namespace": null, - "name": "interlap", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "interlap: fast, simple interval overlap testing", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Brent S Pedersen", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Intended Audience :: Science/Research", - "Natural Language :: English", - "Operating System :: Unix", - "Operating System :: Microsoft :: Windows", - "Operating System :: MacOS", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Scientific/Engineering :: Bio-Informatics" - ], - "homepage_url": "http://brentp.github.io/interlap", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/interlap", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/interlap/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "interlap", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "interlap: fast, simple interval overlap testing", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Brent S Pedersen", + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Operating System :: Unix", + "Operating System :: Microsoft :: Windows", + "Operating System :: MacOS", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Scientific/Engineering :: Bio-Informatics" + ], + "homepage_url": "http://brentp.github.io/interlap", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/interlap", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/interlap/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/mb_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/mb_setup.py-expected.json index 3ac76d404ed..b6191ac7496 100644 --- a/tests/packagedcode/data/pypi/setup.py/mb_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/mb_setup.py-expected.json @@ -1,46 +1,48 @@ -{ - "type": "pypi", - "namespace": null, - "name": "mb", - "version": "2.19.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "mb, a tool to maintain the MirrorBrain database", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "MirrorBrain project", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://mirrorbrain.org/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-2.0", - "declared_license": { - "license": "GPLv2" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/mb@2.19.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/m/mb/mb-2.19.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/mb/2.19.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "mb", + "version": "2.19.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "mb, a tool to maintain the MirrorBrain database", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "MirrorBrain project", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://mirrorbrain.org/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-2.0", + "declared_license": { + "license": "GPLv2" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/mb@2.19.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/m/mb/mb-2.19.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/mb/2.19.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/ntfs_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/ntfs_setup.py-expected.json index 1c37d74bbd5..c483d29efb3 100644 --- a/tests/packagedcode/data/pypi/setup.py/ntfs_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/ntfs_setup.py-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "ntfsutils", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A Python module to manipulate NTFS hard links and junctions.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Siddharth Agarwal", - "email": null, - "url": null - } - ], - "keywords": [ - "windows ntfs hardlink junction", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries :: Python Modules", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.2" - ], - "homepage_url": "https://github.com/sid0/ntfs", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown AND bsd-new", - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/ntfsutils", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/ntfsutils/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "ntfsutils", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A Python module to manipulate NTFS hard links and junctions.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Siddharth Agarwal", + "email": null, + "url": null + } + ], + "keywords": [ + "windows ntfs hardlink junction", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.2" + ], + "homepage_url": "https://github.com/sid0/ntfs", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown AND bsd-new", + "declared_license": { + "license": "BSD", + "classifiers": [ + "License :: OSI Approved :: BSD License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/ntfsutils", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/ntfsutils/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/nvchecker_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/nvchecker_setup.py-expected.json index 6661b54ecc4..b962dc1184e 100644 --- a/tests/packagedcode/data/pypi/setup.py/nvchecker_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/nvchecker_setup.py-expected.json @@ -1,84 +1,86 @@ -{ - "type": "pypi", - "namespace": null, - "name": "nvchecker", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "New version checker for software", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "lilydjwg", - "email": null, - "url": null - } - ], - "keywords": [ - "new version build check", - "Development Status :: 4 - Beta", - "Environment :: Console", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Topic :: Internet", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Software Distribution", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/lilydjwg/nvchecker", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/tornado", - "requirement": ">=4.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "nvchecker", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "New version checker for software", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "lilydjwg", + "email": null, + "url": null + } + ], + "keywords": [ + "new version build check", + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Topic :: Internet", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development", + "Topic :: System :: Archiving :: Packaging", + "Topic :: System :: Software Distribution", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/lilydjwg/nvchecker", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] }, - { - "purl": "pkg:pypi/setuptools", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/nvchecker", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/nvchecker/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/tornado", + "requirement": ">=4.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/setuptools", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/nvchecker", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/nvchecker/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/oi_agents_common_code_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/oi_agents_common_code_setup.py-expected.json index aafcb803b0a..473930daaa7 100644 --- a/tests/packagedcode/data/pypi/setup.py/oi_agents_common_code_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/oi_agents_common_code_setup.py-expected.json @@ -1,59 +1,61 @@ -{ - "type": "pypi", - "namespace": null, - "name": "agents_common", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Function utils for OII agents", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "__author__", - "email": null, - "url": null - } - ], - "keywords": [ - "agents development utils", - "Development Status :: 3 - Alpha", - "Environment :: Console", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python :: 2.7", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" - ], - "homepage_url": "https://lab.openintegrity.org/agents/agents-common-code", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "gpl-3.0 AND (free-unknown AND gpl-3.0)", - "declared_license": { - "license": "GPLv3", - "classifiers": [ - "License :: OSI Approved :: GPLv3 License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/agents-common", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/agents_common/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "agents_common", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Function utils for OII agents", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "__author__", + "email": null, + "url": null + } + ], + "keywords": [ + "agents development utils", + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: Developers", + "Natural Language :: English", + "Programming Language :: Python :: 2.7", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Utilities" + ], + "homepage_url": "https://lab.openintegrity.org/agents/agents-common-code", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "gpl-3.0 AND (free-unknown AND gpl-3.0)", + "declared_license": { + "license": "GPLv3", + "classifiers": [ + "License :: OSI Approved :: GPLv3 License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/agents-common", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/agents_common/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/packageurl_python_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/packageurl_python_setup.py-expected.json index 2b66a5e87a9..511aa6a6a39 100644 --- a/tests/packagedcode/data/pypi/setup.py/packageurl_python_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/packageurl_python_setup.py-expected.json @@ -1,64 +1,66 @@ -{ - "type": "pypi", - "namespace": null, - "name": "packageurl-python", - "version": "0.8.5", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A \"purl\" aka. package URL parser and builder", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "the purl authors", - "email": null, - "url": null - } - ], - "keywords": [ - "package", - "url", - "package manager", - "package url", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Topic :: Software Development :: Libraries", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/package-url/packageurl-python", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/packageurl-python@0.8.5", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/packageurl-python/packageurl-python-0.8.5.tar.gz", - "api_data_url": "https://pypi.org/pypi/packageurl-python/0.8.5/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "packageurl-python", + "version": "0.8.5", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A \"purl\" aka. package URL parser and builder", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "the purl authors", + "email": null, + "url": null + } + ], + "keywords": [ + "package", + "url", + "package manager", + "package url", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Topic :: Software Development :: Libraries", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/package-url/packageurl-python", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/packageurl-python@0.8.5", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/packageurl-python/packageurl-python-0.8.5.tar.gz", + "api_data_url": "https://pypi.org/pypi/packageurl-python/0.8.5/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/pipdeptree_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/pipdeptree_setup.py-expected.json index e25dabafc20..4e6362c6226 100644 --- a/tests/packagedcode/data/pypi/setup.py/pipdeptree_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/pipdeptree_setup.py-expected.json @@ -1,59 +1,61 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pipdeptree", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Command line utility to show dependency tree of packages", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Vineet Naik", - "email": null, - "url": null - } - ], - "keywords": [ - "Environment :: Console", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6" - ], - "homepage_url": "https://github.com/naiquevin/pipdeptree", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT License", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pipdeptree", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/pipdeptree/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pipdeptree", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Command line utility to show dependency tree of packages", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Vineet Naik", + "email": null, + "url": null + } + ], + "keywords": [ + "Environment :: Console", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6" + ], + "homepage_url": "https://github.com/naiquevin/pipdeptree", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT License", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pipdeptree", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/pipdeptree/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/pydep_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/pydep_setup.py-expected.json index 7e14bc21345..f8ad6d00af1 100644 --- a/tests/packagedcode/data/pypi/setup.py/pydep_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/pydep_setup.py-expected.json @@ -1,53 +1,55 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pydep", - "version": "0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A simple module that will print the dependencies of a python projectUsage: python -m pydep ", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Beyang Liu", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://github.com/sourcegraph/pydep", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": {}, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pip@7.1.2", - "requirement": "==7.1.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pydep@0.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pydep/pydep-0.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/pydep/0.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pydep", + "version": "0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A simple module that will print the dependencies of a python projectUsage: python -m pydep ", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Beyang Liu", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://github.com/sourcegraph/pydep", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": {}, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pip@7.1.2", + "requirement": "==7.1.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pydep@0.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pydep/pydep-0.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/pydep/0.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/pyrpm_2_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/pyrpm_2_setup.py-expected.json index 8f51ca5f900..8c7b973324d 100644 --- a/tests/packagedcode/data/pypi/setup.py/pyrpm_2_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/pyrpm_2_setup.py-expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pyrpm-02strich", - "version": "0.5.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A pure python rpm reader and YUM metadata generator", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stefan Richter", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.4", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.1", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": "https://github.com/02strich/pyrpm", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown AND bsd-new", - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pyrpm-02strich@0.5.3", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pyrpm-02strich/pyrpm-02strich-0.5.3.tar.gz", - "api_data_url": "https://pypi.org/pypi/pyrpm-02strich/0.5.3/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pyrpm-02strich", + "version": "0.5.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A pure python rpm reader and YUM metadata generator", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Stefan Richter", + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 4 - Beta", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.4", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.1", + "Topic :: Software Development :: Libraries" + ], + "homepage_url": "https://github.com/02strich/pyrpm", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown AND bsd-new", + "declared_license": { + "license": "BSD", + "classifiers": [ + "License :: OSI Approved :: BSD License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pyrpm-02strich@0.5.3", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pyrpm-02strich/pyrpm-02strich-0.5.3.tar.gz", + "api_data_url": "https://pypi.org/pypi/pyrpm-02strich/0.5.3/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/python_publicsuffix_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/python_publicsuffix_setup.py-expected.json index f1077438ba5..893566c4ab6 100644 --- a/tests/packagedcode/data/pypi/setup.py/python_publicsuffix_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/python_publicsuffix_setup.py-expected.json @@ -1,54 +1,56 @@ -{ - "type": "pypi", - "namespace": null, - "name": "publicsuffix", - "version": "1.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Get a public suffix for a domain name using the Public Suffix List.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Tomaz Solc", - "email": null, - "url": null - } - ], - "keywords": [ - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "Topic :: Internet :: Name Service (DNS)" - ], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/publicsuffix@1.1.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/publicsuffix/publicsuffix-1.1.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/publicsuffix/1.1.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "publicsuffix", + "version": "1.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Get a public suffix for a domain name using the Public Suffix List.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Tomaz Solc", + "email": null, + "url": null + } + ], + "keywords": [ + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Topic :: Internet :: Name Service (DNS)" + ], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/publicsuffix@1.1.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/publicsuffix/publicsuffix-1.1.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/publicsuffix/1.1.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/repology_py_libversion_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/repology_py_libversion_setup.py-expected.json index e1faff3a7c2..9a0d0bf3e62 100644 --- a/tests/packagedcode/data/pypi/setup.py/repology_py_libversion_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/repology_py_libversion_setup.py-expected.json @@ -1,59 +1,61 @@ -{ - "type": "pypi", - "namespace": null, - "name": "libversion", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python bindings for libversion", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Dmitry Marakasov", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 4 - Beta", - "Environment :: Console", - "Environment :: Web Environment", - "Programming Language :: C", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Topic :: Software Development :: Version Control", - "Topic :: System :: Archiving :: Packaging", - "Topic :: System :: Software Distribution" - ], - "homepage_url": "https://github.com/repology/py-libversion", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/libversion", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/libversion/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "libversion", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python bindings for libversion", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Dmitry Marakasov", + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Environment :: Web Environment", + "Programming Language :: C", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "Topic :: Software Development :: Version Control", + "Topic :: System :: Archiving :: Packaging", + "Topic :: System :: Software Distribution" + ], + "homepage_url": "https://github.com/repology/py-libversion", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/libversion", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/libversion/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/saneyaml_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/saneyaml_setup.py-expected.json index bffe5ca2474..e0fcf496697 100644 --- a/tests/packagedcode/data/pypi/setup.py/saneyaml_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/saneyaml_setup.py-expected.json @@ -1,73 +1,75 @@ -{ - "type": "pypi", - "namespace": null, - "name": "saneyaml", - "version": "0.2dev", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Dump readable YAML and load safely any YAML preserving ordering and avoiding surprises of type conversions. This library is a PyYaml wrapper with sane behaviour to read and write readable YAML safely, typically when used for configuration.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "AboutCode authors and others.", - "email": null, - "url": null - } - ], - "keywords": [ - "yaml", - "block", - "flow", - "readable", - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Topic :: Software Development", - "Topic :: Utilities" - ], - "homepage_url": "http://aboutcode.org", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache-2.0", - "classifiers": [ - "License :: OSI Approved :: Apache Software License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pyyaml", - "requirement": "<=3.13,>=3.11", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/saneyaml@0.2dev", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/s/saneyaml/saneyaml-0.2dev.tar.gz", - "api_data_url": "https://pypi.org/pypi/saneyaml/0.2dev/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "saneyaml", + "version": "0.2dev", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Dump readable YAML and load safely any YAML preserving ordering and avoiding surprises of type conversions. This library is a PyYaml wrapper with sane behaviour to read and write readable YAML safely, typically when used for configuration.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "AboutCode authors and others.", + "email": null, + "url": null + } + ], + "keywords": [ + "yaml", + "block", + "flow", + "readable", + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Topic :: Software Development", + "Topic :: Utilities" + ], + "homepage_url": "http://aboutcode.org", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache-2.0", + "classifiers": [ + "License :: OSI Approved :: Apache Software License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pyyaml", + "requirement": "<=3.13,>=3.11", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/saneyaml@0.2dev", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/s/saneyaml/saneyaml-0.2dev.tar.gz", + "api_data_url": "https://pypi.org/pypi/saneyaml/0.2dev/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/setup.py-expected.json index 6d7e98c8c6e..6974d15743f 100644 --- a/tests/packagedcode/data/pypi/setup.py/setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/setup.py-expected.json @@ -1,230 +1,232 @@ -{ - "type": "pypi", - "namespace": null, - "name": "scancode-toolkit", - "version": "1.5.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "ScanCode is a tool to scan code for license, copyright and other interesting facts.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "ScanCode", - "email": null, - "url": null - } - ], - "keywords": [ - "license", - "filetype", - "urn", - "date", - "codec", - "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/nexB/scancode-toolkit", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "(((apache-2.0 AND scancode-acknowledgment) AND cc0-1.0) AND unknown) AND apache-2.0 AND (free-unknown AND unknown)", - "declared_license": { - "license": "Apache-2.0 with ScanCode acknowledgment and CC0-1.0 and others", - "classifiers": [ - "License :: OSI Approved :: Apache Software License", - "License :: OSI Approved :: CC0" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/py2-ipaddress", - "requirement": "<3.0,>=2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/url", - "requirement": ">=0.1.4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/publicsuffix2", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nltk", - "requirement": "<3.0.0,>=2.0b4", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/patch", - "requirement": "<1.15,>=1.14.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/bz2file", - "requirement": ">=0.98", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pyyaml", - "requirement": "<4.0,>=3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/beautifulsoup", - "requirement": "<4.0.0,>=3.2.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/beautifulsoup4", - "requirement": "<5.0.0,>=4.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/html5lib", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/six", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pygments", - "requirement": "<3.0.0,>=2.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pdfminer", - "requirement": ">=20140328", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/chardet", - "requirement": "<3.0.0,>=2.1.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/binaryornot", - "requirement": ">=0.4.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/click", - "requirement": "<5.0.0,>=4.0.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/jinja2", - "requirement": "<3.0.0,>=2.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/markupsafe", - "requirement": ">=0.23", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/colorama", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/about-code-tool", - "requirement": ">=0.9.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/requests", - "requirement": "<3.0.0,>=2.7.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/scancode-toolkit@1.5.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/s/scancode-toolkit/scancode-toolkit-1.5.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/scancode-toolkit/1.5.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "scancode-toolkit", + "version": "1.5.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "ScanCode is a tool to scan code for license, copyright and other interesting facts.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "ScanCode", + "email": null, + "url": null + } + ], + "keywords": [ + "license", + "filetype", + "urn", + "date", + "codec", + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 2.7", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/nexB/scancode-toolkit", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "(((apache-2.0 AND scancode-acknowledgment) AND cc0-1.0) AND unknown) AND apache-2.0 AND (free-unknown AND unknown)", + "declared_license": { + "license": "Apache-2.0 with ScanCode acknowledgment and CC0-1.0 and others", + "classifiers": [ + "License :: OSI Approved :: Apache Software License", + "License :: OSI Approved :: CC0" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/py2-ipaddress", + "requirement": "<3.0,>=2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/url", + "requirement": ">=0.1.4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/publicsuffix2", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nltk", + "requirement": "<3.0.0,>=2.0b4", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/patch", + "requirement": "<1.15,>=1.14.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/bz2file", + "requirement": ">=0.98", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pyyaml", + "requirement": "<4.0,>=3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/beautifulsoup", + "requirement": "<4.0.0,>=3.2.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/beautifulsoup4", + "requirement": "<5.0.0,>=4.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/html5lib", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/six", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pygments", + "requirement": "<3.0.0,>=2.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pdfminer", + "requirement": ">=20140328", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/chardet", + "requirement": "<3.0.0,>=2.1.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/binaryornot", + "requirement": ">=0.4.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/click", + "requirement": "<5.0.0,>=4.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/jinja2", + "requirement": "<3.0.0,>=2.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/markupsafe", + "requirement": ">=0.23", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/colorama", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/about-code-tool", + "requirement": ">=0.9.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/requests", + "requirement": "<3.0.0,>=2.7.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/scancode-toolkit@1.5.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/s/scancode-toolkit/scancode-toolkit-1.5.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/scancode-toolkit/1.5.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/setuppycheck_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/setuppycheck_setup.py-expected.json index 7bd0e99c38c..f08e26b48a4 100644 --- a/tests/packagedcode/data/pypi/setup.py/setuppycheck_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/setuppycheck_setup.py-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "setuppycheck", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Checks for questionable practices in setup.py files.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Marc Abramowitz", - "email": null, - "url": null - } - ], - "keywords": [ - "setup.py pin dependencies" - ], - "homepage_url": "https://github.com/msabramo/setuppycheck", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT" - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/mock", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/setuppycheck", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/setuppycheck/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "setuppycheck", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Checks for questionable practices in setup.py files.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Marc Abramowitz", + "email": null, + "url": null + } + ], + "keywords": [ + "setup.py pin dependencies" + ], + "homepage_url": "https://github.com/msabramo/setuppycheck", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT" + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/mock", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/setuppycheck", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/setuppycheck/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/url_py_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/url_py_setup.py-expected.json index 890f4e92c8f..2fec6b61e90 100644 --- a/tests/packagedcode/data/pypi/setup.py/url_py_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/url_py_setup.py-expected.json @@ -1,63 +1,65 @@ -{ - "type": "pypi", - "namespace": null, - "name": "urlpy", - "version": "0.2.0.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "URL Parsing", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Dan Lecocq", - "email": null, - "url": null - } - ], - "keywords": [ - "Development Status :: 3 - Alpha", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP" - ], - "homepage_url": "http://github.com/nexB/url-py", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/publicsuffix2", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/urlpy@0.2.0.2", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/u/urlpy/urlpy-0.2.0.2.tar.gz", - "api_data_url": "https://pypi.org/pypi/urlpy/0.2.0.2/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "urlpy", + "version": "0.2.0.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "URL Parsing", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Dan Lecocq", + "email": null, + "url": null + } + ], + "keywords": [ + "Development Status :: 3 - Alpha", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP" + ], + "homepage_url": "http://github.com/nexB/url-py", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/publicsuffix2", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/urlpy@0.2.0.2", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/u/urlpy/urlpy-0.2.0.2.tar.gz", + "api_data_url": "https://pypi.org/pypi/urlpy/0.2.0.2/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/venv_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/venv_setup.py-expected.json index 14f88fcb2a0..a3742f78860 100644 --- a/tests/packagedcode/data/pypi/setup.py/venv_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/venv_setup.py-expected.json @@ -1,67 +1,69 @@ -{ - "type": "pypi", - "namespace": null, - "name": "virtualenv", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Virtual Python Environment builder", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Ian Bicking", - "email": null, - "url": null +[ + { + "type": "pypi", + "namespace": null, + "name": "virtualenv", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Virtual Python Environment builder", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Ian Bicking", + "email": null, + "url": null + }, + { + "type": "person", + "role": "maintainer", + "name": "Jannis Leidel, Carl Meyer and Brian Rosner", + "email": null, + "url": null + } + ], + "keywords": [ + "setuptools deployment installation distutils", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5" + ], + "homepage_url": "https://virtualenv.pypa.io/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] }, - { - "type": "person", - "role": "maintainer", - "name": "Jannis Leidel, Carl Meyer and Brian Rosner", - "email": null, - "url": null - } - ], - "keywords": [ - "setuptools deployment installation distutils", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" - ], - "homepage_url": "https://virtualenv.pypa.io/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/virtualenv", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/virtualenv/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/virtualenv", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/virtualenv/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/with_name-setup.py.expected.json b/tests/packagedcode/data/pypi/setup.py/with_name-setup.py.expected.json index 9b93fc3266e..6e4b2563799 100644 --- a/tests/packagedcode/data/pypi/setup.py/with_name-setup.py.expected.json +++ b/tests/packagedcode/data/pypi/setup.py/with_name-setup.py.expected.json @@ -1,46 +1,48 @@ -{ - "type": "pypi", - "namespace": null, - "name": "arpy", - "version": "0.1.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Library for accessing \"ar\" files", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Stanis\u0142aw Pitucha", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://bitbucket.org/viraptor/arpy", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "bsd-simplified", - "declared_license": { - "license": "Simplified BSD" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/arpy@0.1.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/a/arpy/arpy-0.1.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/arpy/0.1.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "arpy", + "version": "0.1.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Library for accessing \"ar\" files", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Stanis\u0142aw Pitucha", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://bitbucket.org/viraptor/arpy", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "bsd-simplified", + "declared_license": { + "license": "Simplified BSD" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/arpy@0.1.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/a/arpy/arpy-0.1.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/arpy/0.1.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/without_name-setup.py.expected.json b/tests/packagedcode/data/pypi/setup.py/without_name-setup.py.expected.json index fbb071b8ee1..85e34b5ecd5 100644 --- a/tests/packagedcode/data/pypi/setup.py/without_name-setup.py.expected.json +++ b/tests/packagedcode/data/pypi/setup.py/without_name-setup.py.expected.json @@ -1,44 +1,46 @@ -{ - "type": "pypi", - "namespace": null, - "name": null, - "version": "1.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A sample package", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Test", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": {}, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": null, + "version": "1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A sample package", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Test", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": {}, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/setup.py/xmltodict_setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py/xmltodict_setup.py-expected.json index 5f15a8e7b47..3af5e439972 100644 --- a/tests/packagedcode/data/pypi/setup.py/xmltodict_setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py/xmltodict_setup.py-expected.json @@ -1,56 +1,58 @@ -{ - "type": "pypi", - "namespace": null, - "name": "xmltodict", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "", - "release_date": null, - "parties": [], - "keywords": [ - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.5", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: Implementation :: Jython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Text Processing :: Markup :: XML" - ], - "homepage_url": "https://github.com/martinblech/xmltodict", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/xmltodict", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": null, - "api_data_url": "https://pypi.org/pypi/xmltodict/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "xmltodict", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "", + "release_date": null, + "parties": [], + "keywords": [ + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.5", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: Implementation :: Jython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Text Processing :: Markup :: XML" + ], + "homepage_url": "https://github.com/martinblech/xmltodict", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/xmltodict", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/xmltodict/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-expected.json index 34c11d2866e..71d6f439055 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-expected.json @@ -1,49 +1,51 @@ -{ - "type": "pypi", - "namespace": null, - "name": "PyJPString", - "version": "0.0.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python japanese string utilities.\nUNKNOWN", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "odoku", - "email": "masashi.onogawa@wamw.jp", - "url": null - } - ], - "keywords": [ - "japanese", - "string" - ], - "homepage_url": "http://github.com/odoku/PyJPString", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pyjpstring@0.0.3", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/P/PyJPString/PyJPString-0.0.3.tar.gz", - "api_data_url": "https://pypi.org/pypi/PyJPString/0.0.3/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "PyJPString", + "version": "0.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python japanese string utilities.\nUNKNOWN", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "odoku", + "email": "masashi.onogawa@wamw.jp", + "url": null + } + ], + "keywords": [ + "japanese", + "string" + ], + "homepage_url": "http://github.com/odoku/PyJPString", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pyjpstring@0.0.3", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/P/PyJPString/PyJPString-0.0.3.tar.gz", + "api_data_url": "https://pypi.org/pypi/PyJPString/0.0.3/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json index 6047ea679e4..e87cc050809 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json @@ -1,82 +1,84 @@ -{ - "type": "pypi", - "namespace": null, - "name": "PyJPString", - "version": "0.0.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python japanese string utilities.\nUNKNOWN", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "odoku", - "email": "masashi.onogawa@wamw.jp", - "url": null - } - ], - "keywords": [ - "japanese", - "string" - ], - "homepage_url": "http://github.com/odoku/PyJPString", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT" - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/six", - "requirement": ">=1.10.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "PyJPString", + "version": "0.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python japanese string utilities.\nUNKNOWN", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "odoku", + "email": "masashi.onogawa@wamw.jp", + "url": null + } + ], + "keywords": [ + "japanese", + "string" + ], + "homepage_url": "http://github.com/odoku/PyJPString", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT" }, - { - "purl": "pkg:pypi/zenhan", - "requirement": ">=0.5.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/django", - "requirement": null, - "scope": "test", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest@2.9.1", - "requirement": "==2.9.1", - "scope": "test", - "is_runtime": true, - "is_optional": false, - "is_resolved": true - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pyjpstring@0.0.3", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/P/PyJPString/PyJPString-0.0.3.tar.gz", - "api_data_url": "https://pypi.org/pypi/PyJPString/0.0.3/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/six", + "requirement": ">=1.10.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/zenhan", + "requirement": ">=0.5.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/django", + "requirement": null, + "scope": "test", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest@2.9.1", + "requirement": "==2.9.1", + "scope": "test", + "is_runtime": true, + "is_optional": false, + "is_resolved": true + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pyjpstring@0.0.3", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/P/PyJPString/PyJPString-0.0.3.tar.gz", + "api_data_url": "https://pypi.org/pypi/PyJPString/0.0.3/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0-expected.json index d2cd8d860e4..e8004b3d6d9 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "python-mimeparse", - "version": "1.6.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "DB Tsai", - "email": "dbtsai@dbtsai.com", - "url": null - } - ], - "keywords": [ - "mime-type", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/dbtsai/python-mimeparse", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", - "copyright": null, - "license_expression": "mit", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/python-mimeparse@1.6.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "python-mimeparse", + "version": "1.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "DB Tsai", + "email": "dbtsai@dbtsai.com", + "url": null + } + ], + "keywords": [ + "mime-type", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Python Modules" + ], + "homepage_url": "https://github.com/dbtsai/python-mimeparse", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", + "copyright": null, + "license_expression": "mit", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/python-mimeparse@1.6.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0-expected.json index 678ff79b576..8da4cf40819 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0-expected.json @@ -1,61 +1,63 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pyup-django", - "version": "0.4.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "pyup-django checks your installed dependencies for known security vulnerabilities and displays them in the admin area.\n[![PyPi](https://img.shields.io/pypi/v/pyup-django.svg)](https://pypi.python.org/pypi/pyup-django)\n[![Travis](https://img.shields.io/travis/pyupio/pyup-django.svg)](https://travis-ci.org/pyupio/pyup-django)\n\n# About\n\nDisplays a red warning banner if you are running an insecure Django release.\n\n![insecure](insecure.png)\n\n# Installation\n\nInstall `pyup-django` with pip:\n\n```\npip install pyup-django\n```\n\nand add it to your `INSTALLED_APPS`, before `django.contrib.admin`\n\n```\nINSTALLED_APPS = [\n 'pyup_django',\n 'django.contrib.admin',\n]\n```\n\n# How does it work?\n\n`pyup-django` extends the admin base template and checks [https://pyup.io/api/v1/insecure/django/](https://pyup.io/api/v1/insecure/django/)\nif the currently installed Django release is insecure.\n\nRequests to the API are cached for 24 hours and won't leak any sensitive\ninformation other than the servers IP address.\n\n\n# Support\n\nIf you are using `pyup-django` in one of your projects, please consider getting a paid\n[pyup.io](https://pyup.io) account. This is what makes projects like this possible.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "pyup.io", - "email": "support@pyup.io", - "url": null - } - ], - "keywords": [ - "pyup_django", - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5" - ], - "homepage_url": "https://github.com/pyupio/pyup-django", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT license", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pyup-django@0.4.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pyup-django/pyup-django-0.4.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/pyup-django/0.4.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pyup-django", + "version": "0.4.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "pyup-django checks your installed dependencies for known security vulnerabilities and displays them in the admin area.\n[![PyPi](https://img.shields.io/pypi/v/pyup-django.svg)](https://pypi.python.org/pypi/pyup-django)\n[![Travis](https://img.shields.io/travis/pyupio/pyup-django.svg)](https://travis-ci.org/pyupio/pyup-django)\n\n# About\n\nDisplays a red warning banner if you are running an insecure Django release.\n\n![insecure](insecure.png)\n\n# Installation\n\nInstall `pyup-django` with pip:\n\n```\npip install pyup-django\n```\n\nand add it to your `INSTALLED_APPS`, before `django.contrib.admin`\n\n```\nINSTALLED_APPS = [\n 'pyup_django',\n 'django.contrib.admin',\n]\n```\n\n# How does it work?\n\n`pyup-django` extends the admin base template and checks [https://pyup.io/api/v1/insecure/django/](https://pyup.io/api/v1/insecure/django/)\nif the currently installed Django release is insecure.\n\nRequests to the API are cached for 24 hours and won't leak any sensitive\ninformation other than the servers IP address.\n\n\n# Support\n\nIf you are using `pyup-django` in one of your projects, please consider getting a paid\n[pyup.io](https://pyup.io) account. This is what makes projects like this possible.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "pyup.io", + "email": "support@pyup.io", + "url": null + } + ], + "keywords": [ + "pyup_django", + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Natural Language :: English", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5" + ], + "homepage_url": "https://github.com/pyupio/pyup-django", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT license", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pyup-django@0.4.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pyup-django/pyup-django-0.4.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/pyup-django/0.4.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19-expected.json index 2e7c0b7e9f2..55d695356aa 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19-expected.json @@ -1,56 +1,58 @@ -{ - "type": "pypi", - "namespace": null, - "name": "anonapi", - "version": "0.0.19", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Client and tools for working with the anoymization web API\n=======\nAnonAPI\n=======\n\n.. image:: https://img.shields.io/pypi/v/anonapi.svg\n :target: https://pypi.python.org/pypi/anonapi", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Sjoerd Kerkstra", - "email": "sjoerd.kerkstra@radboudumc.nl", - "url": null - } - ], - "keywords": [ - "anonapi", - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" - ], - "homepage_url": "https://github.com/sjoerdk/anonapi", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT license", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/anonapi@0.0.19", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/a/anonapi/anonapi-0.0.19.tar.gz", - "api_data_url": "https://pypi.org/pypi/anonapi/0.0.19/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "anonapi", + "version": "0.0.19", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Client and tools for working with the anoymization web API\n=======\nAnonAPI\n=======\n\n.. image:: https://img.shields.io/pypi/v/anonapi.svg\n :target: https://pypi.python.org/pypi/anonapi", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Sjoerd Kerkstra", + "email": "sjoerd.kerkstra@radboudumc.nl", + "url": null + } + ], + "keywords": [ + "anonapi", + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Natural Language :: English", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7" + ], + "homepage_url": "https://github.com/sjoerdk/anonapi", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT license", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/anonapi@0.0.19", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/a/anonapi/anonapi-0.0.19.tar.gz", + "api_data_url": "https://pypi.org/pypi/anonapi/0.0.19/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12-expected.json index 0102ddfe7b8..9d258ae539d 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12-expected.json @@ -1,55 +1,57 @@ -{ - "type": "pypi", - "namespace": null, - "name": "commoncode", - "version": "21.5.12", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Set of common utilities, originally split from ScanCode\nCommonCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/commoncode\n- keywords: utilities, scancode-toolkit, commoncode\n\nCommoncode provides a set of common functions and utilities for handling various things like paths,\ndates, files and hashes. It started as library in scancode-toolkit.\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\n\nTo install this package use::\n\n pip install commoncode\n\n\n\nAlternatively, to set up a development environment::\n\n source configure --dev\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "nexB. Inc. and others", - "email": "info@aboutcode.org", - "url": null - } - ], - "keywords": [ - "utilities", - "scancode-toolkit", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/nexB/commoncode", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache-2.0" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/commoncode@21.5.12", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/c/commoncode/commoncode-21.5.12.tar.gz", - "api_data_url": "https://pypi.org/pypi/commoncode/21.5.12/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "commoncode", + "version": "21.5.12", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Set of common utilities, originally split from ScanCode\nCommonCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/commoncode\n- keywords: utilities, scancode-toolkit, commoncode\n\nCommoncode provides a set of common functions and utilities for handling various things like paths,\ndates, files and hashes. It started as library in scancode-toolkit.\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\n\nTo install this package use::\n\n pip install commoncode\n\n\n\nAlternatively, to set up a development environment::\n\n source configure --dev\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "nexB. Inc. and others", + "email": "info@aboutcode.org", + "url": null + } + ], + "keywords": [ + "utilities", + "scancode-toolkit", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/nexB/commoncode", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache-2.0" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/commoncode@21.5.12", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/c/commoncode/commoncode-21.5.12.tar.gz", + "api_data_url": "https://pypi.org/pypi/commoncode/21.5.12/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info-expected.json index 596231b4fea..5792a91779f 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info-expected.json @@ -1,83 +1,85 @@ -{ - "type": "pypi", - "namespace": null, - "name": "Jinja2", - "version": "2.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A small but fast and easy to use stand-alone template engine written in pure python.\nJinja2\n~~~~~~\n\nJinja2 is a template engine written in pure Python. It provides a\n`Django`_ inspired non-XML syntax but supports inline expressions and\nan optional `sandboxed`_ environment.\n\nNutshell\n--------\n\nHere a small example of a Jinja template::\n\n {% extends 'base.html' %}\n {% block title %}Memberlist{% endblock %}\n {% block content %}\n \n {% endblock %}\n\nPhilosophy\n----------\n\nApplication logic is for the controller but don't try to make the life\nfor the template designer too hard by giving him too few functionality.\n\nFor more informations visit the new `Jinja2 webpage`_ and `documentation`_.\n\n.. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security)\n.. _Django: https://www.djangoproject.com/\n.. _Jinja2 webpage: http://jinja.pocoo.org/\n.. _documentation: http://jinja.pocoo.org/2/documentation/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Text Processing :: Markup :: HTML" - ], - "homepage_url": "http://jinja.pocoo.org/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown AND bsd-new", - "declared_license": { - "license": "BSD", - "classifiers": [ - "License :: OSI Approved :: BSD License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/markupsafe", - "requirement": ">=0.23", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "Jinja2", + "version": "2.10", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A small but fast and easy to use stand-alone template engine written in pure python.\nJinja2\n~~~~~~\n\nJinja2 is a template engine written in pure Python. It provides a\n`Django`_ inspired non-XML syntax but supports inline expressions and\nan optional `sandboxed`_ environment.\n\nNutshell\n--------\n\nHere a small example of a Jinja template::\n\n {% extends 'base.html' %}\n {% block title %}Memberlist{% endblock %}\n {% block content %}\n \n {% endblock %}\n\nPhilosophy\n----------\n\nApplication logic is for the controller but don't try to make the life\nfor the template designer too hard by giving him too few functionality.\n\nFor more informations visit the new `Jinja2 webpage`_ and `documentation`_.\n\n.. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security)\n.. _Django: https://www.djangoproject.com/\n.. _Jinja2 webpage: http://jinja.pocoo.org/\n.. _documentation: http://jinja.pocoo.org/2/documentation/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "url": null + } + ], + "keywords": [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Text Processing :: Markup :: HTML" + ], + "homepage_url": "http://jinja.pocoo.org/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown AND bsd-new", + "declared_license": { + "license": "BSD", + "classifiers": [ + "License :: OSI Approved :: BSD License" + ] }, - { - "purl": "pkg:pypi/babel", - "requirement": ">=0.8", - "scope": "i18n", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/jinja2@2.10", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/J/Jinja2/Jinja2-2.10.tar.gz", - "api_data_url": "https://pypi.org/pypi/Jinja2/2.10/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/markupsafe", + "requirement": ">=0.23", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/babel", + "requirement": ">=0.8", + "scope": "i18n", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/jinja2@2.10", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/J/Jinja2/Jinja2-2.10.tar.gz", + "api_data_url": "https://pypi.org/pypi/Jinja2/2.10/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info-expected.json index d2cd8d860e4..e8004b3d6d9 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info-expected.json @@ -1,57 +1,59 @@ -{ - "type": "pypi", - "namespace": null, - "name": "python-mimeparse", - "version": "1.6.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "DB Tsai", - "email": "dbtsai@dbtsai.com", - "url": null - } - ], - "keywords": [ - "mime-type", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Operating System :: OS Independent", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries :: Python Modules" - ], - "homepage_url": "https://github.com/dbtsai/python-mimeparse", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", - "copyright": null, - "license_expression": "mit", - "declared_license": { - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/python-mimeparse@1.6.0", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", - "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "python-mimeparse", + "version": "1.6.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.\nPython-MimeParse\n================\n\n.. image:: https://travis-ci.org/dbtsai/python-mimeparse.svg?branch=master\n :target: https://travis-ci.org/dbtsai/python-mimeparse\n\nThis module provides basic functions for handling mime-types. It can\nhandle matching mime-types against a list of media-ranges. See section\n5.3.2 of the HTTP 1.1 Semantics and Content specification [RFC 7231] for\na complete explanation: https://tools.ietf.org/html/rfc7231#section-5.3.2\n\nInstallation\n------------\n\nUse **pip**:\n\n.. code-block:: sh\n\n $ pip install python-mimeparse\n\nIt supports Python 2.7 - 3.5 and PyPy.\n\nFunctions\n---------\n\n**parse_mime_type()**\n\nParses a mime-type into its component parts.\n\n**parse_media_range()**\n\nMedia-ranges are mime-types with wild-cards and a \"q\" quality parameter.\n\n**quality()**\n\nDetermines the quality (\"q\") of a mime-type when compared against a list of\nmedia-ranges.\n\n**quality_parsed()**\n\nJust like ``quality()`` except the second parameter must be pre-parsed.\n\n**best_match()**\n\nChoose the mime-type with the highest quality (\"q\") from a list of candidates.\n\nTesting\n-------\n\nRun the tests by typing: ``python mimeparse_test.py``. The tests require Python 2.6.\n\nTo make sure that the package works in all the supported environments, you can\nrun **tox** tests:\n\n.. code-block:: sh\n\n $ pip install tox\n $ tox\n\nThe format of the JSON test data file is as follows: A top-level JSON object\nwhich has a key for each of the functions to be tested. The value corresponding\nto that key is a list of tests. Each test contains: the argument or arguments\nto the function being tested, the expected results and an optional description.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "DB Tsai", + "email": "dbtsai@dbtsai.com", + "url": null + } + ], + "keywords": [ + "mime-type", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries :: Python Modules" + ], + "homepage_url": "https://github.com/dbtsai/python-mimeparse", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/dbtsai/python-mimeparse/tarball/1.6.0", + "copyright": null, + "license_expression": "mit", + "declared_license": { + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/python-mimeparse@1.6.0", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/python-mimeparse/python-mimeparse-1.6.0.tar.gz", + "api_data_url": "https://pypi.org/pypi/python-mimeparse/1.6.0/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info-expected.json index 6536fe22a8b..b34399928cc 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info-expected.json @@ -1,66 +1,68 @@ -{ - "type": "pypi", - "namespace": null, - "name": "toml", - "version": "0.10.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Python Library for Tom's Obvious, Minimal Language\n****\nTOML\n****\n\n.. image:: https://badge.fury.io/py/toml.svg\n :target: https://badge.fury.io/py/toml\n\n.. image:: https://travis-ci.org/uiri/toml.svg?branch=master\n :target: https://travis-ci.org/uiri/toml\n\n.. image:: https://img.shields.io/pypi/pyversions/toml.svg\n :target: https://pypi.org/project/toml/\n\n\nA Python library for parsing and creating `TOML `_.\n\nThe module passes `the TOML test suite `_.\n\nSee also:\n\n* `The TOML Standard `_\n* `The currently supported TOML specification `_\n\nInstallation\n============\n\nTo install the latest release on `PyPI `_,\nsimply run:\n\n::\n\n pip install toml\n\nOr to install the latest development version, run:\n\n::\n\n git clone https://github.com/uiri/toml.git\n cd toml\n python setup.py install\n\nQuick Tutorial\n==============\n\n*toml.loads* takes in a string containing standard TOML-formatted data and\nreturns a dictionary containing the parsed data.\n\n.. code:: pycon\n\n >>> import toml\n >>> toml_string = \"\"\"\n ... # This is a TOML document.\n ...\n ... title = \"TOML Example\"\n ...\n ... [owner]\n ... name = \"Tom Preston-Werner\"\n ... dob = 1979-05-27T07:32:00-08:00 # First class dates\n ...\n ... [database]\n ... server = \"192.168.1.1\"\n ... ports = [ 8001, 8001, 8002 ]\n ... connection_max = 5000\n ... enabled = true\n ...\n ... [servers]\n ...\n ... # Indentation (tabs and/or spaces) is allowed but not required\n ... [servers.alpha]\n ... ip = \"10.0.0.1\"\n ... dc = \"eqdc10\"\n ...\n ... [servers.beta]\n ... ip = \"10.0.0.2\"\n ... dc = \"eqdc10\"\n ...\n ... [clients]\n ... data = [ [\"gamma\", \"delta\"], [1, 2] ]\n ...\n ... # Line breaks are OK when inside arrays\n ... hosts = [\n ... \"alpha\",\n ... \"omega\"\n ... ]\n ... \"\"\"\n >>> parsed_toml = toml.loads(toml_string)\n\n\n*toml.dumps* takes a dictionary and returns a string containing the\ncorresponding TOML-formatted data.\n\n.. code:: pycon\n\n >>> new_toml_string = toml.dumps(parsed_toml)\n >>> print(new_toml_string)\n title = \"TOML Example\"\n [owner]\n name = \"Tom Preston-Werner\"\n dob = 1979-05-27T07:32:00Z\n [database]\n server = \"192.168.1.1\"\n ports = [ 8001, 8001, 8002,]\n connection_max = 5000\n enabled = true\n [clients]\n data = [ [ \"gamma\", \"delta\",], [ 1, 2,],]\n hosts = [ \"alpha\", \"omega\",]\n [servers.alpha]\n ip = \"10.0.0.1\"\n dc = \"eqdc10\"\n [servers.beta]\n ip = \"10.0.0.2\"\n dc = \"eqdc10\"\n\nFor more functions, view the API Reference below.\n\nNote\n----\n\nFor Numpy users, by default the data types ``np.floatX`` will not be translated to floats by toml, but will instead be encoded as strings. To get around this, specify the ``TomlNumpyEncoder`` when saving your data.\n\n.. code:: pycon\n\n >>> import toml\n >>> import numpy as np\n >>> a = np.arange(0, 10, dtype=np.double)\n >>> output = {'a': a}\n >>> toml.dumps(output)\n 'a = [ \"0.0\", \"1.0\", \"2.0\", \"3.0\", \"4.0\", \"5.0\", \"6.0\", \"7.0\", \"8.0\", \"9.0\",]\\n'\n >>> toml.dumps(output, encoder=toml.TomlNumpyEncoder())\n 'a = [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,]\\n'\n\nAPI Reference\n=============\n\n``toml.load(f, _dict=dict)``\n Parse a file or a list of files as TOML and return a dictionary.\n\n :Args:\n * ``f``: A path to a file, list of filepaths (to be read into single\n object) or a file descriptor\n * ``_dict``: The class of the dictionary object to be returned\n\n :Returns:\n A dictionary (or object ``_dict``) containing parsed TOML data\n\n :Raises:\n * ``TypeError``: When ``f`` is an invalid type or is a list containing\n invalid types\n * ``TomlDecodeError``: When an error occurs while decoding the file(s)\n\n``toml.loads(s, _dict=dict)``\n Parse a TOML-formatted string to a dictionary.\n\n :Args:\n * ``s``: The TOML-formatted string to be parsed\n * ``_dict``: Specifies the class of the returned toml dictionary\n\n :Returns:\n A dictionary (or object ``_dict``) containing parsed TOML data\n\n :Raises:\n * ``TypeError``: When a non-string object is passed\n * ``TomlDecodeError``: When an error occurs while decoding the\n TOML-formatted string\n\n``toml.dump(o, f, encoder=None)``\n Write a dictionary to a file containing TOML-formatted data\n\n :Args:\n * ``o``: An object to be converted into TOML\n * ``f``: A File descriptor where the TOML-formatted output should be stored\n * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n :Returns:\n A string containing the TOML-formatted data corresponding to object ``o``\n\n :Raises:\n * ``TypeError``: When anything other than file descriptor is passed\n\n``toml.dumps(o, encoder=None)``\n Create a TOML-formatted string from an input object\n\n :Args:\n * ``o``: An object to be converted into TOML\n * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n :Returns:\n A string containing the TOML-formatted data corresponding to object ``o``\n\n\n\nLicensing\n=========\n\nThis project is released under the terms of the MIT Open Source License. View\n*LICENSE.txt* for more information.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "William Pearson", - "email": "uiri@xqz.ca", - "url": null - } - ], - "keywords": [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://github.com/uiri/toml", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/toml@0.10.1", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/t/toml/toml-0.10.1.tar.gz", - "api_data_url": "https://pypi.org/pypi/toml/0.10.1/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "toml", + "version": "0.10.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Python Library for Tom's Obvious, Minimal Language\n****\nTOML\n****\n\n.. image:: https://badge.fury.io/py/toml.svg\n :target: https://badge.fury.io/py/toml\n\n.. image:: https://travis-ci.org/uiri/toml.svg?branch=master\n :target: https://travis-ci.org/uiri/toml\n\n.. image:: https://img.shields.io/pypi/pyversions/toml.svg\n :target: https://pypi.org/project/toml/\n\n\nA Python library for parsing and creating `TOML `_.\n\nThe module passes `the TOML test suite `_.\n\nSee also:\n\n* `The TOML Standard `_\n* `The currently supported TOML specification `_\n\nInstallation\n============\n\nTo install the latest release on `PyPI `_,\nsimply run:\n\n::\n\n pip install toml\n\nOr to install the latest development version, run:\n\n::\n\n git clone https://github.com/uiri/toml.git\n cd toml\n python setup.py install\n\nQuick Tutorial\n==============\n\n*toml.loads* takes in a string containing standard TOML-formatted data and\nreturns a dictionary containing the parsed data.\n\n.. code:: pycon\n\n >>> import toml\n >>> toml_string = \"\"\"\n ... # This is a TOML document.\n ...\n ... title = \"TOML Example\"\n ...\n ... [owner]\n ... name = \"Tom Preston-Werner\"\n ... dob = 1979-05-27T07:32:00-08:00 # First class dates\n ...\n ... [database]\n ... server = \"192.168.1.1\"\n ... ports = [ 8001, 8001, 8002 ]\n ... connection_max = 5000\n ... enabled = true\n ...\n ... [servers]\n ...\n ... # Indentation (tabs and/or spaces) is allowed but not required\n ... [servers.alpha]\n ... ip = \"10.0.0.1\"\n ... dc = \"eqdc10\"\n ...\n ... [servers.beta]\n ... ip = \"10.0.0.2\"\n ... dc = \"eqdc10\"\n ...\n ... [clients]\n ... data = [ [\"gamma\", \"delta\"], [1, 2] ]\n ...\n ... # Line breaks are OK when inside arrays\n ... hosts = [\n ... \"alpha\",\n ... \"omega\"\n ... ]\n ... \"\"\"\n >>> parsed_toml = toml.loads(toml_string)\n\n\n*toml.dumps* takes a dictionary and returns a string containing the\ncorresponding TOML-formatted data.\n\n.. code:: pycon\n\n >>> new_toml_string = toml.dumps(parsed_toml)\n >>> print(new_toml_string)\n title = \"TOML Example\"\n [owner]\n name = \"Tom Preston-Werner\"\n dob = 1979-05-27T07:32:00Z\n [database]\n server = \"192.168.1.1\"\n ports = [ 8001, 8001, 8002,]\n connection_max = 5000\n enabled = true\n [clients]\n data = [ [ \"gamma\", \"delta\",], [ 1, 2,],]\n hosts = [ \"alpha\", \"omega\",]\n [servers.alpha]\n ip = \"10.0.0.1\"\n dc = \"eqdc10\"\n [servers.beta]\n ip = \"10.0.0.2\"\n dc = \"eqdc10\"\n\nFor more functions, view the API Reference below.\n\nNote\n----\n\nFor Numpy users, by default the data types ``np.floatX`` will not be translated to floats by toml, but will instead be encoded as strings. To get around this, specify the ``TomlNumpyEncoder`` when saving your data.\n\n.. code:: pycon\n\n >>> import toml\n >>> import numpy as np\n >>> a = np.arange(0, 10, dtype=np.double)\n >>> output = {'a': a}\n >>> toml.dumps(output)\n 'a = [ \"0.0\", \"1.0\", \"2.0\", \"3.0\", \"4.0\", \"5.0\", \"6.0\", \"7.0\", \"8.0\", \"9.0\",]\\n'\n >>> toml.dumps(output, encoder=toml.TomlNumpyEncoder())\n 'a = [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,]\\n'\n\nAPI Reference\n=============\n\n``toml.load(f, _dict=dict)``\n Parse a file or a list of files as TOML and return a dictionary.\n\n :Args:\n * ``f``: A path to a file, list of filepaths (to be read into single\n object) or a file descriptor\n * ``_dict``: The class of the dictionary object to be returned\n\n :Returns:\n A dictionary (or object ``_dict``) containing parsed TOML data\n\n :Raises:\n * ``TypeError``: When ``f`` is an invalid type or is a list containing\n invalid types\n * ``TomlDecodeError``: When an error occurs while decoding the file(s)\n\n``toml.loads(s, _dict=dict)``\n Parse a TOML-formatted string to a dictionary.\n\n :Args:\n * ``s``: The TOML-formatted string to be parsed\n * ``_dict``: Specifies the class of the returned toml dictionary\n\n :Returns:\n A dictionary (or object ``_dict``) containing parsed TOML data\n\n :Raises:\n * ``TypeError``: When a non-string object is passed\n * ``TomlDecodeError``: When an error occurs while decoding the\n TOML-formatted string\n\n``toml.dump(o, f, encoder=None)``\n Write a dictionary to a file containing TOML-formatted data\n\n :Args:\n * ``o``: An object to be converted into TOML\n * ``f``: A File descriptor where the TOML-formatted output should be stored\n * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n :Returns:\n A string containing the TOML-formatted data corresponding to object ``o``\n\n :Raises:\n * ``TypeError``: When anything other than file descriptor is passed\n\n``toml.dumps(o, encoder=None)``\n Create a TOML-formatted string from an input object\n\n :Args:\n * ``o``: An object to be converted into TOML\n * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n :Returns:\n A string containing the TOML-formatted data corresponding to object ``o``\n\n\n\nLicensing\n=========\n\nThis project is released under the terms of the MIT Open Source License. View\n*LICENSE.txt* for more information.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "William Pearson", + "email": "uiri@xqz.ca", + "url": null + } + ], + "keywords": [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy" + ], + "homepage_url": "https://github.com/uiri/toml", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/toml@0.10.1", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/t/toml/toml-0.10.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/toml/0.10.1/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info-expected.json index b801d15830b..4c5231c0edc 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info-expected.json @@ -1,124 +1,126 @@ -{ - "type": "pypi", - "namespace": null, - "name": "urllib3", - "version": "1.26.4", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "HTTP library with thread-safe connection pooling, file post, and more.\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, and brotli encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n.. code-block:: python\n\n >>> import urllib3\n >>> http = urllib3.PoolManager()\n >>> r = http.request('GET', 'http://httpbin.org/robots.txt')\n >>> r.status\n 200\n >>> r.data\n 'User-agent: *\\nDisallow: /deny\\n'\n\n\nInstalling\n----------\n\nurllib3 can be installed with `pip `_::\n\n $ python -m pip install urllib3\n\nAlternatively, you can grab the latest source code from `GitHub `_::\n\n $ git clone git://github.com/urllib3/urllib3.git\n $ python setup.py install\n\n\nDocumentation\n-------------\n\nurllib3 has usage and reference documentation at `urllib3.readthedocs.io `_.\n\n\nContributing\n------------\n\nurllib3 happily accepts contributions. Please see our\n`contributing documentation `_\nfor some tips on getting started.\n\n\nSecurity Disclosures\n--------------------\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\nMaintainers\n-----------\n\n- `@sethmlarson `__ (Seth M. Larson)\n- `@pquentin `__ (Quentin Pradet)\n- `@theacodes `__ (Thea Flowers)\n- `@haikuginger `__ (Jess Shapiro)\n- `@lukasa `__ (Cory Benfield)\n- `@sigmavirus24 `__ (Ian Stapleton Cordasco)\n- `@shazow `__ (Andrey Petrov)\n\n\ud83d\udc4b\n\n\nSponsorship\n-----------\n\nIf your company benefits from this library, please consider `sponsoring its\ndevelopment `_.\n\n\nFor Enterprise\n--------------\n\n.. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png\n :width: 75\n :alt: Tidelift\n\n.. list-table::\n :widths: 10 100\n\n * - |tideliftlogo|\n - Professional support for urllib3 is available as part of the `Tidelift\n Subscription`_. Tidelift gives software development teams a single source for\n purchasing and maintaining their software, with professional grade assurances\n from the experts who know it best, while seamlessly integrating with existing\n tools.\n\n.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme\n\n\nChanges\n=======\n\n1.26.4 (2021-03-15)\n-------------------\n\n* Changed behavior of the default ``SSLContext`` when connecting to HTTPS proxy\n during HTTPS requests. The default ``SSLContext`` now sets ``check_hostname=True``.\n\n\n1.26.3 (2021-01-26)\n-------------------\n\n* Fixed bytes and string comparison issue with headers (Pull #2141)\n\n* Changed ``ProxySchemeUnknown`` error message to be\n more actionable if the user supplies a proxy URL without\n a scheme. (Pull #2107)\n\n\n1.26.2 (2020-11-12)\n-------------------\n\n* Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't\n be imported properly on Python 2.7.8 and earlier (Pull #2052)\n\n\n1.26.1 (2020-11-11)\n-------------------\n\n* Fixed an issue where two ``User-Agent`` headers would be sent if a\n ``User-Agent`` header key is passed as ``bytes`` (Pull #2047)\n\n\n1.26.0 (2020-11-10)\n-------------------\n\n* **NOTE: urllib3 v2.0 will drop support for Python 2**.\n `Read more in the v2.0 Roadmap `_.\n\n* Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)\n\n* Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that\n still wish to use TLS earlier than 1.2 without a deprecation warning\n should opt-in explicitly by setting ``ssl_version=ssl.PROTOCOL_TLSv1_1`` (Pull #2002)\n **Starting in urllib3 v2.0: Connections that receive a ``DeprecationWarning`` will fail**\n\n* Deprecated ``Retry`` options ``Retry.DEFAULT_METHOD_WHITELIST``, ``Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST``\n and ``Retry(method_whitelist=...)`` in favor of ``Retry.DEFAULT_ALLOWED_METHODS``,\n ``Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT``, and ``Retry(allowed_methods=...)``\n (Pull #2000) **Starting in urllib3 v2.0: Deprecated options will be removed**\n\n* Added default ``User-Agent`` header to every request (Pull #1750)\n\n* Added ``urllib3.util.SKIP_HEADER`` for skipping ``User-Agent``, ``Accept-Encoding``, \n and ``Host`` headers from being automatically emitted with requests (Pull #2018)\n\n* Collapse ``transfer-encoding: chunked`` request data and framing into\n the same ``socket.send()`` call (Pull #1906)\n\n* Send ``http/1.1`` ALPN identifier with every TLS handshake by default (Pull #1894)\n\n* Properly terminate SecureTransport connections when CA verification fails (Pull #1977)\n\n* Don't emit an ``SNIMissingWarning`` when passing ``server_hostname=None``\n to SecureTransport (Pull #1903)\n\n* Disabled requesting TLSv1.2 session tickets as they weren't being used by urllib3 (Pull #1970)\n\n* Suppress ``BrokenPipeError`` when writing request body after the server\n has closed the socket (Pull #1524)\n\n* Wrap ``ssl.SSLError`` that can be raised from reading a socket (e.g. \"bad MAC\")\n into an ``urllib3.exceptions.SSLError`` (Pull #1939)\n\n\n1.25.11 (2020-10-19)\n--------------------\n\n* Fix retry backoff time parsed from ``Retry-After`` header when given\n in the HTTP date format. The HTTP date was parsed as the local timezone\n rather than accounting for the timezone in the HTTP date (typically\n UTC) (Pull #1932, Pull #1935, Pull #1938, Pull #1949)\n\n* Fix issue where an error would be raised when the ``SSLKEYLOGFILE``\n environment variable was set to the empty string. Now ``SSLContext.keylog_file``\n is not set in this situation (Pull #2016)\n\n\n1.25.10 (2020-07-22)\n--------------------\n\n* Added support for ``SSLKEYLOGFILE`` environment variable for\n logging TLS session keys with use with programs like\n Wireshark for decrypting captured web traffic (Pull #1867)\n\n* Fixed loading of SecureTransport libraries on macOS Big Sur\n due to the new dynamic linker cache (Pull #1905)\n\n* Collapse chunked request bodies data and framing into one\n call to ``send()`` to reduce the number of TCP packets by 2-4x (Pull #1906)\n\n* Don't insert ``None`` into ``ConnectionPool`` if the pool\n was empty when requesting a connection (Pull #1866)\n\n* Avoid ``hasattr`` call in ``BrotliDecoder.decompress()`` (Pull #1858)\n\n\n1.25.9 (2020-04-16)\n-------------------\n\n* Added ``InvalidProxyConfigurationWarning`` which is raised when\n erroneously specifying an HTTPS proxy URL. urllib3 doesn't currently\n support connecting to HTTPS proxies but will soon be able to\n and we would like users to migrate properly without much breakage.\n\n See `this GitHub issue `_\n for more information on how to fix your proxy config. (Pull #1851)\n\n* Drain connection after ``PoolManager`` redirect (Pull #1817)\n\n* Ensure ``load_verify_locations`` raises ``SSLError`` for all backends (Pull #1812)\n\n* Rename ``VerifiedHTTPSConnection`` to ``HTTPSConnection`` (Pull #1805)\n\n* Allow the CA certificate data to be passed as a string (Pull #1804)\n\n* Raise ``ValueError`` if method contains control characters (Pull #1800)\n\n* Add ``__repr__`` to ``Timeout`` (Pull #1795)\n\n\n1.25.8 (2020-01-20)\n-------------------\n\n* Drop support for EOL Python 3.4 (Pull #1774)\n\n* Optimize _encode_invalid_chars (Pull #1787)\n\n\n1.25.7 (2019-11-11)\n-------------------\n\n* Preserve ``chunked`` parameter on retries (Pull #1715, Pull #1734)\n\n* Allow unset ``SERVER_SOFTWARE`` in App Engine (Pull #1704, Issue #1470)\n\n* Fix issue where URL fragment was sent within the request target. (Pull #1732)\n\n* Fix issue where an empty query section in a URL would fail to parse. (Pull #1732)\n\n* Remove TLS 1.3 support in SecureTransport due to Apple removing support (Pull #1703)\n\n\n1.25.6 (2019-09-24)\n-------------------\n\n* Fix issue where tilde (``~``) characters were incorrectly\n percent-encoded in the path. (Pull #1692)\n\n\n1.25.5 (2019-09-19)\n-------------------\n\n* Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which\n caused certificate verification to be enabled when using ``cert_reqs=CERT_NONE``.\n (Issue #1682)\n\n\n1.25.4 (2019-09-19)\n-------------------\n\n* Propagate Retry-After header settings to subsequent retries. (Pull #1607)\n\n* Fix edge case where Retry-After header was still respected even when\n explicitly opted out of. (Pull #1607)\n\n* Remove dependency on ``rfc3986`` for URL parsing.\n\n* Fix issue where URLs containing invalid characters within ``Url.auth`` would\n raise an exception instead of percent-encoding those characters.\n\n* Add support for ``HTTPResponse.auto_close = False`` which makes HTTP responses\n work well with BufferedReaders and other ``io`` module features. (Pull #1652)\n\n* Percent-encode invalid characters in URL for ``HTTPConnectionPool.request()`` (Pull #1673)\n\n\n1.25.3 (2019-05-23)\n-------------------\n\n* Change ``HTTPSConnection`` to load system CA certificates\n when ``ca_certs``, ``ca_cert_dir``, and ``ssl_context`` are\n unspecified. (Pull #1608, Issue #1603)\n\n* Upgrade bundled rfc3986 to v1.3.2. (Pull #1609, Issue #1605)\n\n\n1.25.2 (2019-04-28)\n-------------------\n\n* Change ``is_ipaddress`` to not detect IPvFuture addresses. (Pull #1583)\n\n* Change ``parse_url`` to percent-encode invalid characters within the\n path, query, and target components. (Pull #1586)\n\n\n1.25.1 (2019-04-24)\n-------------------\n\n* Add support for Google's ``Brotli`` package. (Pull #1572, Pull #1579)\n\n* Upgrade bundled rfc3986 to v1.3.1 (Pull #1578)\n\n\n1.25 (2019-04-22)\n-----------------\n\n* Require and validate certificates by default when using HTTPS (Pull #1507)\n\n* Upgraded ``urllib3.utils.parse_url()`` to be RFC 3986 compliant. (Pull #1487)\n\n* Added support for ``key_password`` for ``HTTPSConnectionPool`` to use\n encrypted ``key_file`` without creating your own ``SSLContext`` object. (Pull #1489)\n\n* Add TLSv1.3 support to CPython, pyOpenSSL, and SecureTransport ``SSLContext``\n implementations. (Pull #1496)\n\n* Switched the default multipart header encoder from RFC 2231 to HTML 5 working draft. (Issue #303, Pull #1492)\n\n* Fixed issue where OpenSSL would block if an encrypted client private key was\n given and no password was given. Instead an ``SSLError`` is raised. (Pull #1489)\n\n* Added support for Brotli content encoding. It is enabled automatically if\n ``brotlipy`` package is installed which can be requested with\n ``urllib3[brotli]`` extra. (Pull #1532)\n\n* Drop ciphers using DSS key exchange from default TLS cipher suites.\n Improve default ciphers when using SecureTransport. (Pull #1496)\n\n* Implemented a more efficient ``HTTPResponse.__iter__()`` method. (Issue #1483)\n\n1.24.3 (2019-05-01)\n-------------------\n\n* Apply fix for CVE-2019-9740. (Pull #1591)\n\n1.24.2 (2019-04-17)\n-------------------\n\n* Don't load system certificates by default when any other ``ca_certs``, ``ca_certs_dir`` or\n ``ssl_context`` parameters are specified.\n\n* Remove Authorization header regardless of case when redirecting to cross-site. (Issue #1510)\n\n* Add support for IPv6 addresses in subjectAltName section of certificates. (Issue #1269)\n\n\n1.24.1 (2018-11-02)\n-------------------\n\n* Remove quadratic behavior within ``GzipDecoder.decompress()`` (Issue #1467)\n\n* Restored functionality of ``ciphers`` parameter for ``create_urllib3_context()``. (Issue #1462)\n\n\n1.24 (2018-10-16)\n-----------------\n\n* Allow key_server_hostname to be specified when initializing a PoolManager to allow custom SNI to be overridden. (Pull #1449)\n\n* Test against Python 3.7 on AppVeyor. (Pull #1453)\n\n* Early-out ipv6 checks when running on App Engine. (Pull #1450)\n\n* Change ambiguous description of backoff_factor (Pull #1436)\n\n* Add ability to handle multiple Content-Encodings (Issue #1441 and Pull #1442)\n\n* Skip DNS names that can't be idna-decoded when using pyOpenSSL (Issue #1405).\n\n* Add a server_hostname parameter to HTTPSConnection which allows for\n overriding the SNI hostname sent in the handshake. (Pull #1397)\n\n* Drop support for EOL Python 2.6 (Pull #1429 and Pull #1430)\n\n* Fixed bug where responses with header Content-Type: message/* erroneously\n raised HeaderParsingError, resulting in a warning being logged. (Pull #1439)\n\n* Move urllib3 to src/urllib3 (Pull #1409)\n\n\n1.23 (2018-06-04)\n-----------------\n\n* Allow providing a list of headers to strip from requests when redirecting\n to a different host. Defaults to the ``Authorization`` header. Different\n headers can be set via ``Retry.remove_headers_on_redirect``. (Issue #1316)\n\n* Fix ``util.selectors._fileobj_to_fd`` to accept ``long`` (Issue #1247).\n\n* Dropped Python 3.3 support. (Pull #1242)\n\n* Put the connection back in the pool when calling stream() or read_chunked() on\n a chunked HEAD response. (Issue #1234)\n\n* Fixed pyOpenSSL-specific ssl client authentication issue when clients\n attempted to auth via certificate + chain (Issue #1060)\n\n* Add the port to the connectionpool connect print (Pull #1251)\n\n* Don't use the ``uuid`` module to create multipart data boundaries. (Pull #1380)\n\n* ``read_chunked()`` on a closed response returns no chunks. (Issue #1088)\n\n* Add Python 2.6 support to ``contrib.securetransport`` (Pull #1359)\n\n* Added support for auth info in url for SOCKS proxy (Pull #1363)\n\n\n1.22 (2017-07-20)\n-----------------\n\n* Fixed missing brackets in ``HTTP CONNECT`` when connecting to IPv6 address via\n IPv6 proxy. (Issue #1222)\n\n* Made the connection pool retry on ``SSLError``. The original ``SSLError``\n is available on ``MaxRetryError.reason``. (Issue #1112)\n\n* Drain and release connection before recursing on retry/redirect. Fixes\n deadlocks with a blocking connectionpool. (Issue #1167)\n\n* Fixed compatibility for cookiejar. (Issue #1229)\n\n* pyopenssl: Use vendored version of ``six``. (Issue #1231)\n\n\n1.21.1 (2017-05-02)\n-------------------\n\n* Fixed SecureTransport issue that would cause long delays in response body\n delivery. (Pull #1154)\n\n* Fixed regression in 1.21 that threw exceptions when users passed the\n ``socket_options`` flag to the ``PoolManager``. (Issue #1165)\n\n* Fixed regression in 1.21 that threw exceptions when users passed the\n ``assert_hostname`` or ``assert_fingerprint`` flag to the ``PoolManager``.\n (Pull #1157)\n\n\n1.21 (2017-04-25)\n-----------------\n\n* Improved performance of certain selector system calls on Python 3.5 and\n later. (Pull #1095)\n\n* Resolved issue where the PyOpenSSL backend would not wrap SysCallError\n exceptions appropriately when sending data. (Pull #1125)\n\n* Selectors now detects a monkey-patched select module after import for modules\n that patch the select module like eventlet, greenlet. (Pull #1128)\n\n* Reduced memory consumption when streaming zlib-compressed responses\n (as opposed to raw deflate streams). (Pull #1129)\n\n* Connection pools now use the entire request context when constructing the\n pool key. (Pull #1016)\n\n* ``PoolManager.connection_from_*`` methods now accept a new keyword argument,\n ``pool_kwargs``, which are merged with the existing ``connection_pool_kw``.\n (Pull #1016)\n\n* Add retry counter for ``status_forcelist``. (Issue #1147)\n\n* Added ``contrib`` module for using SecureTransport on macOS:\n ``urllib3.contrib.securetransport``. (Pull #1122)\n\n* urllib3 now only normalizes the case of ``http://`` and ``https://`` schemes:\n for schemes it does not recognise, it assumes they are case-sensitive and\n leaves them unchanged.\n (Issue #1080)\n\n\n1.20 (2017-01-19)\n-----------------\n\n* Added support for waiting for I/O using selectors other than select,\n improving urllib3's behaviour with large numbers of concurrent connections.\n (Pull #1001)\n\n* Updated the date for the system clock check. (Issue #1005)\n\n* ConnectionPools now correctly consider hostnames to be case-insensitive.\n (Issue #1032)\n\n* Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module\n to fail when it is injected, rather than at first use. (Pull #1063)\n\n* Outdated versions of cryptography now cause the PyOpenSSL contrib module\n to fail when it is injected, rather than at first use. (Issue #1044)\n\n* Automatically attempt to rewind a file-like body object when a request is\n retried or redirected. (Pull #1039)\n\n* Fix some bugs that occur when modules incautiously patch the queue module.\n (Pull #1061)\n\n* Prevent retries from occurring on read timeouts for which the request method\n was not in the method whitelist. (Issue #1059)\n\n* Changed the PyOpenSSL contrib module to lazily load idna to avoid\n unnecessarily bloating the memory of programs that don't need it. (Pull\n #1076)\n\n* Add support for IPv6 literals with zone identifiers. (Pull #1013)\n\n* Added support for socks5h:// and socks4a:// schemes when working with SOCKS\n proxies, and controlled remote DNS appropriately. (Issue #1035)\n\n\n1.19.1 (2016-11-16)\n-------------------\n\n* Fixed AppEngine import that didn't function on Python 3.5. (Pull #1025)\n\n\n1.19 (2016-11-03)\n-----------------\n\n* urllib3 now respects Retry-After headers on 413, 429, and 503 responses when\n using the default retry logic. (Pull #955)\n\n* Remove markers from setup.py to assist ancient setuptools versions. (Issue\n #986)\n\n* Disallow superscripts and other integerish things in URL ports. (Issue #989)\n\n* Allow urllib3's HTTPResponse.stream() method to continue to work with\n non-httplib underlying FPs. (Pull #990)\n\n* Empty filenames in multipart headers are now emitted as such, rather than\n being suppressed. (Issue #1015)\n\n* Prefer user-supplied Host headers on chunked uploads. (Issue #1009)\n\n\n1.18.1 (2016-10-27)\n-------------------\n\n* CVE-2016-9015. Users who are using urllib3 version 1.17 or 1.18 along with\n PyOpenSSL injection and OpenSSL 1.1.0 *must* upgrade to this version. This\n release fixes a vulnerability whereby urllib3 in the above configuration\n would silently fail to validate TLS certificates due to erroneously setting\n invalid flags in OpenSSL's ``SSL_CTX_set_verify`` function. These erroneous\n flags do not cause a problem in OpenSSL versions before 1.1.0, which\n interprets the presence of any flag as requesting certificate validation.\n\n There is no PR for this patch, as it was prepared for simultaneous disclosure\n and release. The master branch received the same fix in Pull #1010.\n\n\n1.18 (2016-09-26)\n-----------------\n\n* Fixed incorrect message for IncompleteRead exception. (Pull #973)\n\n* Accept ``iPAddress`` subject alternative name fields in TLS certificates.\n (Issue #258)\n\n* Fixed consistency of ``HTTPResponse.closed`` between Python 2 and 3.\n (Issue #977)\n\n* Fixed handling of wildcard certificates when using PyOpenSSL. (Issue #979)\n\n\n1.17 (2016-09-06)\n-----------------\n\n* Accept ``SSLContext`` objects for use in SSL/TLS negotiation. (Issue #835)\n\n* ConnectionPool debug log now includes scheme, host, and port. (Issue #897)\n\n* Substantially refactored documentation. (Issue #887)\n\n* Used URLFetch default timeout on AppEngine, rather than hardcoding our own.\n (Issue #858)\n\n* Normalize the scheme and host in the URL parser (Issue #833)\n\n* ``HTTPResponse`` contains the last ``Retry`` object, which now also\n contains retries history. (Issue #848)\n\n* Timeout can no longer be set as boolean, and must be greater than zero.\n (Pull #924)\n\n* Removed pyasn1 and ndg-httpsclient from dependencies used for PyOpenSSL. We\n now use cryptography and idna, both of which are already dependencies of\n PyOpenSSL. (Pull #930)\n\n* Fixed infinite loop in ``stream`` when amt=None. (Issue #928)\n\n* Try to use the operating system's certificates when we are using an\n ``SSLContext``. (Pull #941)\n\n* Updated cipher suite list to allow ChaCha20+Poly1305. AES-GCM is preferred to\n ChaCha20, but ChaCha20 is then preferred to everything else. (Pull #947)\n\n* Updated cipher suite list to remove 3DES-based cipher suites. (Pull #958)\n\n* Removed the cipher suite fallback to allow HIGH ciphers. (Pull #958)\n\n* Implemented ``length_remaining`` to determine remaining content\n to be read. (Pull #949)\n\n* Implemented ``enforce_content_length`` to enable exceptions when\n incomplete data chunks are received. (Pull #949)\n\n* Dropped connection start, dropped connection reset, redirect, forced retry,\n and new HTTPS connection log levels to DEBUG, from INFO. (Pull #967)\n\n\n1.16 (2016-06-11)\n-----------------\n\n* Disable IPv6 DNS when IPv6 connections are not possible. (Issue #840)\n\n* Provide ``key_fn_by_scheme`` pool keying mechanism that can be\n overridden. (Issue #830)\n\n* Normalize scheme and host to lowercase for pool keys, and include\n ``source_address``. (Issue #830)\n\n* Cleaner exception chain in Python 3 for ``_make_request``.\n (Issue #861)\n\n* Fixed installing ``urllib3[socks]`` extra. (Issue #864)\n\n* Fixed signature of ``ConnectionPool.close`` so it can actually safely be\n called by subclasses. (Issue #873)\n\n* Retain ``release_conn`` state across retries. (Issues #651, #866)\n\n* Add customizable ``HTTPConnectionPool.ResponseCls``, which defaults to\n ``HTTPResponse`` but can be replaced with a subclass. (Issue #879)\n\n\n1.15.1 (2016-04-11)\n-------------------\n\n* Fix packaging to include backports module. (Issue #841)\n\n\n1.15 (2016-04-06)\n-----------------\n\n* Added Retry(raise_on_status=False). (Issue #720)\n\n* Always use setuptools, no more distutils fallback. (Issue #785)\n\n* Dropped support for Python 3.2. (Issue #786)\n\n* Chunked transfer encoding when requesting with ``chunked=True``.\n (Issue #790)\n\n* Fixed regression with IPv6 port parsing. (Issue #801)\n\n* Append SNIMissingWarning messages to allow users to specify it in\n the PYTHONWARNINGS environment variable. (Issue #816)\n\n* Handle unicode headers in Py2. (Issue #818)\n\n* Log certificate when there is a hostname mismatch. (Issue #820)\n\n* Preserve order of request/response headers. (Issue #821)\n\n\n1.14 (2015-12-29)\n-----------------\n\n* contrib: SOCKS proxy support! (Issue #762)\n\n* Fixed AppEngine handling of transfer-encoding header and bug\n in Timeout defaults checking. (Issue #763)\n\n\n1.13.1 (2015-12-18)\n-------------------\n\n* Fixed regression in IPv6 + SSL for match_hostname. (Issue #761)\n\n\n1.13 (2015-12-14)\n-----------------\n\n* Fixed ``pip install urllib3[secure]`` on modern pip. (Issue #706)\n\n* pyopenssl: Fixed SSL3_WRITE_PENDING error. (Issue #717)\n\n* pyopenssl: Support for TLSv1.1 and TLSv1.2. (Issue #696)\n\n* Close connections more defensively on exception. (Issue #734)\n\n* Adjusted ``read_chunked`` to handle gzipped, chunk-encoded bodies without\n repeatedly flushing the decoder, to function better on Jython. (Issue #743)\n\n* Accept ``ca_cert_dir`` for SSL-related PoolManager configuration. (Issue #758)\n\n\n1.12 (2015-09-03)\n-----------------\n\n* Rely on ``six`` for importing ``httplib`` to work around\n conflicts with other Python 3 shims. (Issue #688)\n\n* Add support for directories of certificate authorities, as supported by\n OpenSSL. (Issue #701)\n\n* New exception: ``NewConnectionError``, raised when we fail to establish\n a new connection, usually ``ECONNREFUSED`` socket error.\n\n\n1.11 (2015-07-21)\n-----------------\n\n* When ``ca_certs`` is given, ``cert_reqs`` defaults to\n ``'CERT_REQUIRED'``. (Issue #650)\n\n* ``pip install urllib3[secure]`` will install Certifi and\n PyOpenSSL as dependencies. (Issue #678)\n\n* Made ``HTTPHeaderDict`` usable as a ``headers`` input value\n (Issues #632, #679)\n\n* Added `urllib3.contrib.appengine `_\n which has an ``AppEngineManager`` for using ``URLFetch`` in a\n Google AppEngine environment. (Issue #664)\n\n* Dev: Added test suite for AppEngine. (Issue #631)\n\n* Fix performance regression when using PyOpenSSL. (Issue #626)\n\n* Passing incorrect scheme (e.g. ``foo://``) will raise\n ``ValueError`` instead of ``AssertionError`` (backwards\n compatible for now, but please migrate). (Issue #640)\n\n* Fix pools not getting replenished when an error occurs during a\n request using ``release_conn=False``. (Issue #644)\n\n* Fix pool-default headers not applying for url-encoded requests\n like GET. (Issue #657)\n\n* log.warning in Python 3 when headers are skipped due to parsing\n errors. (Issue #642)\n\n* Close and discard connections if an error occurs during read.\n (Issue #660)\n\n* Fix host parsing for IPv6 proxies. (Issue #668)\n\n* Separate warning type SubjectAltNameWarning, now issued once\n per host. (Issue #671)\n\n* Fix ``httplib.IncompleteRead`` not getting converted to\n ``ProtocolError`` when using ``HTTPResponse.stream()``\n (Issue #674)\n\n1.10.4 (2015-05-03)\n-------------------\n\n* Migrate tests to Tornado 4. (Issue #594)\n\n* Append default warning configuration rather than overwrite.\n (Issue #603)\n\n* Fix streaming decoding regression. (Issue #595)\n\n* Fix chunked requests losing state across keep-alive connections.\n (Issue #599)\n\n* Fix hanging when chunked HEAD response has no body. (Issue #605)\n\n\n1.10.3 (2015-04-21)\n-------------------\n\n* Emit ``InsecurePlatformWarning`` when SSLContext object is missing.\n (Issue #558)\n\n* Fix regression of duplicate header keys being discarded.\n (Issue #563)\n\n* ``Response.stream()`` returns a generator for chunked responses.\n (Issue #560)\n\n* Set upper-bound timeout when waiting for a socket in PyOpenSSL.\n (Issue #585)\n\n* Work on platforms without `ssl` module for plain HTTP requests.\n (Issue #587)\n\n* Stop relying on the stdlib's default cipher list. (Issue #588)\n\n\n1.10.2 (2015-02-25)\n-------------------\n\n* Fix file descriptor leakage on retries. (Issue #548)\n\n* Removed RC4 from default cipher list. (Issue #551)\n\n* Header performance improvements. (Issue #544)\n\n* Fix PoolManager not obeying redirect retry settings. (Issue #553)\n\n\n1.10.1 (2015-02-10)\n-------------------\n\n* Pools can be used as context managers. (Issue #545)\n\n* Don't re-use connections which experienced an SSLError. (Issue #529)\n\n* Don't fail when gzip decoding an empty stream. (Issue #535)\n\n* Add sha256 support for fingerprint verification. (Issue #540)\n\n* Fixed handling of header values containing commas. (Issue #533)\n\n\n1.10 (2014-12-14)\n-----------------\n\n* Disabled SSLv3. (Issue #473)\n\n* Add ``Url.url`` property to return the composed url string. (Issue #394)\n\n* Fixed PyOpenSSL + gevent ``WantWriteError``. (Issue #412)\n\n* ``MaxRetryError.reason`` will always be an exception, not string.\n (Issue #481)\n\n* Fixed SSL-related timeouts not being detected as timeouts. (Issue #492)\n\n* Py3: Use ``ssl.create_default_context()`` when available. (Issue #473)\n\n* Emit ``InsecureRequestWarning`` for *every* insecure HTTPS request.\n (Issue #496)\n\n* Emit ``SecurityWarning`` when certificate has no ``subjectAltName``.\n (Issue #499)\n\n* Close and discard sockets which experienced SSL-related errors.\n (Issue #501)\n\n* Handle ``body`` param in ``.request(...)``. (Issue #513)\n\n* Respect timeout with HTTPS proxy. (Issue #505)\n\n* PyOpenSSL: Handle ZeroReturnError exception. (Issue #520)\n\n\n1.9.1 (2014-09-13)\n------------------\n\n* Apply socket arguments before binding. (Issue #427)\n\n* More careful checks if fp-like object is closed. (Issue #435)\n\n* Fixed packaging issues of some development-related files not\n getting included. (Issue #440)\n\n* Allow performing *only* fingerprint verification. (Issue #444)\n\n* Emit ``SecurityWarning`` if system clock is waaay off. (Issue #445)\n\n* Fixed PyOpenSSL compatibility with PyPy. (Issue #450)\n\n* Fixed ``BrokenPipeError`` and ``ConnectionError`` handling in Py3.\n (Issue #443)\n\n\n\n1.9 (2014-07-04)\n----------------\n\n* Shuffled around development-related files. If you're maintaining a distro\n package of urllib3, you may need to tweak things. (Issue #415)\n\n* Unverified HTTPS requests will trigger a warning on the first request. See\n our new `security documentation\n `_ for details.\n (Issue #426)\n\n* New retry logic and ``urllib3.util.retry.Retry`` configuration object.\n (Issue #326)\n\n* All raised exceptions should now wrapped in a\n ``urllib3.exceptions.HTTPException``-extending exception. (Issue #326)\n\n* All errors during a retry-enabled request should be wrapped in\n ``urllib3.exceptions.MaxRetryError``, including timeout-related exceptions\n which were previously exempt. Underlying error is accessible from the\n ``.reason`` property. (Issue #326)\n\n* ``urllib3.exceptions.ConnectionError`` renamed to\n ``urllib3.exceptions.ProtocolError``. (Issue #326)\n\n* Errors during response read (such as IncompleteRead) are now wrapped in\n ``urllib3.exceptions.ProtocolError``. (Issue #418)\n\n* Requesting an empty host will raise ``urllib3.exceptions.LocationValueError``.\n (Issue #417)\n\n* Catch read timeouts over SSL connections as\n ``urllib3.exceptions.ReadTimeoutError``. (Issue #419)\n\n* Apply socket arguments before connecting. (Issue #427)\n\n\n1.8.3 (2014-06-23)\n------------------\n\n* Fix TLS verification when using a proxy in Python 3.4.1. (Issue #385)\n\n* Add ``disable_cache`` option to ``urllib3.util.make_headers``. (Issue #393)\n\n* Wrap ``socket.timeout`` exception with\n ``urllib3.exceptions.ReadTimeoutError``. (Issue #399)\n\n* Fixed proxy-related bug where connections were being reused incorrectly.\n (Issues #366, #369)\n\n* Added ``socket_options`` keyword parameter which allows to define\n ``setsockopt`` configuration of new sockets. (Issue #397)\n\n* Removed ``HTTPConnection.tcp_nodelay`` in favor of\n ``HTTPConnection.default_socket_options``. (Issue #397)\n\n* Fixed ``TypeError`` bug in Python 2.6.4. (Issue #411)\n\n\n1.8.2 (2014-04-17)\n------------------\n\n* Fix ``urllib3.util`` not being included in the package.\n\n\n1.8.1 (2014-04-17)\n------------------\n\n* Fix AppEngine bug of HTTPS requests going out as HTTP. (Issue #356)\n\n* Don't install ``dummyserver`` into ``site-packages`` as it's only needed\n for the test suite. (Issue #362)\n\n* Added support for specifying ``source_address``. (Issue #352)\n\n\n1.8 (2014-03-04)\n----------------\n\n* Improved url parsing in ``urllib3.util.parse_url`` (properly parse '@' in\n username, and blank ports like 'hostname:').\n\n* New ``urllib3.connection`` module which contains all the HTTPConnection\n objects.\n\n* Several ``urllib3.util.Timeout``-related fixes. Also changed constructor\n signature to a more sensible order. [Backwards incompatible]\n (Issues #252, #262, #263)\n\n* Use ``backports.ssl_match_hostname`` if it's installed. (Issue #274)\n\n* Added ``.tell()`` method to ``urllib3.response.HTTPResponse`` which\n returns the number of bytes read so far. (Issue #277)\n\n* Support for platforms without threading. (Issue #289)\n\n* Expand default-port comparison in ``HTTPConnectionPool.is_same_host``\n to allow a pool with no specified port to be considered equal to to an\n HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305)\n\n* Improved default SSL/TLS settings to avoid vulnerabilities.\n (Issue #309)\n\n* Fixed ``urllib3.poolmanager.ProxyManager`` not retrying on connect errors.\n (Issue #310)\n\n* Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests\n will send the entire HTTP request ~200 milliseconds faster; however, some of\n the resulting TCP packets will be smaller. (Issue #254)\n\n* Increased maximum number of SubjectAltNames in ``urllib3.contrib.pyopenssl``\n from the default 64 to 1024 in a single certificate. (Issue #318)\n\n* Headers are now passed and stored as a custom\n ``urllib3.collections_.HTTPHeaderDict`` object rather than a plain ``dict``.\n (Issue #329, #333)\n\n* Headers no longer lose their case on Python 3. (Issue #236)\n\n* ``urllib3.contrib.pyopenssl`` now uses the operating system's default CA\n certificates on inject. (Issue #332)\n\n* Requests with ``retries=False`` will immediately raise any exceptions without\n wrapping them in ``MaxRetryError``. (Issue #348)\n\n* Fixed open socket leak with SSL-related failures. (Issue #344, #348)\n\n\n1.7.1 (2013-09-25)\n------------------\n\n* Added granular timeout support with new ``urllib3.util.Timeout`` class.\n (Issue #231)\n\n* Fixed Python 3.4 support. (Issue #238)\n\n\n1.7 (2013-08-14)\n----------------\n\n* More exceptions are now pickle-able, with tests. (Issue #174)\n\n* Fixed redirecting with relative URLs in Location header. (Issue #178)\n\n* Support for relative urls in ``Location: ...`` header. (Issue #179)\n\n* ``urllib3.response.HTTPResponse`` now inherits from ``io.IOBase`` for bonus\n file-like functionality. (Issue #187)\n\n* Passing ``assert_hostname=False`` when creating a HTTPSConnectionPool will\n skip hostname verification for SSL connections. (Issue #194)\n\n* New method ``urllib3.response.HTTPResponse.stream(...)`` which acts as a\n generator wrapped around ``.read(...)``. (Issue #198)\n\n* IPv6 url parsing enforces brackets around the hostname. (Issue #199)\n\n* Fixed thread race condition in\n ``urllib3.poolmanager.PoolManager.connection_from_host(...)`` (Issue #204)\n\n* ``ProxyManager`` requests now include non-default port in ``Host: ...``\n header. (Issue #217)\n\n* Added HTTPS proxy support in ``ProxyManager``. (Issue #170 #139)\n\n* New ``RequestField`` object can be passed to the ``fields=...`` param which\n can specify headers. (Issue #220)\n\n* Raise ``urllib3.exceptions.ProxyError`` when connecting to proxy fails.\n (Issue #221)\n\n* Use international headers when posting file names. (Issue #119)\n\n* Improved IPv6 support. (Issue #203)\n\n\n1.6 (2013-04-25)\n----------------\n\n* Contrib: Optional SNI support for Py2 using PyOpenSSL. (Issue #156)\n\n* ``ProxyManager`` automatically adds ``Host: ...`` header if not given.\n\n* Improved SSL-related code. ``cert_req`` now optionally takes a string like\n \"REQUIRED\" or \"NONE\". Same with ``ssl_version`` takes strings like \"SSLv23\"\n The string values reflect the suffix of the respective constant variable.\n (Issue #130)\n\n* Vendored ``socksipy`` now based on Anorov's fork which handles unexpectedly\n closed proxy connections and larger read buffers. (Issue #135)\n\n* Ensure the connection is closed if no data is received, fixes connection leak\n on some platforms. (Issue #133)\n\n* Added SNI support for SSL/TLS connections on Py32+. (Issue #89)\n\n* Tests fixed to be compatible with Py26 again. (Issue #125)\n\n* Added ability to choose SSL version by passing an ``ssl.PROTOCOL_*`` constant\n to the ``ssl_version`` parameter of ``HTTPSConnectionPool``. (Issue #109)\n\n* Allow an explicit content type to be specified when encoding file fields.\n (Issue #126)\n\n* Exceptions are now pickleable, with tests. (Issue #101)\n\n* Fixed default headers not getting passed in some cases. (Issue #99)\n\n* Treat \"content-encoding\" header value as case-insensitive, per RFC 2616\n Section 3.5. (Issue #110)\n\n* \"Connection Refused\" SocketErrors will get retried rather than raised.\n (Issue #92)\n\n* Updated vendored ``six``, no longer overrides the global ``six`` module\n namespace. (Issue #113)\n\n* ``urllib3.exceptions.MaxRetryError`` contains a ``reason`` property holding\n the exception that prompted the final retry. If ``reason is None`` then it\n was due to a redirect. (Issue #92, #114)\n\n* Fixed ``PoolManager.urlopen()`` from not redirecting more than once.\n (Issue #149)\n\n* Don't assume ``Content-Type: text/plain`` for multi-part encoding parameters\n that are not files. (Issue #111)\n\n* Pass `strict` param down to ``httplib.HTTPConnection``. (Issue #122)\n\n* Added mechanism to verify SSL certificates by fingerprint (md5, sha1) or\n against an arbitrary hostname (when connecting by IP or for misconfigured\n servers). (Issue #140)\n\n* Streaming decompression support. (Issue #159)\n\n\n1.5 (2012-08-02)\n----------------\n\n* Added ``urllib3.add_stderr_logger()`` for quickly enabling STDERR debug\n logging in urllib3.\n\n* Native full URL parsing (including auth, path, query, fragment) available in\n ``urllib3.util.parse_url(url)``.\n\n* Built-in redirect will switch method to 'GET' if status code is 303.\n (Issue #11)\n\n* ``urllib3.PoolManager`` strips the scheme and host before sending the request\n uri. (Issue #8)\n\n* New ``urllib3.exceptions.DecodeError`` exception for when automatic decoding,\n based on the Content-Type header, fails.\n\n* Fixed bug with pool depletion and leaking connections (Issue #76). Added\n explicit connection closing on pool eviction. Added\n ``urllib3.PoolManager.clear()``.\n\n* 99% -> 100% unit test coverage.\n\n\n1.4 (2012-06-16)\n----------------\n\n* Minor AppEngine-related fixes.\n\n* Switched from ``mimetools.choose_boundary`` to ``uuid.uuid4()``.\n\n* Improved url parsing. (Issue #73)\n\n* IPv6 url support. (Issue #72)\n\n\n1.3 (2012-03-25)\n----------------\n\n* Removed pre-1.0 deprecated API.\n\n* Refactored helpers into a ``urllib3.util`` submodule.\n\n* Fixed multipart encoding to support list-of-tuples for keys with multiple\n values. (Issue #48)\n\n* Fixed multiple Set-Cookie headers in response not getting merged properly in\n Python 3. (Issue #53)\n\n* AppEngine support with Py27. (Issue #61)\n\n* Minor ``encode_multipart_formdata`` fixes related to Python 3 strings vs\n bytes.\n\n\n1.2.2 (2012-02-06)\n------------------\n\n* Fixed packaging bug of not shipping ``test-requirements.txt``. (Issue #47)\n\n\n1.2.1 (2012-02-05)\n------------------\n\n* Fixed another bug related to when ``ssl`` module is not available. (Issue #41)\n\n* Location parsing errors now raise ``urllib3.exceptions.LocationParseError``\n which inherits from ``ValueError``.\n\n\n1.2 (2012-01-29)\n----------------\n\n* Added Python 3 support (tested on 3.2.2)\n\n* Dropped Python 2.5 support (tested on 2.6.7, 2.7.2)\n\n* Use ``select.poll`` instead of ``select.select`` for platforms that support\n it.\n\n* Use ``Queue.LifoQueue`` instead of ``Queue.Queue`` for more aggressive\n connection reusing. Configurable by overriding ``ConnectionPool.QueueCls``.\n\n* Fixed ``ImportError`` during install when ``ssl`` module is not available.\n (Issue #41)\n\n* Fixed ``PoolManager`` redirects between schemes (such as HTTP -> HTTPS) not\n completing properly. (Issue #28, uncovered by Issue #10 in v1.1)\n\n* Ported ``dummyserver`` to use ``tornado`` instead of ``webob`` +\n ``eventlet``. Removed extraneous unsupported dummyserver testing backends.\n Added socket-level tests.\n\n* More tests. Achievement Unlocked: 99% Coverage.\n\n\n1.1 (2012-01-07)\n----------------\n\n* Refactored ``dummyserver`` to its own root namespace module (used for\n testing).\n\n* Added hostname verification for ``VerifiedHTTPSConnection`` by vendoring in\n Py32's ``ssl_match_hostname``. (Issue #25)\n\n* Fixed cross-host HTTP redirects when using ``PoolManager``. (Issue #10)\n\n* Fixed ``decode_content`` being ignored when set through ``urlopen``. (Issue\n #27)\n\n* Fixed timeout-related bugs. (Issues #17, #23)\n\n\n1.0.2 (2011-11-04)\n------------------\n\n* Fixed typo in ``VerifiedHTTPSConnection`` which would only present as a bug if\n you're using the object manually. (Thanks pyos)\n\n* Made RecentlyUsedContainer (and consequently PoolManager) more thread-safe by\n wrapping the access log in a mutex. (Thanks @christer)\n\n* Made RecentlyUsedContainer more dict-like (corrected ``__delitem__`` and\n ``__getitem__`` behaviour), with tests. Shouldn't affect core urllib3 code.\n\n\n1.0.1 (2011-10-10)\n------------------\n\n* Fixed a bug where the same connection would get returned into the pool twice,\n causing extraneous \"HttpConnectionPool is full\" log warnings.\n\n\n1.0 (2011-10-08)\n----------------\n\n* Added ``PoolManager`` with LRU expiration of connections (tested and\n documented).\n* Added ``ProxyManager`` (needs tests, docs, and confirmation that it works\n with HTTPS proxies).\n* Added optional partial-read support for responses when\n ``preload_content=False``. You can now make requests and just read the headers\n without loading the content.\n* Made response decoding optional (default on, same as before).\n* Added optional explicit boundary string for ``encode_multipart_formdata``.\n* Convenience request methods are now inherited from ``RequestMethods``. Old\n helpers like ``get_url`` and ``post_url`` should be abandoned in favour of\n the new ``request(method, url, ...)``.\n* Refactored code to be even more decoupled, reusable, and extendable.\n* License header added to ``.py`` files.\n* Embiggened the documentation: Lots of Sphinx-friendly docstrings in the code\n and docs in ``docs/`` and on https://urllib3.readthedocs.io/.\n* Embettered all the things!\n* Started writing this file.\n\n\n0.4.1 (2011-07-17)\n------------------\n\n* Minor bug fixes, code cleanup.\n\n\n0.4 (2011-03-01)\n----------------\n\n* Better unicode support.\n* Added ``VerifiedHTTPSConnection``.\n* Added ``NTLMConnectionPool`` in contrib.\n* Minor improvements.\n\n\n0.3.1 (2010-07-13)\n------------------\n\n* Added ``assert_host_name`` optional parameter. Now compatible with proxies.\n\n\n0.3 (2009-12-10)\n----------------\n\n* Added HTTPS support.\n* Minor bug fixes.\n* Refactored, broken backwards compatibility with 0.2.\n* API to be treated as stable from this version forward.\n\n\n0.2 (2008-11-17)\n----------------\n\n* Added unit tests.\n* Bug fixes.\n\n\n0.1 (2008-11-16)\n----------------\n\n* First release.", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Andrey Petrov", - "email": "andrey.petrov@shazow.net", - "url": null - } - ], - "keywords": [ - "urllib httplib threadsafe filepost http https ssl pooling", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries" - ], - "homepage_url": "https://urllib3.readthedocs.io/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": "Issue tracker, https://github.com/urllib3/urllib3/issues", - "code_view_url": "Code, https://github.com/urllib3/urllib3", - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pyopenssl", - "requirement": ">=0.14", - "scope": "secure", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "urllib3", + "version": "1.26.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "HTTP library with thread-safe connection pooling, file post, and more.\nurllib3 is a powerful, *user-friendly* HTTP client for Python. Much of the\nPython ecosystem already uses urllib3 and you should too.\nurllib3 brings many critical features that are missing from the Python\nstandard libraries:\n\n- Thread safety.\n- Connection pooling.\n- Client-side SSL/TLS verification.\n- File uploads with multipart encoding.\n- Helpers for retrying requests and dealing with HTTP redirects.\n- Support for gzip, deflate, and brotli encoding.\n- Proxy support for HTTP and SOCKS.\n- 100% test coverage.\n\nurllib3 is powerful and easy to use:\n\n.. code-block:: python\n\n >>> import urllib3\n >>> http = urllib3.PoolManager()\n >>> r = http.request('GET', 'http://httpbin.org/robots.txt')\n >>> r.status\n 200\n >>> r.data\n 'User-agent: *\\nDisallow: /deny\\n'\n\n\nInstalling\n----------\n\nurllib3 can be installed with `pip `_::\n\n $ python -m pip install urllib3\n\nAlternatively, you can grab the latest source code from `GitHub `_::\n\n $ git clone git://github.com/urllib3/urllib3.git\n $ python setup.py install\n\n\nDocumentation\n-------------\n\nurllib3 has usage and reference documentation at `urllib3.readthedocs.io `_.\n\n\nContributing\n------------\n\nurllib3 happily accepts contributions. Please see our\n`contributing documentation `_\nfor some tips on getting started.\n\n\nSecurity Disclosures\n--------------------\n\nTo report a security vulnerability, please use the\n`Tidelift security contact `_.\nTidelift will coordinate the fix and disclosure with maintainers.\n\n\nMaintainers\n-----------\n\n- `@sethmlarson `__ (Seth M. Larson)\n- `@pquentin `__ (Quentin Pradet)\n- `@theacodes `__ (Thea Flowers)\n- `@haikuginger `__ (Jess Shapiro)\n- `@lukasa `__ (Cory Benfield)\n- `@sigmavirus24 `__ (Ian Stapleton Cordasco)\n- `@shazow `__ (Andrey Petrov)\n\n\ud83d\udc4b\n\n\nSponsorship\n-----------\n\nIf your company benefits from this library, please consider `sponsoring its\ndevelopment `_.\n\n\nFor Enterprise\n--------------\n\n.. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png\n :width: 75\n :alt: Tidelift\n\n.. list-table::\n :widths: 10 100\n\n * - |tideliftlogo|\n - Professional support for urllib3 is available as part of the `Tidelift\n Subscription`_. Tidelift gives software development teams a single source for\n purchasing and maintaining their software, with professional grade assurances\n from the experts who know it best, while seamlessly integrating with existing\n tools.\n\n.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-urllib3?utm_source=pypi-urllib3&utm_medium=referral&utm_campaign=readme\n\n\nChanges\n=======\n\n1.26.4 (2021-03-15)\n-------------------\n\n* Changed behavior of the default ``SSLContext`` when connecting to HTTPS proxy\n during HTTPS requests. The default ``SSLContext`` now sets ``check_hostname=True``.\n\n\n1.26.3 (2021-01-26)\n-------------------\n\n* Fixed bytes and string comparison issue with headers (Pull #2141)\n\n* Changed ``ProxySchemeUnknown`` error message to be\n more actionable if the user supplies a proxy URL without\n a scheme. (Pull #2107)\n\n\n1.26.2 (2020-11-12)\n-------------------\n\n* Fixed an issue where ``wrap_socket`` and ``CERT_REQUIRED`` wouldn't\n be imported properly on Python 2.7.8 and earlier (Pull #2052)\n\n\n1.26.1 (2020-11-11)\n-------------------\n\n* Fixed an issue where two ``User-Agent`` headers would be sent if a\n ``User-Agent`` header key is passed as ``bytes`` (Pull #2047)\n\n\n1.26.0 (2020-11-10)\n-------------------\n\n* **NOTE: urllib3 v2.0 will drop support for Python 2**.\n `Read more in the v2.0 Roadmap `_.\n\n* Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)\n\n* Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that\n still wish to use TLS earlier than 1.2 without a deprecation warning\n should opt-in explicitly by setting ``ssl_version=ssl.PROTOCOL_TLSv1_1`` (Pull #2002)\n **Starting in urllib3 v2.0: Connections that receive a ``DeprecationWarning`` will fail**\n\n* Deprecated ``Retry`` options ``Retry.DEFAULT_METHOD_WHITELIST``, ``Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST``\n and ``Retry(method_whitelist=...)`` in favor of ``Retry.DEFAULT_ALLOWED_METHODS``,\n ``Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT``, and ``Retry(allowed_methods=...)``\n (Pull #2000) **Starting in urllib3 v2.0: Deprecated options will be removed**\n\n* Added default ``User-Agent`` header to every request (Pull #1750)\n\n* Added ``urllib3.util.SKIP_HEADER`` for skipping ``User-Agent``, ``Accept-Encoding``, \n and ``Host`` headers from being automatically emitted with requests (Pull #2018)\n\n* Collapse ``transfer-encoding: chunked`` request data and framing into\n the same ``socket.send()`` call (Pull #1906)\n\n* Send ``http/1.1`` ALPN identifier with every TLS handshake by default (Pull #1894)\n\n* Properly terminate SecureTransport connections when CA verification fails (Pull #1977)\n\n* Don't emit an ``SNIMissingWarning`` when passing ``server_hostname=None``\n to SecureTransport (Pull #1903)\n\n* Disabled requesting TLSv1.2 session tickets as they weren't being used by urllib3 (Pull #1970)\n\n* Suppress ``BrokenPipeError`` when writing request body after the server\n has closed the socket (Pull #1524)\n\n* Wrap ``ssl.SSLError`` that can be raised from reading a socket (e.g. \"bad MAC\")\n into an ``urllib3.exceptions.SSLError`` (Pull #1939)\n\n\n1.25.11 (2020-10-19)\n--------------------\n\n* Fix retry backoff time parsed from ``Retry-After`` header when given\n in the HTTP date format. The HTTP date was parsed as the local timezone\n rather than accounting for the timezone in the HTTP date (typically\n UTC) (Pull #1932, Pull #1935, Pull #1938, Pull #1949)\n\n* Fix issue where an error would be raised when the ``SSLKEYLOGFILE``\n environment variable was set to the empty string. Now ``SSLContext.keylog_file``\n is not set in this situation (Pull #2016)\n\n\n1.25.10 (2020-07-22)\n--------------------\n\n* Added support for ``SSLKEYLOGFILE`` environment variable for\n logging TLS session keys with use with programs like\n Wireshark for decrypting captured web traffic (Pull #1867)\n\n* Fixed loading of SecureTransport libraries on macOS Big Sur\n due to the new dynamic linker cache (Pull #1905)\n\n* Collapse chunked request bodies data and framing into one\n call to ``send()`` to reduce the number of TCP packets by 2-4x (Pull #1906)\n\n* Don't insert ``None`` into ``ConnectionPool`` if the pool\n was empty when requesting a connection (Pull #1866)\n\n* Avoid ``hasattr`` call in ``BrotliDecoder.decompress()`` (Pull #1858)\n\n\n1.25.9 (2020-04-16)\n-------------------\n\n* Added ``InvalidProxyConfigurationWarning`` which is raised when\n erroneously specifying an HTTPS proxy URL. urllib3 doesn't currently\n support connecting to HTTPS proxies but will soon be able to\n and we would like users to migrate properly without much breakage.\n\n See `this GitHub issue `_\n for more information on how to fix your proxy config. (Pull #1851)\n\n* Drain connection after ``PoolManager`` redirect (Pull #1817)\n\n* Ensure ``load_verify_locations`` raises ``SSLError`` for all backends (Pull #1812)\n\n* Rename ``VerifiedHTTPSConnection`` to ``HTTPSConnection`` (Pull #1805)\n\n* Allow the CA certificate data to be passed as a string (Pull #1804)\n\n* Raise ``ValueError`` if method contains control characters (Pull #1800)\n\n* Add ``__repr__`` to ``Timeout`` (Pull #1795)\n\n\n1.25.8 (2020-01-20)\n-------------------\n\n* Drop support for EOL Python 3.4 (Pull #1774)\n\n* Optimize _encode_invalid_chars (Pull #1787)\n\n\n1.25.7 (2019-11-11)\n-------------------\n\n* Preserve ``chunked`` parameter on retries (Pull #1715, Pull #1734)\n\n* Allow unset ``SERVER_SOFTWARE`` in App Engine (Pull #1704, Issue #1470)\n\n* Fix issue where URL fragment was sent within the request target. (Pull #1732)\n\n* Fix issue where an empty query section in a URL would fail to parse. (Pull #1732)\n\n* Remove TLS 1.3 support in SecureTransport due to Apple removing support (Pull #1703)\n\n\n1.25.6 (2019-09-24)\n-------------------\n\n* Fix issue where tilde (``~``) characters were incorrectly\n percent-encoded in the path. (Pull #1692)\n\n\n1.25.5 (2019-09-19)\n-------------------\n\n* Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which\n caused certificate verification to be enabled when using ``cert_reqs=CERT_NONE``.\n (Issue #1682)\n\n\n1.25.4 (2019-09-19)\n-------------------\n\n* Propagate Retry-After header settings to subsequent retries. (Pull #1607)\n\n* Fix edge case where Retry-After header was still respected even when\n explicitly opted out of. (Pull #1607)\n\n* Remove dependency on ``rfc3986`` for URL parsing.\n\n* Fix issue where URLs containing invalid characters within ``Url.auth`` would\n raise an exception instead of percent-encoding those characters.\n\n* Add support for ``HTTPResponse.auto_close = False`` which makes HTTP responses\n work well with BufferedReaders and other ``io`` module features. (Pull #1652)\n\n* Percent-encode invalid characters in URL for ``HTTPConnectionPool.request()`` (Pull #1673)\n\n\n1.25.3 (2019-05-23)\n-------------------\n\n* Change ``HTTPSConnection`` to load system CA certificates\n when ``ca_certs``, ``ca_cert_dir``, and ``ssl_context`` are\n unspecified. (Pull #1608, Issue #1603)\n\n* Upgrade bundled rfc3986 to v1.3.2. (Pull #1609, Issue #1605)\n\n\n1.25.2 (2019-04-28)\n-------------------\n\n* Change ``is_ipaddress`` to not detect IPvFuture addresses. (Pull #1583)\n\n* Change ``parse_url`` to percent-encode invalid characters within the\n path, query, and target components. (Pull #1586)\n\n\n1.25.1 (2019-04-24)\n-------------------\n\n* Add support for Google's ``Brotli`` package. (Pull #1572, Pull #1579)\n\n* Upgrade bundled rfc3986 to v1.3.1 (Pull #1578)\n\n\n1.25 (2019-04-22)\n-----------------\n\n* Require and validate certificates by default when using HTTPS (Pull #1507)\n\n* Upgraded ``urllib3.utils.parse_url()`` to be RFC 3986 compliant. (Pull #1487)\n\n* Added support for ``key_password`` for ``HTTPSConnectionPool`` to use\n encrypted ``key_file`` without creating your own ``SSLContext`` object. (Pull #1489)\n\n* Add TLSv1.3 support to CPython, pyOpenSSL, and SecureTransport ``SSLContext``\n implementations. (Pull #1496)\n\n* Switched the default multipart header encoder from RFC 2231 to HTML 5 working draft. (Issue #303, Pull #1492)\n\n* Fixed issue where OpenSSL would block if an encrypted client private key was\n given and no password was given. Instead an ``SSLError`` is raised. (Pull #1489)\n\n* Added support for Brotli content encoding. It is enabled automatically if\n ``brotlipy`` package is installed which can be requested with\n ``urllib3[brotli]`` extra. (Pull #1532)\n\n* Drop ciphers using DSS key exchange from default TLS cipher suites.\n Improve default ciphers when using SecureTransport. (Pull #1496)\n\n* Implemented a more efficient ``HTTPResponse.__iter__()`` method. (Issue #1483)\n\n1.24.3 (2019-05-01)\n-------------------\n\n* Apply fix for CVE-2019-9740. (Pull #1591)\n\n1.24.2 (2019-04-17)\n-------------------\n\n* Don't load system certificates by default when any other ``ca_certs``, ``ca_certs_dir`` or\n ``ssl_context`` parameters are specified.\n\n* Remove Authorization header regardless of case when redirecting to cross-site. (Issue #1510)\n\n* Add support for IPv6 addresses in subjectAltName section of certificates. (Issue #1269)\n\n\n1.24.1 (2018-11-02)\n-------------------\n\n* Remove quadratic behavior within ``GzipDecoder.decompress()`` (Issue #1467)\n\n* Restored functionality of ``ciphers`` parameter for ``create_urllib3_context()``. (Issue #1462)\n\n\n1.24 (2018-10-16)\n-----------------\n\n* Allow key_server_hostname to be specified when initializing a PoolManager to allow custom SNI to be overridden. (Pull #1449)\n\n* Test against Python 3.7 on AppVeyor. (Pull #1453)\n\n* Early-out ipv6 checks when running on App Engine. (Pull #1450)\n\n* Change ambiguous description of backoff_factor (Pull #1436)\n\n* Add ability to handle multiple Content-Encodings (Issue #1441 and Pull #1442)\n\n* Skip DNS names that can't be idna-decoded when using pyOpenSSL (Issue #1405).\n\n* Add a server_hostname parameter to HTTPSConnection which allows for\n overriding the SNI hostname sent in the handshake. (Pull #1397)\n\n* Drop support for EOL Python 2.6 (Pull #1429 and Pull #1430)\n\n* Fixed bug where responses with header Content-Type: message/* erroneously\n raised HeaderParsingError, resulting in a warning being logged. (Pull #1439)\n\n* Move urllib3 to src/urllib3 (Pull #1409)\n\n\n1.23 (2018-06-04)\n-----------------\n\n* Allow providing a list of headers to strip from requests when redirecting\n to a different host. Defaults to the ``Authorization`` header. Different\n headers can be set via ``Retry.remove_headers_on_redirect``. (Issue #1316)\n\n* Fix ``util.selectors._fileobj_to_fd`` to accept ``long`` (Issue #1247).\n\n* Dropped Python 3.3 support. (Pull #1242)\n\n* Put the connection back in the pool when calling stream() or read_chunked() on\n a chunked HEAD response. (Issue #1234)\n\n* Fixed pyOpenSSL-specific ssl client authentication issue when clients\n attempted to auth via certificate + chain (Issue #1060)\n\n* Add the port to the connectionpool connect print (Pull #1251)\n\n* Don't use the ``uuid`` module to create multipart data boundaries. (Pull #1380)\n\n* ``read_chunked()`` on a closed response returns no chunks. (Issue #1088)\n\n* Add Python 2.6 support to ``contrib.securetransport`` (Pull #1359)\n\n* Added support for auth info in url for SOCKS proxy (Pull #1363)\n\n\n1.22 (2017-07-20)\n-----------------\n\n* Fixed missing brackets in ``HTTP CONNECT`` when connecting to IPv6 address via\n IPv6 proxy. (Issue #1222)\n\n* Made the connection pool retry on ``SSLError``. The original ``SSLError``\n is available on ``MaxRetryError.reason``. (Issue #1112)\n\n* Drain and release connection before recursing on retry/redirect. Fixes\n deadlocks with a blocking connectionpool. (Issue #1167)\n\n* Fixed compatibility for cookiejar. (Issue #1229)\n\n* pyopenssl: Use vendored version of ``six``. (Issue #1231)\n\n\n1.21.1 (2017-05-02)\n-------------------\n\n* Fixed SecureTransport issue that would cause long delays in response body\n delivery. (Pull #1154)\n\n* Fixed regression in 1.21 that threw exceptions when users passed the\n ``socket_options`` flag to the ``PoolManager``. (Issue #1165)\n\n* Fixed regression in 1.21 that threw exceptions when users passed the\n ``assert_hostname`` or ``assert_fingerprint`` flag to the ``PoolManager``.\n (Pull #1157)\n\n\n1.21 (2017-04-25)\n-----------------\n\n* Improved performance of certain selector system calls on Python 3.5 and\n later. (Pull #1095)\n\n* Resolved issue where the PyOpenSSL backend would not wrap SysCallError\n exceptions appropriately when sending data. (Pull #1125)\n\n* Selectors now detects a monkey-patched select module after import for modules\n that patch the select module like eventlet, greenlet. (Pull #1128)\n\n* Reduced memory consumption when streaming zlib-compressed responses\n (as opposed to raw deflate streams). (Pull #1129)\n\n* Connection pools now use the entire request context when constructing the\n pool key. (Pull #1016)\n\n* ``PoolManager.connection_from_*`` methods now accept a new keyword argument,\n ``pool_kwargs``, which are merged with the existing ``connection_pool_kw``.\n (Pull #1016)\n\n* Add retry counter for ``status_forcelist``. (Issue #1147)\n\n* Added ``contrib`` module for using SecureTransport on macOS:\n ``urllib3.contrib.securetransport``. (Pull #1122)\n\n* urllib3 now only normalizes the case of ``http://`` and ``https://`` schemes:\n for schemes it does not recognise, it assumes they are case-sensitive and\n leaves them unchanged.\n (Issue #1080)\n\n\n1.20 (2017-01-19)\n-----------------\n\n* Added support for waiting for I/O using selectors other than select,\n improving urllib3's behaviour with large numbers of concurrent connections.\n (Pull #1001)\n\n* Updated the date for the system clock check. (Issue #1005)\n\n* ConnectionPools now correctly consider hostnames to be case-insensitive.\n (Issue #1032)\n\n* Outdated versions of PyOpenSSL now cause the PyOpenSSL contrib module\n to fail when it is injected, rather than at first use. (Pull #1063)\n\n* Outdated versions of cryptography now cause the PyOpenSSL contrib module\n to fail when it is injected, rather than at first use. (Issue #1044)\n\n* Automatically attempt to rewind a file-like body object when a request is\n retried or redirected. (Pull #1039)\n\n* Fix some bugs that occur when modules incautiously patch the queue module.\n (Pull #1061)\n\n* Prevent retries from occurring on read timeouts for which the request method\n was not in the method whitelist. (Issue #1059)\n\n* Changed the PyOpenSSL contrib module to lazily load idna to avoid\n unnecessarily bloating the memory of programs that don't need it. (Pull\n #1076)\n\n* Add support for IPv6 literals with zone identifiers. (Pull #1013)\n\n* Added support for socks5h:// and socks4a:// schemes when working with SOCKS\n proxies, and controlled remote DNS appropriately. (Issue #1035)\n\n\n1.19.1 (2016-11-16)\n-------------------\n\n* Fixed AppEngine import that didn't function on Python 3.5. (Pull #1025)\n\n\n1.19 (2016-11-03)\n-----------------\n\n* urllib3 now respects Retry-After headers on 413, 429, and 503 responses when\n using the default retry logic. (Pull #955)\n\n* Remove markers from setup.py to assist ancient setuptools versions. (Issue\n #986)\n\n* Disallow superscripts and other integerish things in URL ports. (Issue #989)\n\n* Allow urllib3's HTTPResponse.stream() method to continue to work with\n non-httplib underlying FPs. (Pull #990)\n\n* Empty filenames in multipart headers are now emitted as such, rather than\n being suppressed. (Issue #1015)\n\n* Prefer user-supplied Host headers on chunked uploads. (Issue #1009)\n\n\n1.18.1 (2016-10-27)\n-------------------\n\n* CVE-2016-9015. Users who are using urllib3 version 1.17 or 1.18 along with\n PyOpenSSL injection and OpenSSL 1.1.0 *must* upgrade to this version. This\n release fixes a vulnerability whereby urllib3 in the above configuration\n would silently fail to validate TLS certificates due to erroneously setting\n invalid flags in OpenSSL's ``SSL_CTX_set_verify`` function. These erroneous\n flags do not cause a problem in OpenSSL versions before 1.1.0, which\n interprets the presence of any flag as requesting certificate validation.\n\n There is no PR for this patch, as it was prepared for simultaneous disclosure\n and release. The master branch received the same fix in Pull #1010.\n\n\n1.18 (2016-09-26)\n-----------------\n\n* Fixed incorrect message for IncompleteRead exception. (Pull #973)\n\n* Accept ``iPAddress`` subject alternative name fields in TLS certificates.\n (Issue #258)\n\n* Fixed consistency of ``HTTPResponse.closed`` between Python 2 and 3.\n (Issue #977)\n\n* Fixed handling of wildcard certificates when using PyOpenSSL. (Issue #979)\n\n\n1.17 (2016-09-06)\n-----------------\n\n* Accept ``SSLContext`` objects for use in SSL/TLS negotiation. (Issue #835)\n\n* ConnectionPool debug log now includes scheme, host, and port. (Issue #897)\n\n* Substantially refactored documentation. (Issue #887)\n\n* Used URLFetch default timeout on AppEngine, rather than hardcoding our own.\n (Issue #858)\n\n* Normalize the scheme and host in the URL parser (Issue #833)\n\n* ``HTTPResponse`` contains the last ``Retry`` object, which now also\n contains retries history. (Issue #848)\n\n* Timeout can no longer be set as boolean, and must be greater than zero.\n (Pull #924)\n\n* Removed pyasn1 and ndg-httpsclient from dependencies used for PyOpenSSL. We\n now use cryptography and idna, both of which are already dependencies of\n PyOpenSSL. (Pull #930)\n\n* Fixed infinite loop in ``stream`` when amt=None. (Issue #928)\n\n* Try to use the operating system's certificates when we are using an\n ``SSLContext``. (Pull #941)\n\n* Updated cipher suite list to allow ChaCha20+Poly1305. AES-GCM is preferred to\n ChaCha20, but ChaCha20 is then preferred to everything else. (Pull #947)\n\n* Updated cipher suite list to remove 3DES-based cipher suites. (Pull #958)\n\n* Removed the cipher suite fallback to allow HIGH ciphers. (Pull #958)\n\n* Implemented ``length_remaining`` to determine remaining content\n to be read. (Pull #949)\n\n* Implemented ``enforce_content_length`` to enable exceptions when\n incomplete data chunks are received. (Pull #949)\n\n* Dropped connection start, dropped connection reset, redirect, forced retry,\n and new HTTPS connection log levels to DEBUG, from INFO. (Pull #967)\n\n\n1.16 (2016-06-11)\n-----------------\n\n* Disable IPv6 DNS when IPv6 connections are not possible. (Issue #840)\n\n* Provide ``key_fn_by_scheme`` pool keying mechanism that can be\n overridden. (Issue #830)\n\n* Normalize scheme and host to lowercase for pool keys, and include\n ``source_address``. (Issue #830)\n\n* Cleaner exception chain in Python 3 for ``_make_request``.\n (Issue #861)\n\n* Fixed installing ``urllib3[socks]`` extra. (Issue #864)\n\n* Fixed signature of ``ConnectionPool.close`` so it can actually safely be\n called by subclasses. (Issue #873)\n\n* Retain ``release_conn`` state across retries. (Issues #651, #866)\n\n* Add customizable ``HTTPConnectionPool.ResponseCls``, which defaults to\n ``HTTPResponse`` but can be replaced with a subclass. (Issue #879)\n\n\n1.15.1 (2016-04-11)\n-------------------\n\n* Fix packaging to include backports module. (Issue #841)\n\n\n1.15 (2016-04-06)\n-----------------\n\n* Added Retry(raise_on_status=False). (Issue #720)\n\n* Always use setuptools, no more distutils fallback. (Issue #785)\n\n* Dropped support for Python 3.2. (Issue #786)\n\n* Chunked transfer encoding when requesting with ``chunked=True``.\n (Issue #790)\n\n* Fixed regression with IPv6 port parsing. (Issue #801)\n\n* Append SNIMissingWarning messages to allow users to specify it in\n the PYTHONWARNINGS environment variable. (Issue #816)\n\n* Handle unicode headers in Py2. (Issue #818)\n\n* Log certificate when there is a hostname mismatch. (Issue #820)\n\n* Preserve order of request/response headers. (Issue #821)\n\n\n1.14 (2015-12-29)\n-----------------\n\n* contrib: SOCKS proxy support! (Issue #762)\n\n* Fixed AppEngine handling of transfer-encoding header and bug\n in Timeout defaults checking. (Issue #763)\n\n\n1.13.1 (2015-12-18)\n-------------------\n\n* Fixed regression in IPv6 + SSL for match_hostname. (Issue #761)\n\n\n1.13 (2015-12-14)\n-----------------\n\n* Fixed ``pip install urllib3[secure]`` on modern pip. (Issue #706)\n\n* pyopenssl: Fixed SSL3_WRITE_PENDING error. (Issue #717)\n\n* pyopenssl: Support for TLSv1.1 and TLSv1.2. (Issue #696)\n\n* Close connections more defensively on exception. (Issue #734)\n\n* Adjusted ``read_chunked`` to handle gzipped, chunk-encoded bodies without\n repeatedly flushing the decoder, to function better on Jython. (Issue #743)\n\n* Accept ``ca_cert_dir`` for SSL-related PoolManager configuration. (Issue #758)\n\n\n1.12 (2015-09-03)\n-----------------\n\n* Rely on ``six`` for importing ``httplib`` to work around\n conflicts with other Python 3 shims. (Issue #688)\n\n* Add support for directories of certificate authorities, as supported by\n OpenSSL. (Issue #701)\n\n* New exception: ``NewConnectionError``, raised when we fail to establish\n a new connection, usually ``ECONNREFUSED`` socket error.\n\n\n1.11 (2015-07-21)\n-----------------\n\n* When ``ca_certs`` is given, ``cert_reqs`` defaults to\n ``'CERT_REQUIRED'``. (Issue #650)\n\n* ``pip install urllib3[secure]`` will install Certifi and\n PyOpenSSL as dependencies. (Issue #678)\n\n* Made ``HTTPHeaderDict`` usable as a ``headers`` input value\n (Issues #632, #679)\n\n* Added `urllib3.contrib.appengine `_\n which has an ``AppEngineManager`` for using ``URLFetch`` in a\n Google AppEngine environment. (Issue #664)\n\n* Dev: Added test suite for AppEngine. (Issue #631)\n\n* Fix performance regression when using PyOpenSSL. (Issue #626)\n\n* Passing incorrect scheme (e.g. ``foo://``) will raise\n ``ValueError`` instead of ``AssertionError`` (backwards\n compatible for now, but please migrate). (Issue #640)\n\n* Fix pools not getting replenished when an error occurs during a\n request using ``release_conn=False``. (Issue #644)\n\n* Fix pool-default headers not applying for url-encoded requests\n like GET. (Issue #657)\n\n* log.warning in Python 3 when headers are skipped due to parsing\n errors. (Issue #642)\n\n* Close and discard connections if an error occurs during read.\n (Issue #660)\n\n* Fix host parsing for IPv6 proxies. (Issue #668)\n\n* Separate warning type SubjectAltNameWarning, now issued once\n per host. (Issue #671)\n\n* Fix ``httplib.IncompleteRead`` not getting converted to\n ``ProtocolError`` when using ``HTTPResponse.stream()``\n (Issue #674)\n\n1.10.4 (2015-05-03)\n-------------------\n\n* Migrate tests to Tornado 4. (Issue #594)\n\n* Append default warning configuration rather than overwrite.\n (Issue #603)\n\n* Fix streaming decoding regression. (Issue #595)\n\n* Fix chunked requests losing state across keep-alive connections.\n (Issue #599)\n\n* Fix hanging when chunked HEAD response has no body. (Issue #605)\n\n\n1.10.3 (2015-04-21)\n-------------------\n\n* Emit ``InsecurePlatformWarning`` when SSLContext object is missing.\n (Issue #558)\n\n* Fix regression of duplicate header keys being discarded.\n (Issue #563)\n\n* ``Response.stream()`` returns a generator for chunked responses.\n (Issue #560)\n\n* Set upper-bound timeout when waiting for a socket in PyOpenSSL.\n (Issue #585)\n\n* Work on platforms without `ssl` module for plain HTTP requests.\n (Issue #587)\n\n* Stop relying on the stdlib's default cipher list. (Issue #588)\n\n\n1.10.2 (2015-02-25)\n-------------------\n\n* Fix file descriptor leakage on retries. (Issue #548)\n\n* Removed RC4 from default cipher list. (Issue #551)\n\n* Header performance improvements. (Issue #544)\n\n* Fix PoolManager not obeying redirect retry settings. (Issue #553)\n\n\n1.10.1 (2015-02-10)\n-------------------\n\n* Pools can be used as context managers. (Issue #545)\n\n* Don't re-use connections which experienced an SSLError. (Issue #529)\n\n* Don't fail when gzip decoding an empty stream. (Issue #535)\n\n* Add sha256 support for fingerprint verification. (Issue #540)\n\n* Fixed handling of header values containing commas. (Issue #533)\n\n\n1.10 (2014-12-14)\n-----------------\n\n* Disabled SSLv3. (Issue #473)\n\n* Add ``Url.url`` property to return the composed url string. (Issue #394)\n\n* Fixed PyOpenSSL + gevent ``WantWriteError``. (Issue #412)\n\n* ``MaxRetryError.reason`` will always be an exception, not string.\n (Issue #481)\n\n* Fixed SSL-related timeouts not being detected as timeouts. (Issue #492)\n\n* Py3: Use ``ssl.create_default_context()`` when available. (Issue #473)\n\n* Emit ``InsecureRequestWarning`` for *every* insecure HTTPS request.\n (Issue #496)\n\n* Emit ``SecurityWarning`` when certificate has no ``subjectAltName``.\n (Issue #499)\n\n* Close and discard sockets which experienced SSL-related errors.\n (Issue #501)\n\n* Handle ``body`` param in ``.request(...)``. (Issue #513)\n\n* Respect timeout with HTTPS proxy. (Issue #505)\n\n* PyOpenSSL: Handle ZeroReturnError exception. (Issue #520)\n\n\n1.9.1 (2014-09-13)\n------------------\n\n* Apply socket arguments before binding. (Issue #427)\n\n* More careful checks if fp-like object is closed. (Issue #435)\n\n* Fixed packaging issues of some development-related files not\n getting included. (Issue #440)\n\n* Allow performing *only* fingerprint verification. (Issue #444)\n\n* Emit ``SecurityWarning`` if system clock is waaay off. (Issue #445)\n\n* Fixed PyOpenSSL compatibility with PyPy. (Issue #450)\n\n* Fixed ``BrokenPipeError`` and ``ConnectionError`` handling in Py3.\n (Issue #443)\n\n\n\n1.9 (2014-07-04)\n----------------\n\n* Shuffled around development-related files. If you're maintaining a distro\n package of urllib3, you may need to tweak things. (Issue #415)\n\n* Unverified HTTPS requests will trigger a warning on the first request. See\n our new `security documentation\n `_ for details.\n (Issue #426)\n\n* New retry logic and ``urllib3.util.retry.Retry`` configuration object.\n (Issue #326)\n\n* All raised exceptions should now wrapped in a\n ``urllib3.exceptions.HTTPException``-extending exception. (Issue #326)\n\n* All errors during a retry-enabled request should be wrapped in\n ``urllib3.exceptions.MaxRetryError``, including timeout-related exceptions\n which were previously exempt. Underlying error is accessible from the\n ``.reason`` property. (Issue #326)\n\n* ``urllib3.exceptions.ConnectionError`` renamed to\n ``urllib3.exceptions.ProtocolError``. (Issue #326)\n\n* Errors during response read (such as IncompleteRead) are now wrapped in\n ``urllib3.exceptions.ProtocolError``. (Issue #418)\n\n* Requesting an empty host will raise ``urllib3.exceptions.LocationValueError``.\n (Issue #417)\n\n* Catch read timeouts over SSL connections as\n ``urllib3.exceptions.ReadTimeoutError``. (Issue #419)\n\n* Apply socket arguments before connecting. (Issue #427)\n\n\n1.8.3 (2014-06-23)\n------------------\n\n* Fix TLS verification when using a proxy in Python 3.4.1. (Issue #385)\n\n* Add ``disable_cache`` option to ``urllib3.util.make_headers``. (Issue #393)\n\n* Wrap ``socket.timeout`` exception with\n ``urllib3.exceptions.ReadTimeoutError``. (Issue #399)\n\n* Fixed proxy-related bug where connections were being reused incorrectly.\n (Issues #366, #369)\n\n* Added ``socket_options`` keyword parameter which allows to define\n ``setsockopt`` configuration of new sockets. (Issue #397)\n\n* Removed ``HTTPConnection.tcp_nodelay`` in favor of\n ``HTTPConnection.default_socket_options``. (Issue #397)\n\n* Fixed ``TypeError`` bug in Python 2.6.4. (Issue #411)\n\n\n1.8.2 (2014-04-17)\n------------------\n\n* Fix ``urllib3.util`` not being included in the package.\n\n\n1.8.1 (2014-04-17)\n------------------\n\n* Fix AppEngine bug of HTTPS requests going out as HTTP. (Issue #356)\n\n* Don't install ``dummyserver`` into ``site-packages`` as it's only needed\n for the test suite. (Issue #362)\n\n* Added support for specifying ``source_address``. (Issue #352)\n\n\n1.8 (2014-03-04)\n----------------\n\n* Improved url parsing in ``urllib3.util.parse_url`` (properly parse '@' in\n username, and blank ports like 'hostname:').\n\n* New ``urllib3.connection`` module which contains all the HTTPConnection\n objects.\n\n* Several ``urllib3.util.Timeout``-related fixes. Also changed constructor\n signature to a more sensible order. [Backwards incompatible]\n (Issues #252, #262, #263)\n\n* Use ``backports.ssl_match_hostname`` if it's installed. (Issue #274)\n\n* Added ``.tell()`` method to ``urllib3.response.HTTPResponse`` which\n returns the number of bytes read so far. (Issue #277)\n\n* Support for platforms without threading. (Issue #289)\n\n* Expand default-port comparison in ``HTTPConnectionPool.is_same_host``\n to allow a pool with no specified port to be considered equal to to an\n HTTP/HTTPS url with port 80/443 explicitly provided. (Issue #305)\n\n* Improved default SSL/TLS settings to avoid vulnerabilities.\n (Issue #309)\n\n* Fixed ``urllib3.poolmanager.ProxyManager`` not retrying on connect errors.\n (Issue #310)\n\n* Disable Nagle's Algorithm on the socket for non-proxies. A subset of requests\n will send the entire HTTP request ~200 milliseconds faster; however, some of\n the resulting TCP packets will be smaller. (Issue #254)\n\n* Increased maximum number of SubjectAltNames in ``urllib3.contrib.pyopenssl``\n from the default 64 to 1024 in a single certificate. (Issue #318)\n\n* Headers are now passed and stored as a custom\n ``urllib3.collections_.HTTPHeaderDict`` object rather than a plain ``dict``.\n (Issue #329, #333)\n\n* Headers no longer lose their case on Python 3. (Issue #236)\n\n* ``urllib3.contrib.pyopenssl`` now uses the operating system's default CA\n certificates on inject. (Issue #332)\n\n* Requests with ``retries=False`` will immediately raise any exceptions without\n wrapping them in ``MaxRetryError``. (Issue #348)\n\n* Fixed open socket leak with SSL-related failures. (Issue #344, #348)\n\n\n1.7.1 (2013-09-25)\n------------------\n\n* Added granular timeout support with new ``urllib3.util.Timeout`` class.\n (Issue #231)\n\n* Fixed Python 3.4 support. (Issue #238)\n\n\n1.7 (2013-08-14)\n----------------\n\n* More exceptions are now pickle-able, with tests. (Issue #174)\n\n* Fixed redirecting with relative URLs in Location header. (Issue #178)\n\n* Support for relative urls in ``Location: ...`` header. (Issue #179)\n\n* ``urllib3.response.HTTPResponse`` now inherits from ``io.IOBase`` for bonus\n file-like functionality. (Issue #187)\n\n* Passing ``assert_hostname=False`` when creating a HTTPSConnectionPool will\n skip hostname verification for SSL connections. (Issue #194)\n\n* New method ``urllib3.response.HTTPResponse.stream(...)`` which acts as a\n generator wrapped around ``.read(...)``. (Issue #198)\n\n* IPv6 url parsing enforces brackets around the hostname. (Issue #199)\n\n* Fixed thread race condition in\n ``urllib3.poolmanager.PoolManager.connection_from_host(...)`` (Issue #204)\n\n* ``ProxyManager`` requests now include non-default port in ``Host: ...``\n header. (Issue #217)\n\n* Added HTTPS proxy support in ``ProxyManager``. (Issue #170 #139)\n\n* New ``RequestField`` object can be passed to the ``fields=...`` param which\n can specify headers. (Issue #220)\n\n* Raise ``urllib3.exceptions.ProxyError`` when connecting to proxy fails.\n (Issue #221)\n\n* Use international headers when posting file names. (Issue #119)\n\n* Improved IPv6 support. (Issue #203)\n\n\n1.6 (2013-04-25)\n----------------\n\n* Contrib: Optional SNI support for Py2 using PyOpenSSL. (Issue #156)\n\n* ``ProxyManager`` automatically adds ``Host: ...`` header if not given.\n\n* Improved SSL-related code. ``cert_req`` now optionally takes a string like\n \"REQUIRED\" or \"NONE\". Same with ``ssl_version`` takes strings like \"SSLv23\"\n The string values reflect the suffix of the respective constant variable.\n (Issue #130)\n\n* Vendored ``socksipy`` now based on Anorov's fork which handles unexpectedly\n closed proxy connections and larger read buffers. (Issue #135)\n\n* Ensure the connection is closed if no data is received, fixes connection leak\n on some platforms. (Issue #133)\n\n* Added SNI support for SSL/TLS connections on Py32+. (Issue #89)\n\n* Tests fixed to be compatible with Py26 again. (Issue #125)\n\n* Added ability to choose SSL version by passing an ``ssl.PROTOCOL_*`` constant\n to the ``ssl_version`` parameter of ``HTTPSConnectionPool``. (Issue #109)\n\n* Allow an explicit content type to be specified when encoding file fields.\n (Issue #126)\n\n* Exceptions are now pickleable, with tests. (Issue #101)\n\n* Fixed default headers not getting passed in some cases. (Issue #99)\n\n* Treat \"content-encoding\" header value as case-insensitive, per RFC 2616\n Section 3.5. (Issue #110)\n\n* \"Connection Refused\" SocketErrors will get retried rather than raised.\n (Issue #92)\n\n* Updated vendored ``six``, no longer overrides the global ``six`` module\n namespace. (Issue #113)\n\n* ``urllib3.exceptions.MaxRetryError`` contains a ``reason`` property holding\n the exception that prompted the final retry. If ``reason is None`` then it\n was due to a redirect. (Issue #92, #114)\n\n* Fixed ``PoolManager.urlopen()`` from not redirecting more than once.\n (Issue #149)\n\n* Don't assume ``Content-Type: text/plain`` for multi-part encoding parameters\n that are not files. (Issue #111)\n\n* Pass `strict` param down to ``httplib.HTTPConnection``. (Issue #122)\n\n* Added mechanism to verify SSL certificates by fingerprint (md5, sha1) or\n against an arbitrary hostname (when connecting by IP or for misconfigured\n servers). (Issue #140)\n\n* Streaming decompression support. (Issue #159)\n\n\n1.5 (2012-08-02)\n----------------\n\n* Added ``urllib3.add_stderr_logger()`` for quickly enabling STDERR debug\n logging in urllib3.\n\n* Native full URL parsing (including auth, path, query, fragment) available in\n ``urllib3.util.parse_url(url)``.\n\n* Built-in redirect will switch method to 'GET' if status code is 303.\n (Issue #11)\n\n* ``urllib3.PoolManager`` strips the scheme and host before sending the request\n uri. (Issue #8)\n\n* New ``urllib3.exceptions.DecodeError`` exception for when automatic decoding,\n based on the Content-Type header, fails.\n\n* Fixed bug with pool depletion and leaking connections (Issue #76). Added\n explicit connection closing on pool eviction. Added\n ``urllib3.PoolManager.clear()``.\n\n* 99% -> 100% unit test coverage.\n\n\n1.4 (2012-06-16)\n----------------\n\n* Minor AppEngine-related fixes.\n\n* Switched from ``mimetools.choose_boundary`` to ``uuid.uuid4()``.\n\n* Improved url parsing. (Issue #73)\n\n* IPv6 url support. (Issue #72)\n\n\n1.3 (2012-03-25)\n----------------\n\n* Removed pre-1.0 deprecated API.\n\n* Refactored helpers into a ``urllib3.util`` submodule.\n\n* Fixed multipart encoding to support list-of-tuples for keys with multiple\n values. (Issue #48)\n\n* Fixed multiple Set-Cookie headers in response not getting merged properly in\n Python 3. (Issue #53)\n\n* AppEngine support with Py27. (Issue #61)\n\n* Minor ``encode_multipart_formdata`` fixes related to Python 3 strings vs\n bytes.\n\n\n1.2.2 (2012-02-06)\n------------------\n\n* Fixed packaging bug of not shipping ``test-requirements.txt``. (Issue #47)\n\n\n1.2.1 (2012-02-05)\n------------------\n\n* Fixed another bug related to when ``ssl`` module is not available. (Issue #41)\n\n* Location parsing errors now raise ``urllib3.exceptions.LocationParseError``\n which inherits from ``ValueError``.\n\n\n1.2 (2012-01-29)\n----------------\n\n* Added Python 3 support (tested on 3.2.2)\n\n* Dropped Python 2.5 support (tested on 2.6.7, 2.7.2)\n\n* Use ``select.poll`` instead of ``select.select`` for platforms that support\n it.\n\n* Use ``Queue.LifoQueue`` instead of ``Queue.Queue`` for more aggressive\n connection reusing. Configurable by overriding ``ConnectionPool.QueueCls``.\n\n* Fixed ``ImportError`` during install when ``ssl`` module is not available.\n (Issue #41)\n\n* Fixed ``PoolManager`` redirects between schemes (such as HTTP -> HTTPS) not\n completing properly. (Issue #28, uncovered by Issue #10 in v1.1)\n\n* Ported ``dummyserver`` to use ``tornado`` instead of ``webob`` +\n ``eventlet``. Removed extraneous unsupported dummyserver testing backends.\n Added socket-level tests.\n\n* More tests. Achievement Unlocked: 99% Coverage.\n\n\n1.1 (2012-01-07)\n----------------\n\n* Refactored ``dummyserver`` to its own root namespace module (used for\n testing).\n\n* Added hostname verification for ``VerifiedHTTPSConnection`` by vendoring in\n Py32's ``ssl_match_hostname``. (Issue #25)\n\n* Fixed cross-host HTTP redirects when using ``PoolManager``. (Issue #10)\n\n* Fixed ``decode_content`` being ignored when set through ``urlopen``. (Issue\n #27)\n\n* Fixed timeout-related bugs. (Issues #17, #23)\n\n\n1.0.2 (2011-11-04)\n------------------\n\n* Fixed typo in ``VerifiedHTTPSConnection`` which would only present as a bug if\n you're using the object manually. (Thanks pyos)\n\n* Made RecentlyUsedContainer (and consequently PoolManager) more thread-safe by\n wrapping the access log in a mutex. (Thanks @christer)\n\n* Made RecentlyUsedContainer more dict-like (corrected ``__delitem__`` and\n ``__getitem__`` behaviour), with tests. Shouldn't affect core urllib3 code.\n\n\n1.0.1 (2011-10-10)\n------------------\n\n* Fixed a bug where the same connection would get returned into the pool twice,\n causing extraneous \"HttpConnectionPool is full\" log warnings.\n\n\n1.0 (2011-10-08)\n----------------\n\n* Added ``PoolManager`` with LRU expiration of connections (tested and\n documented).\n* Added ``ProxyManager`` (needs tests, docs, and confirmation that it works\n with HTTPS proxies).\n* Added optional partial-read support for responses when\n ``preload_content=False``. You can now make requests and just read the headers\n without loading the content.\n* Made response decoding optional (default on, same as before).\n* Added optional explicit boundary string for ``encode_multipart_formdata``.\n* Convenience request methods are now inherited from ``RequestMethods``. Old\n helpers like ``get_url`` and ``post_url`` should be abandoned in favour of\n the new ``request(method, url, ...)``.\n* Refactored code to be even more decoupled, reusable, and extendable.\n* License header added to ``.py`` files.\n* Embiggened the documentation: Lots of Sphinx-friendly docstrings in the code\n and docs in ``docs/`` and on https://urllib3.readthedocs.io/.\n* Embettered all the things!\n* Started writing this file.\n\n\n0.4.1 (2011-07-17)\n------------------\n\n* Minor bug fixes, code cleanup.\n\n\n0.4 (2011-03-01)\n----------------\n\n* Better unicode support.\n* Added ``VerifiedHTTPSConnection``.\n* Added ``NTLMConnectionPool`` in contrib.\n* Minor improvements.\n\n\n0.3.1 (2010-07-13)\n------------------\n\n* Added ``assert_host_name`` optional parameter. Now compatible with proxies.\n\n\n0.3 (2009-12-10)\n----------------\n\n* Added HTTPS support.\n* Minor bug fixes.\n* Refactored, broken backwards compatibility with 0.2.\n* API to be treated as stable from this version forward.\n\n\n0.2 (2008-11-17)\n----------------\n\n* Added unit tests.\n* Bug fixes.\n\n\n0.1 (2008-11-16)\n----------------\n\n* First release.", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Andrey Petrov", + "email": "andrey.petrov@shazow.net", + "url": null + } + ], + "keywords": [ + "urllib httplib threadsafe filepost http https ssl pooling", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries" + ], + "homepage_url": "https://urllib3.readthedocs.io/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "Issue tracker, https://github.com/urllib3/urllib3/issues", + "code_view_url": "Code, https://github.com/urllib3/urllib3", + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] }, - { - "purl": "pkg:pypi/cryptography", - "requirement": ">=1.3.4", - "scope": "secure", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/idna", - "requirement": ">=2.0.0", - "scope": "secure", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/certifi", - "requirement": null, - "scope": "secure", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/ipaddress", - "requirement": null, - "scope": "secure", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pysocks", - "requirement": "!=1.5.7,<2.0,>=1.5.6", - "scope": "socks", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/brotlipy", - "requirement": ">=0.6.0", - "scope": "brotli", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/urllib3@1.26.4", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/u/urllib3/urllib3-1.26.4.tar.gz", - "api_data_url": "https://pypi.org/pypi/urllib3/1.26.4/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pyopenssl", + "requirement": ">=0.14", + "scope": "secure", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/cryptography", + "requirement": ">=1.3.4", + "scope": "secure", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/idna", + "requirement": ">=2.0.0", + "scope": "secure", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/certifi", + "requirement": null, + "scope": "secure", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/ipaddress", + "requirement": null, + "scope": "secure", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pysocks", + "requirement": "!=1.5.7,<2.0,>=1.5.6", + "scope": "socks", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/brotlipy", + "requirement": ">=0.6.0", + "scope": "brotli", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/urllib3@1.26.4", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/u/urllib3/urllib3-1.26.4.tar.gz", + "api_data_url": "https://pypi.org/pypi/urllib3/1.26.4/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json index c5e42ef8904..e73cdafdbfb 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json @@ -1,155 +1,157 @@ -{ - "type": "pypi", - "namespace": null, - "name": "haruka-bot", - "version": "1.2.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Push dynamics and live informations from bilibili to QQ. Based on nonebot2.\n[![HarukaBot](https://socialify.git.ci/SK-415/HarukaBot/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&language=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2FSK-415%2FHarukaBot%2Fmaster%2Fdocs%2F.vuepress%2Fpublic%2Flogo.png&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Light)](https://haruka-bot.live/)\n\n# HarukaBot \u2014\u2014\u4f60\u7684\u201c\u5355\u63a8\u201d\u5c0f\u52a9\u624b\n\n\u540d\u79f0\u6765\u6e90\uff1a[@\u767d\u795e\u9065Haruka](https://space.bilibili.com/477332594 )\n \nlogo \u753b\u5e08\uff1a[@\u79e6\u65e0](https://space.bilibili.com/4668826 )\n\n[![VERSION](https://img.shields.io/pypi/v/haruka-bot)](https://haruka-bot.live/about/CHANGELOG.html)\n[![time tracker](https://wakatime.com/badge/github/SK-415/HarukaBot.svg )](https://wakatime.com/badge/github/SK-415/HarukaBot)\n[![qq group](https://img.shields.io/badge/QQ%E7%BE%A4-629574472-orange )](https://jq.qq.com/?_wv=1027&k=sHPbCRAd)\n[![docs](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-%E7%82%B9%E5%87%BB%E6%9F%A5%E7%9C%8B-green)](https://haruka-bot.live/)\n\n## \u7b80\u4ecb\n\n\u4e00\u6b3e\u5c06\u54d4\u54e9\u54d4\u54e9UP\u4e3b\u7684\u76f4\u64ad\u4e0e\u52a8\u6001\u4fe1\u606f\u63a8\u9001\u81f3QQ\u7684\u673a\u5668\u4eba\u3002\u57fa\u4e8e [`NoneBot2`](https://github.com/nonebot/nonebot2 ) \u5f00\u53d1\uff0c\u524d\u8eab\u4e3a [`dd-bot`](https://github.com/SK-415/dd-bot) \u3002\n \nHarukaBot \u81f4\u529b\u4e8e\u4e3aB\u7ad9UP\u4e3b\u4eec\u63d0\u4f9b\u4e00\u4e2a\u5f00\u6e90\u514d\u8d39\u7684\u7c89\u4e1d\u7fa4\u63a8\u9001\u65b9\u6848\u3002\u6781\u5927\u7684\u51cf\u8f7b\u7ba1\u7406\u5458\u8d1f\u62c5\uff0c\u4e0d\u4f1a\u518d\u9047\u5230\u7a81\u51fb\u65e0\u4eba\u63a8\u9001\u7684\u5c34\u5c2c\u60c5\u51b5\u3002\u540c\u65f6\u8fd8\u80fd\u5c06B\u535a\u52a8\u6001\u622a\u56fe\u8f6c\u53d1\u81f3\u7c89\u4e1d\u7fa4\uff0c\u6d3b\u8dc3\u7fa4\u5185\u8bdd\u9898\u3002\n \n> \u4ecb\u4e8e\u4f5c\u8005\u6280\u672f\u529b\u4f4e\u4e0b\uff0cHarukaBot \u7684\u4f53\u9a8c\u53ef\u80fd\u5e76\u4e0d\u662f\u5f88\u597d\u3002\u5982\u679c\u4f7f\u7528\u4e2d\u6709\u4efb\u4f55\u610f\u89c1\u6216\u8005\u5efa\u8bae\u90fd\u6b22\u8fce\u63d0\u51fa\uff0c\u6211\u4f1a\u52aa\u529b\u53bb\u5b8c\u5584\u5b83\u3002\n\n## [\u6587\u6863\uff08\u70b9\u6211\u67e5\u770b\uff09](https://haruka-bot.live/)\n\n## \u529f\u80fd\u4ecb\u7ecd\n\n**\u4ee5\u4e0b\u4ec5\u4e3a\u529f\u80fd\u4ecb\u7ecd\uff0c\u5e76\u975e\u5b9e\u9645\u547d\u4ee4\u540d\u79f0\u3002\u5177\u4f53\u547d\u4ee4\u5411 bot \u53d1\u9001 `\u5e2e\u52a9` \u67e5\u770b\uff0c\u7fa4\u91cc\u4f7f\u7528\u9700\u8981\u5148@\u673a\u5668\u4eba**\u3002\n\nHarukaBot \u4e13\u6ce8\u4e8e\u8ba2\u9605B\u7ad9UP\u4e3b\u4eec\u7684\u52a8\u6001\u4e0e\u5f00\u64ad\u63d0\u9192\uff0c\u5e76\u8f6c\u53d1\u81f3QQ\u7fa4/\u597d\u53cb\u3002\n\n\u540c\u65f6 HarukaBot \u9488\u5bf9\u7c89\u4e1d\u7fa4\u4e2d\u7684\u63a8\u9001\u573a\u666f\u8fdb\u884c\u4e86\u82e5\u5e72\u4f18\u5316: \n\n- **\u6743\u9650\u5f00\u5173**: \u6307\u5b9a\u67d0\u4e2a\u7fa4\u53ea\u6709\u7ba1\u7406\u5458\u624d\u80fd\u89e6\u53d1\u6307\u4ee4\n\n- **@\u5168\u4f53\u5f00\u5173**: \u6307\u5b9a\u7fa4\u91cc\u67d0\u4f4d\u8ba2\u9605\u7684\u4e3b\u64ad\u5f00\u64ad\u63a8\u9001\u5e26@\u5168\u4f53\n\n- **\u52a8\u6001/\u76f4\u64ad\u5f00\u5173**: \u53ef\u4ee5\u81ea\u7531\u8bbe\u7f6e\u6bcf\u4f4d\u4e3b\u64ad\u662f\u5426\u63a8\u9001\u76f4\u64ad/\u52a8\u6001\n\n- **\u8ba2\u9605\u5217\u8868**: \u6bcf\u4e2a\u7fa4/\u597d\u53cb\u7684\u8ba2\u9605\u90fd\u662f\u5206\u5f00\u6765\u7684\n\n- **\u591a\u7aef\u63a8\u9001**: \u53d7\u9650\u4e8e\u4e00\u4e2aQQ\u53f7\u4e00\u5929\u53ea\u80fd@\u5341\u6b21\u5168\u4f53\u6210\u5458\uff0c\u56e0\u6b64\u5bf9\u4e8e\u7c89\u4e1d\u7fa4\u591a\u7684UP\u6765\u8bf4\u4e00\u4e2a bot \u7684\u6b21\u6570\u5b8c\u5168\u4e0d\u591f\u63a8\u9001\u3002\u56e0\u6b64\u4e00\u53f0 HarukaBot \u652f\u6301\u540c\u65f6\u8fde\u63a5\u591a\u4e2aQQ\uff0c\u5206\u522b\u5411\u4e0d\u540c\u7684\u7fa4/\u597d\u53cb\u540c\u65f6\u63a8\u9001\n\n## \u7279\u522b\u611f\u8c22\n\n- [`go-cqhttp`](https://github.com/Mrs4s/go-cqhttp)\uff1a\u7b80\u5355\u53c8\u5b8c\u5584\u7684 cqhttp \u5b9e\u73b0\n\n- [`NoneBot2`](https://github.com/nonebot/nonebot2)\uff1a\u8d85\u597d\u7528\u7684\u5f00\u53d1\u6846\u67b6\uff0c\u6ca1\u6709\u5b83\u5c31\u6ca1\u6709 HarukaBot\uff08yyy\u4f6c\u725b\u903c\uff09\n\n- [`bilibili-API-collect`](https://github.com/SocialSisterYi/bilibili-API-collect)\uff1a\u975e\u5e38\u8be6\u7ec6\u7684 B\u7ad9 api \u6587\u6863\n\n- [`bilibili_api`](https://github.com/Passkou/bilibili_api)\uff1aPython \u5b9e\u73b0\u7684\u5f3a\u5927 B\u7ad9 api \u5e93\n\n## \u652f\u6301\u4e0e\u8d21\u732e\n\n\u70b9\u4e2a\u5c0f\u661f\u661f\u5c31\u662f\u5bf9\u6211\u6700\u597d\u7684\u652f\u6301\uff0c\u611f\u8c22\u4f7f\u7528 HarukaBot\u3002\u4e5f\u6b22\u8fce \u6709\u80fdman \u5bf9\u672c\u9879\u76ee Pull requests\u3002\n\n## \u8bb8\u53ef\u8bc1\n\u672c\u9879\u76ee\u4f7f\u7528 [`GNU AGPLv3`](https://choosealicense.com/licenses/agpl-3.0/) \u4f5c\u4e3a\u5f00\u6e90\u8bb8\u53ef\u8bc1\u3002", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "SK-415", - "email": "2967923486@qq.com", - "url": null - } - ], - "keywords": [ - "nonebot", - "nonebot2", - "qqbot", - "bilibili", - "bot", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9" - ], - "homepage_url": "https://github.com/SK-415/HarukaBot", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": "Repository, https://github.com/SK-415/HarukaBot/tree/master/src/plugins/haruka_bot", - "copyright": null, - "license_expression": "agpl-3.0-plus", - "declared_license": { - "license": "AGPL-3.0-or-later", - "classifiers": [ - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/click", - "requirement": "<8.0.0,>=7.1.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "haruka-bot", + "version": "1.2.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Push dynamics and live informations from bilibili to QQ. Based on nonebot2.\n[![HarukaBot](https://socialify.git.ci/SK-415/HarukaBot/image?description=1&font=Source%20Code%20Pro&forks=1&issues=1&language=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2FSK-415%2FHarukaBot%2Fmaster%2Fdocs%2F.vuepress%2Fpublic%2Flogo.png&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Light)](https://haruka-bot.live/)\n\n# HarukaBot \u2014\u2014\u4f60\u7684\u201c\u5355\u63a8\u201d\u5c0f\u52a9\u624b\n\n\u540d\u79f0\u6765\u6e90\uff1a[@\u767d\u795e\u9065Haruka](https://space.bilibili.com/477332594 )\n \nlogo \u753b\u5e08\uff1a[@\u79e6\u65e0](https://space.bilibili.com/4668826 )\n\n[![VERSION](https://img.shields.io/pypi/v/haruka-bot)](https://haruka-bot.live/about/CHANGELOG.html)\n[![time tracker](https://wakatime.com/badge/github/SK-415/HarukaBot.svg )](https://wakatime.com/badge/github/SK-415/HarukaBot)\n[![qq group](https://img.shields.io/badge/QQ%E7%BE%A4-629574472-orange )](https://jq.qq.com/?_wv=1027&k=sHPbCRAd)\n[![docs](https://img.shields.io/badge/%E6%96%87%E6%A1%A3-%E7%82%B9%E5%87%BB%E6%9F%A5%E7%9C%8B-green)](https://haruka-bot.live/)\n\n## \u7b80\u4ecb\n\n\u4e00\u6b3e\u5c06\u54d4\u54e9\u54d4\u54e9UP\u4e3b\u7684\u76f4\u64ad\u4e0e\u52a8\u6001\u4fe1\u606f\u63a8\u9001\u81f3QQ\u7684\u673a\u5668\u4eba\u3002\u57fa\u4e8e [`NoneBot2`](https://github.com/nonebot/nonebot2 ) \u5f00\u53d1\uff0c\u524d\u8eab\u4e3a [`dd-bot`](https://github.com/SK-415/dd-bot) \u3002\n \nHarukaBot \u81f4\u529b\u4e8e\u4e3aB\u7ad9UP\u4e3b\u4eec\u63d0\u4f9b\u4e00\u4e2a\u5f00\u6e90\u514d\u8d39\u7684\u7c89\u4e1d\u7fa4\u63a8\u9001\u65b9\u6848\u3002\u6781\u5927\u7684\u51cf\u8f7b\u7ba1\u7406\u5458\u8d1f\u62c5\uff0c\u4e0d\u4f1a\u518d\u9047\u5230\u7a81\u51fb\u65e0\u4eba\u63a8\u9001\u7684\u5c34\u5c2c\u60c5\u51b5\u3002\u540c\u65f6\u8fd8\u80fd\u5c06B\u535a\u52a8\u6001\u622a\u56fe\u8f6c\u53d1\u81f3\u7c89\u4e1d\u7fa4\uff0c\u6d3b\u8dc3\u7fa4\u5185\u8bdd\u9898\u3002\n \n> \u4ecb\u4e8e\u4f5c\u8005\u6280\u672f\u529b\u4f4e\u4e0b\uff0cHarukaBot \u7684\u4f53\u9a8c\u53ef\u80fd\u5e76\u4e0d\u662f\u5f88\u597d\u3002\u5982\u679c\u4f7f\u7528\u4e2d\u6709\u4efb\u4f55\u610f\u89c1\u6216\u8005\u5efa\u8bae\u90fd\u6b22\u8fce\u63d0\u51fa\uff0c\u6211\u4f1a\u52aa\u529b\u53bb\u5b8c\u5584\u5b83\u3002\n\n## [\u6587\u6863\uff08\u70b9\u6211\u67e5\u770b\uff09](https://haruka-bot.live/)\n\n## \u529f\u80fd\u4ecb\u7ecd\n\n**\u4ee5\u4e0b\u4ec5\u4e3a\u529f\u80fd\u4ecb\u7ecd\uff0c\u5e76\u975e\u5b9e\u9645\u547d\u4ee4\u540d\u79f0\u3002\u5177\u4f53\u547d\u4ee4\u5411 bot \u53d1\u9001 `\u5e2e\u52a9` \u67e5\u770b\uff0c\u7fa4\u91cc\u4f7f\u7528\u9700\u8981\u5148@\u673a\u5668\u4eba**\u3002\n\nHarukaBot \u4e13\u6ce8\u4e8e\u8ba2\u9605B\u7ad9UP\u4e3b\u4eec\u7684\u52a8\u6001\u4e0e\u5f00\u64ad\u63d0\u9192\uff0c\u5e76\u8f6c\u53d1\u81f3QQ\u7fa4/\u597d\u53cb\u3002\n\n\u540c\u65f6 HarukaBot \u9488\u5bf9\u7c89\u4e1d\u7fa4\u4e2d\u7684\u63a8\u9001\u573a\u666f\u8fdb\u884c\u4e86\u82e5\u5e72\u4f18\u5316: \n\n- **\u6743\u9650\u5f00\u5173**: \u6307\u5b9a\u67d0\u4e2a\u7fa4\u53ea\u6709\u7ba1\u7406\u5458\u624d\u80fd\u89e6\u53d1\u6307\u4ee4\n\n- **@\u5168\u4f53\u5f00\u5173**: \u6307\u5b9a\u7fa4\u91cc\u67d0\u4f4d\u8ba2\u9605\u7684\u4e3b\u64ad\u5f00\u64ad\u63a8\u9001\u5e26@\u5168\u4f53\n\n- **\u52a8\u6001/\u76f4\u64ad\u5f00\u5173**: \u53ef\u4ee5\u81ea\u7531\u8bbe\u7f6e\u6bcf\u4f4d\u4e3b\u64ad\u662f\u5426\u63a8\u9001\u76f4\u64ad/\u52a8\u6001\n\n- **\u8ba2\u9605\u5217\u8868**: \u6bcf\u4e2a\u7fa4/\u597d\u53cb\u7684\u8ba2\u9605\u90fd\u662f\u5206\u5f00\u6765\u7684\n\n- **\u591a\u7aef\u63a8\u9001**: \u53d7\u9650\u4e8e\u4e00\u4e2aQQ\u53f7\u4e00\u5929\u53ea\u80fd@\u5341\u6b21\u5168\u4f53\u6210\u5458\uff0c\u56e0\u6b64\u5bf9\u4e8e\u7c89\u4e1d\u7fa4\u591a\u7684UP\u6765\u8bf4\u4e00\u4e2a bot \u7684\u6b21\u6570\u5b8c\u5168\u4e0d\u591f\u63a8\u9001\u3002\u56e0\u6b64\u4e00\u53f0 HarukaBot \u652f\u6301\u540c\u65f6\u8fde\u63a5\u591a\u4e2aQQ\uff0c\u5206\u522b\u5411\u4e0d\u540c\u7684\u7fa4/\u597d\u53cb\u540c\u65f6\u63a8\u9001\n\n## \u7279\u522b\u611f\u8c22\n\n- [`go-cqhttp`](https://github.com/Mrs4s/go-cqhttp)\uff1a\u7b80\u5355\u53c8\u5b8c\u5584\u7684 cqhttp \u5b9e\u73b0\n\n- [`NoneBot2`](https://github.com/nonebot/nonebot2)\uff1a\u8d85\u597d\u7528\u7684\u5f00\u53d1\u6846\u67b6\uff0c\u6ca1\u6709\u5b83\u5c31\u6ca1\u6709 HarukaBot\uff08yyy\u4f6c\u725b\u903c\uff09\n\n- [`bilibili-API-collect`](https://github.com/SocialSisterYi/bilibili-API-collect)\uff1a\u975e\u5e38\u8be6\u7ec6\u7684 B\u7ad9 api \u6587\u6863\n\n- [`bilibili_api`](https://github.com/Passkou/bilibili_api)\uff1aPython \u5b9e\u73b0\u7684\u5f3a\u5927 B\u7ad9 api \u5e93\n\n## \u652f\u6301\u4e0e\u8d21\u732e\n\n\u70b9\u4e2a\u5c0f\u661f\u661f\u5c31\u662f\u5bf9\u6211\u6700\u597d\u7684\u652f\u6301\uff0c\u611f\u8c22\u4f7f\u7528 HarukaBot\u3002\u4e5f\u6b22\u8fce \u6709\u80fdman \u5bf9\u672c\u9879\u76ee Pull requests\u3002\n\n## \u8bb8\u53ef\u8bc1\n\u672c\u9879\u76ee\u4f7f\u7528 [`GNU AGPLv3`](https://choosealicense.com/licenses/agpl-3.0/) \u4f5c\u4e3a\u5f00\u6e90\u8bb8\u53ef\u8bc1\u3002", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "SK-415", + "email": "2967923486@qq.com", + "url": null + } + ], + "keywords": [ + "nonebot", + "nonebot2", + "qqbot", + "bilibili", + "bot", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9" + ], + "homepage_url": "https://github.com/SK-415/HarukaBot", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "Repository, https://github.com/SK-415/HarukaBot/tree/master/src/plugins/haruka_bot", + "copyright": null, + "license_expression": "agpl-3.0-plus", + "declared_license": { + "license": "AGPL-3.0-or-later", + "classifiers": [ + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)" + ] }, - { - "purl": "pkg:pypi/httpx", - "requirement": "<0.18.0,>=0.17.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nonebot-adapter-cqhttp", - "requirement": "<3.0.0,>=2.0.0-alpha.11", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nonebot-plugin-apscheduler", - "requirement": "<0.2.0,>=0.1.2", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/nonebot2", - "requirement": "<3.0.0,>=2.0.0-alpha.11", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/packaging", - "requirement": "<21.0,>=20.9", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pydantic", - "requirement": "<2.0.0,>=1.8.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pyppeteer", - "requirement": "<0.3.0,>=0.2.5", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/python-dotenv", - "requirement": "<0.16.0,>=0.15.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/qrcode", - "requirement": "<7.0,>=6.1", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/rsa", - "requirement": "<5.0,>=4.7", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/tinydb", - "requirement": "<5.0.0,>=4.3.0", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/haruka-bot@1.2.3", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/h/haruka-bot/haruka-bot-1.2.3.tar.gz", - "api_data_url": "https://pypi.org/pypi/haruka-bot/1.2.3/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/click", + "requirement": "<8.0.0,>=7.1.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/httpx", + "requirement": "<0.18.0,>=0.17.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nonebot-adapter-cqhttp", + "requirement": "<3.0.0,>=2.0.0-alpha.11", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nonebot-plugin-apscheduler", + "requirement": "<0.2.0,>=0.1.2", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/nonebot2", + "requirement": "<3.0.0,>=2.0.0-alpha.11", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/packaging", + "requirement": "<21.0,>=20.9", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pydantic", + "requirement": "<2.0.0,>=1.8.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pyppeteer", + "requirement": "<0.3.0,>=0.2.5", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/python-dotenv", + "requirement": "<0.16.0,>=0.15.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/qrcode", + "requirement": "<7.0,>=6.1", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/rsa", + "requirement": "<5.0,>=4.7", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/tinydb", + "requirement": "<5.0.0,>=4.3.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/haruka-bot@1.2.3", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/h/haruka-bot/haruka-bot-1.2.3.tar.gz", + "api_data_url": "https://pypi.org/pypi/haruka-bot/1.2.3/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info-expected.json index 534f0337f15..9c0e75c407f 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info-expected.json @@ -1,64 +1,66 @@ -{ - "type": "pypi", - "namespace": null, - "name": "pip", - "version": "20.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn 2020, we're working on improvements to the heart of pip. Please `learn more and take our survey`_ to help us do it right.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development mailing list`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installing.html\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _learn more and take our survey: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _Development mailing list: https://mail.python.org/mailman3/lists/distutils-sig.python.org/\n.. _User IRC: https://webchat.freenode.net/?channels=%23pypa\n.. _Development IRC: https://webchat.freenode.net/?channels=%23pypa-dev\n.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "The pip developers", - "email": "distutils-sig@python.org", - "url": null - } - ], - "keywords": [ - "distutils easy_install egg setuptools wheel virtualenv", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Topic :: Software Development :: Build Tools", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ], - "homepage_url": "https://pip.pypa.io/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": "Source, https://github.com/pypa/pip", - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/pip@20.2.2", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/pip/pip-20.2.2.tar.gz", - "api_data_url": "https://pypi.org/pypi/pip/20.2.2/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "pip", + "version": "20.2.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "The PyPA recommended tool for installing Python packages.\npip - The Python Package Installer\n==================================\n\n.. image:: https://img.shields.io/pypi/v/pip.svg\n :target: https://pypi.org/project/pip/\n\n.. image:: https://readthedocs.org/projects/pip/badge/?version=latest\n :target: https://pip.pypa.io/en/latest\n\npip is the `package installer`_ for Python. You can use pip to install packages from the `Python Package Index`_ and other indexes.\n\nPlease take a look at our documentation for how to install and use pip:\n\n* `Installation`_\n* `Usage`_\n\nWe release updates regularly, with a new version every 3 months. Find more details in our documentation:\n\n* `Release notes`_\n* `Release process`_\n\nIn 2020, we're working on improvements to the heart of pip. Please `learn more and take our survey`_ to help us do it right.\n\nIf you find bugs, need help, or want to talk to the developers, please use our mailing lists or chat rooms:\n\n* `Issue tracking`_\n* `Discourse channel`_\n* `User IRC`_\n\nIf you want to get involved head over to GitHub to get the source code, look at our development documentation and feel free to jump on the developer mailing lists and chat rooms:\n\n* `GitHub page`_\n* `Development documentation`_\n* `Development mailing list`_\n* `Development IRC`_\n\nCode of Conduct\n---------------\n\nEveryone interacting in the pip project's codebases, issue trackers, chat\nrooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.\n\n.. _package installer: https://packaging.python.org/guides/tool-recommendations/\n.. _Python Package Index: https://pypi.org\n.. _Installation: https://pip.pypa.io/en/stable/installing.html\n.. _Usage: https://pip.pypa.io/en/stable/\n.. _Release notes: https://pip.pypa.io/en/stable/news.html\n.. _Release process: https://pip.pypa.io/en/latest/development/release-process/\n.. _GitHub page: https://github.com/pypa/pip\n.. _Development documentation: https://pip.pypa.io/en/latest/development\n.. _learn more and take our survey: https://pyfound.blogspot.com/2020/03/new-pip-resolver-to-roll-out-this-year.html\n.. _Issue tracking: https://github.com/pypa/pip/issues\n.. _Discourse channel: https://discuss.python.org/c/packaging\n.. _Development mailing list: https://mail.python.org/mailman3/lists/distutils-sig.python.org/\n.. _User IRC: https://webchat.freenode.net/?channels=%23pypa\n.. _Development IRC: https://webchat.freenode.net/?channels=%23pypa-dev\n.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "The pip developers", + "email": "distutils-sig@python.org", + "url": null + } + ], + "keywords": [ + "distutils easy_install egg setuptools wheel virtualenv", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy" + ], + "homepage_url": "https://pip.pypa.io/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": "Source, https://github.com/pypa/pip", + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/pip@20.2.2", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/pip/pip-20.2.2.tar.gz", + "api_data_url": "https://pypi.org/pypi/pip/20.2.2/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info-expected.json index dd80e99d186..56624b19f0f 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info-expected.json @@ -1,123 +1,125 @@ -{ - "type": "pypi", - "namespace": null, - "name": "plugincode", - "version": "21.1.21", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "plugincode is a library that provides plugin functionality for ScanCode toolkit.\nPluginCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/plugincode\n- keywords: plugins, utilities, scancode-toolkit, plugincode\n\n\nPluginCode is a library that provides plugable functionality with plugins, \nincluding Click plugins.\nIt is used by ScanCode toolkit and related projects\n\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\nTo set up the development environment::\n\n source configure\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "nexB. Inc. and others", - "email": "info@aboutcode.org", - "url": null - } - ], - "keywords": [ - "utilities", - "plugincode", - "scancode", - "scancode-toolkit", - "plugins", - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Topic :: Software Development", - "Topic :: Utilities" - ], - "homepage_url": "https://github.com/nexB/plugincode", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": { - "license": "Apache-2.0" - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/click", - "requirement": ">=6", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false +[ + { + "type": "pypi", + "namespace": null, + "name": "plugincode", + "version": "21.1.21", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "plugincode is a library that provides plugin functionality for ScanCode toolkit.\nPluginCode\n==========\n\n- license: Apache-2.0\n- copyright: copyright (c) nexB. Inc. and others\n- homepage_url: https://github.com/nexB/plugincode\n- keywords: plugins, utilities, scancode-toolkit, plugincode\n\n\nPluginCode is a library that provides plugable functionality with plugins, \nincluding Click plugins.\nIt is used by ScanCode toolkit and related projects\n\nVisit https://aboutcode.org and https://github.com/nexB/ for support and download.\n\nTo set up the development environment::\n\n source configure\n\nTo run unit tests::\n\n pytest -vvs -n 2\n\nTo clean up development environment::\n\n ./configure --clean", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "nexB. Inc. and others", + "email": "info@aboutcode.org", + "url": null + } + ], + "keywords": [ + "utilities", + "plugincode", + "scancode", + "scancode-toolkit", + "plugins", + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/nexB/plugincode", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": { + "license": "Apache-2.0" }, - { - "purl": "pkg:pypi/commoncode", - "requirement": ">=21.1.21", - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pluggy", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/sphinx", - "requirement": ">=3.3.1", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/sphinx-rtd-theme", - "requirement": ">=0.5.0", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/doc8", - "requirement": ">=0.8.1", - "scope": "docs", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest", - "requirement": ">=6", - "scope": "testing", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - }, - { - "purl": "pkg:pypi/pytest-xdist", - "requirement": ">=2", - "scope": "testing", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/plugincode@21.1.21", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/p/plugincode/plugincode-21.1.21.tar.gz", - "api_data_url": "https://pypi.org/pypi/plugincode/21.1.21/json" -} \ No newline at end of file + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/click", + "requirement": ">=6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/commoncode", + "requirement": ">=21.1.21", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pluggy", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/sphinx", + "requirement": ">=3.3.1", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/sphinx-rtd-theme", + "requirement": ">=0.5.0", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/doc8", + "requirement": ">=0.8.1", + "scope": "docs", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest", + "requirement": ">=6", + "scope": "testing", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + }, + { + "purl": "pkg:pypi/pytest-xdist", + "requirement": ">=2", + "scope": "testing", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/plugincode@21.1.21", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/p/plugincode/plugincode-21.1.21.tar.gz", + "api_data_url": "https://pypi.org/pypi/plugincode/21.1.21/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info-expected.json b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info-expected.json index 19a6f2fe6c9..cace4ddda29 100644 --- a/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info-expected.json @@ -1,65 +1,67 @@ -{ - "type": "pypi", - "namespace": null, - "name": "anonapi", - "version": "0.0.19", - "qualifiers": {}, - "subpath": null, - "primary_language": "Python", - "description": "Client and tools for working with the anoymization web API\n=======\nAnonAPI\n=======\n\n.. image:: https://img.shields.io/pypi/v/anonapi.svg\n :target: https://pypi.python.org/pypi/anonapi\n\n.. image:: https://img.shields.io/travis/sjoerdk/anonapi.svg\n :target: https://travis-ci.org/sjoerdk/anonapi\n\n.. image:: https://readthedocs.org/projects/anonapi/badge/?version=latest\n :target: https://anonapi.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://api.codeclimate.com/v1/badges/5c3b7f45f6a476d0f21e/maintainability\n :target: https://codeclimate.com/github/sjoerdk/anonapi/maintainability\n :alt: Maintainability\n\n.. image:: https://codecov.io/gh/sjoerdk/anonapi/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/sjoerdk/anonapi\n\n.. image:: https://pyup.io/repos/github/comic/evalutils/shield.svg\n :target: https://pyup.io/repos/github/sjoerdk/anonapi/\n :alt: Updates\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n\n\nClient and tools for working with the IDIS web API\n\n\n* Free software: MIT license\n* Documentation: https://anonapi.readthedocs.io.\n\n\nFeatures\n--------\n\n* Interact with IDIS anonymization server web API via https\n* Create, modify, cancel anonymization jobs\n* CLI (Command Line Interface) for quick overview of jobs and cancel/restart job.\n* CLI can save servers and credentials locally for convenience\n* Python code with examples for fully automated interaction\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.0.1 (2018-10-23)\n------------------\n\n* First release on PyPI\n\n0.0.2-0.0.8 (2018-10-23)\n------------------------\n\n* Fixed deployment and packaging issues, pre-alpha\n\n0.0.9 (2018-10-23)\n------------------\n\n* Added distutil entry_points to have 'anon' console command after pip install\n\n0.0.10-0.0.18 (2018-11-12)\n------------------\n\n* Fixed deployment, docs\n\n0.0.19 (2018-11-14)\n------------------\n\n* set python 3.6 Required in setup.py", - "release_date": null, - "parties": [ - { - "type": "person", - "role": "author", - "name": "Sjoerd Kerkstra", - "email": "sjoerd.kerkstra@radboudumc.nl", - "url": null - } - ], - "keywords": [ - "anonapi", - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Natural Language :: English", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7" - ], - "homepage_url": "https://github.com/sjoerdk/anonapi", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": { - "license": "MIT license", - "classifiers": [ - "License :: OSI Approved :: MIT License" - ] - }, - "notice_text": null, - "root_path": null, - "dependencies": [ - { - "purl": "pkg:pypi/pyyaml", - "requirement": null, - "scope": "install", - "is_runtime": true, - "is_optional": false, - "is_resolved": false - } - ], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:pypi/anonapi@0.0.19", - "repository_homepage_url": "https://pypi.org/project/https://pypi.org", - "repository_download_url": "https://pypi.org/packages/source/a/anonapi/anonapi-0.0.19.tar.gz", - "api_data_url": "https://pypi.org/pypi/anonapi/0.0.19/json" -} \ No newline at end of file +[ + { + "type": "pypi", + "namespace": null, + "name": "anonapi", + "version": "0.0.19", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Client and tools for working with the anoymization web API\n=======\nAnonAPI\n=======\n\n.. image:: https://img.shields.io/pypi/v/anonapi.svg\n :target: https://pypi.python.org/pypi/anonapi\n\n.. image:: https://img.shields.io/travis/sjoerdk/anonapi.svg\n :target: https://travis-ci.org/sjoerdk/anonapi\n\n.. image:: https://readthedocs.org/projects/anonapi/badge/?version=latest\n :target: https://anonapi.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://api.codeclimate.com/v1/badges/5c3b7f45f6a476d0f21e/maintainability\n :target: https://codeclimate.com/github/sjoerdk/anonapi/maintainability\n :alt: Maintainability\n\n.. image:: https://codecov.io/gh/sjoerdk/anonapi/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/sjoerdk/anonapi\n\n.. image:: https://pyup.io/repos/github/comic/evalutils/shield.svg\n :target: https://pyup.io/repos/github/sjoerdk/anonapi/\n :alt: Updates\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n\n\nClient and tools for working with the IDIS web API\n\n\n* Free software: MIT license\n* Documentation: https://anonapi.readthedocs.io.\n\n\nFeatures\n--------\n\n* Interact with IDIS anonymization server web API via https\n* Create, modify, cancel anonymization jobs\n* CLI (Command Line Interface) for quick overview of jobs and cancel/restart job.\n* CLI can save servers and credentials locally for convenience\n* Python code with examples for fully automated interaction\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.0.1 (2018-10-23)\n------------------\n\n* First release on PyPI\n\n0.0.2-0.0.8 (2018-10-23)\n------------------------\n\n* Fixed deployment and packaging issues, pre-alpha\n\n0.0.9 (2018-10-23)\n------------------\n\n* Added distutil entry_points to have 'anon' console command after pip install\n\n0.0.10-0.0.18 (2018-11-12)\n------------------\n\n* Fixed deployment, docs\n\n0.0.19 (2018-11-14)\n------------------\n\n* set python 3.6 Required in setup.py", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Sjoerd Kerkstra", + "email": "sjoerd.kerkstra@radboudumc.nl", + "url": null + } + ], + "keywords": [ + "anonapi", + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Natural Language :: English", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7" + ], + "homepage_url": "https://github.com/sjoerdk/anonapi", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": { + "license": "MIT license", + "classifiers": [ + "License :: OSI Approved :: MIT License" + ] + }, + "notice_text": null, + "root_path": null, + "dependencies": [ + { + "purl": "pkg:pypi/pyyaml", + "requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false + } + ], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:pypi/anonapi@0.0.19", + "repository_homepage_url": "https://pypi.org/project/https://pypi.org", + "repository_download_url": "https://pypi.org/packages/source/a/anonapi/anonapi-0.0.19.tar.gz", + "api_data_url": "https://pypi.org/pypi/anonapi/0.0.19/json" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/android/basic/README.android.expected b/tests/packagedcode/data/readme/android/basic/README.android.expected index 27b351aa2da..22f3e8a7511 100644 --- a/tests/packagedcode/data/readme/android/basic/README.android.expected +++ b/tests/packagedcode/data/readme/android/basic/README.android.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "libaom", - "version": "v1.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://aomedia.org", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "BSD", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/libaom@v1.0.0", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "libaom", + "version": "v1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://aomedia.org", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "BSD", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/libaom@v1.0.0", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/chromium/basic/README.chromium.expected b/tests/packagedcode/data/readme/chromium/basic/README.chromium.expected index 93908cf3bc0..c08a29c708e 100644 --- a/tests/packagedcode/data/readme/chromium/basic/README.chromium.expected +++ b/tests/packagedcode/data/readme/chromium/basic/README.chromium.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "tsproxy", - "version": "a2f578febcd79b751d948f615bbde8f6189fbeed (commit hash)", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/WPO-Foundation/tsproxy", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "Apache", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/tsproxy@a2f578febcd79b751d948f615bbde8f6189fbeed%20%28commit%20hash%29", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "tsproxy", + "version": "a2f578febcd79b751d948f615bbde8f6189fbeed (commit hash)", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/WPO-Foundation/tsproxy", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "Apache", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/tsproxy@a2f578febcd79b751d948f615bbde8f6189fbeed%20%28commit%20hash%29", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/basic/README.facebook.expected b/tests/packagedcode/data/readme/facebook/basic/README.facebook.expected index 6838935d8c0..ec162b6dbd5 100644 --- a/tests/packagedcode/data/readme/facebook/basic/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/basic/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "setuptools", - "version": "18.5", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "PSF or ZPL", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/setuptools@18.5", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "setuptools", + "version": "18.5", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "PSF or ZPL", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/setuptools@18.5", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/capital-filename/README.FACEBOOK.expected b/tests/packagedcode/data/readme/facebook/capital-filename/README.FACEBOOK.expected index 6838935d8c0..ec162b6dbd5 100644 --- a/tests/packagedcode/data/readme/facebook/capital-filename/README.FACEBOOK.expected +++ b/tests/packagedcode/data/readme/facebook/capital-filename/README.FACEBOOK.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "setuptools", - "version": "18.5", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "PSF or ZPL", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/setuptools@18.5", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "setuptools", + "version": "18.5", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "PSF or ZPL", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/setuptools@18.5", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/download-link-as-download_url/README.facebook.expected b/tests/packagedcode/data/readme/facebook/download-link-as-download_url/README.facebook.expected index 6ec634fd47d..0e6e7bc7f10 100644 --- a/tests/packagedcode/data/readme/facebook/download-link-as-download_url/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/download-link-as-download_url/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "mbed TLS", - "version": "2.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/ARMmbed/mbedtls", - "download_url": "https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.16.7.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/mbed%20TLS@2.16.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "mbed TLS", + "version": "2.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/ARMmbed/mbedtls", + "download_url": "https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.16.7.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/mbed%20TLS@2.16.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/downloaded-from-as-download_url/README.facebook.expected b/tests/packagedcode/data/readme/facebook/downloaded-from-as-download_url/README.facebook.expected index 6ec634fd47d..0e6e7bc7f10 100644 --- a/tests/packagedcode/data/readme/facebook/downloaded-from-as-download_url/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/downloaded-from-as-download_url/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "mbed TLS", - "version": "2.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/ARMmbed/mbedtls", - "download_url": "https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.16.7.tar.gz", - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/mbed%20TLS@2.16.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "mbed TLS", + "version": "2.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/ARMmbed/mbedtls", + "download_url": "https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.16.7.tar.gz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/mbed%20TLS@2.16.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/missing-type/README.facebook.expected b/tests/packagedcode/data/readme/facebook/missing-type/README.facebook.expected index f9964dbada0..7a51196ea70 100644 --- a/tests/packagedcode/data/readme/facebook/missing-type/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/missing-type/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "missing-type", - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/missing-type", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "missing-type", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/missing-type", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/project-as-name/README.facebook.expected b/tests/packagedcode/data/readme/facebook/project-as-name/README.facebook.expected index 3e0a29cb34e..d52bbe93046 100644 --- a/tests/packagedcode/data/readme/facebook/project-as-name/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/project-as-name/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "mbed TLS", - "version": "2.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/ARMmbed/mbedtls", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/mbed%20TLS@2.16.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "mbed TLS", + "version": "2.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/ARMmbed/mbedtls", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/mbed%20TLS@2.16.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/source-as-homepage_url/README.facebook.expected b/tests/packagedcode/data/readme/facebook/source-as-homepage_url/README.facebook.expected index 3e0a29cb34e..d52bbe93046 100644 --- a/tests/packagedcode/data/readme/facebook/source-as-homepage_url/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/source-as-homepage_url/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "mbed TLS", - "version": "2.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/ARMmbed/mbedtls", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/mbed%20TLS@2.16.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "mbed TLS", + "version": "2.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/ARMmbed/mbedtls", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/mbed%20TLS@2.16.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook.expected b/tests/packagedcode/data/readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook.expected index 6838935d8c0..ec162b6dbd5 100644 --- a/tests/packagedcode/data/readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "setuptools", - "version": "18.5", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "PSF or ZPL", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/setuptools@18.5", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "setuptools", + "version": "18.5", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-18.5.tar.gz#md5=533c868f01169a3085177dffe5e768bb", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "PSF or ZPL", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/setuptools@18.5", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/facebook/website-as-homepage_url/README.facebook.expected b/tests/packagedcode/data/readme/facebook/website-as-homepage_url/README.facebook.expected index 3e0a29cb34e..d52bbe93046 100644 --- a/tests/packagedcode/data/readme/facebook/website-as-homepage_url/README.facebook.expected +++ b/tests/packagedcode/data/readme/facebook/website-as-homepage_url/README.facebook.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "mbed TLS", - "version": "2.16.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/ARMmbed/mbedtls", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "apache-2.0", - "declared_license": "Apache 2.0", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/mbed%20TLS@2.16.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "mbed TLS", + "version": "2.16.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/ARMmbed/mbedtls", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "apache-2.0", + "declared_license": "Apache 2.0", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/mbed%20TLS@2.16.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/google/basic/README.google.expected b/tests/packagedcode/data/readme/google/basic/README.google.expected index 5de583d4094..859ac656d3b 100644 --- a/tests/packagedcode/data/readme/google/basic/README.google.expected +++ b/tests/packagedcode/data/readme/google/basic/README.google.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "lunit", - "version": "0.5", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "https://github.com/dcurrie/lunit", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "mit", - "declared_license": "MIT", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/lunit@0.5", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "lunit", + "version": "0.5", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "https://github.com/dcurrie/lunit", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "mit", + "declared_license": "MIT", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/lunit@0.5", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/readme/thirdparty/basic/README.thirdparty.expected b/tests/packagedcode/data/readme/thirdparty/basic/README.thirdparty.expected index 7b1a6a05e65..136b63cfd10 100644 --- a/tests/packagedcode/data/readme/thirdparty/basic/README.thirdparty.expected +++ b/tests/packagedcode/data/readme/thirdparty/basic/README.thirdparty.expected @@ -1,36 +1,38 @@ -{ - "type": "readme", - "namespace": null, - "name": "colorama", - "version": "0.2.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": "http://pypi.python.org/pypi/colorama", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": "unknown", - "declared_license": "BSD", - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:readme/colorama@0.2.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "readme", + "namespace": null, + "name": "colorama", + "version": "0.2.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": "http://pypi.python.org/pypi/colorama", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": "unknown", + "declared_license": "BSD", + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:readme/colorama@0.2.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json index 26c008226b3..496c295a80e 100644 --- a/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/Microsoft.Practices.EnterpriseLibrary.Caching.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft Enterprise Library for .NET", - "version": "2.0.0.0", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Enterprise Library Caching Application Block", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "LegalCopyright": null, - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%20Enterprise%20Library%20for%20.NET@2.0.0.0", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft Enterprise Library for .NET", + "version": "2.0.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Enterprise Library Caching Application Block", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": { + "LegalCopyright": null, + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%20Enterprise%20Library%20for%20.NET@2.0.0.0", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json index 8e9714c4a11..8255481f3a0 100644 --- a/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/Moq.Silverlight.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Moq", - "version": "4.2.1507.0118", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Moq", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Clarius Consulting, Manas Technology Solutions, InSTEDD", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "LegalCopyright": null, - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Moq@4.2.1507.0118", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Moq", + "version": "4.2.1507.0118", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Moq", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Clarius Consulting, Manas Technology Solutions, InSTEDD", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": { + "LegalCopyright": null, + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Moq@4.2.1507.0118", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json b/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json index 6b68677dd7b..ec8b43ef0a4 100644 --- a/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json +++ b/tests/packagedcode/data/win_pe/Windows.AI.winmd.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Windows SDK", - "version": "10.0.10011.16384", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Windows SDK metadata", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Windows%20SDK@10.0.10011.16384", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Windows SDK", + "version": "10.0.10011.16384", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Windows SDK metadata", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Windows%20SDK@10.0.10011.16384", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json index 3287b345d48..dd92ce4e1f7 100644 --- a/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json +++ b/tests/packagedcode/data/win_pe/_ctypes_test.pyd.package-expected.json @@ -1,40 +1,42 @@ -{ - "type": "winexe", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "LegalCopyright": null, - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": { + "LegalCopyright": null, + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/chcp.com.package-expected.json b/tests/packagedcode/data/win_pe/chcp.com.package-expected.json index b65d35f186b..07875cc4f90 100644 --- a/tests/packagedcode/data/win_pe/chcp.com.package-expected.json +++ b/tests/packagedcode/data/win_pe/chcp.com.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft\u00ae Windows\u00ae Operating System", - "version": "10.0.17763.1", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Change CodePage Utility", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.17763.1", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft\u00ae Windows\u00ae Operating System", + "version": "10.0.17763.1", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Change CodePage Utility", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.17763.1", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json b/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json index e102673e32c..938fa2465f2 100644 --- a/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json +++ b/tests/packagedcode/data/win_pe/clfs.sys.mui.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft\u00ae Windows\u00ae Operating System", - "version": "10.0.18362.1256", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Common Log File System Driver", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft\u00ae Windows\u00ae Operating System", + "version": "10.0.18362.1256", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Common Log File System Driver", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json b/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json index 3787efa2617..f135cf9a637 100644 --- a/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json +++ b/tests/packagedcode/data/win_pe/crypt32.dll.mun.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft\u00ae Windows\u00ae Operating System", - "version": "10.0.18362.1256", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Crypto API32", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft\u00ae Windows\u00ae Operating System", + "version": "10.0.18362.1256", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Crypto API32", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json b/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json index 3287b345d48..dd92ce4e1f7 100644 --- a/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json +++ b/tests/packagedcode/data/win_pe/euc-jp.so.package-expected.json @@ -1,40 +1,42 @@ -{ - "type": "winexe", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "", - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "license_expression": null, - "declared_license": { - "LegalCopyright": null, - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": null, - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "", + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "license_expression": null, + "declared_license": { + "LegalCopyright": null, + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": null, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/file.exe.package-expected.json b/tests/packagedcode/data/win_pe/file.exe.package-expected.json index 93fc4327c06..01f5c64b80e 100644 --- a/tests/packagedcode/data/win_pe/file.exe.package-expected.json +++ b/tests/packagedcode/data/win_pe/file.exe.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "File", - "version": "5.03.3414.16721", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "File: determine file type", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "GnuWin32 ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://www.darwinsys.com/file/", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 2009 Ian F. Darwin", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 2009 Ian F. Darwin", - "LegalTrademarks": "GnuWin32\u00ae, File\u00ae, file\u00ae", - "License": "Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is not subject to any export provision of the United States Department of Commerce, and may be exported to any country or planet. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice immediately at the beginning of the file, without modification, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/File@5.03.3414.16721", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "File", + "version": "5.03.3414.16721", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "File: determine file type", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "GnuWin32 ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://www.darwinsys.com/file/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 2009 Ian F. Darwin", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 2009 Ian F. Darwin", + "LegalTrademarks": "GnuWin32\u00ae, File\u00ae, file\u00ae", + "License": "Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. Software written by Ian F. Darwin and others; maintained 1994-2004 Christos Zoulas. This software is not subject to any export provision of the United States Department of Commerce, and may be exported to any country or planet. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice immediately at the beginning of the file, without modification, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/File@5.03.3414.16721", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json b/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json index e525e894e7d..5a97769961e 100644 --- a/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/libiconv2.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "LibIconv", - "version": "1.9.2.1519", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "LibIconv: convert between character encodings", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "GNU ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 2004 Free Software Foundation ", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 2004 Free Software Foundation ", - "LegalTrademarks": "GNU\u00ae, LibIconv\u00ae, libiconv2\u00ae", - "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License;see www.gnu.org/copyleft/lesser.html." - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/LibIconv@1.9.2.1519", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "LibIconv", + "version": "1.9.2.1519", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "LibIconv: convert between character encodings", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "GNU ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 2004 Free Software Foundation ", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 2004 Free Software Foundation ", + "LegalTrademarks": "GNU\u00ae, LibIconv\u00ae, libiconv2\u00ae", + "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License;see www.gnu.org/copyleft/lesser.html." + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/LibIconv@1.9.2.1519", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json b/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json index 3cdf034e221..558a703803d 100644 --- a/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/libintl3.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "GetText", - "version": "0.14.4.1952", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "GetText: library and tools for native language support", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "GNU ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://www.gnu.org/software/gettext/gettext.html", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 2005 Free Software Foundation ", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 2005 Free Software Foundation ", - "LegalTrademarks": "GNU\u00ae, GetText\u00ae, libintl3\u00ae", - "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License;see www.gnu.org/copyleft/gpl.html." - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/GetText@0.14.4.1952", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "GetText", + "version": "0.14.4.1952", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "GetText: library and tools for native language support", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "GNU ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://www.gnu.org/software/gettext/gettext.html", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 2005 Free Software Foundation ", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 2005 Free Software Foundation ", + "LegalTrademarks": "GNU\u00ae, GetText\u00ae, libintl3\u00ae", + "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License;see www.gnu.org/copyleft/gpl.html." + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/GetText@0.14.4.1952", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json b/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json index 724ed3a62a7..b2a46a126b9 100644 --- a/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json +++ b/tests/packagedcode/data/win_pe/stdole2.tlb.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft\u00ae Windows\u00ae Operating System", - "version": "10.0.18362.1256", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "STDOLE2.TLB", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft\u00ae Windows\u00ae Operating System", + "version": "10.0.18362.1256", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "STDOLE2.TLB", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.18362.1256", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json b/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json index 42120c8a901..60b24dd59e4 100644 --- a/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json +++ b/tests/packagedcode/data/win_pe/tbs.sys.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Microsoft\u00ae Windows\u00ae Operating System", - "version": "10.0.17763.1697", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Export driver for kernel mode TPM API", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", - "LegalTrademarks": "", - "License": null - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.17763.1697", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Microsoft\u00ae Windows\u00ae Operating System", + "version": "10.0.17763.1697", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Export driver for kernel mode TPM API", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 Microsoft Corporation. All rights reserved.", + "LegalTrademarks": "", + "License": null + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Microsoft%C2%AE%20Windows%C2%AE%20Operating%20System@10.0.17763.1697", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json b/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json index 55d9860b82b..1683f86fc20 100644 --- a/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/tre4.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Tre", - "version": "0.7.5.3276", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Tre4: Posix compliant regular expression library", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "GnuWin32 ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://laurikari.net/tre", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 2008 Ville Laurikari ", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 2008 Ville Laurikari ", - "LegalTrademarks": "GnuWin32\u00ae, Tre\u00ae, tre4\u00ae", - "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; see www.gnu.org/copyleft/gpl.html." - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Tre@0.7.5.3276", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Tre", + "version": "0.7.5.3276", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Tre4: Posix compliant regular expression library", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "GnuWin32 ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://laurikari.net/tre", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 2008 Ville Laurikari ", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 2008 Ville Laurikari ", + "LegalTrademarks": "GnuWin32\u00ae, Tre\u00ae, tre4\u00ae", + "License": "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; see www.gnu.org/copyleft/gpl.html." + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Tre@0.7.5.3276", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json b/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json index f69c17947d1..8c8bd99faf8 100644 --- a/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json +++ b/tests/packagedcode/data/win_pe/zlib1.dll.package-expected.json @@ -1,48 +1,50 @@ -{ - "type": "winexe", - "namespace": null, - "name": "Zlib", - "version": "1.2.3.2532", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Zlib1: general purpose data compression / decompression library", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "author", - "name": "GnuWin32 ", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://www.zlib.net", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "\u00a9 2006 Jean-loup Gailly , Mark Adler ", - "license_expression": null, - "declared_license": { - "LegalCopyright": "\u00a9 2006 Jean-loup Gailly , Mark Adler ", - "LegalTrademarks": "GnuWin32\u00ae, Zlib\u00ae, zlib1\u00ae", - "License": "(C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu" - }, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:winexe/Zlib@1.2.3.2532", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "winexe", + "namespace": null, + "name": "Zlib", + "version": "1.2.3.2532", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Zlib1: general purpose data compression / decompression library", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "author", + "name": "GnuWin32 ", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://www.zlib.net", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "\u00a9 2006 Jean-loup Gailly , Mark Adler ", + "license_expression": null, + "declared_license": { + "LegalCopyright": "\u00a9 2006 Jean-loup Gailly , Mark Adler ", + "LegalTrademarks": "GnuWin32\u00ae, Zlib\u00ae, zlib1\u00ae", + "License": "(C) 1995-2002 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu" + }, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:winexe/Zlib@1.2.3.2532", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/windows/mum/test.mum.expected b/tests/packagedcode/data/windows/mum/test.mum.expected index e9d597a3371..5232a41534c 100644 --- a/tests/packagedcode/data/windows/mum/test.mum.expected +++ b/tests/packagedcode/data/windows/mum/test.mum.expected @@ -1,44 +1,46 @@ -{ - "type": "windows-update", - "namespace": null, - "name": "Package_1_for_KB4601060", - "version": "10.0.3770.4", - "qualifiers": {}, - "subpath": null, - "primary_language": null, - "description": "Fix for KB4601060", - "release_date": null, - "parties": [ - { - "type": "organization", - "role": "owner", - "name": "Microsoft Corporation", - "email": null, - "url": null - } - ], - "keywords": [], - "homepage_url": "http://support.microsoft.com/?kbid=4601060", - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": "Microsoft Corporation", - "license_expression": null, - "declared_license": null, - "notice_text": null, - "root_path": null, - "dependencies": [], - "contains_source_code": null, - "source_packages": [], - "extra_data": {}, - "purl": "pkg:windows-update/Package_1_for_KB4601060@10.0.3770.4", - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null -} \ No newline at end of file +[ + { + "type": "windows-update", + "namespace": null, + "name": "Package_1_for_KB4601060", + "version": "10.0.3770.4", + "qualifiers": {}, + "subpath": null, + "primary_language": null, + "description": "Fix for KB4601060", + "release_date": null, + "parties": [ + { + "type": "organization", + "role": "owner", + "name": "Microsoft Corporation", + "email": null, + "url": null + } + ], + "keywords": [], + "homepage_url": "http://support.microsoft.com/?kbid=4601060", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": "Microsoft Corporation", + "license_expression": null, + "declared_license": null, + "notice_text": null, + "root_path": null, + "dependencies": [], + "contains_source_code": null, + "source_packages": [], + "extra_data": {}, + "purl": "pkg:windows-update/Package_1_for_KB4601060@10.0.3770.4", + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/test_about.py b/tests/packagedcode/test_about.py index 6eee81376a3..5176ba50465 100644 --- a/tests/packagedcode/test_about.py +++ b/tests/packagedcode/test_about.py @@ -17,14 +17,18 @@ class TestAbout(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_can_detect_aboutfile(self): + test_file = self.get_test_loc('about/aboutfiles/apipkg.ABOUT') + assert about.Aboutfile.is_manifest(test_file) + def test_parse_about_file_home_url(self): test_file = self.get_test_loc('about/aboutfiles/apipkg.ABOUT') - package = about.parse(test_file) + package = about.Aboutfile.recognize(test_file) expected_loc = self.get_test_loc('about/apipkg.ABOUT-expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_about_file_homepage_url(self): test_file = self.get_test_loc('about/aboutfiles/appdirs.ABOUT') - package = about.parse(test_file) + package = about.Aboutfile.recognize(test_file) expected_loc = self.get_test_loc('about/appdirs.ABOUT-expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) diff --git a/tests/packagedcode/test_bower.py b/tests/packagedcode/test_bower.py index 21cfa78d0e6..0778a241541 100644 --- a/tests/packagedcode/test_bower.py +++ b/tests/packagedcode/test_bower.py @@ -17,20 +17,24 @@ class TestBower(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_bower_json(self): + test_file = self.get_test_loc('bower/basic/bower.json') + assert bower.BowerJson.is_manifest(test_file) + def test_parse_bower_json_basic(self): test_file = self.get_test_loc('bower/basic/bower.json') - package = bower.parse(test_file) + package = bower.BowerJson.recognize(test_file) expected_loc = self.get_test_loc('bower/basic/expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_bower_json_list_of_licenses(self): test_file = self.get_test_loc('bower/list-of-licenses/bower.json') - package = bower.parse(test_file) + package = bower.BowerJson.recognize(test_file) expected_loc = self.get_test_loc('bower/list-of-licenses/expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_bower_json_author_objects(self): test_file = self.get_test_loc('bower/author-objects/bower.json') - package = bower.parse(test_file) + package = bower.BowerJson.recognize(test_file) expected_loc = self.get_test_loc('bower/author-objects/expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) diff --git a/tests/packagedcode/test_cargo.py b/tests/packagedcode/test_cargo.py index 3d9910c4c81..f18d9a0bc3b 100644 --- a/tests/packagedcode/test_cargo.py +++ b/tests/packagedcode/test_cargo.py @@ -18,65 +18,73 @@ class TestCargo(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_cargo_toml(self): + test_file = self.get_test_loc('cargo/cargo_toml/clap/Cargo.toml') + assert cargo.CargoToml.is_manifest(test_file) + def test_parse_cargo_toml_clap(self): test_file = self.get_test_loc('cargo/cargo_toml/clap/Cargo.toml') expected_loc = self.get_test_loc('cargo/cargo_toml/clap/Cargo.toml.expected') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoToml.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_toml_clippy(self): test_file = self.get_test_loc('cargo/cargo_toml/clippy/Cargo.toml') expected_loc = self.get_test_loc('cargo/cargo_toml/clippy/Cargo.toml.expected') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoToml.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_toml_mdbook(self): test_file = self.get_test_loc('cargo/cargo_toml/mdbook/Cargo.toml') expected_loc = self.get_test_loc('cargo/cargo_toml/mdbook/Cargo.toml.expected') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoToml.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_toml_rustfmt(self): test_file = self.get_test_loc('cargo/cargo_toml/rustfmt/Cargo.toml') expected_loc = self.get_test_loc('cargo/cargo_toml/rustfmt/Cargo.toml.expected') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoToml.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_toml_rustup(self): test_file = self.get_test_loc('cargo/cargo_toml/rustup/Cargo.toml') expected_loc = self.get_test_loc('cargo/cargo_toml/rustup/Cargo.toml.expected') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoToml.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) + + def test_is_manifest_cargo_lock(self): + test_file = self.get_test_loc('cargo/cargo_lock/sample1/Cargo.lock') + assert cargo.CargoLock.is_manifest(test_file) def test_parse_cargo_lock_sample1(self): test_file = self.get_test_loc('cargo/cargo_lock/sample1/Cargo.lock') expected_loc = self.get_test_loc('cargo/cargo_lock/sample1/output.expected.json') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoLock.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_lock_sample2(self): test_file = self.get_test_loc('cargo/cargo_lock/sample2/Cargo.lock') expected_loc = self.get_test_loc('cargo/cargo_lock/sample2/output.expected.json') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoLock.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_lock_sample3(self): test_file = self.get_test_loc('cargo/cargo_lock/sample3/Cargo.lock') expected_loc = self.get_test_loc('cargo/cargo_lock/sample3/output.expected.json') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoLock.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_lock_sample4(self): test_file = self.get_test_loc('cargo/cargo_lock/sample4/Cargo.lock') expected_loc = self.get_test_loc('cargo/cargo_lock/sample4/output.expected.json') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoLock.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_cargo_lock_sample5(self): test_file = self.get_test_loc('cargo/cargo_lock/sample5/Cargo.lock') expected_loc = self.get_test_loc('cargo/cargo_lock/sample5/output.expected.json') - package = cargo.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = cargo.CargoLock.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) PERSON_PARSER_TEST_TABLE = [ diff --git a/tests/packagedcode/test_chef.py b/tests/packagedcode/test_chef.py index 3331ac251f1..cff82400079 100644 --- a/tests/packagedcode/test_chef.py +++ b/tests/packagedcode/test_chef.py @@ -16,20 +16,28 @@ class TestChef(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') - def test_parse_from_json(self): + def test_chef_metadata_json_is_manifest(self): + test_file = self.get_test_loc('chef/basic/metadata.json') + assert chef.MetadataJson.is_manifest(test_file) + + def test_chef_metadata_rb_from_json(self): test_file = self.get_test_loc('chef/basic/metadata.json') expected_file = self.get_test_loc('chef/basic/metadata.json.expected') - self.check_package(chef.parse(test_file), expected_file, regen=False) + self.check_packages(chef.MetadataJson.recognize(test_file), expected_file, regen=False) + + def test_chef_metadata_rb_is_manifest(self): + test_file = self.get_test_loc('chef/basic/metadata.rb') + assert chef.Metadatarb.is_manifest(test_file) def test_parse_from_rb(self): test_file = self.get_test_loc('chef/basic/metadata.rb') expected_file = self.get_test_loc('chef/basic/metadata.rb.expected') - self.check_package(chef.parse(test_file), expected_file, regen=False) + self.check_packages(chef.Metadatarb.recognize(test_file), expected_file, regen=False) def test_parse_from_rb_dependency_requirement(self): test_file = self.get_test_loc('chef/dependencies/metadata.rb') expected_file = self.get_test_loc('chef/dependencies/metadata.rb.expected') - self.check_package(chef.parse(test_file), expected_file, regen=False) + self.check_packages(chef.Metadatarb.recognize(test_file), expected_file, regen=False) def test_build_package(self): package_data = dict( @@ -39,7 +47,7 @@ def test_build_package(self): license='public-domain' ) expected_file = self.get_test_loc('chef/basic/test_package.json.expected') - self.check_package(chef.build_package(package_data), expected_file, regen=False) + self.check_packages(chef.build_package(chef.MetadataJson, package_data), expected_file, regen=False) def test_build_package_long_description(self): package_data = dict( @@ -49,7 +57,7 @@ def test_build_package_long_description(self): license='public-domain' ) expected_file = self.get_test_loc('chef/basic/test_package.json.expected') - self.check_package(chef.build_package(package_data), expected_file, regen=False) + self.check_packages(chef.build_package(chef.MetadataJson, package_data), expected_file, regen=False) def test_build_package_dependencies(self): package_data = dict( @@ -60,7 +68,7 @@ def test_build_package_dependencies(self): dependencies={'test dependency': '0.01'} ) expected_file = self.get_test_loc('chef/basic/test_package_dependencies.json.expected') - self.check_package(chef.build_package(package_data), expected_file, regen=False) + self.check_packages(chef.build_package(chef.MetadataJson, package_data), expected_file, regen=False) def test_build_package_parties(self): package_data = dict( @@ -72,7 +80,7 @@ def test_build_package_parties(self): maintainer_email='test_maintainer@example.com', ) expected_file = self.get_test_loc('chef/basic/test_package_parties.json.expected') - self.check_package(chef.build_package(package_data), expected_file, regen=False) + self.check_packages(chef.build_package(chef.MetadataJson, package_data), expected_file, regen=False) def test_build_package_code_view_url_and_bug_tracking_url(self): package_data = dict( @@ -84,4 +92,4 @@ def test_build_package_code_view_url_and_bug_tracking_url(self): issues_url='example.com/issues' ) expected_file = self.get_test_loc('chef/basic/test_package_code_view_url_and_bug_tracking_url.json.expected') - self.check_package(chef.build_package(package_data), expected_file, regen=False) + self.check_packages(chef.build_package(chef.MetadataJson, package_data), expected_file, regen=False) diff --git a/tests/packagedcode/test_cocoapods.py b/tests/packagedcode/test_cocoapods.py index f3cfbeeeceb..57f57183a0f 100644 --- a/tests/packagedcode/test_cocoapods.py +++ b/tests/packagedcode/test_cocoapods.py @@ -9,59 +9,73 @@ import os -from packagedcode import cocoapods +from packagedcode.cocoapods import Podspec +from packagedcode.cocoapods import PodfileLock +from packagedcode.cocoapods import PodspecJson from packages_test_utils import PackageTester class TestCocoaPodspec(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_cocoapods_can_detect_podspec(self): + test_file = self.get_test_loc('cocoapods/podspec/BadgeHub.podspec') + assert Podspec.is_manifest(test_file) + def test_cocoapods_can_parse_BadgeHub(self): test_file = self.get_test_loc('cocoapods/podspec/BadgeHub.podspec') expected_loc = self.get_test_loc('cocoapods/podspec/BadgeHub.podspec.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = Podspec.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_cocoapods_can_parse_LoadingShimmer(self): test_file = self.get_test_loc('cocoapods/podspec/LoadingShimmer.podspec') expected_loc = self.get_test_loc('cocoapods/podspec/LoadingShimmer.podspec.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = Podspec.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_cocoapods_can_parse_nanopb(self): test_file = self.get_test_loc('cocoapods/podspec/nanopb.podspec') expected_loc = self.get_test_loc('cocoapods/podspec/nanopb.podspec.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = Podspec.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_cocoapods_can_parse_Starscream(self): test_file = self.get_test_loc('cocoapods/podspec/Starscream.podspec') expected_loc = self.get_test_loc('cocoapods/podspec/Starscream.podspec.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = Podspec.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_cocoapods_can_parse_SwiftLib(self): test_file = self.get_test_loc('cocoapods/podspec/SwiftLib.podspec') expected_loc = self.get_test_loc('cocoapods/podspec/SwiftLib.podspec.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = Podspec.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) class TestCocoaPodspecJson(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_cocoapods_can_detect_podspec_json(self): + test_file = self.get_test_loc('cocoapods/podspec.json/FirebaseAnalytics.podspec.json') + assert PodspecJson.is_manifest(test_file) + def test_cocoapods_can_parse_FirebaseAnalytics(self): test_file = self.get_test_loc('cocoapods/podspec.json/FirebaseAnalytics.podspec.json') expected_loc = self.get_test_loc('cocoapods/podspec.json/FirebaseAnalytics.podspec.json.expected.json') - packages = cocoapods.parse(test_file) - self.check_package(packages, expected_loc, regen=False) + packages = PodspecJson.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) class TestCocoaPodfileLock(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_cocoapods_can_detect_podfile_lock(self): + test_file = self.get_test_loc('cocoapods/podfle.lock/braintree_ios_Podfile.lock') + assert PodfileLock.is_manifest(test_file) + def test_cocoapods_can_parse_braintree_ios(self): test_file = self.get_test_loc('cocoapods/podfle.lock/braintree_ios_Podfile.lock') expected_loc = self.get_test_loc('cocoapods/podfle.lock/braintree_ios_Podfile.lock.expected.json') - packages = cocoapods.parse(test_file) + packages = PodfileLock.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) diff --git a/tests/packagedcode/test_conda.py b/tests/packagedcode/test_conda.py index 24dc9343679..cab1efb0f8f 100644 --- a/tests/packagedcode/test_conda.py +++ b/tests/packagedcode/test_conda.py @@ -27,11 +27,15 @@ def test_get_yaml_data(self): results = conda.get_yaml_data(test_file) assert list(results.items())[0] == (u'package', dict([(u'name', u'abeona'), (u'version', u'0.45.0')])) + def test_condayml_is_manifest(self): + test_file = self.get_test_loc('conda/meta.yaml') + assert conda.Condayml.is_manifest(test_file) + def test_parse(self): test_file = self.get_test_loc('conda/meta.yaml') - package = conda.parse(test_file) + package = conda.Condayml.recognize(test_file) expected_loc = self.get_test_loc('conda/meta.yaml.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=True) def test_root_dir(self): test_file = self.get_test_loc('conda/requests-kerberos-0.8.0-py35_0.tar.bz2-extract/info/recipe.tar-extract/recipe/meta.yaml') diff --git a/tests/packagedcode/test_freebsd.py b/tests/packagedcode/test_freebsd.py index 44c3f486a2e..e13a5a55144 100644 --- a/tests/packagedcode/test_freebsd.py +++ b/tests/packagedcode/test_freebsd.py @@ -17,50 +17,49 @@ class TestFreeBSD(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_compact_manifest(self): + test_file = self.get_test_loc('freebsd/multi_license/+COMPACT_MANIFEST') + assert freebsd.CompactManifest.is_manifest(test_file) + def test_parse_with_multi_licenses(self): test_file = self.get_test_loc('freebsd/multi_license/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/multi_license/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_dual_licenses2(self): test_file = self.get_test_loc('freebsd/dual_license2/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/dual_license2/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_dual_licenses(self): test_file = self.get_test_loc('freebsd/dual_license/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/dual_license/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_without_licenses(self): test_file = self.get_test_loc('freebsd/no_licenses/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/no_licenses/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_basic2(self): test_file = self.get_test_loc('freebsd/basic2/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/basic2/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_basic(self): test_file = self.get_test_loc('freebsd/basic/+COMPACT_MANIFEST') expected_loc = self.get_test_loc('freebsd/basic/+COMPACT_MANIFEST.expected') - package = freebsd.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = freebsd.CompactManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_not_yaml(self): test_file = self.get_test_loc('freebsd/not_yaml/+COMPACT_MANIFEST') try: - freebsd.parse(test_file) + freebsd.CompactManifest.recognize(test_file) except saneyaml.YAMLError as e: assert 'while parsing a block node' in str(e) - - def test_parse_invalid_metafile(self): - test_file = self.get_test_loc('freebsd/invalid/invalid_metafile') - package = freebsd.parse(test_file) - assert package == None diff --git a/tests/packagedcode/test_golang.py b/tests/packagedcode/test_golang.py index 51689c28788..2b8dd3bd832 100644 --- a/tests/packagedcode/test_golang.py +++ b/tests/packagedcode/test_golang.py @@ -21,74 +21,82 @@ class TestGolang(PackageTester): """ test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_gomod_is_manifest(self): + test_file = self.get_test_loc('golang/gomod/kingpin/go.mod') + assert golang.GoMod.is_manifest(test_file) + def test_parse_gomod_kingpin(self): test_file = self.get_test_loc('golang/gomod/kingpin/go.mod') expected_loc = self.get_test_loc('golang/gomod/kingpin/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gomod_opencensus(self): test_file = self.get_test_loc('golang/gomod/opencensus-service/go.mod') expected_loc = self.get_test_loc('golang/gomod/opencensus-service/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gomod_participle(self): test_file = self.get_test_loc('golang/gomod/participle/go.mod') expected_loc = self.get_test_loc('golang/gomod/participle/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gomod_sample(self): test_file = self.get_test_loc('golang/gomod/sample/go.mod') expected_loc = self.get_test_loc('golang/gomod/sample/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gomod_uap_go(self): test_file = self.get_test_loc('golang/gomod/uap-go/go.mod') expected_loc = self.get_test_loc('golang/gomod/uap-go/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gomod_user_agent(self): test_file = self.get_test_loc('golang/gomod/user_agent/go.mod') expected_loc = self.get_test_loc('golang/gomod/user_agent/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoMod.recognize(test_file) self.check_packages(package, expected_loc, regen=False) + def test_gosum_is_manifest(self): + test_file = self.get_test_loc('golang/gosum/sample1/go.sum') + assert golang.GoSum.is_manifest(test_file) + def test_parse_gosum_sample1(self): test_file = self.get_test_loc('golang/gosum/sample1/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample1/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gosum_sample2(self): test_file = self.get_test_loc('golang/gosum/sample2/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample2/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gosum_sample3(self): test_file = self.get_test_loc('golang/gosum/sample3/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample3/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gosum_sample4(self): test_file = self.get_test_loc('golang/gosum/sample4/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample4/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gosum_sample5(self): test_file = self.get_test_loc('golang/gosum/sample5/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample5/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) def test_parse_gosum_sample6(self): test_file = self.get_test_loc('golang/gosum/sample6/go.sum') expected_loc = self.get_test_loc('golang/gosum/sample6/output.expected.json') - package = golang.GolangPackage.recognize(test_file) + package = golang.GoSum.recognize(test_file) self.check_packages(package, expected_loc, regen=False) diff --git a/tests/packagedcode/test_haxe.py b/tests/packagedcode/test_haxe.py index 99034c94339..ff2f65f008e 100644 --- a/tests/packagedcode/test_haxe.py +++ b/tests/packagedcode/test_haxe.py @@ -17,29 +17,33 @@ class TestHaxe(PackageTester): test_data_dir = path.join(path.dirname(__file__), 'data') + def test_is_manifest_haxelib_json(self): + test_file = self.get_test_loc('haxe/basic/haxelib.json') + assert haxe.HaxelibJson.is_manifest(test_file) + def test_parse_basic(self): test_file = self.get_test_loc('haxe/basic/haxelib.json') expected_loc = self.get_test_loc('haxe/basic/haxelib.json.expected') - package = haxe.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = haxe.HaxelibJson.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_basic2(self): test_file = self.get_test_loc('haxe/basic2/haxelib.json') expected_loc = self.get_test_loc('haxe/basic2/haxelib.json.expected') - package = haxe.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = haxe.HaxelibJson.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_deps(self): test_file = self.get_test_loc('haxe/deps/haxelib.json') expected_loc = self.get_test_loc('haxe/deps/haxelib.json.expected') - package = haxe.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = haxe.HaxelibJson.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_tags(self): test_file = self.get_test_loc('haxe/tags/haxelib.json') expected_loc = self.get_test_loc('haxe/tags/haxelib.json.expected') - package = haxe.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = haxe.HaxelibJson.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_root_dir(self): test_file = self.get_test_loc('haxe/tags/haxelib.json') diff --git a/tests/packagedcode/test_models.py b/tests/packagedcode/test_models.py new file mode 100644 index 00000000000..026b00444dc --- /dev/null +++ b/tests/packagedcode/test_models.py @@ -0,0 +1,22 @@ +# +# Copyright (c) nexB Inc. and others. All rights reserved. +# ScanCode is a trademark of nexB Inc. +# SPDX-License-Identifier: Apache-2.0 +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. +# See https://github.com/nexB/scancode-toolkit for support or download. +# See https://aboutcode.org for more information about nexB OSS projects. +# + +import os +from unittest.case import expectedFailure + +from commoncode.testcase import FileBasedTesting + +import packagedcode +from packagedcode.recognize import recognize_package_manifests + +from packagedcode import models + + +class TestRecognize(FileBasedTesting): + test_data_dir = os.path.join(os.path.dirname(__file__), 'data') diff --git a/tests/packagedcode/test_npm.py b/tests/packagedcode/test_npm.py index 94a5c8cc291..c1330ad0a44 100644 --- a/tests/packagedcode/test_npm.py +++ b/tests/packagedcode/test_npm.py @@ -57,214 +57,230 @@ def test_parse_person_dict4(self): 'url': 'http://example.com'} assert npm.parse_person(test) == ('Isaac Z. Schlueter', 'me@this.com' , 'http://example.com') + def test_is_manifest_package_json(self): + test_file = self.get_test_loc('npm/dist/package.json') + assert npm.PackageJson.is_manifest(test_file) + def test_parse_dist_with_string_values(self): test_file = self.get_test_loc('npm/dist/package.json') expected_loc = self.get_test_loc('npm/dist/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_as_installed(self): test_file = self.get_test_loc('npm/as_installed/package.json') expected_loc = self.get_test_loc('npm/as_installed/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_authors_list_dicts(self): # See: https://github.com/csscomb/grunt-csscomb/blob/master/package.json test_file = self.get_test_loc('npm/authors_list_dicts/package.json') expected_loc = self.get_test_loc('npm/authors_list_dicts/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_authors_list_strings(self): # See: https://github.com/chenglou/react-motion/blob/master/package.json test_file = self.get_test_loc('npm/authors_list_strings/package.json') expected_loc = self.get_test_loc('npm/authors_list_strings/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_authors_list_strings2(self): # See: https://github.com/gomfunkel/node-exif/blob/master/package.json test_file = self.get_test_loc('npm/authors_list_strings2/package.json') expected_loc = self.get_test_loc('npm/authors_list_strings2/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_basic(self): test_file = self.get_test_loc('npm/basic/package.json') expected_loc = self.get_test_loc('npm/basic/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_bundleddeps(self): test_file = self.get_test_loc('npm/bundledDeps/package.json') expected_loc = self.get_test_loc('npm/bundledDeps/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_faulty_npm(self): test_file = self.get_test_loc('npm/casepath/package.json') expected_loc = self.get_test_loc('npm/casepath/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_legacy_licenses(self): test_file = self.get_test_loc('npm/chartist/package.json') expected_loc = self.get_test_loc('npm/chartist/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_from_npmjs(self): test_file = self.get_test_loc('npm/from_npmjs/package.json') expected_loc = self.get_test_loc('npm/from_npmjs/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_package_json_from_tarball_with_deps(self): test_file = self.get_test_loc('npm/from_tarball/package.json') expected_loc = self.get_test_loc('npm/from_tarball/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_invalid_json(self): test_file = self.get_test_loc('npm/invalid/package.json') try: - npm.parse(test_file) + npm.PackageJson.recognize(test_file) except ValueError as e: assert 'Expecting value: line 60 column 3' in str(e) def test_parse_keywords(self): test_file = self.get_test_loc('npm/keywords/package.json') expected_loc = self.get_test_loc('npm/keywords/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_legacy_licenses_as_dict(self): test_file = self.get_test_loc('npm/legacy_license_dict/package.json') expected_loc = self.get_test_loc('npm/legacy_license_dict/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_double_legacy_licenses_as_dict(self): test_file = self.get_test_loc('npm/double_license/package.json') expected_loc = self.get_test_loc('npm/double_license/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_nodep(self): test_file = self.get_test_loc('npm/nodep/package.json') expected_loc = self.get_test_loc('npm/nodep/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_does_not_crash_if_partial_repo_url(self): test_file = self.get_test_loc('npm/repo_url/package.json') expected_loc = self.get_test_loc('npm/repo_url/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_scoped_package_1(self): test_file = self.get_test_loc('npm/scoped1/package.json') expected_loc = self.get_test_loc('npm/scoped1/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_scoped_package_2(self): test_file = self.get_test_loc('npm/scoped2/package.json') expected_loc = self.get_test_loc('npm/scoped2/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_from_npm_authors_with_email_list(self): # See: sequelize test_file = self.get_test_loc('npm/sequelize/package.json') expected_loc = self.get_test_loc('npm/sequelize/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_from_urls_dict_legacy_is_ignored(self): test_file = self.get_test_loc('npm/urls_dict/package.json') expected_loc = self.get_test_loc('npm/urls_dict/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_from_uri_vcs(self): test_file = self.get_test_loc('npm/uri_vcs/package.json') expected_loc = self.get_test_loc('npm/uri_vcs/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_registry_old_format(self): test_file = self.get_test_loc('npm/old_registry/package.json') expected_loc = self.get_test_loc('npm/old_registry/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_with_homepage_as_list(self): test_file = self.get_test_loc('npm/homepage-as-list/package.json') expected_loc = self.get_test_loc('npm/homepage-as-list/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_with_invalid_dep(self): test_file = self.get_test_loc('npm/invalid-dep/package.json') expected_loc = self.get_test_loc('npm/invalid-dep/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_utils_merge_1_0_0(self): test_file = self.get_test_loc('npm/utils-merge-1.0.0/package.json') expected_loc = self.get_test_loc( 'npm/utils-merge-1.0.0/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_mime_1_3_4(self): test_file = self.get_test_loc('npm/mime-1.3.4/package.json') expected_loc = self.get_test_loc( 'npm/mime-1.3.4/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_express_jwt_3_4_0(self): test_file = self.get_test_loc('npm/express-jwt-3.4.0/package.json') expected_loc = self.get_test_loc( 'npm/express-jwt-3.4.0/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) + def test_is_manifest_package_lock_json(self): + test_file = self.get_test_loc('npm/package-lock/package-lock.json') + assert npm.PackageLockJson.is_manifest(test_file) + def test_parse_package_lock(self): test_file = self.get_test_loc('npm/package-lock/package-lock.json') expected_loc = self.get_test_loc( 'npm/package-lock/package-lock.json-expected') - packages = npm.parse(test_file) + packages = npm.PackageLockJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) + def test_is_manifest_npm_shrinkwrap_json(self): + test_file = self.get_test_loc('npm/npm-shrinkwrap/npm-shrinkwrap.json') + assert npm.PackageLockJson.is_manifest(test_file) + def test_parse_npm_shrinkwrap(self): test_file = self.get_test_loc('npm/npm-shrinkwrap/npm-shrinkwrap.json') expected_loc = self.get_test_loc( 'npm/npm-shrinkwrap/npm-shrinkwrap.json-expected') - packages = npm.parse(test_file) + packages = npm.PackageLockJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_with_name(self): test_file = self.get_test_loc('npm/with_name/package.json') expected_loc = self.get_test_loc('npm/with_name/package.json.expected') - packages = npm.parse(test_file) + packages = npm.PackageJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_without_name(self): test_file = self.get_test_loc('npm/without_name/package.json') try: - npm.parse(test_file) + npm.PackageJson.recognize(test_file) except AttributeError as e: assert "'NoneType' object has no attribute 'to_dict'" in str(e) + def test_is_manifest_yarn_lock(self): + test_file = self.get_test_loc('npm/yarn-lock/yarn.lock') + assert npm.YarnLockJson.is_manifest(test_file) + def test_parse_yarn_lock(self): test_file = self.get_test_loc('npm/yarn-lock/yarn.lock') expected_loc = self.get_test_loc( 'npm/yarn-lock/yarn.lock-expected') - packages = npm.parse(test_file) + packages = npm.YarnLockJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_vcs_repository_mapper(self): diff --git a/tests/packagedcode/test_nuget.py b/tests/packagedcode/test_nuget.py index 71181683241..e73f92def20 100644 --- a/tests/packagedcode/test_nuget.py +++ b/tests/packagedcode/test_nuget.py @@ -17,38 +17,42 @@ class TestNuget(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_nuspec_is_manifest(self): + test_file = self.get_test_loc('nuget/bootstrap.nuspec') + assert nuget.Nuspec.is_manifest(test_file) + def test_parse_creates_package_from_nuspec_bootstrap(self): test_file = self.get_test_loc('nuget/bootstrap.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/bootstrap.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_creates_package_from_nuspec_entity_framework(self): test_file = self.get_test_loc('nuget/EntityFramework.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/EntityFramework.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_creates_package_from_nuspec_jquery_ui(self): test_file = self.get_test_loc('nuget/jQuery.UI.Combined.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/jQuery.UI.Combined.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_creates_package_from_nuspec_microsoft_asp_mvc(self): test_file = self.get_test_loc('nuget/Microsoft.AspNet.Mvc.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/Microsoft.AspNet.Mvc.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_creates_package_from_nuspec(self): test_file = self.get_test_loc('nuget/Microsoft.Net.Http.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/Microsoft.Net.Http.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_as_package(self): test_file = self.get_test_loc('nuget/Castle.Core.nuspec') - package = nuget.parse(test_file) + package = nuget.Nuspec.recognize(test_file) expected_loc = self.get_test_loc('nuget/Castle.Core.nuspec.json.expected') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) diff --git a/tests/packagedcode/test_opam.py b/tests/packagedcode/test_opam.py index 38e0181b6c9..20edb00a252 100644 --- a/tests/packagedcode/test_opam.py +++ b/tests/packagedcode/test_opam.py @@ -18,53 +18,57 @@ class TestOcaml(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_cargo_toml(self): + test_file = self.get_test_loc('opam/sample1/sample1.opam') + assert opam.OpamFile.is_manifest(test_file) + def test_parse_sample1(self): test_file = self.get_test_loc('opam/sample1/sample1.opam') expected_loc = self.get_test_loc('opam/sample1/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample2(self): test_file = self.get_test_loc('opam/sample2/sample2.opam') expected_loc = self.get_test_loc('opam/sample2/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample3(self): test_file = self.get_test_loc('opam/sample3/sample3.opam') expected_loc = self.get_test_loc('opam/sample3/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample4(self): test_file = self.get_test_loc('opam/sample4/opam') expected_loc = self.get_test_loc('opam/sample4/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample5(self): test_file = self.get_test_loc('opam/sample5/opam') expected_loc = self.get_test_loc('opam/sample5/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample6(self): test_file = self.get_test_loc('opam/sample6/sample6.opam') expected_loc = self.get_test_loc('opam/sample6/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample7(self): test_file = self.get_test_loc('opam/sample7/sample7.opam') expected_loc = self.get_test_loc('opam/sample7/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) def test_parse_sample8(self): test_file = self.get_test_loc('opam/sample8/opam') expected_loc = self.get_test_loc('opam/sample8/output.opam.expected') - package = opam.parse(test_file) - self.check_package(package, expected_loc, regen=False) + packages = opam.OpamFile.recognize(test_file) + self.check_packages(packages, expected_loc, regen=False) FILE_LINE = [ diff --git a/tests/packagedcode/test_phpcomposer.py b/tests/packagedcode/test_phpcomposer.py index fc3f67d4624..0f724944c4b 100644 --- a/tests/packagedcode/test_phpcomposer.py +++ b/tests/packagedcode/test_phpcomposer.py @@ -35,44 +35,53 @@ def test_parse_person(self): ('Jordi Boggiano', 'Developer', 'j.boggiano@seld.be', 'http://seld.be') ] assert list(phpcomposer.parse_person(test)) == expected + + def test_is_manifest_php_composer_json(self): + test_file = self.get_test_loc('phpcomposer/a-timer/composer.json') + assert phpcomposer.ComposerJson.is_manifest(test_file) + def test_parse_atimer(self): test_file = self.get_test_loc('phpcomposer/a-timer/composer.json') expected_loc = self.get_test_loc('phpcomposer/a-timer/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_framework(self): test_file = self.get_test_loc('phpcomposer/framework/composer.json') expected_loc = self.get_test_loc('phpcomposer/framework/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_slim(self): test_file = self.get_test_loc('phpcomposer/slim/composer.json') expected_loc = self.get_test_loc('phpcomposer/slim/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_modern(self): test_file = self.get_test_loc('phpcomposer/modern/composer.json') expected_loc = self.get_test_loc('phpcomposer/modern/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_fake_license1(self): test_file = self.get_test_loc('phpcomposer/fake/composer.json') expected_loc = self.get_test_loc('phpcomposer/fake/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_parse_fake_license2(self): test_file = self.get_test_loc('phpcomposer/fake2/composer.json') expected_loc = self.get_test_loc('phpcomposer/fake2/composer.json.expected') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerJson.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) + def test_is_manifest_php_composer_lock(self): + test_file = self.get_test_loc('phpcomposer/composer.lock') + assert phpcomposer.ComposerLock.is_manifest(test_file) + def test_parse_composer_lock(self): test_file = self.get_test_loc('phpcomposer/composer.lock') expected_loc = self.get_test_loc('phpcomposer/composer.lock-expected.json') - packages = phpcomposer.parse(test_file) + packages = phpcomposer.ComposerLock.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) diff --git a/tests/packagedcode/test_pubspec.py b/tests/packagedcode/test_pubspec.py index caf507a29f9..2d65d7cabb9 100644 --- a/tests/packagedcode/test_pubspec.py +++ b/tests/packagedcode/test_pubspec.py @@ -21,19 +21,33 @@ class TestPubspecDatadriven(PackageTester): test_data_dir = test_data_dir + def test_pubspec_lock_is_manifest(self): + test_file = self.get_test_loc('pubspec/locks/dart-pubspec.lock') + assert pubspec.PubspecLock.is_manifest(test_file) + + def test_pubspec_yaml_is_manifest(self): + test_file = self.get_test_loc('pubspec/specs/authors-pubspec.yaml') + assert pubspec.PubspecYaml.is_manifest(test_file) + def test_parse_lock(self): test_loc = self.get_test_loc('pubspec/mini-pubspec.lock') expected_loc = self.get_test_loc('pubspec/mini-pubspec.lock-expected.json', must_exist=False) - result = pubspec.parse_lock(test_loc).to_dict() - check_result_equals_expected_json(result, expected_loc, regen=False) + package_manifests = pubspec.PubspecLock.recognize(test_loc) + self.check_packages(package_manifests, expected_loc, regen=False) def pub_tester(location,): - return pubspec.parse_pub(location).to_dict() + manifests = [] + for package_manifest in pubspec.PubspecYaml.recognize(location): + manifests.append(package_manifest.to_dict()) + return manifests def lock_tester(location,): - return pubspec.parse_lock(location).to_dict() + manifests = [] + for package_manifest in pubspec.PubspecLock.recognize(location): + manifests.append(package_manifest.to_dict()) + return manifests build_tests( diff --git a/tests/packagedcode/test_pypi.py b/tests/packagedcode/test_pypi.py index 705d6833fa7..8fccfd3216b 100644 --- a/tests/packagedcode/test_pypi.py +++ b/tests/packagedcode/test_pypi.py @@ -11,6 +11,7 @@ import os from unittest.case import expectedFailure from unittest.case import skipIf +import dparse import pytest @@ -24,17 +25,21 @@ class TestPyPiDevelop(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_python_pkg_info_is_manifest(self): + test_file = self.get_test_loc('pypi/develop/scancode_toolkit.egg-info/PKG-INFO') + assert pypi.MetadataFile.is_manifest(test_file) + def test_develop_with_parse_metadata(self): test_file = self.get_test_loc('pypi/develop/scancode_toolkit.egg-info/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/develop/scancode_toolkit.egg-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_develop_with_parse(self): test_file = self.get_test_loc('pypi/develop/scancode_toolkit.egg-info/PKG-INFO') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/develop/scancode_toolkit.egg-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPyPiMetadata(PackageTester): @@ -42,67 +47,79 @@ class TestPyPiMetadata(PackageTester): def test_parse_metadata_format_v10(self): test_file = self.get_test_loc('pypi/metadata/v10/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/v10/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_format_v11(self): test_file = self.get_test_loc('pypi/metadata/v11/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/v11/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_format_v12(self): test_file = self.get_test_loc('pypi/metadata/v12/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/v12/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_format_v20(self): test_file = self.get_test_loc('pypi/metadata/v20/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/v20/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_format_v21(self): test_file = self.get_test_loc('pypi/metadata/v21/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/v21/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_pkg_dash_info_basic(self): test_file = self.get_test_loc('pypi/metadata/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/PKG-INFO-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) + + def test_python_metadata_is_manifest(self): + test_file = self.get_test_loc('pypi/metadata/METADATA') + assert pypi.MetadataFile.is_manifest(test_file) def test_parse_metadata_basic(self): test_file = self.get_test_loc('pypi/metadata/METADATA') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/metadata/METADATA-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPypiArchive(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_python_bdist_whl_is_manifest(self): + test_file = self.get_test_loc('pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl') + assert pypi.BinaryDistArchive.is_manifest(test_file) + + def test_python_bdist_egg_is_manifest(self): + test_file = self.get_test_loc('pypi/archive/commoncode-21.5.12-py3.9.egg') + assert pypi.BinaryDistArchive.is_manifest(test_file) + def test_parse_archive_with_wheelfile(self): test_file = self.get_test_loc('pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl') - package = pypi.parse_archive(test_file) + package = pypi.BinaryDistArchive.recognize(test_file) expected_loc = self.get_test_loc('pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_wheelfile(self): test_file = self.get_test_loc('pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl') - package = pypi.parse(test_file) + package = pypi.BinaryDistArchive.recognize(test_file) expected_loc = self.get_test_loc('pypi/archive/atomicwrites-1.2.1-py2.py3-none-any.whl-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_eggfile(self): test_file = self.get_test_loc('pypi/archive/commoncode-21.5.12-py3.9.egg') - package = pypi.parse(test_file) + package = pypi.BinaryDistArchive.recognize(test_file) expected_loc = self.get_test_loc('pypi/archive/commoncode-21.5.12-py3.9.egg-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPypiUnpackedWheel(PackageTester): @@ -110,51 +127,51 @@ class TestPypiUnpackedWheel(PackageTester): def test_parse_with_unpacked_wheel_meta_v20_1(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/Jinja2-2.10.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v20_2(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/python_mimeparse-1.6.0.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v20_3(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/toml-0.10.1.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v20_4(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.0/urllib3-1.26.4.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v21_1(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/haruka_bot-1.2.3.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v21_2(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/pip-20.2.2.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v21_3(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/plugincode-21.1.21.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_with_unpacked_wheel_meta_v21__with_sources(self): test_file = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info/METADATA') - package = pypi.parse(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_wheel/metadata-2.1/with_sources/anonapi-0.0.19.dist-info-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPypiUnpackedSdist(PackageTester): @@ -162,27 +179,27 @@ class TestPypiUnpackedSdist(PackageTester): def test_parse_metadata_unpacked_sdist_metadata_v10(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_unpacked_sdist_metadata_v10_subdir(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3/PyJPString.egg-info/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.0/PyJPString-0.0.3-subdir-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_with_name(self): test_file = self.get_test_loc('pypi/setup.py/with_name-setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/with_name-setup.py.expected.json', must_exist=False) - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_without_name(self): test_file = self.get_test_loc('pypi/setup.py/without_name-setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/without_name-setup.py.expected.json', must_exist=False) - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_get_setup_py_args_with_name(self): test_file = self.get_test_loc('pypi/setup.py/with_name-setup.py') @@ -198,85 +215,94 @@ def test_get_setup_py_args_without_name(self): def test_parse_metadata_unpacked_sdist_metadata_v11_1(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.1/python-mimeparse-1.6.0-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_unpacked_sdist_metadata_v11_2(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.1/pyup-django-0.4.0-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_unpacked_sdist_metadata_v12(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-1.2/anonapi-0.0.19-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_metadata_unpacked_sdist_metadata_v21(self): test_file = self.get_test_loc('pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12/PKG-INFO') - package = pypi.parse_metadata(test_file) + package = pypi.MetadataFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/unpacked_sdist/metadata-2.1/commoncode-21.5.12-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPyPiRequirements(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_python_requirements_is_manifest(self): + test_file = self.get_test_loc('pypi/requirements_txt/basic/requirements.txt') + assert pypi.RequirementsFile.is_manifest(test_file) + def test_parse_with_dparse_requirements(self): test_file = self.get_test_loc('pypi/requirements_txt/simple/requirements.txt') - dependencies = [d.to_dict() for d in pypi.parse_with_dparse(test_file)] + dependencies = [ + d.to_dict() + for d in pypi.parse_with_dparse( + location=test_file, dependency_type=dparse.filetypes.requirements_txt + ) + ] expected_loc = self.get_test_loc('pypi/requirements_txt/simple/output.expected.json') check_result_equals_expected_json(dependencies, expected_loc, regen=False) def test_parse_dependency_file_basic(self): test_file = self.get_test_loc('pypi/requirements_txt/basic/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/basic/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_pinned(self): test_file = self.get_test_loc('pypi/requirements_txt/pinned/sample-requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/pinned/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_dev(self): test_file = self.get_test_loc('pypi/requirements_txt/dev/requirements-dev.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/dev/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_requirements_in(self): test_file = self.get_test_loc('pypi/requirements_txt/requirements_in/requirements.in') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/requirements_in/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_eol_comment(self): test_file = self.get_test_loc('pypi/requirements_txt/eol_comment/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/eol_comment/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_complex(self): test_file = self.get_test_loc('pypi/requirements_txt/complex/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/complex/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_editable(self): test_file = self.get_test_loc('pypi/requirements_txt/editable/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/editable/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_double_extras(self): test_file = self.get_test_loc('pypi/requirements_txt/double_extras/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/double_extras/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) @expectedFailure def test_parse_dependency_file_repeated(self): @@ -284,63 +310,63 @@ def test_parse_dependency_file_repeated(self): # dependencies we should return only a single value which should be the # last one test_file = self.get_test_loc('pypi/requirements_txt/repeated/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/repeated/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_vcs_eggs(self): test_file = self.get_test_loc('pypi/requirements_txt/vcs_eggs/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/vcs_eggs/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_local_paths_and_files(self): test_file = self.get_test_loc('pypi/requirements_txt/local_paths_and_files/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/local_paths_and_files/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_urls_wth_checksums(self): test_file = self.get_test_loc('pypi/requirements_txt/urls_wth_checksums/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/urls_wth_checksums/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_mixed(self): test_file = self.get_test_loc('pypi/requirements_txt/mixed/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/mixed/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_comments_and_empties(self): test_file = self.get_test_loc('pypi/requirements_txt/comments_and_empties/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/comments_and_empties/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_many_specs(self): test_file = self.get_test_loc('pypi/requirements_txt/many_specs/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/many_specs/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_vcs_editable(self): test_file = self.get_test_loc('pypi/requirements_txt/vcs_editable/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/vcs_editable/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_vcs_extras_require(self): test_file = self.get_test_loc('pypi/requirements_txt/vcs_extras_require/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/vcs_extras_require/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_dependency_file_vcs_git(self): test_file = self.get_test_loc('pypi/requirements_txt/vcs-git/requirements.txt') - package = pypi.parse_dependency_file(test_file) + package = pypi.RequirementsFile.recognize(test_file) expected_loc = self.get_test_loc('pypi/requirements_txt/vcs-git/output.expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestPyPiPipfile(PackageTester): @@ -348,33 +374,33 @@ class TestPyPiPipfile(PackageTester): def test_pipfile_lock_sample1(self): test_file = self.get_test_loc('pypi/pipfile.lock/sample1/Pipfile.lock') - package = pypi.parse_pipfile_lock(test_file) + package = pypi.PipfileLock.recognize(test_file) expected_loc = self.get_test_loc('pypi/pipfile.lock/sample1/Pipfile.lock-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_pipfile_lock_sample2(self): test_file = self.get_test_loc('pypi/pipfile.lock/sample2/Pipfile.lock') - package = pypi.parse_pipfile_lock(test_file) + package = pypi.PipfileLock.recognize(test_file) expected_loc = self.get_test_loc('pypi/pipfile.lock/sample2/Pipfile.lock-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_pipfile_lock_sample3(self): test_file = self.get_test_loc('pypi/pipfile.lock/sample3/Pipfile.lock') - package = pypi.parse_pipfile_lock(test_file) + package = pypi.PipfileLock.recognize(test_file) expected_loc = self.get_test_loc('pypi/pipfile.lock/sample3/Pipfile.lock-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_pipfile_lock_sample4(self): test_file = self.get_test_loc('pypi/pipfile.lock/sample4/Pipfile.lock') - package = pypi.parse_pipfile_lock(test_file) + package = pypi.PipfileLock.recognize(test_file) expected_loc = self.get_test_loc('pypi/pipfile.lock/sample4/Pipfile.lock-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_pipfile_lock_sample5(self): test_file = self.get_test_loc('pypi/pipfile.lock/sample5/Pipfile.lock') - package = pypi.parse_pipfile_lock(test_file) + package = pypi.PipfileLock.recognize(test_file) expected_loc = self.get_test_loc('pypi/pipfile.lock/sample5/Pipfile.lock-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) class TestRequirementsFiletype(object): @@ -424,7 +450,7 @@ class TestSetupPyVersions(object): @pytest.mark.parametrize('test_loc, expected_loc', list(get_setup_py_test_files(test_data_dir))) def test_parse_setup_py_with_computed_versions(self, test_loc, expected_loc, regen=False): - package = pypi.parse_setup_py(test_loc) + package = pypi.SetupPy.recognize(test_loc) if package: results = package.to_dict() else: @@ -449,155 +475,155 @@ class TestPyPiSetupPy(PackageTester): @skipIf(on_windows, 'Somehow this fails on Windows') def test_parse_setup_py_arpy(self): test_file = self.get_test_loc('pypi/setup.py/arpy_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/arpy_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=True) @expectedFailure def test_parse_setup_py_pluggy(self): test_file = self.get_test_loc('pypi/setup.py/pluggy_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/pluggy_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) @expectedFailure def test_parse_setup_py_pygtrie(self): # this uses a kwargs dict test_file = self.get_test_loc('pypi/setup.py/pygtrie_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/pygtrie_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_basic(self): test_file = self.get_test_loc('pypi/setup.py/simple-setup.py') - package = pypi.parse(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_boolean2_py(self): test_file = self.get_test_loc('pypi/setup.py/boolean2_py_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/boolean2_py_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_container_check(self): test_file = self.get_test_loc('pypi/setup.py/container_check_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/container_check_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_fb303_py(self): test_file = self.get_test_loc('pypi/setup.py/fb303_py_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/fb303_py_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_frell_src(self): # setup.py is a temaplte with @vars test_file = self.get_test_loc('pypi/setup.py/frell_src_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/frell_src_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_gyp(self): test_file = self.get_test_loc('pypi/setup.py/gyp_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/gyp_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_interlap(self): test_file = self.get_test_loc('pypi/setup.py/interlap_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/interlap_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_mb(self): test_file = self.get_test_loc('pypi/setup.py/mb_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/mb_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_ntfs(self): test_file = self.get_test_loc('pypi/setup.py/ntfs_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/ntfs_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_nvchecker(self): test_file = self.get_test_loc('pypi/setup.py/nvchecker_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/nvchecker_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_oi_agents_common_code(self): test_file = self.get_test_loc('pypi/setup.py/oi_agents_common_code_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/oi_agents_common_code_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_packageurl_python(self): test_file = self.get_test_loc('pypi/setup.py/packageurl_python_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/packageurl_python_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_pipdeptree(self): test_file = self.get_test_loc('pypi/setup.py/pipdeptree_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/pipdeptree_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_pydep(self): test_file = self.get_test_loc('pypi/setup.py/pydep_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/pydep_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_pyrpm_2(self): test_file = self.get_test_loc('pypi/setup.py/pyrpm_2_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/pyrpm_2_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_python_publicsuffix(self): test_file = self.get_test_loc('pypi/setup.py/python_publicsuffix_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/python_publicsuffix_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_repology_py_libversion(self): test_file = self.get_test_loc('pypi/setup.py/repology_py_libversion_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/repology_py_libversion_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_saneyaml(self): test_file = self.get_test_loc('pypi/setup.py/saneyaml_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/saneyaml_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_setuppycheck(self): test_file = self.get_test_loc('pypi/setup.py/setuppycheck_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/setuppycheck_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_url_py(self): test_file = self.get_test_loc('pypi/setup.py/url_py_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/url_py_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_venv(self): test_file = self.get_test_loc('pypi/setup.py/venv_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/venv_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) def test_parse_setup_py_xmltodict(self): test_file = self.get_test_loc('pypi/setup.py/xmltodict_setup.py') - package = pypi.parse_setup_py(test_file) + package = pypi.SetupPy.recognize(test_file) expected_loc = self.get_test_loc('pypi/setup.py/xmltodict_setup.py-expected.json') - self.check_package(package, expected_loc, regen=False) + self.check_packages(package, expected_loc, regen=False) diff --git a/tests/packagedcode/test_readme.py b/tests/packagedcode/test_readme.py index 4d93209fb54..620b88a5666 100644 --- a/tests/packagedcode/test_readme.py +++ b/tests/packagedcode/test_readme.py @@ -17,91 +17,98 @@ class TestReadme(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_readme_facebook(self): + test_file = self.get_test_loc('readme/facebook/downloaded-from-as-download_url/README.facebook') + assert readme.ReadmeManifest.is_manifest(test_file) + def test_parse_facebook_downloaded_from_as_download_url(self): test_file = self.get_test_loc('readme/facebook/downloaded-from-as-download_url/README.facebook') expected_loc = self.get_test_loc('readme/facebook/downloaded-from-as-download_url/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_download_link_as_download_url(self): test_file = self.get_test_loc('readme/facebook/download-link-as-download_url/README.facebook') expected_loc = self.get_test_loc('readme/facebook/download-link-as-download_url/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_source_as_homepage_url(self): test_file = self.get_test_loc('readme/facebook/repo-as-homepage_url/README.facebook') expected_loc = self.get_test_loc('readme/facebook/repo-as-homepage_url/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_source_as_homepage_url(self): test_file = self.get_test_loc('readme/facebook/source-as-homepage_url/README.facebook') expected_loc = self.get_test_loc('readme/facebook/source-as-homepage_url/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_website_as_homepage_url(self): test_file = self.get_test_loc('readme/facebook/website-as-homepage_url/README.facebook') expected_loc = self.get_test_loc('readme/facebook/website-as-homepage_url/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_project_as_name(self): test_file = self.get_test_loc('readme/facebook/project-as-name/README.facebook') expected_loc = self.get_test_loc('readme/facebook/project-as-name/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_missing_type(self): test_file = self.get_test_loc('readme/facebook/missing-type/README.facebook') expected_loc = self.get_test_loc('readme/facebook/missing-type/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_capitalized_filename(self): test_file = self.get_test_loc('readme/facebook/capital-filename/README.FACEBOOK') expected_loc = self.get_test_loc('readme/facebook/capital-filename/README.FACEBOOK.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_use_parent_dir_name_as_package_name_if_no_package_name_detected(self): test_file = self.get_test_loc('readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook') expected_loc = self.get_test_loc('readme/facebook/use-parent-dir-name-as-package-name/setuptools/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_thirdparty_basic(self): test_file = self.get_test_loc('readme/thirdparty/basic/README.thirdparty') expected_loc = self.get_test_loc('readme/thirdparty/basic/README.thirdparty.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) + + def test_is_manifest_readme_google(self): + test_file = self.get_test_loc('readme/google/basic/README.google') + assert readme.ReadmeManifest.is_manifest(test_file) def test_parse_google_basic(self): test_file = self.get_test_loc('readme/google/basic/README.google') expected_loc = self.get_test_loc('readme/google/basic/README.google.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_facebook_basic(self): test_file = self.get_test_loc('readme/facebook/basic/README.facebook') expected_loc = self.get_test_loc('readme/facebook/basic/README.facebook.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_chromium_basic(self): test_file = self.get_test_loc('readme/chromium/basic/README.chromium') expected_loc = self.get_test_loc('readme/chromium/basic/README.chromium.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) def test_parse_android_basic(self): test_file = self.get_test_loc('readme/android/basic/README.android') expected_loc = self.get_test_loc('readme/android/basic/README.android.expected') - package = readme.parse(test_file) - self.check_package(package, expected_loc, regen=False) + package = readme.ReadmeManifest.recognize(test_file) + self.check_packages(package, expected_loc, regen=False) - def test_parse_invalid_readme(self): + def test_is_manifest_not_readme(self): test_file = self.get_test_loc('readme/invalid/invalid_file') - package = readme.parse(test_file) - assert package == None + assert not readme.ReadmeManifest.is_manifest(test_file) diff --git a/tests/packagedcode/test_recognize.py b/tests/packagedcode/test_recognize.py index 43c1272bb2c..7e11e3e91ba 100644 --- a/tests/packagedcode/test_recognize.py +++ b/tests/packagedcode/test_recognize.py @@ -85,14 +85,6 @@ def test_recognize_package_manifests_does_not_recognize_plain_tarball(self): packages = recognize_package_manifests(test_file) assert not packages - def test_recognize_cpan_manifest_as_plain_package(self): - test_file = self.get_test_loc('cpan/MANIFEST') - try: - recognize_package_manifests(test_file) - self.fail('Exception not raised') - except NotImplementedError: - pass - def test_recognize_maven_dot_pom(self): test_file = self.get_test_loc('m2/aspectj/aspectjrt/1.5.3/aspectjrt-1.5.3.pom') packages = recognize_package_manifests(test_file) @@ -133,7 +125,7 @@ def test_recognize_composer(self): test_file = self.get_test_loc('recon/composer.json') packages = recognize_package_manifests(test_file) assert packages - assert isinstance(packages[0], phpcomposer.PHPComposerPackage) + assert isinstance(packages[0], phpcomposer.PhpComposerPackage) def test_recognize_haxe(self): test_file = self.get_test_loc('recon/haxelib.json') @@ -165,7 +157,6 @@ def test_recognize_bower(self): assert packages assert isinstance(packages[0], bower.BowerPackage) - @expectedFailure def test_recognize_cpan(self): test_file = self.get_test_loc('cpan/MANIFEST') packages = recognize_package_manifests(test_file) diff --git a/tests/packagedcode/test_rpm.py b/tests/packagedcode/test_rpm.py index f98f2cfa61d..59adf3eea42 100644 --- a/tests/packagedcode/test_rpm.py +++ b/tests/packagedcode/test_rpm.py @@ -21,7 +21,9 @@ class TestRpmBasics(FileBasedTesting): def test_parse_to_package(self): test_file = self.get_test_loc('rpm/header/libproxy-bin-0.3.0-4.el6_3.x86_64.rpm') - package = rpm.parse(test_file) + for package_manifest in rpm.RpmManifest.recognize(test_file): + break + expected = [ ('type', 'rpm'), ('namespace', None), @@ -67,7 +69,7 @@ def test_parse_to_package(self): ('repository_download_url', None), ('api_data_url', None), ] - assert list(package.to_dict().items()) == expected + assert list(package_manifest.to_dict().items()) == expected def test_pyrpm_basic(self): test_file = self.get_test_loc('rpm/header/python-glc-0.7.1-1.src.rpm') @@ -126,10 +128,13 @@ def test_get_rpm_tags_(self): expected = expected._replace(description=None) assert rpm.get_rpm_tags(test_file, include_desc=False) == expected - def test_packagedcode_rpm_tags_and_info_on_non_rpm_file(self): + def test_rpm_is_manifest_non_rpm_file(self): test_file = self.get_test_loc('rpm/README.txt') - assert not rpm.get_rpm_tags(test_file, include_desc=True) - assert not rpm.get_rpm_tags(test_file, include_desc=False) + assert not rpm.RpmManifest.is_manifest(test_file) + + def test_rpm_is_manifest_rpm_file(self): + test_file = self.get_test_loc('rpm/header/python-glc-0.7.1-1.src.rpm') + assert rpm.RpmManifest.is_manifest(test_file) def check_json(result, expected_file, regen=False): diff --git a/tests/packagedcode/test_rubygems.py b/tests/packagedcode/test_rubygems.py index cd09356e1e2..c88a1c14243 100644 --- a/tests/packagedcode/test_rubygems.py +++ b/tests/packagedcode/test_rubygems.py @@ -25,66 +25,72 @@ # this is a multiple personality package (Java and Ruby) # see also https://rubygems.org/downloads/jaro_winkler-1.5.1-java.gem -class TestRubyGemspec(PackageTester): +class TestGemSpec(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_ruby_gemspec(self): + test_file = self.get_test_loc('rubygems/gemspec/address_standardization.gemspec') + assert rubygems.GemSpec.is_manifest(test_file) + def test_rubygems_can_parse_gemspec_address_standardization_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/address_standardization.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/address_standardization.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_can_parse_gemspec_arel_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/arel.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/arel.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_cat_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/cat.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/cat.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_github_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/github.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/github.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_mecab_ruby_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/mecab-ruby.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/mecab-ruby.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_oj_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/oj.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/oj.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_rubocop_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/rubocop.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/rubocop.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) def test_rubygems_with_variables_gemspec(self): test_file = self.get_test_loc('rubygems/gemspec/with_variables.gemspec') expected_loc = self.get_test_loc('rubygems/gemspec/with_variables.gemspec.expected.json') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemSpec.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) class TestRubyGemMetadata(FileBasedTesting): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_ruby_archive_extracted(self): + test_file = self.get_test_loc('rubygems/metadata/metadata.gz-extract') + assert rubygems.GemArchiveExtracted.is_manifest(test_file) + def test_build_rubygem_package_does_not_crash(self): test_file = self.get_test_loc('rubygems/metadata/metadata.gz-extract') - with open(test_file) as tf: - metadata = saneyaml.load(tf.read()) - rubygems.build_rubygem_package(metadata) + rubygems.GemArchiveExtracted.recognize(test_file) def relative_walk(dir_path, extension='.gem'): @@ -109,7 +115,8 @@ def create_test_function(test_loc, test_name, regen=False): def check_rubygem(self): loc = self.get_test_loc(test_loc) expected_json_loc = loc + '.json' - package = rubygems.get_gem_package(location=loc) + packages = list(rubygems.GemArchive.recognize(location=loc)) + package = packages[0] package.license_expression = package.compute_normalized_license() package = [package.to_dict()] if regen: @@ -148,13 +155,17 @@ def build_tests(test_dir, clazz, prefix='test_rubygems_parse_', regen=False): setattr(clazz, test_name, test_method) -class TestRubyGemfileLock(PackageTester): +class TestGemfileLock(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_is_manifest_ruby_gemfilelock(self): + test_file = self.get_test_loc('rubygems/gemfile-lock/Gemfile.lock') + assert rubygems.GemfileLock.is_manifest(test_file) + def test_ruby_gemfile_lock_as_dict(self): test_file = self.get_test_loc('rubygems/gemfile-lock/Gemfile.lock') expected_loc = self.get_test_loc('rubygems/gemfile-lock/Gemfile.lock.expected') - packages = rubygems.RubyGem.recognize(test_file) + packages = rubygems.GemfileLock.recognize(test_file) self.check_packages(packages, expected_loc, regen=False) diff --git a/tests/packagedcode/test_win_pe.py b/tests/packagedcode/test_win_pe.py index 37e4d77ba1e..2234e16389a 100644 --- a/tests/packagedcode/test_win_pe.py +++ b/tests/packagedcode/test_win_pe.py @@ -35,6 +35,10 @@ def check_win_pe(self, test_file, regen=False): assert result == expected + def test_gosum_is_manifest(self): + test_file = self.get_test_loc('win_pe/_ctypes_test.pyd') + assert win_pe.WindowsExecutableManifest.is_manifest(test_file) + def test_win_pe_ctypes_test_pyd(self): test_file = self.get_test_loc('win_pe/_ctypes_test.pyd') self.check_win_pe(test_file, regen=False) @@ -102,4 +106,7 @@ class TestWinPeParseToPackage(TestWinPePeInfo): expected_file_suffix = '.package-expected.json' def get_results(self, test_file): - return win_pe.parse(test_file).to_dict() + package_manifests = [] + for manifest in win_pe.WindowsExecutableManifest.recognize(test_file): + package_manifests.append(manifest.to_dict()) + return package_manifests diff --git a/tests/packagedcode/test_windows.py b/tests/packagedcode/test_windows.py index 19212f2ab80..a9c5ef8a70f 100644 --- a/tests/packagedcode/test_windows.py +++ b/tests/packagedcode/test_windows.py @@ -9,7 +9,7 @@ import os -from packagedcode.windows import parse +from packagedcode import windows from packages_test_utils import PackageTester @@ -17,8 +17,12 @@ class TestWindows(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + def test_gosum_is_manifest(self): + test_file = self.get_test_loc('windows/mum/test.mum') + assert windows.MicrosoftUpdateManifest.is_manifest(test_file) + def test_windows_mum_parse(self): test_file = self.get_test_loc('windows/mum/test.mum') expected_loc = self.get_test_loc('windows/mum/test.mum.expected') - package = parse(test_file) - self.check_package(package, expected_loc, regen=False) + package_manifests = windows.MicrosoftUpdateManifest.recognize(test_file) + self.check_packages(package_manifests, expected_loc, regen=False)