Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Add wheels building for all platforms #7

Merged
merged 37 commits into from Nov 24, 2017
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9c51a57
add multibuild tools
menshikh-iv Nov 23, 2017
45f4b78
add scripts for win
menshikh-iv Nov 23, 2017
069f1f8
add initial windows config
menshikh-iv Nov 23, 2017
9bbcad3
fix typo
menshikh-iv Nov 23, 2017
f1c708e
use last commit
menshikh-iv Nov 23, 2017
561811b
add missing dependencies
menshikh-iv Nov 23, 2017
deede57
try to make sure that we test wheel
menshikh-iv Nov 23, 2017
5581ce5
try to add artifacts
menshikh-iv Nov 23, 2017
66c0a43
fix typo
menshikh-iv Nov 23, 2017
8419612
make external dir + pytest options
menshikh-iv Nov 23, 2017
9af740d
add email notifications
menshikh-iv Nov 23, 2017
0e8684a
save old travis version
menshikh-iv Nov 23, 2017
4eb8437
try to avoid non-wheel installation
menshikh-iv Nov 23, 2017
9b7e139
add basic travis
menshikh-iv Nov 23, 2017
a04219d
add config.sh
menshikh-iv Nov 23, 2017
cb74048
empty function
menshikh-iv Nov 23, 2017
3cecaae
moar test deps + preparation for wheel uploading
menshikh-iv Nov 23, 2017
e0f0612
prepare to publish wheels with windows
menshikh-iv Nov 23, 2017
153d37e
remove terryfy
menshikh-iv Nov 23, 2017
87c7392
add smart_open + fast_fail
menshikh-iv Nov 23, 2017
e9981b5
disable verbosity
menshikh-iv Nov 23, 2017
c437827
move tf/keras to optional deps, for x64 only
menshikh-iv Nov 23, 2017
005f3b4
try to fix dist
menshikh-iv Nov 23, 2017
b46098d
remove useless cache / etc
menshikh-iv Nov 23, 2017
0b78990
update gensim to last dev commit
menshikh-iv Nov 23, 2017
027cd20
fix condition for tf/keras
menshikh-iv Nov 23, 2017
40f9b2e
enable verbosity
menshikh-iv Nov 23, 2017
d54b84e
install annoy only for linux
menshikh-iv Nov 23, 2017
616d43a
try to add correct dist path
menshikh-iv Nov 23, 2017
6ce1a19
use relative path to dist
menshikh-iv Nov 23, 2017
bed0e6e
remove old travis configuration
menshikh-iv Nov 24, 2017
84ffd3e
add rackspace upload
menshikh-iv Nov 24, 2017
934db10
upd appveyor
menshikh-iv Nov 24, 2017
1c703cb
add unicode builds
menshikh-iv Nov 24, 2017
e079db2
remove python installation
menshikh-iv Nov 24, 2017
42be28f
replace link to host with scipy wheels
menshikh-iv Nov 24, 2017
32d102c
remove python install script for win
menshikh-iv Nov 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
@@ -1,6 +1,6 @@
[submodule "terryfy"]
path = terryfy
url = https://github.com/MacPython/terryfy.git
[submodule "gensim"]
path = gensim
url = https://github.com/piskvorky/gensim.git
[submodule "multibuild"]
path = multibuild
url = https://github.com/matthew-brett/multibuild.git
140 changes: 97 additions & 43 deletions .travis.yml
@@ -1,46 +1,100 @@
language:
- objective-c
os: osx
osx_image: xcode8.1
env:
global:
- REPO_DIR=gensim
#- BUILD_COMMIT=latest-tag # comment out to build version in submodule
matrix:
# 2.7, 3.5 and 3.6
# can't download - VERSION=2.6.8
- VERSION=2.7.12
- VERSION=3.5.2
- VERSION=3.6.0
global:
- REPO_DIR=gensim
- BUILD_COMMIT=1980109764f67513ef9740d39f2763aba6519ba2
- BUILD_DEPENDS="numpy==1.11.3 scipy==0.18.1 six smart_open"
- TEST_DEPENDS="pytest pytest-rerunfailures cython pyemd testfixtures scikit-learn Morfessor==2.0.2a4"

