Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9dff54a
Create junction from Scripts to bin
chinyeungli Jun 17, 2021
b735a3f
Merge pull request #26 from nexB/windows-junction
pombredanne Jun 17, 2021
77ce5e4
Check for deps in local thirdparty directory #31
JonoYang Aug 31, 2021
fa13562
Merge pull request #32 from nexB/install-from-thirdparty-dir
JonoYang Aug 31, 2021
1bcaaa5
Enforce use of requirements.txt #34
JonoYang Sep 1, 2021
e9067c8
Add scripts from scancode-toolkit/etc/release/ #33
JonoYang Sep 2, 2021
0e1f56b
Normalize license in load_pkginfo_data #33
JonoYang Sep 2, 2021
288532d
Add --init option to configure #33
JonoYang Sep 2, 2021
a5ae4f3
Update README.rst #33
JonoYang Sep 2, 2021
593e237
Use venv as virtual environment directory name #37
JonoYang Sep 3, 2021
9342bc1
Update configure.bat #33
JonoYang Sep 3, 2021
45e4a2a
Add placeholder requirements.txt files #33
JonoYang Sep 3, 2021
944fbae
Handle multiple options in configure #33
JonoYang Sep 3, 2021
3532b22
Fix path to aboutcode in utils_thirdparty.py #33
JonoYang Sep 4, 2021
9c78ddb
Update release notes in README.rst
JonoYang Sep 4, 2021
ebcfb93
Handle ExpressionParseError #33
JonoYang Sep 4, 2021
6ab9c10
Update README.rst
pombredanne Sep 7, 2021
bfdc6ff
Address review comments #33
JonoYang Sep 7, 2021
8583d7f
Merge pull request #39 from nexB/update-skeleton
JonoYang Sep 8, 2021
71d8dad
Update READMEs
JonoYang Sep 8, 2021
d3b8524
Merge pull request #40 from nexB/add-scripts-readme
JonoYang Sep 8, 2021
d2bafb9
Fixed #41 - Handled encoding issue when generating ABOUT files
chinyeungli Sep 15, 2021
c41196a
Merge pull request #42 from nexB/41_fix_encoding_error
chinyeungli Oct 4, 2021
5671563
Treat text files as text
pombredanne Oct 5, 2021
14f6a2d
Add helper to publish files in GH releases
pombredanne Oct 5, 2021
1a2a144
Add code to use curl if wget is not installed
chinyeungli Oct 6, 2021
7aa7d4c
Do not issue warning if thirdparty dir is missing
pombredanne Oct 8, 2021
51d0c5c
Merge pull request #45 from nexB/open-as-text
pombredanne Oct 11, 2021
b46d84f
Handle as_text correctly in cache
pombredanne Oct 11, 2021
255a898
Handle as_text correctly in cache
pombredanne Oct 11, 2021
7b76f4a
Merge origin/as_text-cache
pombredanne Oct 15, 2021
3a5307c
Merge pull request #47 from nexB/as_text-cache
pombredanne Oct 15, 2021
e5833d1
Add support for Python 3.10
pombredanne Oct 18, 2021
de336a6
Remove unused variable
pombredanne Oct 22, 2021
e5c9bac
Return correct type for directories
pombredanne Oct 22, 2021
2bd54cc
Merge latest skeleton
pombredanne Oct 22, 2021
50e0929
Add generated requirements
pombredanne Oct 22, 2021
1878da2
Improve testing
pombredanne Oct 23, 2021
cc7ac67
Format code
pombredanne Oct 23, 2021
c7c865e
Add arg to configure number of layer path segments
pombredanne Oct 23, 2021
b726730
Improve docker module documentation
pombredanne Oct 26, 2021
6244889
Format code
pombredanne Oct 26, 2021
9317714
Do not run CI on Ubuntu 16.
pombredanne Oct 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/Lib
/pip-selfcheck.json
/tmp
/venv
.Python
/include
/Include
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ python:
install: ./configure --dev

# Scripts to run at script stage
script: tmp/bin/pytest -vvs -n2
script: venv/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
=========


v30.0.0
--------

This is a minor release with bug fixes and minor updates.

- Switched back to semver from calver like other AboutCode projects.
- Adopted the latest skeleton. With this the virtualenv is created under venv.
- Add new "layer_path_segments" argument to image.Image.to_dict() to allow
to report the Layer extracted locations as trimmed paths keeping only this
many trailing path segments.


v21.6.10
--------

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Quick start

