Skip to content

Commit

Permalink
fix: deal with cython, numpy, scipy dependencies before running setup…
Browse files Browse the repository at this point in the history
….py - use pyproject.toml file
  • Loading branch information
mgierada committed May 18, 2021
1 parent 58c5c23 commit 6e6e0b1
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .eggs/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

This directory caches those eggs to prevent repeated downloads.

However, it is safe to delete this directory.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ __pycache__
*.html
*.traj
.coverage
build
*venv
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
"setuptools >= 54.2.0",
"setuptools_scm >= 2.0.0, <3",
"cython >= 0.29.23",
"numpy",
"scipy"
]

build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ numpy>=1.14.0
scipy>=1.1.0
ase>=3.18.0
jax>=0.2.3
jaxlib>=0.1.56
jaxlib>=0.1.56
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from Cython.Build import cythonize
except ImportError:
use_cython = False

else:
use_cython = True

cy_suff = '.pyx' if use_cython else '.c'

cy_files = [
['force_match'],
['utilities', 'blas'],
['utilities', 'math'],
]
Expand Down

0 comments on commit 6e6e0b1

Please sign in to comment.