- WHEELHOUSE_UPLOADER_USERNAME="Lev.Konstantinovskiy"
# generated by 'gem install travis; travis encrypt -r MacPython/gensim-wheels WHEELHOUSE_UPLOADER_SECRET=<the api key>'
- secure: "L99GHXSsHwj2P+lfJPTeLCIDMpRomj8yhhH2TuFJ9wP36rkVtewpy6ExVey/jae1dwMaRyoMbdXZwbMTNs0cUuvDvniBwQM8PRNxy3VdOxLNVGFbCtj6+/iOl6rxok6TPkhwlrhzQy2hq9vyZjeNsFZCkGiTFm7Idgd1dWUPDeBowR3X6ucIFK7fR5qDgNfFVVBUPKMmGOyvLy1nUB9FV7mdAK8VQCrIKk5BMVcovAsnYBgUF2eAMemgeFUtHMF9KbpXPRgjPyMZfdKhjIvqz5qbOGDhbrTn5sD1oPWx0IkA5gVazlng8EeyasiRg87br2TxknHLHHP8TEiVnj0wTJ7yYQK6zAwz6RM1ZFOQ1JI0YY4kgw1TRZpTqelehlvQYtHiwDxJXQfb/Nt2dxC0cJPjs5NMMrQKWyP5yHRP/RX4CKSRMF/48pF2kROg1gkc+i68mKKrPpckq0QXEzxTJwjuLLFq4Nos4JAQhs+3rxm4yFExpgdkfbtutRv3/I/HNW9il/aQltGgih65KCYkkJx6uFfENQnXnvLMoR16vJ94RghCKh4cnC6w4h4HRjVZgm34FZ00fe9Z30H/5FKb1/VoGm0edz56o5zOvdKEpzxoGS3wI5IrVGCh348heUFRzjxLNmWtkpOJgm3b9FZgb6h72cflq5NwbgeQtF4ld+U="


language: python
# The travis Python version is unrelated to the version we build and test
# with. This is set with the MB_PYTHON_VERSION variable.
python: 3.5
sudo: required
dist: trusty
services: docker

matrix:
exclude:
# Exclude the default Python 3.5 build
- python: 3.5
include:

# Linux
- os: linux
env:
- MB_PYTHON_VERSION=2.7
- PLAT=x86_64

- os: linux
env:
- MB_PYTHON_VERSION=2.7
- PLAT=i686

- os: linux
env:
- MB_PYTHON_VERSION=3.5
- PLAT=x86_64

- os: linux
env:
- MB_PYTHON_VERSION=3.5
- PLAT=i686

- os: linux
env:
- MB_PYTHON_VERSION=3.6
- PLAT=x86_64

- os: linux
env:
- MB_PYTHON_VERSION=3.6
- PLAT=i686

# MacOS
- os: osx
language: generic
env:
- MB_PYTHON_VERSION=2.7

- os: osx
language: generic
env:
- MB_PYTHON_VERSION=3.5

- os: osx
language: generic
env:
- MB_PYTHON_VERSION=3.6


before_install:
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install

