Merge branch 'fixed_setup' into travis_all
This commit is contained in:
commit
584f28ceaa
38
.travis.yml
38
.travis.yml
@ -1,8 +1,34 @@
|
||||
language: python
|
||||
|
||||
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
||||
|
||||
python:
|
||||
- "3.6"
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- pip install flake8
|
||||
script:
|
||||
- python check.py
|
||||
- "3.7"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: "pip install under linux"
|
||||
before_install:
|
||||
# C++17
|
||||
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
- sudo apt-get update -qq
|
||||
install:
|
||||
# C++17
|
||||
- sudo apt-get install -qq gcc-8 g++-8
|
||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
|
||||
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90
|
||||
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90
|
||||
# Linux install script
|
||||
- bash ./install.sh
|
||||
script:
|
||||
# todo: use python unittest
|
||||
- python -c "import vnpy.api.ctp.vnctp; import vnpy.api.oes.vnoes; exit(0);"
|
||||
|
||||
|
||||
- name: "code quality analysis: flake8"
|
||||
before_install:
|
||||
- pip install flake8
|
||||
install:
|
||||
- "" # prevent running "pip install -r requirements.txt"
|
||||
script:
|
||||
- flake8
|
||||
|
@ -2,4 +2,4 @@
|
||||
pip install -r requirements.txt
|
||||
|
||||
:: Install vn.py
|
||||
python setup.py install
|
||||
pip install .
|
21
install.sh
21
install.sh
@ -1,5 +1,20 @@
|
||||
::Install Python Modules
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get and build ta-lib
|
||||
pushd /tmp
|
||||
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
||||
tar -xf ta-lib-0.4.0-src.tar.gz
|
||||
cd ta-lib
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
sudo make install
|
||||
popd
|
||||
|
||||
# old versions of ta-lib imports numpy in setup.py
|
||||
pip install numpy
|
||||
|
||||
# Install Python Modules
|
||||
pip install -r requirements.txt
|
||||
|
||||
:: Install vn.py
|
||||
python setup.py install
|
||||
# Install vn.py
|
||||
pip install .
|
@ -8,6 +8,5 @@ numpy
|
||||
pandas
|
||||
matplotlib
|
||||
seaborn
|
||||
jupyter
|
||||
ta-lib; platform_system=="Unix"
|
||||
ta-lib; platform_system=="Linux"
|
||||
|
||||
|
4
setup.py
4
setup.py
@ -34,7 +34,7 @@ vnctpmd = Extension("vnpy.api.ctp.vnctpmd",
|
||||
extra_compile_args=compiler_flags,
|
||||
extra_link_args=extra_link_args,
|
||||
depends=[],
|
||||
runtime_library_dirs=["vnpy/api/ctp"],
|
||||
runtime_library_dirs=["$ORIGIN"],
|
||||
language="cpp",
|
||||
)
|
||||
vnctptd = Extension("vnpy.api.ctp.vnctptd",
|
||||
@ -48,7 +48,7 @@ vnctptd = Extension("vnpy.api.ctp.vnctptd",
|
||||
libraries=["thostmduserapi", "thosttraderapi", ],
|
||||
extra_compile_args=compiler_flags,
|
||||
extra_link_args=extra_link_args,
|
||||
runtime_library_dirs=["vnpy/api/ctp"],
|
||||
runtime_library_dirs=["$ORIGIN"],
|
||||
depends=[],
|
||||
language="cpp",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user