Repository: openkim/kimpy (language: python)

Issue:
pybind11 and pytest shouldn't be in install_requires
pybind11 is a build-only dependency, pytest is a test dependency.
Tests fail: cannot import name 'model' from partially initialized module 'kimpy'
```
===>  Testing for py39-kimpy-2.0.1
===>   py39-kimpy-2.0.1 depends on package: py39-pytest>=7,1 - found
===>   py39-kimpy-2.0.1 depends on file: /usr/local/bin/python3.9 - found
cd /disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1 && /usr/bin/env XDG_DATA_HOME=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39  XDG_CONFIG_HOME=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39  XDG_CACHE_HOME=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/.cache  HOME=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39 PATH=/usr/local/libexec/ccache:/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer"  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -fno-omit-frame-pointer  "  MANPREFIX="/usr/local" CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" PYTHONPATH=/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/stage/usr/local/lib/python3.9/site-packages /usr/local/bin/python3.9 -m pytest -k '' -rs -v -o addopts= 
==================================================================================== test session starts =====================================================================================
platform freebsd13 -- Python 3.9.13, pytest-7.1.3, pluggy-1.0.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/.hypothesis/examples')
rootdir: /disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1
plugins: forked-1.4.0, hypothesis-6.55.0, cov-2.9.0, rerunfailures-10.1, xdist-2.5.0, typeguard-2.13.3
collected 0 items / 21 errors                                                                                                                                                                

=========================================================================================== ERRORS ===========================================================================================
__________________________________________________________________________ ERROR collecting tests/test_callbacks.py __________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_callbacks.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_callbacks.py:18: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_________________________________________________________________________ ERROR collecting tests/test_charge_unit.py _________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_charge_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_charge_unit.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_________________________________________________________________________ ERROR collecting tests/test_collection.py __________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_collection.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_collection.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
____________________________________________________________________ ERROR collecting tests/test_collection_item_type.py _____________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_collection_item_type.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_collection_item_type.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
____________________________________________________________________ ERROR collecting tests/test_compute_argument_name.py ____________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_compute_argument_name.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_compute_argument_name.py:1: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
____________________________________________________________________ ERROR collecting tests/test_compute_callback_name.py ____________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_compute_callback_name.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_compute_callback_name.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
__________________________________________________________________________ ERROR collecting tests/test_data_type.py __________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_data_type.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_data_type.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_________________________________________________________________________ ERROR collecting tests/test_energy_unit.py _________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_energy_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_energy_unit.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
________________________________________________________________________ ERROR collecting tests/test_language_name.py ________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_language_name.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_language_name.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_________________________________________________________________________ ERROR collecting tests/test_length_unit.py _________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_length_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_length_unit.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
________________________________________________________________________ ERROR collecting tests/test_log_verbosity.py ________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_log_verbosity.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_log_verbosity.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
____________________________________________________________________________ ERROR collecting tests/test_model.py ____________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_model.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_model.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_____________________________________________________________________ ERROR collecting tests/test_model_neigh_library.py _____________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_model_neigh_library.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_model_neigh_library.py:2: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_____________________________________________________________________ ERROR collecting tests/test_model_routine_name.py ______________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_model_routine_name.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_model_routine_name.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
__________________________________________________________________________ ERROR collecting tests/test_numbering.py __________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_numbering.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_numbering.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
___________________________________________________________________________ ERROR collecting tests/test_sem_ver.py ___________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_sem_ver.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_sem_ver.py:1: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
________________________________________________________________________ ERROR collecting tests/test_species_name.py _________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_species_name.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_species_name.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_______________________________________________________________________ ERROR collecting tests/test_support_status.py ________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_support_status.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_support_status.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
______________________________________________________________________ ERROR collecting tests/test_temperature_unit.py _______________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_temperature_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_temperature_unit.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
__________________________________________________________________________ ERROR collecting tests/test_time_unit.py __________________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/test_time_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_time_unit.py:3: in <module>
    import kimpy
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
_____________________________________________________________________ ERROR collecting tests/neighlist/test_graphite.py ______________________________________________________________________
ImportError while importing test module '/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/tests/neighlist/test_graphite.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/neighlist/test_graphite.py:4: in <module>
    from kimpy import neighlist as nl
kimpy/__init__.py:4: in <module>
    from . import model
E   ImportError: cannot import name 'model' from partially initialized module 'kimpy' (most likely due to a circular import) (/disk-samsung/freebsd-ports/science/py-kimpy/work-py39/kimpy-2.0.1/kimpy/__init__.py)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 21 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 21 errors in 0.97s =====================================================================================
*** Error code 2
```

