diff --git a/setup.py b/setup.py index 1539c186e..915e34d7f 100644 --- a/setup.py +++ b/setup.py @@ -93,7 +93,9 @@ numpy_include = np.get_numpy_include() # Determine if we have an available BLAS implementation - blas_info = get_info("blas_opt", 0) + if 'bdist_wheel' not in sys.argv: + blas_info = get_info("blas_opt", 0) + numpy_available = True except ImportError as e: if is_building_tick: diff --git a/tick/preprocessing/build/__init__.py b/tick/preprocessing/build/__init__.py new file mode 100644 index 000000000..588cf7e93 --- /dev/null +++ b/tick/preprocessing/build/__init__.py @@ -0,0 +1 @@ +# License: BSD 3 clause diff --git a/tick/simulation/src/hawkes.h b/tick/simulation/src/hawkes.h index d67bfbb62..0bd8dfd98 100644 --- a/tick/simulation/src/hawkes.h +++ b/tick/simulation/src/hawkes.h @@ -7,6 +7,8 @@ // License: BSD 3 clause +#include "defs.h" + #include #include diff --git a/tick/simulation/src/hawkes_baselines/baseline.h b/tick/simulation/src/hawkes_baselines/baseline.h index 6f6315d87..3cda9d294 100644 --- a/tick/simulation/src/hawkes_baselines/baseline.h +++ b/tick/simulation/src/hawkes_baselines/baseline.h @@ -4,9 +4,10 @@ // License: BSD 3 clause -#include #include "base.h" +#include + /*! \class HawkesBaseline * \brief A abstract class for Hawkes baselines */ diff --git a/tick/simulation/src/hawkes_baselines/constant_baseline.h b/tick/simulation/src/hawkes_baselines/constant_baseline.h index a34e2d067..50e4f35cd 100644 --- a/tick/simulation/src/hawkes_baselines/constant_baseline.h +++ b/tick/simulation/src/hawkes_baselines/constant_baseline.h @@ -4,9 +4,10 @@ // License: BSD 3 clause -#include #include "baseline.h" +#include + /*! \class HawkesConstantBaseline * \brief A basic wrapper of double to represent \f$ \mu \f$ of Hawkes processes */ diff --git a/tick/simulation/src/hawkes_baselines/timefunction_baseline.h b/tick/simulation/src/hawkes_baselines/timefunction_baseline.h index 23e40cd2c..a2fd408ae 100644 --- a/tick/simulation/src/hawkes_baselines/timefunction_baseline.h +++ b/tick/simulation/src/hawkes_baselines/timefunction_baseline.h @@ -4,10 +4,11 @@ // License: BSD 3 clause -#include #include "base.h" #include "baseline.h" +#include + /*! \class HawkesBaseline * \brief Class of time varying baselines modeled by TimeFunction */ diff --git a/tools/docker/build_wheels.sh b/tools/docker/build_wheels.sh new file mode 100755 index 000000000..90de03d15 --- /dev/null +++ b/tools/docker/build_wheels.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -e -x + +python_versions=(cp34-cp34m cp35-cp35m cp36-cp36m) + +for PYVER in ${python_versions[@]}; do + PYBIN=/opt/python/${PYVER}/bin + + cd /io + + "${PYBIN}/python3" -mpip install -r requirements.txt + "${PYBIN}/python3" setup.py bdist_wheel --dist-dir=/tick/wheelhouse +done + +for whl in /tick/wheelhouse/*.whl; do + auditwheel repair "$whl" -w /io/wheelhouse/ +done \ No newline at end of file diff --git a/tools/docker/tick_manylinux1_x86_64/Dockerfile b/tools/docker/tick_manylinux1_x86_64/Dockerfile index 0b0f3c996..f29317765 100644 --- a/tools/docker/tick_manylinux1_x86_64/Dockerfile +++ b/tools/docker/tick_manylinux1_x86_64/Dockerfile @@ -5,32 +5,19 @@ RUN yum update -y && yum install -y zlib-devel bzip2 bzip2-devel readline-devel ENV PATH="/root/.pyenv/bin:$PATH" SWIG_VER=3.0.12 -# Installing pyenv -RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash - # Installing swig RUN curl -O https://kent.dl.sourceforge.net/project/swig/swig/swig-${SWIG_VER}/swig-${SWIG_VER}.tar.gz && tar -xf swig-${SWIG_VER}.tar.gz && \ - cd swig-${SWIG_VER} && ./configure && make && make install && \ + cd swig-${SWIG_VER} && ./configure && make -j4 && make install && \ rm -rf swig-${SWIG_VER}.tar.gz swig-${SWIG_VER} # Installing cmake RUN curl -O https://cmake.org/files/v3.8/cmake-3.8.0.tar.gz && tar -xf cmake-3.8.0.tar.gz && \ - (cd cmake-3.8.0 && ./configure && gmake && gmake install) && \ + (cd cmake-3.8.0 && ./configure && gmake -j4 && gmake install) && \ rm -rf cmake-3.8.0.tar.gz cmake-3.8.0 # Installing googletest RUN git clone https://github.com/google/googletest.git && \ - (cd googletest && mkdir -p build && cd build && cmake .. && make && make install) && \ + (cd googletest && mkdir -p build && cd build && cmake .. && make -j4 && make install) && \ rm -rf googletest -# Installing necessary python versions -RUN pyenv install 3.4.6 && pyenv install 3.5.3 && pyenv install 3.6.1 - -COPY requirements.txt requirements.txt - -RUN eval "$(pyenv init -)" && \ - pyenv local 3.4.6 && pip install -r requirements.txt -U pip && \ - pyenv local 3.5.3 && pip install -r requirements.txt -U pip && \ - pyenv local 3.6.1 && pip install -r requirements.txt -U pip - LABEL maintainer "soren.poulsen@polytechnique.edu" \ No newline at end of file diff --git a/tools/docker/tick_manylinux1_x86_64/requirements.txt b/tools/docker/tick_manylinux1_x86_64/requirements.txt deleted file mode 100644 index 57b1a5991..000000000 --- a/tools/docker/tick_manylinux1_x86_64/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -numpy -numpydoc -scipy -matplotlib -scikit-learn -pandas - -cpplint -wheel -twine -sphinx -pillow -bokeh - -auditwheel