Skip to content

Commit

Permalink
Fix setup (#526)
Browse files Browse the repository at this point in the history
* fix

* refine

* refine

* refine

* reformat

* refine

* py3.9->py3.10

* refine

* refine github workflow

* refine

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* ci run success
  • Loading branch information
xiezipeng-ML authored Dec 12, 2023
1 parent 4185118 commit b97fc9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: '3.6'

- name: Install dependencies
# flake8-bugbear flake8-comprehensions are useful but not available internally
Expand Down Expand Up @@ -52,18 +52,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --pre oneflow -f https://staging.oneflow.info/branch/master/cpu
python -m pip install --pre oneflow -f https://oneflow-staging.oss-cn-beijing.aliyuncs.com/branch/master/cpu
python -m pip install pybind11
python -m pip install torch torchvision torchaudio
- name: Build and install
run: |
python -m pip install -e .
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ def write_version_file():


def get_pybind11():
import pybind11 as pb

try:
import pybind11 as pb
except ImportError:
print("pybind11 not found, installing...")
os.system(f"{sys.executable} -m pip install pybind11")
import pybind11 as pb
return pb


Expand Down

0 comments on commit b97fc9f

Please sign in to comment.