Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set pybind11 to ValeevGroup/v2.11 #283

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
./hf++ $LIBINT_EXPORTED_DIR/tests/hartree-fock/h2o_rotated.xyz | python $LIBINT_EXPORTED_DIR/tests/hartree-fock/hartree-fock++-validate.py $LIBINT_EXPORTED_DIR/MakeVars.features

- name: Build Python bindings
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.os != 'macos-latest' }}
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
shell: bash
working-directory: ${{github.workspace}}/build/library
run: |
Expand Down
14 changes: 3 additions & 11 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@ if (NOT TARGET pybind11::pybind11)
include(FetchContent)
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.6.0 # sync below!
# GIT_REPOSITORY https://github.com/ValeevGroup/pybind11.git
# GIT_TAG 80d452484c5409444b0ec19383faa84bb7a4d351 # v2.4.3
# FIND_PACKAGE_ARGS 2.4.3 CONFIG # CMake 3.24 integrates find_package() call above into FC_Declare
GIT_REPOSITORY https://github.com/ValeevGroup/pybind11.git
GIT_TAG ValeevGroup/v2.11
)

FetchContent_MakeAvailable(pybind11)
set(pybind11_VERSION "2.6.0") # getting the fetched version isn't reliable from ${CMAKE_PROJECT_VERSION}), so sync explicitly from tag above
endif()

if (pybind11_VERSION VERSION_LESS_EQUAL 2.5.0)
# remove after minimum pb11 advances beyond v2.5.0 and let cxx_std_17 below do the work
set(CMAKE_CXX_STANDARD 17)
set(pybind11_VERSION "2.11") # getting the fetched version isn't reliable from ${CMAKE_PROJECT_VERSION}), so sync explicitly from tag above
endif()

if (pybind11_VERSION VERSION_GREATER_EQUAL 2.11.0)
Expand Down
12 changes: 11 additions & 1 deletion python/setup.py.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import setuptools
try:
import setuptools
except ImportError as e:
print(
"Error: %s\n" % str(e) +
"Python setuptools are not installed\n" +
"'pip install setuptools' to build libint Python bindings"
)
import sys
sys.exit(1)

from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import os
Expand Down
Loading