Skip to content

Commit 5bd7600

Browse files
authored
Merge pull request #31 from nexB/make-distro-work
Make distro work
2 parents 4871738 + 1a43d81 commit 5bd7600

22 files changed

+375
-227
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ python:
1313
- "3.6"
1414
- "3.7"
1515
- "3.8"
16+
- "3.9"
1617

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

2021
# Scripts to run at script stage
21-
script: tmp/bin/pytest
22+
script: tmp/bin/pytest -vvs -n2

CHANGELOG.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
Changelog
22
=========
33

4+
v21.6.4
5+
--------
6+
7+
This is a minor release with bug fixes and minor API changes.
8+
9+
API changes
10+
~~~~~~~~~~~
11+
12+
The Distro.from_rootfs() now works as expected. It can handle empty location
13+
and works correctly with a base_distro. When a base_distro is provided it
14+
will raise an Exception if the found Distro.os does not match the base Distro.os
15+
16+
417
v21.5.25
518
--------
619

NOTICE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Copyright (c) nexB Inc. and others.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
5+
# Visit https://aboutcode.org and https://github.com/nexB/container-inspector
6+
# for support and download.
67
# ScanCode is a trademark of nexB Inc.
78
#
89
# Licensed under the Apache License, Version 2.0 (the "License");

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ Related tools
7777
-------------
7878
- Fetching Image from remote registry is available in ScanCode.io
7979
- Extracting VM Image filesystems as archives is available in ExtractCode
80+
- Scanning for application and system packages is available in ScanCode Toolkit
8081

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[build-system]
2-
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 4"]
2+
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 6"]
33
build-backend = "setuptools.build_meta"
44

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

1010
[tool.pytest.ini_options]
1111
norecursedirs = [

requirements_dev.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

setup.cfg

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[metadata]
2-
license_files =
2+
license_files =
33
apache-2.0.LICENSE
44
NOTICE
55
README.rst
@@ -10,7 +10,7 @@ author_email = [email protected]
1010
license = Apache-2.0
1111

1212
# description must be on ONE line https://github.com/pypa/setuptools/issues/1390
13-
description = Docker, containers, rootfs and virtual machinesrelated utilities.
13+
description = Docker, containers, rootfs and virtual machine related software composition analysis (SCA) utilities.
1414
long_description = file:README.rst
1515
url = https://github.com/nexB/container-inspector
1616
classifiers =
@@ -55,11 +55,14 @@ testing =
5555
# upstream
5656
pytest >= 6
5757
pytest-xdist >= 2
58+
twine
59+
restview
60+
5861
docs=
5962
Sphinx>=3.3.1
6063
sphinx-rtd-theme>=0.5.0
6164
doc8>=0.8.1
6265

6366

6467
[aliases]
65-
release = register clean --all sdist bdist_wheel
68+
release = clean --all sdist bdist_wheel

src/container_inspector/__init__.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
# Copyright (c) nexB Inc. and others. All rights reserved.
2-
# http://nexb.com and https://github.com/nexB/container-inspector/
31
#
4-
# This software is licensed under the Apache License version 2.0.#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5+
# See https://github.com/nexB/container-inspector for support or download.
6+
# See https://aboutcode.org for more information about nexB OSS projects.
57
#
6-
# You may not use this software except in compliance with the License.
7-
# You may obtain a copy of the License at:
8-
# http://apache.org/licenses/LICENSE-2.0
9-
# Unless required by applicable law or agreed to in writing, software distributed
10-
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11-
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
12-
# specific language governing permissions and limitations under the License.
138

149
import re
1510

src/container_inspector/cli.py

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

14-
import csv as csv_module
15-
import json as json_module
169
import logging
1710
import os
18-
from os import path
1911
import sys
2012
import tempfile
13+
import csv as csv_module
14+
import json as json_module
15+
from os import path
2116

2217
import click
2318

2419
from container_inspector import image
2520
from container_inspector import dockerfile
2621
from container_inspector import rootfs
2722

23+
TRACE = False
2824
logger = logging.getLogger(__name__)
29-
# un-comment these lines to enable logging
30-
# logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
31-
# logger.setLevel(logging.DEBUG)
25+
if TRACE:
26+
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
27+
logger.setLevel(logging.DEBUG)
3228

3329

3430
@click.command()

0 commit comments

Comments
 (0)