Skip to content

Commit 81db2e7

Browse files
authored
[WIP] POT build without installing cython first (#293)
* test build with no dep * cleaning up stuff * build wheels
1 parent d755433 commit 81db2e7

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ jobs:
3838
name: Get Python running
3939
command: |
4040
python -m pip install --user --upgrade --progress-bar off pip
41+
python -m pip install --user -e .
4142
python -m pip install --user --upgrade --progress-bar off -r requirements.txt
4243
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
4344
python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
44-
python -m pip install --user -e .
45+
4546
4647
- save_cache:
4748
key: pip-cache

.github/workflows/build_tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ jobs:
3030
uses: actions/setup-python@v1
3131
with:
3232
python-version: ${{ matrix.python-version }}
33+
- name: Install POT
34+
run: |
35+
pip install -e .
3336
- name: Install dependencies
3437
run: |
3538
python -m pip install --upgrade pip
3639
pip install -r requirements.txt
3740
pip install pytest "pytest-cov<2.6" codecov
38-
- name: Install POT
39-
run: |
40-
pip install -e .
4141
- name: Run tests
4242
run: |
4343
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
@@ -88,7 +88,6 @@ jobs:
8888
- name: Install dependencies
8989
run: |
9090
python -m pip install --upgrade pip
91-
pip install -r .github/requirements_strict.txt
9291
pip install pytest
9392
- name: Install POT
9493
run: |
@@ -112,14 +111,14 @@ jobs:
112111
uses: actions/setup-python@v1
113112
with:
114113
python-version: ${{ matrix.python-version }}
114+
- name: Install POT
115+
run: |
116+
pip install -e .
115117
- name: Install dependencies
116118
run: |
117119
python -m pip install --upgrade pip
118120
pip install -r requirements.txt
119121
pip install pytest "pytest-cov<2.6"
120-
- name: Install POT
121-
run: |
122-
pip install -e .
123122
- name: Run tests
124123
run: |
125124
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes
@@ -139,15 +138,15 @@ jobs:
139138
uses: actions/setup-python@v1
140139
with:
141140
python-version: ${{ matrix.python-version }}
141+
- name: Install POT
142+
run: |
143+
python -m pip install -e .
142144
- name: Install dependencies
143145
run: |
144146
python -m pip install --upgrade pip
145147
python -m pip install -r .github/requirements_test_windows.txt
146148
python -m pip install torch==1.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
147149
python -m pip install pytest "pytest-cov<2.6"
148-
- name: Install POT
149-
run: |
150-
python -m pip install -e .
151150
- name: Run tests
152151
run: |
153152
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --ignore ot/gpu/ --cov=ot --color=yes

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,10 @@ The library has been tested on Linux, MacOSX and Windows. It requires a C++ comp
7979

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

8484
#### Pip installation
8585

86-
Note that due to a limitation of pip, `cython` and `numpy` need to be installed
87-
prior to installing POT. This can be done easily with
88-
89-
```console
90-
pip install numpy cython
91-
```
9286

9387
You can install the toolbox through PyPI with:
9488

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "numpy>=1.16", "cython>=0.23"]
3+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)