Skip to content

Commit

Permalink
Merge pull request #31 from nexB/make-distro-work
Browse files Browse the repository at this point in the history
Make distro work
  • Loading branch information
pombredanne authored Jun 5, 2021
2 parents 4871738 + 1a43d81 commit 5bd7600
Show file tree
Hide file tree
Showing 22 changed files with 375 additions and 227 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"

# Scripts to run at install stage
install: ./configure --dev

# Scripts to run at script stage
script: tmp/bin/pytest
script: tmp/bin/pytest -vvs -n2
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Changelog
=========

v21.6.4
--------

This is a minor release with bug fixes and minor API changes.

API changes
~~~~~~~~~~~

The Distro.from_rootfs() now works as expected. It can handle empty location
and works correctly with a base_distro. When a base_distro is provided it
will raise an Exception if the found Distro.os does not match the base Distro.os


v21.5.25
--------

Expand Down
3 changes: 2 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Copyright (c) nexB Inc. and others.
# SPDX-License-Identifier: Apache-2.0
#
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
# Visit https://aboutcode.org and https://github.com/nexB/container-inspector
# for support and download.
# ScanCode is a trademark of nexB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ Related tools
-------------
- Fetching Image from remote registry is available in ScanCode.io
- Extracting VM Image filesystems as archives is available in ExtractCode
- Scanning for application and system packages is available in ScanCode Toolkit

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[build-system]
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 4"]
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 6"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# this is used populated when creating a git archive
# and when there is .git dir and/or there is no git installed
fallback_version = "v9999.$Format:%h-%cs$"
fallback_version = "9999.$Format:%h-%cs$"

[tool.pytest.ini_options]
norecursedirs = [
Expand Down
4 changes: 0 additions & 4 deletions requirements_dev.txt

This file was deleted.

9 changes: 6 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
license_files =
license_files =
apache-2.0.LICENSE
NOTICE
README.rst
Expand All @@ -10,7 +10,7 @@ author_email = info@aboutcode.org
license = Apache-2.0

# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
description = Docker, containers, rootfs and virtual machinesrelated utilities.
description = Docker, containers, rootfs and virtual machine related software composition analysis (SCA) utilities.
long_description = file:README.rst
url = https://github.com/nexB/container-inspector
classifiers =
Expand Down Expand Up @@ -55,11 +55,14 @@ testing =
# upstream
pytest >= 6
pytest-xdist >= 2
twine
restview

docs=
Sphinx>=3.3.1
sphinx-rtd-theme>=0.5.0
doc8>=0.8.1


[aliases]
release = register clean --all sdist bdist_wheel
release = clean --all sdist bdist_wheel
15 changes: 5 additions & 10 deletions src/container_inspector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# Copyright (c) nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/container-inspector/
#
# This software is licensed under the Apache License version 2.0.#
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/container-inspector for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
# You may not use this software except in compliance with the License.
# You may obtain a copy of the License at:
# http://apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import re

Expand Down
28 changes: 12 additions & 16 deletions src/container_inspector/cli.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
# Copyright (c) nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/container-inspector/
#
# This software is licensed under the Apache License version 2.0.#
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/container-inspector for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
# You may not use this software except in compliance with the License.
# You may obtain a copy of the License at:
# http://apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

import csv as csv_module
import json as json_module
import logging
import os
from os import path
import sys
import tempfile
import csv as csv_module
import json as json_module
from os import path

import click

from container_inspector import image
from container_inspector import dockerfile
from container_inspector import rootfs

TRACE = False
logger = logging.getLogger(__name__)
# un-comment these lines to enable logging
# logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
# logger.setLevel(logging.DEBUG)
if TRACE:
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
logger.setLevel(logging.DEBUG)


@click.command()
Expand Down
Loading

0 comments on commit 5bd7600

Please sign in to comment.