Skip to content
148 changes: 83 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,113 @@
version: 2
version: 2.1

commands:
mac_install_python:
parameters:
python_version:
description: "version of python to install"
type: string
default: 3.6.5
steps:
- run: |
brew update
python --version
sudo -H pip install --upgrade virtualenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install << parameters.python_version >>
pyenv versions
pyenv global << parameters.python_version >>
python --version

install_run_tests:
steps:
- run: |
python setup.py install
python -m pip install pytest
- run: pytest

jobs:
python_3_6_5:
mac_python_3_6:
shell: /bin/bash --login
macos:
xcode: '9.4.1'
steps:
- checkout
- run: |
brew update
python --version
sudo -H pip install --upgrade virtualenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install 3.6.5
pyenv versions
pyenv global 3.6.5
python --version
- run: python setup.py install
- run: python setup.py test
- mac_install_python:
python_version: "3.6.5"
- install_run_tests

python_3_7_10:

mac_python_3_7:
shell: /bin/bash --login
macos:
xcode: '9.4.1'
steps:
- checkout
- run: |
brew update
python --version
sudo -H pip install --upgrade virtualenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install 3.7.10
pyenv versions
pyenv global 3.7.10
python --version
- run: python setup.py install
- run: python setup.py test
- mac_install_python:
python_version: "3.7.10"
- install_run_tests


python_3_8_10:
mac_python_3_8:
shell: /bin/bash --login
macos:
xcode: '9.4.1'
steps:
- checkout
- run: |
brew update
python --version
sudo -H pip install --upgrade virtualenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install 3.8.10
pyenv versions
pyenv global 3.8.10
python --version
- run: python setup.py install
- run: python setup.py test
- mac_install_python:
python_version: "3.8.10"
- install_run_tests

python_3_9_5:
mac_python_3_9:
shell: /bin/bash --login
macos:
xcode: '9.4.1'
steps:
- checkout
- run: |
brew update
python --version
sudo -H pip install --upgrade virtualenv
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
pyenv install 3.9.5
pyenv versions
pyenv global 3.9.5
python --version
- run: python setup.py install
- run: python setup.py test
- mac_install_python:
python_version: "3.9.5"
- install_run_tests

linux_python_3_6:
docker:
- image: python:3.6
steps:
- checkout
- install_run_tests

linux_python_3_7:
docker:
- image: python:3.7
steps:
- checkout
- install_run_tests

linux_python_3_8:
docker:
- image: python:3.8
steps:
- checkout
- install_run_tests

linux_python_3_9:
docker:
- image: python:3.9
steps:
- checkout
- install_run_tests

workflows:
version: 2
python_matrix_build:
jobs:
- python_3_6_5
- python_3_7_10
- python_3_8_10
- python_3_9_5
- mac_python_3_6
- mac_python_3_7
- mac_python_3_8
- mac_python_3_9
- linux_python_3_6
- linux_python_3_7
- linux_python_3_8
- linux_python_3_9
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ environment:
install:
- "%PYTHON_EXE% --version"
- "%PYTHON_EXE% setup.py install"
- "%PYTHON_EXE% -m pip install pytest"

build: off

test_script:
- "%PYTHON_EXE% setup.py test"
- "%PYTHON_EXE% -m pytest"
4 changes: 0 additions & 4 deletions examples/parse_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# Parses an RDF file and prints out some basic information.
# Usage: parse_rdf.py <rdffile>
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals


def parse_RDF(file):
import spdx.file as spdxfile
Expand Down
4 changes: 0 additions & 4 deletions examples/parse_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# Parses a tag/value file and prints out some basic information.
# Usage: parse_tv.py <tagvaluefile>
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals


def parse_TAG(file):
from spdx.parsers.tagvalue import Parser
Expand Down
4 changes: 0 additions & 4 deletions examples/pp_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# Parses a tag/value file and writes it out pretty-printed.
# Usage: pp_tv <infile> <outfile>
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

if __name__ == "__main__":
import sys
import codecs
Expand Down
4 changes: 0 additions & 4 deletions examples/rdf_to_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# Converts an RDF file to tag/value format.
# Usage: rdf_to_tv <rdffile> <tagvaluefile>
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals


def RDF_to_TAG(infile_name, outfile_name):
# if __name__ == "__main__":
Expand Down
4 changes: 0 additions & 4 deletions examples/write_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

# Writes a new tag/value file from scratch.
# Usage: write_tv <tagvaluefile>
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

if __name__ == "__main__":
import sys
import codecs
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ def test_suite():
'ply',
'pyparsing<=1.5.7;python_version<="2.8"',
'rdflib',
'six',
'enum34',
'Click',
'pyyaml',
'xmltodict',
],
python_requires='>=2.7',
python_requires='>=3.6',
entry_points={
'console_scripts': [
'convertor = spdx.cli_tools.convertor:main',
'parser = spdx.cli_tools.parser:main',
'generate_notice_file = spdx.cli_tools.generate_notice_file:main',
],
},

Expand All @@ -56,6 +56,9 @@ def test_suite():
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.7'
'Programming Language :: Python :: 3.6'
'Programming Language :: Python :: 3.7'
'Programming Language :: Python :: 3.8'
'Programming Language :: Python :: 3.9'
]
)
4 changes: 0 additions & 4 deletions spdx/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

from datetime import datetime
from functools import total_ordering

Expand Down
4 changes: 0 additions & 4 deletions spdx/checksum.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals


class Algorithm(object):
"""Generic checksum algorithm."""
Expand Down
4 changes: 0 additions & 4 deletions spdx/cli_tools/convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import os
from examples.rdf_to_json import RDF_to_JSON
from examples.rdf_to_tv import RDF_to_TAG
Expand Down
4 changes: 0 additions & 4 deletions spdx/cli_tools/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import os
from examples.parse_json import parse_JSON
from examples.parse_rdf import parse_RDF
Expand Down
4 changes: 0 additions & 4 deletions spdx/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import codecs
import json
import os
Expand Down
4 changes: 0 additions & 4 deletions spdx/creationinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

from datetime import datetime
from functools import total_ordering

Expand Down
4 changes: 0 additions & 4 deletions spdx/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

import warnings

from functools import total_ordering
Expand Down
8 changes: 1 addition & 7 deletions spdx/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals

from functools import total_ordering
import hashlib

import six

from spdx import checksum
from spdx import document
from spdx import utils
Expand Down Expand Up @@ -121,7 +115,7 @@ def validate_spdx_id(self, messages):
def validate_copyright(self, messages):
if not isinstance(
self.copyright,
(six.string_types, six.text_type, utils.NoAssert, utils.SPDXNone),
(str, utils.NoAssert, utils.SPDXNone),
):
messages = messages + [
"File copyright must be str or unicode or "
Expand Down
Loading