From 6b91dea1028313730c773cd41dbb18ef812100ad Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 26 Dec 2024 13:13:57 +0800 Subject: [PATCH] fix_ci_error --- .github/workflows/test_qlib_from_pip.yml | 1 + .github/workflows/test_qlib_from_source.yml | 1 - .github/workflows/test_qlib_from_source_slow.yml | 5 ----- Makefile | 14 ++++++++++++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_qlib_from_pip.yml b/.github/workflows/test_qlib_from_pip.yml index c1c2546a42..6af5747266 100644 --- a/.github/workflows/test_qlib_from_pip.yml +++ b/.github/workflows/test_qlib_from_pip.yml @@ -32,6 +32,7 @@ jobs: run: | python -m pip install --upgrade pip + # Will cancel this step when the next qlib version is released. The current qlib version is: 0.9.6 - name: Installing pywinpt for windows if: ${{ matrix.os == 'windows-latest' }} run: | diff --git a/.github/workflows/test_qlib_from_source.yml b/.github/workflows/test_qlib_from_source.yml index a3b7089680..9d36479790 100644 --- a/.github/workflows/test_qlib_from_source.yml +++ b/.github/workflows/test_qlib_from_source.yml @@ -47,7 +47,6 @@ jobs: if: ${{ matrix.os == 'windows-latest' }} run: | python -m pip install torch torchvision torchaudio - python -m pip install pywinpty --only-binary=:all: - name: Set up Python tools run: | diff --git a/.github/workflows/test_qlib_from_source_slow.yml b/.github/workflows/test_qlib_from_source_slow.yml index 88a3435cf8..21e2f2ef37 100644 --- a/.github/workflows/test_qlib_from_source_slow.yml +++ b/.github/workflows/test_qlib_from_source_slow.yml @@ -29,11 +29,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Installing pywinpt for windows - if: ${{ matrix.os == 'windows-latest' }} - run: | - python -m pip install pywinpty --only-binary=:all: - - name: Set up Python tools run: | make dev diff --git a/Makefile b/Makefile index 03dfc7310c..cb3a79fae1 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,12 @@ PUBLIC_DIR := $(shell [ "$$READTHEDOCS" = "True" ] && echo "$$READTHEDOCS_OUTPUT SO_DIR := qlib/data/_libs SO_FILES := $(wildcard $(SO_DIR)/*.so) +ifeq ($(OS),Windows_NT) + IS_WINDOWS = true +else + IS_WINDOWS = false +endif + ######################################################################################## # Development Environment Management ######################################################################################## @@ -62,6 +68,14 @@ prerequisite: dependencies: python -m pip install -e . +# pywinpty as a dependency of jupyter on windows, if you use pip install pywinpty installation, +# will first download the tar.gz file, and then locally compiled and installed, +# this will lead to some unnecessary trouble, so we choose to install the compiled whl file, to avoid trouble. +pywinpt: + ifeq ($(IS_WINDOWS),true) + python -m pip install pywinpty --only-binary=:all: + endif + lightgbm: python -m pip install lightgbm --prefer-binary