Skip to content

Commit

Permalink
Add pyproject.toml to host build requires
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwen committed Nov 5, 2022
1 parent eb839d3 commit 02d58a6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ kim.log
.cache
.pytest_cache/
.DS_Store
.idea
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", "pybind11"]
build-backend = "setuptools.build_meta"
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
"""Setup."""

import os
import subprocess
import sys
from sysconfig import get_config_vars

from setuptools import setup, Extension, find_packages, distutils
from setuptools import Extension, distutils, find_packages, setup
from setuptools.command.build_ext import build_ext
from sysconfig import get_config_vars

from api_compatibility import check_kim_api_compatibility
try:
from api_compatibility import check_kim_api_compatibility
except ImportError:
# new version of pip does not add cwd to path
sys.path.append(os.getcwd())
from api_compatibility import check_kim_api_compatibility


# remove `-Wstrict-prototypes' that is for C not C++
Expand Down Expand Up @@ -306,8 +309,10 @@ def chech_kim_api_compatibility():
name="kimpy",
version=get_kimpy_version(),
packages=find_packages(),
setup_requires=["pybind11"],
install_requires=["pybind11", "numpy", "pytest"],
install_requires=["numpy"],
extras_require={
"test": ["pytest", "ase"],
},
python_requires=">=3.7",
cmdclass={"build_ext": BuildExt},
ext_modules=get_kimpy_ext_modules(),
Expand Down

0 comments on commit 02d58a6

Please sign in to comment.