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

[WIP] : QISKIT installer based on setuptools and Cython #412

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ test/python/*.tex
out/*

# CMake generates this file on the fly
setup.py
qiskit/backends/qasm_simulator_cpp

src/qasm-simulator-cpp/test/qubit_vector_tests

*.o
.DS_Store
*.cpp
230 changes: 57 additions & 173 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,178 +1,62 @@
# Copyright 2017 IBM RESEARCH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# =============================================================================

notifications:
email: false

cache: pip
sudo: false
dist: trusty
language: python

###############################################################################
# Anchored and aliased definitions.
###############################################################################

# These are used for avoiding repeating code, and due to problems with
# overriding some keys (in particular, "os" and "language: ptyhon") when using
# the standard travis matrix with stages.
#
# This allows re-using different "sets" of configurations in the stages
# matrix, mimicking a hierarchy:
# * stage_generic
# * stage_linux
# * stage_linux_no_compile
# * stage_osx

stage_generic: &stage_generic
install:
# Install step for jobs that require compilation and qa.
- pip install -U -r requirements.txt
- pip install -U -r requirements-dev.txt
# Create the basic cmake structure, setting out/ as the default dir.
- mkdir out && cd out && cmake $CMAKE_FLAGS ..
script:
# Compile the executables and run the tests.
- make && ARGS="-V" make test

stage_linux: &stage_linux
<<: *stage_generic
os: linux
dist: trusty
language: python
python: 3.5
env: CMAKE_FLAGS="-D CMAKE_CXX_COMPILER=g++-5 -D ENABLE_TARGETS_QA=False"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- liblapack-dev
- libblas-dev
- g++-5

stage_osx: &stage_osx
<<: *stage_generic
os: osx
osx_image: xcode9.2
language: generic
env: CMAKE_FLAGS="-D CMAKE_CXX_COMPILER=g++-6 -D ENABLE_TARGETS_QA=False"
before_install:
# Travis does not provide support for Python 3 under osx - it needs to be
# installed manually.
|
if [ ${TRAVIS_OS_NAME} = "osx" ]; then
brew upgrade python3
brew install gcc@6
brew link --overwrite gcc@6
virtualenv env -p python3
source env/bin/activate
fi

stage_linux_no_compile: &stage_linux_no_compile
<<: *stage_linux
addons: false
env: CMAKE_FLAGS="-D ENABLE_TARGETS_NON_PYTHON=False"


# Other aliases: for convenience, keeping the "jobs" matrix defined later on
# less verbose.

deploy_ghpages: &deploy_ghpages
provider: script
skip_cleanup: true
script: tools/ghpages_documentation_deploy.sh
on:
branch: stable

deploy_pypi: &deploy_pypi
provider: pypi
skip_cleanup: true
user: "diegoplan9"
password:
secure: "QIhEDs+gec0XvmJnzO2USLOz6I0eGKKcjqFtFYDdw1tbFby8OpnVviT7mJLrBx5qTWeR2RfiiEkm9v+HmevZQEdhOZg2A9w98bHLdWh2sYfjSJgvorNUjXgxba+mvsov9nixTf/k2RK8K7IvY1nbAuAwmS3uSXUBNvbyj0MhwUactPCcjwX9QCjCGrhVeZ1IlwoHPhOG7+zBPJ99ws6g0UBwhszotKN+3yTSgNU/PhW7jG3bjpKOso/CKg7Nv+UIdO8IljbcoJpLNZC/SC9XyHEjd8i4MKNi+tDFdguHk5b54Qobx2x0UaisrIrrNVfGZQliel5DU3eYs2kUPjVetmByO7sK8mXXj5HvIFv9t+XDkQVb1Y9D5CcU+DiKQGl0chWP+ZJu5uzxGClzm8MPO2ChGSKoFbYx95QFSiLc3gKjd6Z6lM4e3HYjMQ4ANt7Hjrez9mHbmbZnElKsg2vJS3gttglxEq5rlZg3Xm/6rRQfcbn93JHG29vLKAe+FjHCs9aG1l+MHn9eRgLbEz2JvMowHU7Tua0YM54J59ERZu1008FCvA2UR6k3sF+htnRiXDmbj/777cGcqv8ckm+OXKSB1ujGRbekkHgR9pf7HNUXPsZ3bwuHyio3mPikFQqU6m3Lm1esTQWrA5QoFuImyXQxDcSFeEx3/bFPkJfMOSw="
server: "https://test.pypi.org/legacy/"
distributions: "sdist bdist_wheel"
on:
branch: stable
condition: '$TRAVIS_COMMIT_MESSAGE == "pip release: "*'


###############################################################################
# Stage-related definitions
###############################################################################

# Define the order of the stages.
stages:
- lint and pure python test
- test
- deploy doc and pypi

# Define the job matrix explicitly, as matrix expansion causes issues when
# using it with stages and some variables/sections cannot be overridden.
jobs:
matrix:
include:
# "lint and and pure python test" stage
###########################################################################
# Linter and style check (GNU/Linux, Python 3.5)
- stage: lint and pure python test
<<: *stage_linux_no_compile
script: make style VERBOSE="" && make lint VERBOSE=""

# Run the tests against without compilation (GNU/Linux, Python 3.5)
- stage: lint and pure python test
<<: *stage_linux_no_compile

# "test" stage
###########################################################################
# GNU/Linux, Python 3.5
- stage: test
<<: *stage_linux

# GNU/Linux, Python 3.6
- stage: test
<<: *stage_linux
python: 3.6

# OSX, Python 3.latest (brew does not support versioning)
- stage: test
<<: *stage_osx

# "deploy" stage.
###########################################################################
# github pages documentation update (GNU/Linux, Python 3.5)
- stage: deploy doc and pypi
<<: *stage_linux_no_compile
if: branch = stable and repo = QISKit/qiskit-sdk-py and type = push
script: cd ..
deploy:
<<: *deploy_ghpages
- python: 3.6
env:
- PYFLAKES=1 PEP8=1
before_install: skip
install:
- pip install pyflakes pycodestyle
script:
- pyflakes qiskit
- pycodestyle qiskit
- python: 3.5
env: CC=gcc-5 CXX=g++-5
- python: 3.6
env: CC=gcc-5 CXX=g++-5
- python: 3.6
env: CC=clang CXX=clang++
- python: 3.6
env: OPENBLAS=1 CC=gcc-5 CXX=g++-5
- os: osx
osx_image: xcode9.2
language: generic

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update -qq;
sudo apt-get install -qq g++-5;
fi

# GNU/Linux, Python 3.5
- stage: deploy doc and pypi
<<: *stage_linux
if: branch = stable and repo = QISKit/qiskit-sdk-py and type = push
install: mkdir out && cd out && cmake $CMAKE_FLAGS ..
script: cd ..
deploy:
<<: *deploy_pypi
# command to install dependencies
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
export LD_LIBRARY_PATH=$(if [[ $CC == "clang" ]]; then echo -n '/usr/local/clang/lib'; fi);
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
#- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- if [[ "${OPENBLAS}" == "1" ]]; then
conda install nomkl numpy scipy cython sympy ply networkx matplotlib;
else
conda install mkl numpy scipy cython sympy ply networkx matplotlib;
fi
- pip install IBMQuantumExperience
# Finally, build Cython modules.
- python setup.py build_ext --inplace

# OSX, Python 3.latest (brew does not support versions)
- stage: deploy doc and pypi
<<: *stage_osx
if: branch = stable and repo = QISKit/qiskit-sdk-py and type = push
install: mkdir out && cd out && cmake $CMAKE_FLAGS ..
script: cd ..
deploy:
<<: *deploy_pypi
distributions: "bdist_wheel"
# command to run tests
script:
- python -m unittest discover -s test -v
31 changes: 0 additions & 31 deletions CMakeLists.txt

This file was deleted.

105 changes: 0 additions & 105 deletions Make.bat

This file was deleted.

Loading