Skip to content

Commit

Permalink
Feature/travis multiple os (#4)
Browse files Browse the repository at this point in the history
Version 1.0.2 - Add windows to os list
  • Loading branch information
kebu authored Jul 9, 2020
1 parent 909b3c6 commit 5ce86f2
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 9 deletions.
66 changes: 59 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,64 @@
language: python
os: linux
cache: pip
python:
- '3.6'
- '3.7'
- '3.8'
install: "pip install -r requirements.txt"

matrix:
include:
- name: "Python 3.6.8 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.6.8
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- choco uninstall -y mingw
- choco upgrade --no-progress -y msys2
- export msys2='cmd //C RefreshEnv.cmd '
- export msys2+='& set MSYS=winsymlinks:nativestrict '
- export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
- export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
- export msys2+=" -msys2 -c "\"\$@"\" --"
- $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain
- export PATH=/C/tools/msys64/mingw64/bin:$PATH
- export MAKE=mingw32-make # so that Autotools can find it
- $msys2 pacman -S mingw-w64-x86_64-gtk3 --noconfirm
env: PATH=/c/Python36:/c/Python36/Scripts:$PATH
- name: "Python 3.7.4 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.7.4
- python --version
- python -m pip install --upgrade pip
- pip3 install --upgrade pytest
- choco uninstall -y mingw
- choco upgrade --no-progress -y msys2
- export msys2='cmd //C RefreshEnv.cmd '
- export msys2+='& set MSYS=winsymlinks:nativestrict '
- export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
- export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
- export msys2+=" -msys2 -c "\"\$@"\" --"
- $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain
- export PATH=/C/tools/msys64/mingw64/bin:$PATH
- export MAKE=mingw32-make # so that Autotools can find it
- $msys2 pacman -S mingw-w64-x86_64-gtk3 --noconfirm
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
- os: linux
python: 3.6
- os: linux
python: 3.7
- os: linux
python: 3.8
- os: linux
python: pypy3

before_install:
- python --version
- pip install -U pip
- pip install -U pytest
install:
- pip install -r requirements.txt
script: "pytest test.py"

deploy:
provider: pypi
user: "__token__"
Expand Down
2 changes: 1 addition & 1 deletion py_avataaars/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def __unique_id(prefix: str = None) -> str:

@staticmethod
def __template_path(path: str, enum_type: AvatarEnum) -> str:
return str(pathlib.Path(path).joinpath(f"{enum_type.name.lower()}.svg"))
return str(pathlib.PurePosixPath(path).joinpath(f"{enum_type.name.lower()}.svg"))

@staticmethod
def __template_name(context):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='py-avataaars',
version='1.0.1',
version='1.0.2',
license='MIT',
description='Python Avatar generator library',
long_description=long_description,
Expand Down

0 comments on commit 5ce86f2

Please sign in to comment.