Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 36 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
# This deliberately is not "python" as a work-around to support
# multi-os builds with custom Python versions in Travis CI.
language: cpp

os:
- osx
- linux
language: generic

env:
matrix:
- PYTHON_EXE="`pyenv install -s 2.7.13 && pyenv local 2.7.13`"
- PYTHON_EXE="`pyenv install -s 3.5.3 && pyenv local 3.5.3`"
- PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`"
- PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`"


# Travis does not offer OSX with arbitrary python versions (like 2.7.13 above)
# So, you cannot simply have the following section in your build matrix:
# os:
# - linux
# - osx
# Instead, you have to include OSX entries into the build matrix manually.
# In particular, this means specifying the environment variables again.

# The following was adapted from here:
# https://docs.travis-ci.com/user/multi-os/
# Set `language: generic` to clear `language: python` from above
# Set `python:` (to empty) to clear it from the travis-ci web interface
# Set `osx_image: xcode7.3` to pin OSX version see here:
# https://docs.travis-ci.com/user/osx-ci-environment/

matrix:
include:
- os: osx
language: generic
python:
osx_image: xcode7.3
env: PYTHON_EXE="`pyenv install -s 2.7.14 && pyenv local 2.7.14`"
- os: osx
language: generic
python:
osx_image: xcode7.3
env: PYTHON_EXE="`pyenv install -s 3.6.1 && pyenv local 3.6.1`"


install:
- pyenv install --list
- echo $PYTHON_EXE
- python --version
- ./configure

before_script:
- bin/pip install aboutcode-toolkit
- bin/about-code check --show-all .
- bin/about-code check --verbose .

script:
- "bin/py.test -vvs"
Expand All @@ -32,4 +56,4 @@ notifications:
use_notice: true
skip_join: true
template:
- "%{repository_slug}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} : %{build_url}"
- "%{repository_slug}#%{build_number} (%{branch}-%{commit}:%{author})-%{message}- %{build_url}"
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ And expression can be simplified:

>>> expression2 = ' GPL-2.0 or (mit and LGPL 2.1) or bsd Or GPL-2.0 or (mit and LGPL 2.1)'
>>> parsed2 = licensing.parse(expression2)
>>> str(parsed2)
'GPL-2.0 OR (mit AND LGPL 2.1) OR BSD OR GPL-2.0 OR (mit AND LGPL 2.1)'
>>> assert str(parsed2.simplify()) == 'BSD OR GPL-2.0 OR (LGPL 2.1 AND mit)'

Two expressions can be compared for equivalence and containment:
Expand Down
12 changes: 5 additions & 7 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ CONF_DEFAULT="etc/conf/dev"

CFG_CMD_LINE_ARGS="$@"

if [ "$1" == "--init" ]; then
CFG_CMD_LINE_ARGS=$CONF_INIT
fi

if [ "$1" == "" ]; then
if [[ "$1" == "" ]]; then
# default for dev conf if not argument is provided
CFG_CMD_LINE_ARGS=$CONF_DEFAULT
fi

if [ "$PYTHON_EXE" == "" ]; then
CONFIGURE_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ "$PYTHON_EXE" == "" ]]; then
PYTHON_EXE=python
fi

$PYTHON_EXE etc/configure.py $CFG_CMD_LINE_ARGS
$PYTHON_EXE "$CONFIGURE_ROOT_DIR/etc/configure.py" $CFG_CMD_LINE_ARGS
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='license-expression',
version='0.98',
version='0.99',
license='apache-2.0',
description=desc,
long_description=desc,
Expand All @@ -30,7 +30,7 @@
include_package_data=True,
zip_safe=False,
classifiers=[
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
Expand All @@ -48,6 +48,6 @@
'licence'
],
install_requires=[
'boolean.py >= 3.5, < 4.0.0',
'boolean.py >= 3.6, < 4.0.0',
]
)
Loading