Version: 2.0.1
Python 3.9
FreeBSD 13.1 STABLE


Discussion / hints:
If I remember correctly, in the past, there was a `tests_require` which is deprecated. @mjwen we can use `extra-require` for test dependency, but I am not sure if this is the best approach. @yurivict, do you have any specific suggestions?
IMO you should just remove pybind11 and pytest from install_requires and add them to extra-require under the key "test". That's what other python projects do.
Following the latest `setuptools` guide, we can add a `project.toml` file to specify the need of `pybind11` at build time. And let `pytest` be a test dependency only as @yurivict suggested. The kliff repo is actually doing it in this way and we need to update kimpy similarily.   


Fix patch:
diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml
index 2697ccf..08228a1 100644
--- a/.github/workflows/pythonpublish.yml
+++ b/.github/workflows/pythonpublish.yml
@@ -31,7 +31,7 @@ jobs:
     - name: Set up Python
       uses: actions/setup-python@v2
       with:
-        python-version: '3.x'
+        python-version: "3.10"
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
diff --git a/.gitignore b/.gitignore
index acd6ed6..1c76032 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,4 @@ kim.log
 .cache
 .pytest_cache/
 .DS_Store
+.idea
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7cec460..a72f8a6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,13 @@
 Change Log
 ==========
 
+v2.1.0 (2022/12/06)
+===================
+
+- Fixing inverse function bug in neighbor list, which can result in incorrect
+  padding
+- Using pyproject.toml, and refactoring build and test requires
+
 v2.0.1 (2022/08/18)
 ===================
 
diff --git a/Makefile b/Makefile
deleted file mode 100644
index c16543d..0000000
--- a/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-build:
-	python setup.py build
-develop:
-	python setup.py develop
-inplace:
-	python setup.py build_ext --inplace
-install:
-	python setup.py install
-clean:
-	python setup.py clean
-clean_all:
-	rm -rf build/ dist/ kimpy.egg-info/ */*.so */*.pyc */__pycache__  \
diff --git a/api_compatibility.txt b/api_compatibility.txt
index 580ea70..5121817 100644
--- a/api_compatibility.txt
+++ b/api_compatibility.txt
@@ -21,3 +21,4 @@
   1.0.0          2.2.1               2.2.0
   2.0.0          2.2.1               2.2.1
   2.0.1          2.3.0               2.2.1
+  2.1.0          2.3.0               2.2.1
diff --git a/kimpy/__init__.py b/kimpy/__init__.py
index b6a3e89..70813a5 100644
--- a/kimpy/__init__.py
+++ b/kimpy/__init__.py
@@ -1,4 +1,4 @@
-__version__ = "2.0.1"
+__version__ = "2.1.0"
 
 # import all modules
 from . import model
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..8902b08
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools", "wheel", "pybind11"]
+build-backend = "setuptools.build_meta"
diff --git a/setup.py b/setup.py
index 0a6d24b..b831f06 100644
--- a/setup.py
+++ b/setup.py
@@ -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++
@@ -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(),


Test patch:
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 2b4d569..8f879c1 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -7,7 +7,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.7, 3.8, 3.9]
+        python-version: ["3.8", "3.9", "3.10"]
     steps:
     - uses: actions/checkout@v2
     - name: Install gcc
@@ -59,7 +59,7 @@ jobs:
     runs-on: macos-latest
     strategy:
       matrix:
-        python-version: [3.7, 3.8, 3.9]
+        python-version: ["3.8", "3.9", "3.10"]
         compiler: [clang, gcc]
     steps:
     - uses: actions/checkout@v2
@@ -126,7 +126,7 @@ jobs:
     runs-on: windows-latest
     strategy:
       matrix:
-        python-version: [3.7, 3.8, 3.9]
+        python-version: ["3.8", "3.9", "3.10"]
         compiler: [gcc]
     defaults:
       run: