Skip to content

Commit 02d58a6

Browse files
committed
Add pyproject.toml to host build requires
1 parent eb839d3 commit 02d58a6

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ kim.log
4545
.cache
4646
.pytest_cache/
4747
.DS_Store
48+
.idea

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel", "pybind11"]
3+
build-backend = "setuptools.build_meta"

setup.py

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
"""Setup."""
2-
31
import os
42
import subprocess
53
import sys
4+
from sysconfig import get_config_vars
65

7-
from setuptools import setup, Extension, find_packages, distutils
6+
from setuptools import Extension, distutils, find_packages, setup
87
from setuptools.command.build_ext import build_ext
9-
from sysconfig import get_config_vars
108

11-
from api_compatibility import check_kim_api_compatibility
9+
try:
10+
from api_compatibility import check_kim_api_compatibility
11+
except ImportError:
12+
# new version of pip does not add cwd to path
13+
sys.path.append(os.getcwd())
14+
from api_compatibility import check_kim_api_compatibility
1215

1316

1417
# remove `-Wstrict-prototypes' that is for C not C++
@@ -306,8 +309,10 @@ def chech_kim_api_compatibility():
306309
name="kimpy",
307310
version=get_kimpy_version(),
308311
packages=find_packages(),
309-
setup_requires=["pybind11"],
310-
install_requires=["pybind11", "numpy", "pytest"],
312+
install_requires=["numpy"],
313+
extras_require={
314+
"test": ["pytest", "ase"],
315+
},
311316
python_requires=">=3.7",
312317
cmdclass={"build_ext": BuildExt},
313318
ext_modules=get_kimpy_ext_modules(),

0 commit comments

Comments
 (0)