- Only runs on POSIX OSes
- Get Python 3.6+
- Check out a clone or download of container-inspector, then run: `./configure`.
- Then run `tmp/bin/container-inspector -h` for help.
- Check out a clone or download of container-inspector, then run: `./configure --dev`.
- Then run `env/bin/container-inspector -h` for help.


Container image formats
Expand Down
16 changes: 4 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,34 @@

jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu16_cpython
image_name: ubuntu-16.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu18_cpython
image_name: ubuntu-18.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1014_cpython
image_name: macos-10.14
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs
48 changes: 34 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
#set -x

################################
# A configuration script to set things up:
# A configuration script to set things up:
# create a virtualenv and install or update thirdparty packages.
# Source this script for initial configuration
# Use configure --help for details
Expand All @@ -26,16 +26,16 @@ CLI_ARGS=$1
################################

# Requirement arguments passed to pip and used by default or with --dev.
REQUIREMENTS="--editable ."
DEV_REQUIREMENTS="--editable .[testing]"
REQUIREMENTS="--editable . --constraint requirements.txt"
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"

# where we create a virtualenv
VIRTUALENV_DIR=tmp
VIRTUALENV_DIR=venv

# Cleanable files and directories with the --clean option
CLEANABLE="
build
tmp"
venv"

# extra arguments passed to pip
PIP_EXTRA_ARGS=" "
Expand All @@ -50,9 +50,15 @@ VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin

# Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
if [ -f "$CFG_ROOT_DIR/thirdparty" ]; then
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty "
fi
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS --find-links https://thirdparty.aboutcode.org/pypi"


################################
# Set the quiet flag to empty if not defined
# Set the quiet flag to empty if not defined
if [[ "$CFG_QUIET" == "" ]]; then
CFG_QUIET=" "
fi
Expand All @@ -63,7 +69,7 @@ fi
# Use environment variables or a file if available.
# Otherwise the latest Python by default.
if [[ "$PYTHON_EXECUTABLE" == "" ]]; then
# check for a file named PYTHON_EXECUTABLE
# check for a file named PYTHON_EXECUTABLE
if [ -f "$CFG_ROOT_DIR/PYTHON_EXECUTABLE" ]; then
PYTHON_EXECUTABLE=$(cat "$CFG_ROOT_DIR/PYTHON_EXECUTABLE")
else
Expand All @@ -78,10 +84,14 @@ cli_help() {
echo " usage: ./configure [options]"
echo
echo The default is to configure for regular use. Use --dev for development.
echo Use the --init option if starting a new project and the project
echo dependencies are not available on thirdparty.aboutcode.org/pypi/
echo and requirements.txt and/or requirements-dev.txt has not been generated.
echo
echo The options are:
echo " --clean: clean built and installed files and exit."
echo " --dev: configure the environment for development."
echo " --init: pull dependencies from PyPI. Used when first setting up a project."
echo " --help: display this help message and exit."
echo
echo By default, the python interpreter version found in the path is used.
Expand Down Expand Up @@ -120,7 +130,7 @@ create_virtualenv() {
VIRTUALENV_PYZ="$CFG_ROOT_DIR/etc/thirdparty/virtualenv.pyz"
else
VIRTUALENV_PYZ="$CFG_ROOT_DIR/$VENV_DIR/virtualenv.pyz"
wget -O "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL"
wget -O "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL" 2>/dev/null || curl -o "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL"
fi

$PYTHON_EXECUTABLE "$VIRTUALENV_PYZ" \
Expand Down Expand Up @@ -155,12 +165,22 @@ install_packages() {
# Main command line entry point
CFG_DEV_MODE=0
CFG_REQUIREMENTS=$REQUIREMENTS

case "$CLI_ARGS" in
--help) cli_help;;
--clean) clean;;
--dev) CFG_REQUIREMENTS="$DEV_REQUIREMENTS" && CFG_DEV_MODE=1;;
esac
NO_INDEX="--no-index"

# We are using getopts to parse option arguments that start with "-"
while getopts :-: optchar; do
case "${optchar}" in
-)
case "${OPTARG}" in
help ) cli_help;;
clean ) clean;;
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS" && CFG_DEV_MODE=1;;
init ) NO_INDEX="";;
esac;;
esac
done

PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS $NO_INDEX"

create_virtualenv "$VIRTUALENV_DIR"
install_packages "$CFG_REQUIREMENTS"
Expand Down
Loading