diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..8abf8e8 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,21 @@ +on: [push, pull_request] + +defaults: + run: + shell: bash + +jobs: + + test: + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get install -y --no-install-recommends libmlpack-dev + - run: pip install . diff --git a/README.md b/README.md index a6d4f0c..6cb7c2e 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,5 @@ MALA ==== Training and evaluation scripts for MALA (https://arxiv.org/abs/1709.02974). + +Depends on mlpack (`mlpack` on AUR, `libmlpack-dev` on debian-based). diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..848e39b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "cython", "numpy", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 0f57144..452fd06 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,4 @@ +numpy +cython +setuptools tensorflow diff --git a/setup.py b/setup.py index 6370501..c14677d 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ from setuptools import setup, Extension from setuptools.command.build_ext import build_ext as _build_ext import os +import builtins include_dirs = [ os.path.join(os.path.dirname(os.path.abspath(__file__)), "mala"), @@ -18,7 +19,7 @@ class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_options(self) # Prevent numpy from thinking it is still in its setup process: - __builtins__.__NUMPY_SETUP__ = False + builtins.__NUMPY_SETUP__ = False import numpy self.include_dirs.append(numpy.get_include())