Skip to content

Commit

Permalink
[WIP] POT build without installing cython first (PythonOT#293)
Browse files Browse the repository at this point in the history
* test build with no dep

* cleaning up stuff

* build wheels
  • Loading branch information
rflamary authored Oct 27, 2021
1 parent d755433 commit 81db2e7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ jobs:
name: Get Python running
command: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -e .
python -m pip install --user --upgrade --progress-bar off -r requirements.txt
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
python -m pip install --user -e .
- save_cache:
key: pip-cache
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest "pytest-cov<2.6" codecov
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
Expand Down Expand Up @@ -88,7 +88,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .github/requirements_strict.txt
pip install pytest
- name: Install POT
run: |
Expand All @@ -112,14 +111,14 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest "pytest-cov<2.6"
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
Expand All @@ -139,15 +138,15 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install POT
run: |
python -m pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r .github/requirements_test_windows.txt
python -m pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install pytest "pytest-cov<2.6"
- name: Install POT
run: |
python -m pip install -e .
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,10 @@ The library has been tested on Linux, MacOSX and Windows. It requires a C++ comp

- Numpy (>=1.16)
- Scipy (>=1.0)
- Cython (>=0.23) (build only, not necessary when installing wheels from pip or conda)
- Cython (>=0.23) (build only, not necessary when installing from pip or conda)

#### Pip installation

Note that due to a limitation of pip, `cython` and `numpy` need to be installed
prior to installing POT. This can be done easily with

```console
pip install numpy cython
```

You can install the toolbox through PyPI with:

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "numpy>=1.16", "cython>=0.23"]
build-backend = "setuptools.build_meta"

0 comments on commit 81db2e7

Please sign in to comment.