diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 00d6e5ab..15e48de3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,7 +5,7 @@ on: - develop - release/** - hotfix/** - - feat/dev-583-remove-set-env-in-github-actions + - feat/dev-2469-fix-github-action tags: - "*" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b38c8d84..9d94f23f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,12 +8,17 @@ include: - templates/common/python.yaml tox: + variables: + BASE_CONTAINER_VERSION: 1.2.0 parallel: matrix: - BUILD_PY_VERSION: - - python3.6 - - python3.7 + - python35 + - python36 + - python37 script: + # for python3.5 apt install libffi-dev + - apt-get update && apt-get install libffi-dev - tox -r -e py diff --git a/.travis.yml b/.travis.yml index 8264f73d..53eaeacf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,8 @@ -language: generic - -sudo: false - -before_install: - - unset PYENV_ROOT - - rm -rf ~/.pyenv - - curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - - export PATH="$HOME/.pyenv/bin:$PATH" - -install: - - virtualenv venv - - source venv/bin/activate - - pip install tox-travis tox-pyenv - - pyenv install 3.5.7 - - pyenv install 3.6.9 - - pyenv install 3.7.5 - -script: - - pyenv local 3.5.7 3.6.9 3.7.5 - - tox -e py35,py36,py37 - -after_script: - - tox -e coverage +language: python +python: + - "3.5" + - "3.6" + - "3.7" + +install: pip install tox-travis +script: tox diff --git a/bin/package b/bin/package index 2bce6639..3052814d 100755 --- a/bin/package +++ b/bin/package @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -e +set -euox pipefail function cleanup() { # get rid of the virtualenv @@ -69,8 +69,8 @@ esac # setup.py is in previous dir cd .. -python -m pip install -r requirements.txt -python setup.py install +python -m pip install --no-deps -r requirements.txt +python -m pip install --no-deps . # go back go the ./gdc_client/bin dir cd bin @@ -78,7 +78,7 @@ cd bin echo "Building for ${TARGET_ENVIRONMENT}..." # Make sure the correct version of pyinstaller and setuptools are installed -pip install -U "PyInstaller==3.5" +pip install -U "PyInstaller>=4.10" # Ran into ModuleNotFoundError: No module named 'pkg_resources.py2_warn' with higher versions of setuptools pip install --upgrade 'setuptools<45.0.0' @@ -96,6 +96,7 @@ pyinstaller \ --additional-hooks-dir=. \ --noconfirm \ --onefile \ + --copy-metadata gdc-client \ -c gdc-client echo "Testing produced binary..." @@ -106,7 +107,7 @@ echo "Zipping binary..." cd dist PRE_ZIP_NAME="gdc-client_${VERSION}_${TARGET_ENVIRONMENT}_x64" -if [ -n "${DATE}" ]; then +if [ -n "${DATE+x}" ]; then PRE_ZIP_NAME="gdc-client_${VERSION}_${DATE}_${TARGET_ENVIRONMENT}_x64" fi diff --git a/dev-requirements.txt b/dev-requirements.txt index 293e51ee..f5149cc2 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.6 # To update, run: # # pip-compile dev-requirements.in @@ -14,12 +14,12 @@ aws-sam-translator==1.11.0 # cfn-lint aws-xray-sdk==2.11.0 # via moto +boto==2.49.0 + # via moto boto3==1.16.63 # via # aws-sam-translator # moto -boto==2.49.0 - # via moto botocore==1.19.63 # via # aws-xray-sdk @@ -68,8 +68,9 @@ idna==2.8 # -c requirements.txt # moto # requests -importlib-metadata==2.1.3 +importlib-metadata==2.1.3 ; python_version < "3.8" # via + # -c requirements.txt # pluggy # pytest itsdangerous==1.1.0 @@ -107,8 +108,6 @@ moto==1.3.16 # via -r dev-requirements.in packaging==20.9 # via pytest -pathlib2==2.3.7.post1 - # via pytest pluggy==0.13.1 # via pytest py==1.11.0 @@ -124,12 +123,12 @@ pycparser==2.21 # cffi pyparsing==2.4.7 # via packaging -pytest-cov==2.7.1 - # via -r dev-requirements.in pytest==4.6.2 # via # -r dev-requirements.in # pytest-cov +pytest-cov==2.7.1 + # via -r dev-requirements.in python-dateutil==2.8.2 # via # botocore @@ -145,8 +144,6 @@ pyyaml==5.3.1 # -c requirements.txt # cfn-lint # moto -requests-mock==1.5.2 - # via -r dev-requirements.in requests==2.22.0 # via # -c requirements.txt @@ -156,6 +153,8 @@ requests==2.22.0 # moto # requests-mock # responses +requests-mock==1.5.2 + # via -r dev-requirements.in responses==0.17.0 # via moto rsa==4.7.2 @@ -172,7 +171,6 @@ six==1.16.0 # ecdsa # mock # moto - # pathlib2 # pytest # python-dateutil # python-jose @@ -201,6 +199,7 @@ xmltodict==0.13.0 # via moto zipp==1.2.0 # via + # -c requirements.txt # importlib-metadata # moto diff --git a/requirements.txt b/requirements.txt index 92e0db53..5900016c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.6 # To update, run: # # pip-compile @@ -12,36 +12,38 @@ chardet==3.0.4 # via requests cryptography==2.8 # via - # gdc_client (setup.py) + # gdc-client (setup.py) # pyopenssl idna==2.8 # via requests +importlib-metadata==2.1.3 ; python_version < "3.8" + # via gdc-client (setup.py) intervaltree==3.0.2 - # via gdc_client (setup.py) + # via gdc-client (setup.py) jsonschema==2.6.0 - # via gdc_client (setup.py) + # via gdc-client (setup.py) lxml==4.4.2 - # via gdc_client (setup.py) + # via gdc-client (setup.py) ndg-httpsclient==0.5.0 - # via gdc_client (setup.py) + # via gdc-client (setup.py) progressbar2==3.43.1 - # via gdc_client (setup.py) + # via gdc-client (setup.py) pyasn1==0.4.3 # via - # gdc_client (setup.py) + # gdc-client (setup.py) # ndg-httpsclient pycparser==2.21 # via cffi pyopenssl==18.0.0 # via - # gdc_client (setup.py) + # gdc-client (setup.py) # ndg-httpsclient python-utils==2.7.1 # via progressbar2 pyyaml==5.3.1 - # via gdc_client (setup.py) + # via gdc-client (setup.py) requests==2.22.0 - # via gdc_client (setup.py) + # via gdc-client (setup.py) six==1.16.0 # via # cryptography @@ -51,6 +53,10 @@ six==1.16.0 sortedcontainers==2.4.0 # via intervaltree termcolor==1.1.0 - # via gdc_client (setup.py) + # via gdc-client (setup.py) urllib3==1.25.11 # via requests +zipp==1.2.0 + # via + # gdc-client (setup.py) + # importlib-metadata diff --git a/setup.py b/setup.py index 1454119f..4fe111e0 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,15 @@ use_scm_version={ "local_scheme": "dirty-tag", }, + classifiers=[ + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + ], + python_requires=">=3.5", setup_requires=["setuptools_scm<6"], packages=find_packages(), package_data={}, @@ -18,9 +27,10 @@ "pyOpenSSL~=18.0.0", "PyYAML>=5.1", "intervaltree~=3.0.2", - "importlib_metadata; python_version<'3.8'", + "importlib_metadata<=2.1.3; python_version<'3.8'", # 2.1.3 last support for py35 "termcolor~=1.1.0", "requests~=2.22.0", "progressbar2~=3.43.1", + "zipp<2", # zipp < 2 for python3.5 ], ) diff --git a/tox.ini b/tox.ini index 24a722eb..d4ca7611 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py35,py36 +envlist=py35,py36,py37 [testenv] setenv=