Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python2 targets!! #85

Merged
merged 29 commits into from
Nov 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b6f68e7
Compile python package based on version
Oct 23, 2016
77e7273
Merge kroisse's commit
Kroisse Sep 17, 2016
54bffa7
Make can be built
kanghyojun Oct 24, 2016
90c72f2
Move python verison specific codes
kanghyojun Oct 24, 2016
0c6d933
Move python related test in python file
kanghyojun Nov 3, 2016
bac4a31
Rename pythontest.sh to test.sh
kanghyojun Nov 14, 2016
e815e08
Use QuasiQuote instead of cons&snoc combi
kanghyojun Nov 14, 2016
c83b779
typing._type_repr contain module's name
kanghyojun Nov 14, 2016
55c8fde
Show proper typehints
kanghyojun Nov 14, 2016
34684f0
Implement __ne__ for python2
kanghyojun Nov 14, 2016
59ab5a9
Remove useless space
kanghyojun Nov 14, 2016
2dc854b
Install python2 if version lower than 3
kanghyojun Nov 14, 2016
91a9465
Don't call __eq__ in __ne__
kanghyojun Nov 14, 2016
f1a1162
Show representation properly
kanghyojun Nov 14, 2016
a755504
stash
kanghyojun Nov 14, 2016
5b6f5b2
Use qualified import
kanghyojun Nov 23, 2016
9be2dce
Refactor sourceDirectory
kanghyojun Nov 23, 2016
8466a27
Rename emptyContext to empty
kanghyojun Nov 23, 2016
4e9683e
Ignore pyc & tox
kanghyojun Nov 23, 2016
6046984
Use typeReprCompiler
kanghyojun Nov 23, 2016
a974eca
Change missing return type annotation
kanghyojun Nov 23, 2016
de2ba5b
Test with tox
kanghyojun Nov 23, 2016
be43955
Install nirum python runtime from git
kanghyojun Nov 23, 2016
6ffa991
Fix generated Python package to include both src and src-py2
dahlia Nov 23, 2016
3c118b5
Fix appveyor & travis
dahlia Nov 23, 2016
b30d5ff
Package generate MANIFEST.in as well
kanghyojun Nov 23, 2016
3ddda68
Tap deadsnakes for python34,35
kanghyojun Nov 23, 2016
f82b787
Test metadata with pytest
kanghyojun Nov 23, 2016
a6e7346
Install tox on AppVeyor CI
kanghyojun Nov 23, 2016
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
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.*.swp
.cabal-sandbox
.git

__pycache__
.stack-work
cabal.sandbox.config
dist
*.pyc

.tox
*.egg-info
33 changes: 10 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
language: c
matrix:
include:
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-08-15 PY=3.5
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-10-10
os: osx
osx_image: xcode7.3
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-08-15 PY=3.4
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-10-10
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-8.0.1, python3.4, libgmp10, upx-ucl]
- env: GHCVER=8.0.1 RESOLVER=nightly-2016-08-15 PY=3.5
addons:
apt:
sources: [hvr-ghc, deadsnakes]
packages: [ghc-8.0.1, python3.5, libgmp10, upx-ucl]
packages: [ghc-8.0.1, python2.7, python3.4, python3.5, libgmp10, upx-ucl]
cache:
directories:
- "$HOME/.stack"
- "$HOME/.pyvenv"
- "$HOME/.ghc"
before_install:
- mkdir -p "$HOME/.local/bin"
Expand All @@ -32,32 +26,26 @@ before_install:
- |
if [[ "$TRAVIS_OS_NAME" = "osx" ]]
then
# always using Brew's latest Python3
brew update
brew install python3 || brew upgrade python3 || true
brew tap drolando/deadsnakes
brew install python34 python3 || brew upgrade python34 python35 || true
fi
- curl -o "$HOME/.local/bin/travis_long" -L https://raw.githubusercontent.com/futurice/fum2github/master/travis_long
- chmod +x "$HOME/.local/bin/travis_long"
install:
- |
if [[ "$TRAVIS_OS_NAME" = "osx" ]]
then
pip3 install --user virtualenv
if [[ ! -f "$HOME/.pyvenv/bin/activate" ]]; then pyvenv "$HOME/.pyvenv"; fi
if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
pip3 install --user --upgrade tox pip setuptools
else
pip install --user virtualenv
if [[ ! -f "$HOME/.pyvenv/bin/activate" ]]; then virtualenv -p "$(which python$PY)" "$HOME/.pyvenv"; fi
pip install --user --upgrade tox pip setuptools
fi
- '"$HOME/.pyvenv/bin/pip" install --upgrade pip setuptools'
- '"$HOME/.pyvenv/bin/pip" install --upgrade git+git://github.com/spoqa/nirum-python.git'
- if [[ "$PY" = "3.4" ]]; then "$HOME/.pyvenv/bin/pip" install --upgrade typing; fi # FIXME
- 'sed -E "s/resolver\s*:\s*.*/resolver: $RESOLVER/" stack.yaml > stack-new.yaml'
- mv stack-new.yaml stack.yaml
- travis_long stack --no-terminal setup
- travis_long stack --no-terminal install scan
script:
- source "$HOME/.pyvenv/bin/activate" && stack --no-terminal test
- stack --no-terminal test
- ./lint.sh
- ./test.sh
before_deploy:
- stack build --no-terminal --copy-bins
- mkdir -p /tmp/nirum-build
Expand All @@ -79,7 +67,6 @@ deploy:
local_dir: /tmp/nirum-build
on:
branch: master
condition: '"$GHCVER" = "8.0.1" && "$PY" = "3.5"'
upload-dir: travis-builds
acl: public_read
bucket: nightly-builds.nirum.org
Expand Down
11 changes: 5 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ install:
}
$env:PATH = $env:STACK_ROOT + ';C:\msys64\usr\bin;' + $env:PATH;
- if not exist "%LOCALAPPDATA%\Programs\stack" ( stack --no-terminal --skip-msys setup )
- C:\Python35\python -m venv C:\pyvenv
- >
C:\pyvenv\Scripts\Activate.bat &
python -m pip install --upgrade setuptools pip &
pip install --upgrade git+git://github.com/spoqa/nirum-python.git
- C:\Python35\python -m pip install --upgrade tox pip setuptools
build_script:
- stack --no-terminal build --copy-bins
after_build:
Expand All @@ -42,7 +38,10 @@ after_build:
- ps: ls
- ps: upx.exe -9 nirum-win-${env:PLATFORM}.exe
test_script:
- C:\pyvenv\Scripts\Activate.bat & stack test
- stack test
# FIXME: duplicate code with test.sh
- stack exec -- nirum -o nirum_fixture test/nirum_fixture
- C:\Python35\Scripts\tox
artifacts:
- path: nirum-win-x86.exe
- path: nirum-win-x64.exe
Loading