[Del] remove numpy ccompiler
This commit is contained in:
parent
430220959d
commit
c3546a8bf7
@ -42,7 +42,6 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- g++-8
|
- g++-8
|
||||||
before_install:
|
before_install:
|
||||||
- alias make="make -j2"
|
|
||||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
|
- 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/c++ c++ /usr/bin/g++-8 90
|
||||||
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90
|
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90
|
||||||
@ -51,7 +50,7 @@ matrix:
|
|||||||
- python -m pip install --upgrade pip wheel setuptools
|
- python -m pip install --upgrade pip wheel setuptools
|
||||||
# Linux install script
|
# Linux install script
|
||||||
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
||||||
- NPY_NUM_BUILD_JOBS=2 bash ./install.sh
|
- bash ./install.sh
|
||||||
|
|
||||||
- name: "sdist install under Ubuntu: gcc-7"
|
- name: "sdist install under Ubuntu: gcc-7"
|
||||||
addons:
|
addons:
|
||||||
@ -61,7 +60,6 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- g++-7
|
- g++-7
|
||||||
before_install:
|
before_install:
|
||||||
- alias make="make -j2"
|
|
||||||
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
|
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
|
||||||
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 90
|
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 90
|
||||||
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-7 90
|
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-7 90
|
||||||
@ -79,7 +77,7 @@ matrix:
|
|||||||
- pip install numpy
|
- pip install numpy
|
||||||
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
- pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
||||||
- python setup.py sdist
|
- python setup.py sdist
|
||||||
- NPY_NUM_BUILD_JOBS=2 pip install dist/`ls dist`
|
- pip install dist/`ls dist`
|
||||||
|
|
||||||
- name: "pip install under osx"
|
- name: "pip install under osx"
|
||||||
os: osx
|
os: osx
|
||||||
|
17
setup.py
17
setup.py
@ -22,23 +22,6 @@ import sys
|
|||||||
|
|
||||||
from setuptools import Extension, find_packages, setup
|
from setuptools import Extension, find_packages, setup
|
||||||
|
|
||||||
|
|
||||||
def hook_compiler():
|
|
||||||
"""
|
|
||||||
if numpy is installed, use compiler from that instead of setuptools,
|
|
||||||
which run faster in multi-core env
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
from numpy.distutils.ccompiler import CCompiler_compile
|
|
||||||
import distutils.ccompiler
|
|
||||||
|
|
||||||
distutils.ccompiler.CCompiler.compile = CCompiler_compile
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
hook_compiler()
|
|
||||||
|
|
||||||
with open("vnpy/__init__.py", "rb") as f:
|
with open("vnpy/__init__.py", "rb") as f:
|
||||||
version_line = re.search(
|
version_line = re.search(
|
||||||
r"__version__\s+=\s+(.*)", f.read().decode("utf-8")
|
r"__version__\s+=\s+(.*)", f.read().decode("utf-8")
|
||||||
|
Loading…
Reference in New Issue
Block a user