install:
- source terryfy/travis_tools.sh
- get_python_environment macpython $VERSION venv
- pip install numpy scipy sklearn
- pip install -U cython wheel six
- if [ -n "$BUILD_COMMIT" ]; then
checkout_commit $REPO_DIR $BUILD_COMMIT;
fi
- cd $REPO_DIR
- python setup.py bdist_wheel
- rename_wheels dist
- pip install dist/*.whl
- cd ..
- clean_code $REPO_DIR $BUILD_COMMIT
- build_wheel $REPO_DIR $PLAT

script:
# - if [ "${VERSION:0:3}" != "3.3" ]; then pip install -U numpy; fi
- pip install nose pyemd testfixtures unittest2 morfessor==2.0.2a4 sklearn

- mkdir tmp_for_test
- cd tmp_for_test
# make sure we test the wheel
- nosetests --exe -v gensim
# setup.py doesn't test wheel, just the local files: - python ../setup.py test
- cd ..
before_deploy: cd $REPO_DIR/dist
deploy:
provider: cloudfiles
username: travis-worker
api_key:
secure: "lZW7U67gVsceiI+Ofi2n+X3BRyou8D/ul5BuJK0OBtt4aiccKzrUAb8vraHy6ED0l1t/j3GWfrg8jaP9G9BRGIfoDQROJ5w+BZ/pTL0p+OnJrqZkNNiG82qvEOSmlVrE+afl2YMeLKDou+uX1wuXp6xYaN9W/lJJW0qskS6D/aiPY7KwagFWv+QsUF07SpomMBiZ/EE4FsMJBhg9q7sUg/tG4mbiTgZY2jGx+R2u5ktq3zPr6MIzIqz+7vswMR/BTg2WJTDvxQTMpWGYihi3vOxX9ty0vIUKti0zHIcj6B8RYgiDoAC6P2OUtk2J1qHiyvAooi9Vm+WkPnxQqF+8EOXkbajvsuniwPwenmy6xYh7fmNxs4huxFb3H8FYC6qI1256cMXd9CssFCroeLuQoUa7sn1X+cmb2IjrE1mOyboIF6iQ5M31xcQBUzIuauONnx4xz58ASovYDfHc1RkhatBtaW2nKhjiti6uvs8kVgok/dzoGOExRblbN1IjpjmCvhDQh6WQryMupoUmjJWjIsgs1MfaMaT7jW8AM1as5beHoEJiB445KJTBIb61BHxyfXcneuUJrRmlM7F8Tw56Gpilwl7hE/ufd3teabJDdxV0J18r4Rq/HI8N5vh4YFvV3h+p4drEnZYPHV3narMj8nGnud65qXAFfp0e25cLY3c="
region: ORD
container: wheels
skip_cleanup: true
- install_run $PLAT

after_success:
- pip install wheelhouse-uploader
- echo ${TRAVIS_BUILD_DIR}/wheelhouse/
- ls -laht ${TRAVIS_BUILD_DIR}/wheelhouse/
# This uploads the wheels to a Rackspace container owned by the
# scikit-learn team, available at http://wheels.scipy.org. See above
# for information on using this account or choosing another.
- python -m wheelhouse_uploader upload --local-folder ${TRAVIS_BUILD_DIR}/wheelhouse/ --no-ssl-check gensim-wheels

notifications:
email:
- ivan+gensimwheels@rare-technologies.com
on_success: always
on_failure: always
98 changes: 98 additions & 0 deletions appveyor.yml
@@ -0,0 +1,98 @@
environment:
global:
BUILD_COMMIT: 1980109764f67513ef9740d39f2763aba6519ba2
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C ..\\appveyor\\run_with_env.cmd"
WHEELHOUSE_UPLOADER_USERNAME: "Lev.Konstantinovskiy"
WHEELHOUSE_UPLOADER_SECRET:
secure: qXqY3dFmLOqvxa3Om2gQi/BjotTOK+EP2IPLolBNo0c61yDtNWxbmE4wH3up72Be

matrix:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.12"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.12"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.2"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.2"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "64"


matrix:
fast_finish: true


install:
# Install Python (from the official .msi of http://python.org) and pip when
# not already installed.
- "powershell ./appveyor/install.ps1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you don't need this - Python should already be installed for the all versions you need.

- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "python -m pip install -U pip setuptools wheel wheelhouse_uploader"

# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- "git submodule update --init --recursive"
- "cd gensim"
- "git checkout %BUILD_COMMIT%"
- "git clean -fxd"
- "git reset --hard"


# Install the build and runtime dependencies of the project.
- "%CMD_IN_ENV% pip install --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com --find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/ numpy==1.11.3 scipy==0.18.1 smart_open pytest pytest-rerunfailures cython pyemd testfixtures scikit-learn Morfessor==2.0.2a4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use normal pip / pypi for these wheels? You'd need to start at scipy 1.0 but otherwise, as far as I know, you'd be alright.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, we need to test with 0.18.1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you test that on travis / linux + OSX, and test scipy 1.0 on Windows?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do need these packages, probably better to use the https address : https://8003f898b26602186ccc-7b1aad3fab3cc330e1fd9d109892382a.ssl.cf2.rackcdn.com

- "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst"
- ps: "ls dist"

# Install the generated wheel package to test it
- "pip install --pre --no-index --force-reinstall --find-links dist/ gensim"


build: false


test_script:
# Change to a non-source folder to make sure we run the tests on the
# installed library.
- "cd .."
- "mkdir empty_folder"
- "cd empty_folder"
- "pytest -rfxEXs --durations=20 --showlocals --rerun 3 --pyargs gensim"
- "cd ../gensim/dist"
- "ls"


artifacts:
# Archive the generated wheel package in the ci.appveyor.com build report.
- path: "gensim\\dist\\*"


on_success:
# Upload the generated wheel package to Rackspace
# On Windows, Apache Libcloud cannot find a standard CA cert bundle so we
# disable the ssl checks.
- "python -m wheelhouse_uploader upload --no-ssl-check --local-folder=. gensim-wheels"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to add the container name - in this case (for a release) wheels.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But gensim-wheels is container name, or I missed something?



notifications:
- provider: Email
to: ivan+gensimwheels@rare-technologies.com
on_build_success: true
on_build_failure: true