|
1 |
| -"""Setup.""" |
2 |
| - |
3 | 1 | import os
|
4 | 2 | import subprocess
|
5 | 3 | import sys
|
| 4 | +from sysconfig import get_config_vars |
6 | 5 |
|
7 |
| -from setuptools import setup, Extension, find_packages, distutils |
| 6 | +from setuptools import Extension, distutils, find_packages, setup |
8 | 7 | from setuptools.command.build_ext import build_ext
|
9 |
| -from sysconfig import get_config_vars |
10 | 8 |
|
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 |
12 | 15 |
|
13 | 16 |
|
14 | 17 | # remove `-Wstrict-prototypes' that is for C not C++
|
@@ -306,8 +309,10 @@ def chech_kim_api_compatibility():
|
306 | 309 | name="kimpy",
|
307 | 310 | version=get_kimpy_version(),
|
308 | 311 | 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 | + }, |
311 | 316 | python_requires=">=3.7",
|
312 | 317 | cmdclass={"build_ext": BuildExt},
|
313 | 318 | ext_modules=get_kimpy_ext_modules(),
|
|
0 commit comments