Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ 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 Expand Up @@ -183,4 +183,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /[0-9]+(\.[0-9]+)*$/
only: /[0-9]+(\.[0-9]+)*$/
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ The library has been tested on Linux, MacOSX and Windows. It requires a C++ comp

#### 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:

```console
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"
32 changes: 16 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@
import subprocess
import sys

from setuptools import find_packages, setup
from setuptools.extension import Extension
from setuptools import find_packages, setup, Extension

import numpy
from Cython.Build import cythonize


# dirty but working
__version__ = re.search(
Expand All @@ -34,7 +31,8 @@
if sys.platform.startswith('darwin'):
compile_args.append("-stdlib=libc++")
sdk_path = subprocess.check_output(['xcrun', '--show-sdk-path'])
os.environ['CFLAGS'] = '-isysroot "{}"'.format(sdk_path.rstrip().decode("utf-8"))
os.environ['CFLAGS'] = '-isysroot "{}"'.format(
sdk_path.rstrip().decode("utf-8"))

setup(
name='POT',
Expand All @@ -46,19 +44,22 @@
author_email='remi.flamary@gmail.com, ncourty@gmail.com',
url='https://github.com/PythonOT/POT',
packages=find_packages(),
ext_modules=cythonize(Extension(
name="ot.lp.emd_wrap",
sources=["ot/lp/emd_wrap.pyx", "ot/lp/EMD_wrapper.cpp"], # cython/c++ src files
language="c++",
include_dirs=[numpy.get_include(), os.path.join(ROOT, 'ot/lp')],
extra_compile_args=compile_args,
)),
ext_modules=[
Extension(
name="ot.lp.emd_wrap",
sources=["ot/lp/emd_wrap.pyx",
"ot/lp/EMD_wrapper.cpp"], # cython/c++ src files
language="c++",
include_dirs=[numpy.get_include()],
extra_compile_args=compile_args,
)
],
platforms=['linux', 'macosx', 'windows'],
download_url='https://github.com/PythonOT/POT/archive/{}.tar.gz'.format(__version__),
download_url='https://github.com/PythonOT/POT/archive/{}.tar.gz'.format(
__version__),
license='MIT',
scripts=[],
data_files=[],
setup_requires=["numpy>=1.16", "cython>=0.23"],
install_requires=["numpy>=1.16", "scipy>=1.0"],
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -85,5 +86,4 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
]
)
])