Require pybind 2.6 from environment for gmxapi Python package extension module.
[alexxy/gromacs.git] / python_packaging / CMakeLists.txt
index 9735dfe94ebfd8ab52faceaef83647aa56c60727..4de5bb3616625aa37432a5cec7222e6d2087eab7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2019, by the GROMACS development team, led by
+# Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 #    current ``PYTHONPATH`` environment variable or after ``sys.path.append()``.
 #  * "To build a package" means to create a package from sources that may need
 #    to be configured or compiled before the package can be imported. Reference
-#    the ``distutils`` ``build`` and ``build_ext`` commands. For example, when
-#    scikit-build is directed to build a package through the ``setuptools`` interface,
-#    it invokes CMake to build **and install** a CMake library target for the C++
-#    extension module in the Python package.
+#    the ``distutils`` ``build`` and ``build_ext`` commands.
 #
 # For basic building and testing of the Python package, we don't necessarily
 # need to create a distribution archive or install the Python package outside
 # and the ExternalProject installation directory will have to be added to the
 # PYTHONPATH environment variable where the package needs to be available.
 #
-# Such an ExternalProject could be used as part of the process of packaging a
-# distribution archive through arguments to the Python side of ``skbuild``,
-# but coupling that machinery is not necessary. The packaging infrastructure may
-# be simplest and most maintainable by using scikit-build with its default
-# behavior (letting it maintain its own environment and artifacts).
-#
 # Note that a binary distribution needs to be built for a specific major and minor
 # Python release, and is often sensitive to a particular Python distribution or
 # packaging system. Instead, we can build `gmxapi` source distributions during
 # (system or user) GROMACS installation and (user) Python environment. For a
 # system-wide Python environment, the package needs to be built and installed
 # (to the ``site-packages`` directory) for each supported Python interpreter.
-# ``setup.py`` can just be invoked with different Python interpreters. We can
-# add CMake infrastructure to allow multiple/repeated PYTHON_EXECUTABLE
-# specification at the GROMACS project level if such a use case is important to
-# HPC site administrators or Linux distribution packagers.
+# ``setup.py`` can just be invoked with different Python interpreters.
 #
 # To drive the packaging of a Python package distribution archive
 # by a higher-level CMake configuration, a CMakeLists.txt file at this level would
 
 set(PYBIND11_PYTHON_VERSION "3")
 add_subdirectory(src)
+add_subdirectory(sample_restraint)