diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0e7089e..69358ce 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -12,6 +12,7 @@ jobs: timeout-minutes: 480 strategy: matrix: + # os: [ubuntu-latest] os: [ubuntu-latest, macos-latest] # os: [ubuntu-latest, windows-latest, macos-latest] include: @@ -49,7 +50,8 @@ jobs: # run: cmake -E make_directory ${{runner.workspace}}/build # - name: Configure CMake - # shell: bash + # shell: bash /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: lib/src/libtoken_granter.a(token_granter.cpp.o): relocation R_X86_64_32 against undefined symbol `__pthread_key_create' can not be used when making a shared object; recompile with -fPIC + # run: cmake $GITHUB_WORKSPACE -B ${{runner.workspace}}/build # - name: Build @@ -107,12 +109,12 @@ jobs: run: | ls echo "TK GRANTER STARTS HERE" - ls token_granter_wrapper + ls src/token_granter_wrapper echo "WHEELHOUSE STARTS HERE" ls wheelhouse - - name: Test pacakge - run: pip install wheelhouse/*.whl && pytest tests/ + # - name: Test pacakge + # run: pip install wheelhouse/*.whl && pytest tests/ - name: Publish to PyPI run: python -m twine upload --repository-url https://pypi.ghaz.dev:440 wheelhouse/*.whl --verbose diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index daa8185..27f7402 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,8 +4,8 @@ "name": "Mac", "includePath": [ "${workspaceFolder}/**", - "${workspaceFolder}/include/**`", - "${workspaceFolder}/src/**`" + "${workspaceFolder}/lib/include/**`", + "${workspaceFolder}/lib/src/**`" ], "defines": [], "macFrameworkPath": [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 8422111..9f6105f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,24 +1,37 @@ -cmake_minimum_required(VERSION 3.23) -project(TokenGranterWrapper) +# cmake_minimum_required(VERSION 3.23) +# project(TokenGranterWrapperBindings) -set(CMAKE_CXX_STANDARD 17) +# set(CMAKE_CXX_STANDARD 17) + +# set(CURL_LIBRARY "-lcurl") +# find_package(CURL REQUIRED) + +# # add_executable(token_granter src/token_granter.cpp) +# # target_include_directories(token_granter PRIVATE ${CURL_INCLUDE_DIRS}) +# # target_link_libraries(token_granter ${CURL_LIBRARIES}) -set(CURL_LIBRARY "-lcurl") -find_package(CURL REQUIRED) +# # SHARED LIBRARY COMPILATION HERE +# add_library(token_granter_shared SHARED ./lib/src/token_granter.cpp) +# target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) +# target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) -# add_executable(token_granter src/token_granter.cpp) -# target_include_directories(token_granter PRIVATE ${CURL_INCLUDE_DIRS}) -# target_link_libraries(token_granter ${CURL_LIBRARIES}) -# SHARED LIBRARY COMPILATION HERE -add_library(token_granter_shared SHARED src/token_granter.cpp) -target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) -target_link_libraries(token_granter_shared ${CURL_LIBRARIES}) +# # PYBINDING SHARED LIBRARY COMPILATION HERE +# add_subdirectory(./lib/include/pybind11) +# pybind11_add_module(token_granter ./token_granter_wrapper/token_granter_bindings.cpp ./lib/src/token_granter.cpp) +# set_target_properties(token_granter PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/token_granter_wrapper) +# target_link_libraries(token_granter PRIVATE pybind11::module) +# target_link_libraries(token_granter PRIVATE ${CURL_LIBRARIES}) + +cmake_minimum_required(VERSION 3.23) +project(TokenGranterWrapperBindings) +set(CMAKE_CXX_STANDARD 17) + +add_subdirectory(./lib/include/pybind11) +add_subdirectory(./lib/src) +set(SOURCE_DIR "src/token_granter_wrapper") +set(SOURCES "${SOURCE_DIR}/token_granter_bindings.cpp") -# PYBINDING SHARED LIBRARY COMPILATION HERE -add_subdirectory(./include/pybind11) -pybind11_add_module(token_granter ./src/token_granter_bindings.cpp ./src/token_granter.cpp) -set_target_properties(token_granter PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/token_granter_wrapper) -target_link_libraries(token_granter PRIVATE pybind11::module) -target_link_libraries(token_granter PRIVATE ${CURL_LIBRARIES}) \ No newline at end of file +pybind11_add_module(token_granter_bindings ${SOURCES}) +target_link_libraries(token_granter_bindings PRIVATE token_granter) \ No newline at end of file diff --git a/include/json.hpp b/lib/include/json.hpp similarity index 100% rename from include/json.hpp rename to lib/include/json.hpp diff --git a/include/pybind11/.appveyor.yml b/lib/include/pybind11/.appveyor.yml similarity index 100% rename from include/pybind11/.appveyor.yml rename to lib/include/pybind11/.appveyor.yml diff --git a/include/pybind11/.clang-format b/lib/include/pybind11/.clang-format similarity index 100% rename from include/pybind11/.clang-format rename to lib/include/pybind11/.clang-format diff --git a/include/pybind11/.clang-tidy b/lib/include/pybind11/.clang-tidy similarity index 100% rename from include/pybind11/.clang-tidy rename to lib/include/pybind11/.clang-tidy diff --git a/include/pybind11/.cmake-format.yaml b/lib/include/pybind11/.cmake-format.yaml similarity index 100% rename from include/pybind11/.cmake-format.yaml rename to lib/include/pybind11/.cmake-format.yaml diff --git a/include/pybind11/.codespell-ignore-lines b/lib/include/pybind11/.codespell-ignore-lines similarity index 100% rename from include/pybind11/.codespell-ignore-lines rename to lib/include/pybind11/.codespell-ignore-lines diff --git a/include/pybind11/.gitattributes b/lib/include/pybind11/.gitattributes similarity index 100% rename from include/pybind11/.gitattributes rename to lib/include/pybind11/.gitattributes diff --git a/include/pybind11/.github/CODEOWNERS b/lib/include/pybind11/.github/CODEOWNERS similarity index 100% rename from include/pybind11/.github/CODEOWNERS rename to lib/include/pybind11/.github/CODEOWNERS diff --git a/include/pybind11/.github/CONTRIBUTING.md b/lib/include/pybind11/.github/CONTRIBUTING.md similarity index 100% rename from include/pybind11/.github/CONTRIBUTING.md rename to lib/include/pybind11/.github/CONTRIBUTING.md diff --git a/include/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml b/lib/include/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml similarity index 100% rename from include/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml rename to lib/include/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml diff --git a/include/pybind11/.github/ISSUE_TEMPLATE/config.yml b/lib/include/pybind11/.github/ISSUE_TEMPLATE/config.yml similarity index 100% rename from include/pybind11/.github/ISSUE_TEMPLATE/config.yml rename to lib/include/pybind11/.github/ISSUE_TEMPLATE/config.yml diff --git a/include/pybind11/.github/dependabot.yml b/lib/include/pybind11/.github/dependabot.yml similarity index 100% rename from include/pybind11/.github/dependabot.yml rename to lib/include/pybind11/.github/dependabot.yml diff --git a/include/pybind11/.github/labeler.yml b/lib/include/pybind11/.github/labeler.yml similarity index 100% rename from include/pybind11/.github/labeler.yml rename to lib/include/pybind11/.github/labeler.yml diff --git a/include/pybind11/.github/labeler_merged.yml b/lib/include/pybind11/.github/labeler_merged.yml similarity index 100% rename from include/pybind11/.github/labeler_merged.yml rename to lib/include/pybind11/.github/labeler_merged.yml diff --git a/include/pybind11/.github/matchers/pylint.json b/lib/include/pybind11/.github/matchers/pylint.json similarity index 100% rename from include/pybind11/.github/matchers/pylint.json rename to lib/include/pybind11/.github/matchers/pylint.json diff --git a/include/pybind11/.github/pull_request_template.md b/lib/include/pybind11/.github/pull_request_template.md similarity index 100% rename from include/pybind11/.github/pull_request_template.md rename to lib/include/pybind11/.github/pull_request_template.md diff --git a/include/pybind11/.github/workflows/ci.yml b/lib/include/pybind11/.github/workflows/ci.yml similarity index 100% rename from include/pybind11/.github/workflows/ci.yml rename to lib/include/pybind11/.github/workflows/ci.yml diff --git a/include/pybind11/.github/workflows/configure.yml b/lib/include/pybind11/.github/workflows/configure.yml similarity index 100% rename from include/pybind11/.github/workflows/configure.yml rename to lib/include/pybind11/.github/workflows/configure.yml diff --git a/include/pybind11/.github/workflows/format.yml b/lib/include/pybind11/.github/workflows/format.yml similarity index 100% rename from include/pybind11/.github/workflows/format.yml rename to lib/include/pybind11/.github/workflows/format.yml diff --git a/include/pybind11/.github/workflows/labeler.yml b/lib/include/pybind11/.github/workflows/labeler.yml similarity index 100% rename from include/pybind11/.github/workflows/labeler.yml rename to lib/include/pybind11/.github/workflows/labeler.yml diff --git a/include/pybind11/.github/workflows/pip.yml b/lib/include/pybind11/.github/workflows/pip.yml similarity index 100% rename from include/pybind11/.github/workflows/pip.yml rename to lib/include/pybind11/.github/workflows/pip.yml diff --git a/include/pybind11/.github/workflows/upstream.yml b/lib/include/pybind11/.github/workflows/upstream.yml similarity index 100% rename from include/pybind11/.github/workflows/upstream.yml rename to lib/include/pybind11/.github/workflows/upstream.yml diff --git a/include/pybind11/.gitignore b/lib/include/pybind11/.gitignore similarity index 100% rename from include/pybind11/.gitignore rename to lib/include/pybind11/.gitignore diff --git a/include/pybind11/.pre-commit-config.yaml b/lib/include/pybind11/.pre-commit-config.yaml similarity index 100% rename from include/pybind11/.pre-commit-config.yaml rename to lib/include/pybind11/.pre-commit-config.yaml diff --git a/include/pybind11/.readthedocs.yml b/lib/include/pybind11/.readthedocs.yml similarity index 100% rename from include/pybind11/.readthedocs.yml rename to lib/include/pybind11/.readthedocs.yml diff --git a/include/pybind11/CMakeLists.txt b/lib/include/pybind11/CMakeLists.txt similarity index 100% rename from include/pybind11/CMakeLists.txt rename to lib/include/pybind11/CMakeLists.txt diff --git a/include/pybind11/LICENSE b/lib/include/pybind11/LICENSE similarity index 100% rename from include/pybind11/LICENSE rename to lib/include/pybind11/LICENSE diff --git a/include/pybind11/MANIFEST.in b/lib/include/pybind11/MANIFEST.in similarity index 100% rename from include/pybind11/MANIFEST.in rename to lib/include/pybind11/MANIFEST.in diff --git a/include/pybind11/README.rst b/lib/include/pybind11/README.rst similarity index 100% rename from include/pybind11/README.rst rename to lib/include/pybind11/README.rst diff --git a/include/pybind11/SECURITY.md b/lib/include/pybind11/SECURITY.md similarity index 100% rename from include/pybind11/SECURITY.md rename to lib/include/pybind11/SECURITY.md diff --git a/include/pybind11/docs/Doxyfile b/lib/include/pybind11/docs/Doxyfile similarity index 100% rename from include/pybind11/docs/Doxyfile rename to lib/include/pybind11/docs/Doxyfile diff --git a/include/pybind11/docs/_static/css/custom.css b/lib/include/pybind11/docs/_static/css/custom.css similarity index 100% rename from include/pybind11/docs/_static/css/custom.css rename to lib/include/pybind11/docs/_static/css/custom.css diff --git a/include/pybind11/docs/advanced/cast/chrono.rst b/lib/include/pybind11/docs/advanced/cast/chrono.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/chrono.rst rename to lib/include/pybind11/docs/advanced/cast/chrono.rst diff --git a/include/pybind11/docs/advanced/cast/custom.rst b/lib/include/pybind11/docs/advanced/cast/custom.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/custom.rst rename to lib/include/pybind11/docs/advanced/cast/custom.rst diff --git a/include/pybind11/docs/advanced/cast/eigen.rst b/lib/include/pybind11/docs/advanced/cast/eigen.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/eigen.rst rename to lib/include/pybind11/docs/advanced/cast/eigen.rst diff --git a/include/pybind11/docs/advanced/cast/functional.rst b/lib/include/pybind11/docs/advanced/cast/functional.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/functional.rst rename to lib/include/pybind11/docs/advanced/cast/functional.rst diff --git a/include/pybind11/docs/advanced/cast/index.rst b/lib/include/pybind11/docs/advanced/cast/index.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/index.rst rename to lib/include/pybind11/docs/advanced/cast/index.rst diff --git a/include/pybind11/docs/advanced/cast/overview.rst b/lib/include/pybind11/docs/advanced/cast/overview.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/overview.rst rename to lib/include/pybind11/docs/advanced/cast/overview.rst diff --git a/include/pybind11/docs/advanced/cast/stl.rst b/lib/include/pybind11/docs/advanced/cast/stl.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/stl.rst rename to lib/include/pybind11/docs/advanced/cast/stl.rst diff --git a/include/pybind11/docs/advanced/cast/strings.rst b/lib/include/pybind11/docs/advanced/cast/strings.rst similarity index 100% rename from include/pybind11/docs/advanced/cast/strings.rst rename to lib/include/pybind11/docs/advanced/cast/strings.rst diff --git a/include/pybind11/docs/advanced/classes.rst b/lib/include/pybind11/docs/advanced/classes.rst similarity index 100% rename from include/pybind11/docs/advanced/classes.rst rename to lib/include/pybind11/docs/advanced/classes.rst diff --git a/include/pybind11/docs/advanced/embedding.rst b/lib/include/pybind11/docs/advanced/embedding.rst similarity index 100% rename from include/pybind11/docs/advanced/embedding.rst rename to lib/include/pybind11/docs/advanced/embedding.rst diff --git a/include/pybind11/docs/advanced/exceptions.rst b/lib/include/pybind11/docs/advanced/exceptions.rst similarity index 100% rename from include/pybind11/docs/advanced/exceptions.rst rename to lib/include/pybind11/docs/advanced/exceptions.rst diff --git a/include/pybind11/docs/advanced/functions.rst b/lib/include/pybind11/docs/advanced/functions.rst similarity index 100% rename from include/pybind11/docs/advanced/functions.rst rename to lib/include/pybind11/docs/advanced/functions.rst diff --git a/include/pybind11/docs/advanced/misc.rst b/lib/include/pybind11/docs/advanced/misc.rst similarity index 100% rename from include/pybind11/docs/advanced/misc.rst rename to lib/include/pybind11/docs/advanced/misc.rst diff --git a/include/pybind11/docs/advanced/pycpp/index.rst b/lib/include/pybind11/docs/advanced/pycpp/index.rst similarity index 100% rename from include/pybind11/docs/advanced/pycpp/index.rst rename to lib/include/pybind11/docs/advanced/pycpp/index.rst diff --git a/include/pybind11/docs/advanced/pycpp/numpy.rst b/lib/include/pybind11/docs/advanced/pycpp/numpy.rst similarity index 100% rename from include/pybind11/docs/advanced/pycpp/numpy.rst rename to lib/include/pybind11/docs/advanced/pycpp/numpy.rst diff --git a/include/pybind11/docs/advanced/pycpp/object.rst b/lib/include/pybind11/docs/advanced/pycpp/object.rst similarity index 100% rename from include/pybind11/docs/advanced/pycpp/object.rst rename to lib/include/pybind11/docs/advanced/pycpp/object.rst diff --git a/include/pybind11/docs/advanced/pycpp/utilities.rst b/lib/include/pybind11/docs/advanced/pycpp/utilities.rst similarity index 100% rename from include/pybind11/docs/advanced/pycpp/utilities.rst rename to lib/include/pybind11/docs/advanced/pycpp/utilities.rst diff --git a/include/pybind11/docs/advanced/smart_ptrs.rst b/lib/include/pybind11/docs/advanced/smart_ptrs.rst similarity index 100% rename from include/pybind11/docs/advanced/smart_ptrs.rst rename to lib/include/pybind11/docs/advanced/smart_ptrs.rst diff --git a/include/pybind11/docs/basics.rst b/lib/include/pybind11/docs/basics.rst similarity index 100% rename from include/pybind11/docs/basics.rst rename to lib/include/pybind11/docs/basics.rst diff --git a/include/pybind11/docs/benchmark.py b/lib/include/pybind11/docs/benchmark.py similarity index 100% rename from include/pybind11/docs/benchmark.py rename to lib/include/pybind11/docs/benchmark.py diff --git a/include/pybind11/docs/benchmark.rst b/lib/include/pybind11/docs/benchmark.rst similarity index 100% rename from include/pybind11/docs/benchmark.rst rename to lib/include/pybind11/docs/benchmark.rst diff --git a/include/pybind11/docs/changelog.rst b/lib/include/pybind11/docs/changelog.rst similarity index 100% rename from include/pybind11/docs/changelog.rst rename to lib/include/pybind11/docs/changelog.rst diff --git a/include/pybind11/docs/classes.rst b/lib/include/pybind11/docs/classes.rst similarity index 100% rename from include/pybind11/docs/classes.rst rename to lib/include/pybind11/docs/classes.rst diff --git a/include/pybind11/docs/cmake/index.rst b/lib/include/pybind11/docs/cmake/index.rst similarity index 100% rename from include/pybind11/docs/cmake/index.rst rename to lib/include/pybind11/docs/cmake/index.rst diff --git a/include/pybind11/docs/compiling.rst b/lib/include/pybind11/docs/compiling.rst similarity index 100% rename from include/pybind11/docs/compiling.rst rename to lib/include/pybind11/docs/compiling.rst diff --git a/include/pybind11/docs/conf.py b/lib/include/pybind11/docs/conf.py similarity index 100% rename from include/pybind11/docs/conf.py rename to lib/include/pybind11/docs/conf.py diff --git a/include/pybind11/docs/faq.rst b/lib/include/pybind11/docs/faq.rst similarity index 100% rename from include/pybind11/docs/faq.rst rename to lib/include/pybind11/docs/faq.rst diff --git a/include/pybind11/docs/index.rst b/lib/include/pybind11/docs/index.rst similarity index 100% rename from include/pybind11/docs/index.rst rename to lib/include/pybind11/docs/index.rst diff --git a/include/pybind11/docs/installing.rst b/lib/include/pybind11/docs/installing.rst similarity index 100% rename from include/pybind11/docs/installing.rst rename to lib/include/pybind11/docs/installing.rst diff --git a/include/pybind11/docs/limitations.rst b/lib/include/pybind11/docs/limitations.rst similarity index 100% rename from include/pybind11/docs/limitations.rst rename to lib/include/pybind11/docs/limitations.rst diff --git a/include/pybind11/docs/pybind11-logo.png b/lib/include/pybind11/docs/pybind11-logo.png similarity index 100% rename from include/pybind11/docs/pybind11-logo.png rename to lib/include/pybind11/docs/pybind11-logo.png diff --git a/include/pybind11/docs/pybind11_vs_boost_python1.png b/lib/include/pybind11/docs/pybind11_vs_boost_python1.png similarity index 100% rename from include/pybind11/docs/pybind11_vs_boost_python1.png rename to lib/include/pybind11/docs/pybind11_vs_boost_python1.png diff --git a/include/pybind11/docs/pybind11_vs_boost_python1.svg b/lib/include/pybind11/docs/pybind11_vs_boost_python1.svg similarity index 100% rename from include/pybind11/docs/pybind11_vs_boost_python1.svg rename to lib/include/pybind11/docs/pybind11_vs_boost_python1.svg diff --git a/include/pybind11/docs/pybind11_vs_boost_python2.png b/lib/include/pybind11/docs/pybind11_vs_boost_python2.png similarity index 100% rename from include/pybind11/docs/pybind11_vs_boost_python2.png rename to lib/include/pybind11/docs/pybind11_vs_boost_python2.png diff --git a/include/pybind11/docs/pybind11_vs_boost_python2.svg b/lib/include/pybind11/docs/pybind11_vs_boost_python2.svg similarity index 100% rename from include/pybind11/docs/pybind11_vs_boost_python2.svg rename to lib/include/pybind11/docs/pybind11_vs_boost_python2.svg diff --git a/include/pybind11/docs/reference.rst b/lib/include/pybind11/docs/reference.rst similarity index 100% rename from include/pybind11/docs/reference.rst rename to lib/include/pybind11/docs/reference.rst diff --git a/include/pybind11/docs/release.rst b/lib/include/pybind11/docs/release.rst similarity index 100% rename from include/pybind11/docs/release.rst rename to lib/include/pybind11/docs/release.rst diff --git a/include/pybind11/docs/requirements.in b/lib/include/pybind11/docs/requirements.in similarity index 100% rename from include/pybind11/docs/requirements.in rename to lib/include/pybind11/docs/requirements.in diff --git a/include/pybind11/docs/requirements.txt b/lib/include/pybind11/docs/requirements.txt similarity index 100% rename from include/pybind11/docs/requirements.txt rename to lib/include/pybind11/docs/requirements.txt diff --git a/include/pybind11/docs/upgrade.rst b/lib/include/pybind11/docs/upgrade.rst similarity index 100% rename from include/pybind11/docs/upgrade.rst rename to lib/include/pybind11/docs/upgrade.rst diff --git a/include/pybind11/include/pybind11/attr.h b/lib/include/pybind11/include/pybind11/attr.h similarity index 100% rename from include/pybind11/include/pybind11/attr.h rename to lib/include/pybind11/include/pybind11/attr.h diff --git a/include/pybind11/include/pybind11/buffer_info.h b/lib/include/pybind11/include/pybind11/buffer_info.h similarity index 100% rename from include/pybind11/include/pybind11/buffer_info.h rename to lib/include/pybind11/include/pybind11/buffer_info.h diff --git a/include/pybind11/include/pybind11/cast.h b/lib/include/pybind11/include/pybind11/cast.h similarity index 100% rename from include/pybind11/include/pybind11/cast.h rename to lib/include/pybind11/include/pybind11/cast.h diff --git a/include/pybind11/include/pybind11/chrono.h b/lib/include/pybind11/include/pybind11/chrono.h similarity index 100% rename from include/pybind11/include/pybind11/chrono.h rename to lib/include/pybind11/include/pybind11/chrono.h diff --git a/include/pybind11/include/pybind11/common.h b/lib/include/pybind11/include/pybind11/common.h similarity index 100% rename from include/pybind11/include/pybind11/common.h rename to lib/include/pybind11/include/pybind11/common.h diff --git a/include/pybind11/include/pybind11/complex.h b/lib/include/pybind11/include/pybind11/complex.h similarity index 100% rename from include/pybind11/include/pybind11/complex.h rename to lib/include/pybind11/include/pybind11/complex.h diff --git a/include/pybind11/include/pybind11/detail/class.h b/lib/include/pybind11/include/pybind11/detail/class.h similarity index 100% rename from include/pybind11/include/pybind11/detail/class.h rename to lib/include/pybind11/include/pybind11/detail/class.h diff --git a/include/pybind11/include/pybind11/detail/common.h b/lib/include/pybind11/include/pybind11/detail/common.h similarity index 100% rename from include/pybind11/include/pybind11/detail/common.h rename to lib/include/pybind11/include/pybind11/detail/common.h diff --git a/include/pybind11/include/pybind11/detail/descr.h b/lib/include/pybind11/include/pybind11/detail/descr.h similarity index 100% rename from include/pybind11/include/pybind11/detail/descr.h rename to lib/include/pybind11/include/pybind11/detail/descr.h diff --git a/include/pybind11/include/pybind11/detail/init.h b/lib/include/pybind11/include/pybind11/detail/init.h similarity index 100% rename from include/pybind11/include/pybind11/detail/init.h rename to lib/include/pybind11/include/pybind11/detail/init.h diff --git a/include/pybind11/include/pybind11/detail/internals.h b/lib/include/pybind11/include/pybind11/detail/internals.h similarity index 100% rename from include/pybind11/include/pybind11/detail/internals.h rename to lib/include/pybind11/include/pybind11/detail/internals.h diff --git a/include/pybind11/include/pybind11/detail/type_caster_base.h b/lib/include/pybind11/include/pybind11/detail/type_caster_base.h similarity index 100% rename from include/pybind11/include/pybind11/detail/type_caster_base.h rename to lib/include/pybind11/include/pybind11/detail/type_caster_base.h diff --git a/include/pybind11/include/pybind11/detail/typeid.h b/lib/include/pybind11/include/pybind11/detail/typeid.h similarity index 100% rename from include/pybind11/include/pybind11/detail/typeid.h rename to lib/include/pybind11/include/pybind11/detail/typeid.h diff --git a/include/pybind11/include/pybind11/eigen.h b/lib/include/pybind11/include/pybind11/eigen.h similarity index 100% rename from include/pybind11/include/pybind11/eigen.h rename to lib/include/pybind11/include/pybind11/eigen.h diff --git a/include/pybind11/include/pybind11/eigen/common.h b/lib/include/pybind11/include/pybind11/eigen/common.h similarity index 100% rename from include/pybind11/include/pybind11/eigen/common.h rename to lib/include/pybind11/include/pybind11/eigen/common.h diff --git a/include/pybind11/include/pybind11/eigen/matrix.h b/lib/include/pybind11/include/pybind11/eigen/matrix.h similarity index 100% rename from include/pybind11/include/pybind11/eigen/matrix.h rename to lib/include/pybind11/include/pybind11/eigen/matrix.h diff --git a/include/pybind11/include/pybind11/eigen/tensor.h b/lib/include/pybind11/include/pybind11/eigen/tensor.h similarity index 100% rename from include/pybind11/include/pybind11/eigen/tensor.h rename to lib/include/pybind11/include/pybind11/eigen/tensor.h diff --git a/include/pybind11/include/pybind11/embed.h b/lib/include/pybind11/include/pybind11/embed.h similarity index 100% rename from include/pybind11/include/pybind11/embed.h rename to lib/include/pybind11/include/pybind11/embed.h diff --git a/include/pybind11/include/pybind11/eval.h b/lib/include/pybind11/include/pybind11/eval.h similarity index 100% rename from include/pybind11/include/pybind11/eval.h rename to lib/include/pybind11/include/pybind11/eval.h diff --git a/include/pybind11/include/pybind11/functional.h b/lib/include/pybind11/include/pybind11/functional.h similarity index 100% rename from include/pybind11/include/pybind11/functional.h rename to lib/include/pybind11/include/pybind11/functional.h diff --git a/include/pybind11/include/pybind11/gil.h b/lib/include/pybind11/include/pybind11/gil.h similarity index 100% rename from include/pybind11/include/pybind11/gil.h rename to lib/include/pybind11/include/pybind11/gil.h diff --git a/include/pybind11/include/pybind11/gil_safe_call_once.h b/lib/include/pybind11/include/pybind11/gil_safe_call_once.h similarity index 100% rename from include/pybind11/include/pybind11/gil_safe_call_once.h rename to lib/include/pybind11/include/pybind11/gil_safe_call_once.h diff --git a/include/pybind11/include/pybind11/iostream.h b/lib/include/pybind11/include/pybind11/iostream.h similarity index 100% rename from include/pybind11/include/pybind11/iostream.h rename to lib/include/pybind11/include/pybind11/iostream.h diff --git a/include/pybind11/include/pybind11/numpy.h b/lib/include/pybind11/include/pybind11/numpy.h similarity index 100% rename from include/pybind11/include/pybind11/numpy.h rename to lib/include/pybind11/include/pybind11/numpy.h diff --git a/include/pybind11/include/pybind11/operators.h b/lib/include/pybind11/include/pybind11/operators.h similarity index 100% rename from include/pybind11/include/pybind11/operators.h rename to lib/include/pybind11/include/pybind11/operators.h diff --git a/include/pybind11/include/pybind11/options.h b/lib/include/pybind11/include/pybind11/options.h similarity index 100% rename from include/pybind11/include/pybind11/options.h rename to lib/include/pybind11/include/pybind11/options.h diff --git a/include/pybind11/include/pybind11/pybind11.h b/lib/include/pybind11/include/pybind11/pybind11.h similarity index 100% rename from include/pybind11/include/pybind11/pybind11.h rename to lib/include/pybind11/include/pybind11/pybind11.h diff --git a/include/pybind11/include/pybind11/pytypes.h b/lib/include/pybind11/include/pybind11/pytypes.h similarity index 100% rename from include/pybind11/include/pybind11/pytypes.h rename to lib/include/pybind11/include/pybind11/pytypes.h diff --git a/include/pybind11/include/pybind11/stl.h b/lib/include/pybind11/include/pybind11/stl.h similarity index 100% rename from include/pybind11/include/pybind11/stl.h rename to lib/include/pybind11/include/pybind11/stl.h diff --git a/include/pybind11/include/pybind11/stl/filesystem.h b/lib/include/pybind11/include/pybind11/stl/filesystem.h similarity index 100% rename from include/pybind11/include/pybind11/stl/filesystem.h rename to lib/include/pybind11/include/pybind11/stl/filesystem.h diff --git a/include/pybind11/include/pybind11/stl_bind.h b/lib/include/pybind11/include/pybind11/stl_bind.h similarity index 100% rename from include/pybind11/include/pybind11/stl_bind.h rename to lib/include/pybind11/include/pybind11/stl_bind.h diff --git a/include/pybind11/include/pybind11/type_caster_pyobject_ptr.h b/lib/include/pybind11/include/pybind11/type_caster_pyobject_ptr.h similarity index 100% rename from include/pybind11/include/pybind11/type_caster_pyobject_ptr.h rename to lib/include/pybind11/include/pybind11/type_caster_pyobject_ptr.h diff --git a/include/pybind11/include/pybind11/typing.h b/lib/include/pybind11/include/pybind11/typing.h similarity index 100% rename from include/pybind11/include/pybind11/typing.h rename to lib/include/pybind11/include/pybind11/typing.h diff --git a/include/pybind11/noxfile.py b/lib/include/pybind11/noxfile.py similarity index 100% rename from include/pybind11/noxfile.py rename to lib/include/pybind11/noxfile.py diff --git a/include/pybind11/pybind11/__init__.py b/lib/include/pybind11/pybind11/__init__.py similarity index 100% rename from include/pybind11/pybind11/__init__.py rename to lib/include/pybind11/pybind11/__init__.py diff --git a/include/pybind11/pybind11/__main__.py b/lib/include/pybind11/pybind11/__main__.py similarity index 100% rename from include/pybind11/pybind11/__main__.py rename to lib/include/pybind11/pybind11/__main__.py diff --git a/include/pybind11/pybind11/_version.py b/lib/include/pybind11/pybind11/_version.py similarity index 100% rename from include/pybind11/pybind11/_version.py rename to lib/include/pybind11/pybind11/_version.py diff --git a/include/pybind11/pybind11/commands.py b/lib/include/pybind11/pybind11/commands.py similarity index 100% rename from include/pybind11/pybind11/commands.py rename to lib/include/pybind11/pybind11/commands.py diff --git a/include/pybind11/pybind11/py.typed b/lib/include/pybind11/pybind11/py.typed similarity index 100% rename from include/pybind11/pybind11/py.typed rename to lib/include/pybind11/pybind11/py.typed diff --git a/include/pybind11/pybind11/setup_helpers.py b/lib/include/pybind11/pybind11/setup_helpers.py similarity index 100% rename from include/pybind11/pybind11/setup_helpers.py rename to lib/include/pybind11/pybind11/setup_helpers.py diff --git a/include/pybind11/pyproject.toml b/lib/include/pybind11/pyproject.toml similarity index 100% rename from include/pybind11/pyproject.toml rename to lib/include/pybind11/pyproject.toml diff --git a/include/pybind11/setup.cfg b/lib/include/pybind11/setup.cfg similarity index 100% rename from include/pybind11/setup.cfg rename to lib/include/pybind11/setup.cfg diff --git a/include/pybind11/setup.py b/lib/include/pybind11/setup.py similarity index 100% rename from include/pybind11/setup.py rename to lib/include/pybind11/setup.py diff --git a/include/pybind11/tests/CMakeLists.txt b/lib/include/pybind11/tests/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/CMakeLists.txt rename to lib/include/pybind11/tests/CMakeLists.txt diff --git a/include/pybind11/tests/conftest.py b/lib/include/pybind11/tests/conftest.py similarity index 100% rename from include/pybind11/tests/conftest.py rename to lib/include/pybind11/tests/conftest.py diff --git a/include/pybind11/tests/constructor_stats.h b/lib/include/pybind11/tests/constructor_stats.h similarity index 100% rename from include/pybind11/tests/constructor_stats.h rename to lib/include/pybind11/tests/constructor_stats.h diff --git a/include/pybind11/tests/cross_module_gil_utils.cpp b/lib/include/pybind11/tests/cross_module_gil_utils.cpp similarity index 100% rename from include/pybind11/tests/cross_module_gil_utils.cpp rename to lib/include/pybind11/tests/cross_module_gil_utils.cpp diff --git a/include/pybind11/tests/cross_module_interleaved_error_already_set.cpp b/lib/include/pybind11/tests/cross_module_interleaved_error_already_set.cpp similarity index 100% rename from include/pybind11/tests/cross_module_interleaved_error_already_set.cpp rename to lib/include/pybind11/tests/cross_module_interleaved_error_already_set.cpp diff --git a/include/pybind11/tests/eigen_tensor_avoid_stl_array.cpp b/lib/include/pybind11/tests/eigen_tensor_avoid_stl_array.cpp similarity index 100% rename from include/pybind11/tests/eigen_tensor_avoid_stl_array.cpp rename to lib/include/pybind11/tests/eigen_tensor_avoid_stl_array.cpp diff --git a/include/pybind11/tests/env.py b/lib/include/pybind11/tests/env.py similarity index 100% rename from include/pybind11/tests/env.py rename to lib/include/pybind11/tests/env.py diff --git a/include/pybind11/tests/extra_python_package/pytest.ini b/lib/include/pybind11/tests/extra_python_package/pytest.ini similarity index 100% rename from include/pybind11/tests/extra_python_package/pytest.ini rename to lib/include/pybind11/tests/extra_python_package/pytest.ini diff --git a/include/pybind11/tests/extra_python_package/test_files.py b/lib/include/pybind11/tests/extra_python_package/test_files.py similarity index 100% rename from include/pybind11/tests/extra_python_package/test_files.py rename to lib/include/pybind11/tests/extra_python_package/test_files.py diff --git a/include/pybind11/tests/extra_setuptools/pytest.ini b/lib/include/pybind11/tests/extra_setuptools/pytest.ini similarity index 100% rename from include/pybind11/tests/extra_setuptools/pytest.ini rename to lib/include/pybind11/tests/extra_setuptools/pytest.ini diff --git a/include/pybind11/tests/extra_setuptools/test_setuphelper.py b/lib/include/pybind11/tests/extra_setuptools/test_setuphelper.py similarity index 100% rename from include/pybind11/tests/extra_setuptools/test_setuphelper.py rename to lib/include/pybind11/tests/extra_setuptools/test_setuphelper.py diff --git a/include/pybind11/tests/local_bindings.h b/lib/include/pybind11/tests/local_bindings.h similarity index 100% rename from include/pybind11/tests/local_bindings.h rename to lib/include/pybind11/tests/local_bindings.h diff --git a/include/pybind11/tests/object.h b/lib/include/pybind11/tests/object.h similarity index 100% rename from include/pybind11/tests/object.h rename to lib/include/pybind11/tests/object.h diff --git a/include/pybind11/tests/pybind11_cross_module_tests.cpp b/lib/include/pybind11/tests/pybind11_cross_module_tests.cpp similarity index 100% rename from include/pybind11/tests/pybind11_cross_module_tests.cpp rename to lib/include/pybind11/tests/pybind11_cross_module_tests.cpp diff --git a/include/pybind11/tests/pybind11_tests.cpp b/lib/include/pybind11/tests/pybind11_tests.cpp similarity index 100% rename from include/pybind11/tests/pybind11_tests.cpp rename to lib/include/pybind11/tests/pybind11_tests.cpp diff --git a/include/pybind11/tests/pybind11_tests.h b/lib/include/pybind11/tests/pybind11_tests.h similarity index 100% rename from include/pybind11/tests/pybind11_tests.h rename to lib/include/pybind11/tests/pybind11_tests.h diff --git a/include/pybind11/tests/pytest.ini b/lib/include/pybind11/tests/pytest.ini similarity index 100% rename from include/pybind11/tests/pytest.ini rename to lib/include/pybind11/tests/pytest.ini diff --git a/include/pybind11/tests/requirements.txt b/lib/include/pybind11/tests/requirements.txt similarity index 100% rename from include/pybind11/tests/requirements.txt rename to lib/include/pybind11/tests/requirements.txt diff --git a/include/pybind11/tests/test_async.cpp b/lib/include/pybind11/tests/test_async.cpp similarity index 100% rename from include/pybind11/tests/test_async.cpp rename to lib/include/pybind11/tests/test_async.cpp diff --git a/include/pybind11/tests/test_async.py b/lib/include/pybind11/tests/test_async.py similarity index 100% rename from include/pybind11/tests/test_async.py rename to lib/include/pybind11/tests/test_async.py diff --git a/include/pybind11/tests/test_buffers.cpp b/lib/include/pybind11/tests/test_buffers.cpp similarity index 100% rename from include/pybind11/tests/test_buffers.cpp rename to lib/include/pybind11/tests/test_buffers.cpp diff --git a/include/pybind11/tests/test_buffers.py b/lib/include/pybind11/tests/test_buffers.py similarity index 100% rename from include/pybind11/tests/test_buffers.py rename to lib/include/pybind11/tests/test_buffers.py diff --git a/include/pybind11/tests/test_builtin_casters.cpp b/lib/include/pybind11/tests/test_builtin_casters.cpp similarity index 100% rename from include/pybind11/tests/test_builtin_casters.cpp rename to lib/include/pybind11/tests/test_builtin_casters.cpp diff --git a/include/pybind11/tests/test_builtin_casters.py b/lib/include/pybind11/tests/test_builtin_casters.py similarity index 100% rename from include/pybind11/tests/test_builtin_casters.py rename to lib/include/pybind11/tests/test_builtin_casters.py diff --git a/include/pybind11/tests/test_call_policies.cpp b/lib/include/pybind11/tests/test_call_policies.cpp similarity index 100% rename from include/pybind11/tests/test_call_policies.cpp rename to lib/include/pybind11/tests/test_call_policies.cpp diff --git a/include/pybind11/tests/test_call_policies.py b/lib/include/pybind11/tests/test_call_policies.py similarity index 100% rename from include/pybind11/tests/test_call_policies.py rename to lib/include/pybind11/tests/test_call_policies.py diff --git a/include/pybind11/tests/test_callbacks.cpp b/lib/include/pybind11/tests/test_callbacks.cpp similarity index 100% rename from include/pybind11/tests/test_callbacks.cpp rename to lib/include/pybind11/tests/test_callbacks.cpp diff --git a/include/pybind11/tests/test_callbacks.py b/lib/include/pybind11/tests/test_callbacks.py similarity index 100% rename from include/pybind11/tests/test_callbacks.py rename to lib/include/pybind11/tests/test_callbacks.py diff --git a/include/pybind11/tests/test_chrono.cpp b/lib/include/pybind11/tests/test_chrono.cpp similarity index 100% rename from include/pybind11/tests/test_chrono.cpp rename to lib/include/pybind11/tests/test_chrono.cpp diff --git a/include/pybind11/tests/test_chrono.py b/lib/include/pybind11/tests/test_chrono.py similarity index 100% rename from include/pybind11/tests/test_chrono.py rename to lib/include/pybind11/tests/test_chrono.py diff --git a/include/pybind11/tests/test_class.cpp b/lib/include/pybind11/tests/test_class.cpp similarity index 100% rename from include/pybind11/tests/test_class.cpp rename to lib/include/pybind11/tests/test_class.cpp diff --git a/include/pybind11/tests/test_class.py b/lib/include/pybind11/tests/test_class.py similarity index 100% rename from include/pybind11/tests/test_class.py rename to lib/include/pybind11/tests/test_class.py diff --git a/include/pybind11/tests/test_cmake_build/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/embed.cpp b/lib/include/pybind11/tests/test_cmake_build/embed.cpp similarity index 100% rename from include/pybind11/tests/test_cmake_build/embed.cpp rename to lib/include/pybind11/tests/test_cmake_build/embed.cpp diff --git a/include/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/installed_embed/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/installed_function/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/installed_target/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/main.cpp b/lib/include/pybind11/tests/test_cmake_build/main.cpp similarity index 100% rename from include/pybind11/tests/test_cmake_build/main.cpp rename to lib/include/pybind11/tests/test_cmake_build/main.cpp diff --git a/include/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/subdirectory_embed/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/subdirectory_function/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt b/lib/include/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt rename to lib/include/pybind11/tests/test_cmake_build/subdirectory_target/CMakeLists.txt diff --git a/include/pybind11/tests/test_cmake_build/test.py b/lib/include/pybind11/tests/test_cmake_build/test.py similarity index 100% rename from include/pybind11/tests/test_cmake_build/test.py rename to lib/include/pybind11/tests/test_cmake_build/test.py diff --git a/include/pybind11/tests/test_const_name.cpp b/lib/include/pybind11/tests/test_const_name.cpp similarity index 100% rename from include/pybind11/tests/test_const_name.cpp rename to lib/include/pybind11/tests/test_const_name.cpp diff --git a/include/pybind11/tests/test_const_name.py b/lib/include/pybind11/tests/test_const_name.py similarity index 100% rename from include/pybind11/tests/test_const_name.py rename to lib/include/pybind11/tests/test_const_name.py diff --git a/include/pybind11/tests/test_constants_and_functions.cpp b/lib/include/pybind11/tests/test_constants_and_functions.cpp similarity index 100% rename from include/pybind11/tests/test_constants_and_functions.cpp rename to lib/include/pybind11/tests/test_constants_and_functions.cpp diff --git a/include/pybind11/tests/test_constants_and_functions.py b/lib/include/pybind11/tests/test_constants_and_functions.py similarity index 100% rename from include/pybind11/tests/test_constants_and_functions.py rename to lib/include/pybind11/tests/test_constants_and_functions.py diff --git a/include/pybind11/tests/test_copy_move.cpp b/lib/include/pybind11/tests/test_copy_move.cpp similarity index 100% rename from include/pybind11/tests/test_copy_move.cpp rename to lib/include/pybind11/tests/test_copy_move.cpp diff --git a/include/pybind11/tests/test_copy_move.py b/lib/include/pybind11/tests/test_copy_move.py similarity index 100% rename from include/pybind11/tests/test_copy_move.py rename to lib/include/pybind11/tests/test_copy_move.py diff --git a/include/pybind11/tests/test_custom_type_casters.cpp b/lib/include/pybind11/tests/test_custom_type_casters.cpp similarity index 100% rename from include/pybind11/tests/test_custom_type_casters.cpp rename to lib/include/pybind11/tests/test_custom_type_casters.cpp diff --git a/include/pybind11/tests/test_custom_type_casters.py b/lib/include/pybind11/tests/test_custom_type_casters.py similarity index 100% rename from include/pybind11/tests/test_custom_type_casters.py rename to lib/include/pybind11/tests/test_custom_type_casters.py diff --git a/include/pybind11/tests/test_custom_type_setup.cpp b/lib/include/pybind11/tests/test_custom_type_setup.cpp similarity index 100% rename from include/pybind11/tests/test_custom_type_setup.cpp rename to lib/include/pybind11/tests/test_custom_type_setup.cpp diff --git a/include/pybind11/tests/test_custom_type_setup.py b/lib/include/pybind11/tests/test_custom_type_setup.py similarity index 100% rename from include/pybind11/tests/test_custom_type_setup.py rename to lib/include/pybind11/tests/test_custom_type_setup.py diff --git a/include/pybind11/tests/test_docstring_options.cpp b/lib/include/pybind11/tests/test_docstring_options.cpp similarity index 100% rename from include/pybind11/tests/test_docstring_options.cpp rename to lib/include/pybind11/tests/test_docstring_options.cpp diff --git a/include/pybind11/tests/test_docstring_options.py b/lib/include/pybind11/tests/test_docstring_options.py similarity index 100% rename from include/pybind11/tests/test_docstring_options.py rename to lib/include/pybind11/tests/test_docstring_options.py diff --git a/include/pybind11/tests/test_eigen_matrix.cpp b/lib/include/pybind11/tests/test_eigen_matrix.cpp similarity index 100% rename from include/pybind11/tests/test_eigen_matrix.cpp rename to lib/include/pybind11/tests/test_eigen_matrix.cpp diff --git a/include/pybind11/tests/test_eigen_matrix.py b/lib/include/pybind11/tests/test_eigen_matrix.py similarity index 100% rename from include/pybind11/tests/test_eigen_matrix.py rename to lib/include/pybind11/tests/test_eigen_matrix.py diff --git a/include/pybind11/tests/test_eigen_tensor.cpp b/lib/include/pybind11/tests/test_eigen_tensor.cpp similarity index 100% rename from include/pybind11/tests/test_eigen_tensor.cpp rename to lib/include/pybind11/tests/test_eigen_tensor.cpp diff --git a/include/pybind11/tests/test_eigen_tensor.inl b/lib/include/pybind11/tests/test_eigen_tensor.inl similarity index 100% rename from include/pybind11/tests/test_eigen_tensor.inl rename to lib/include/pybind11/tests/test_eigen_tensor.inl diff --git a/include/pybind11/tests/test_eigen_tensor.py b/lib/include/pybind11/tests/test_eigen_tensor.py similarity index 100% rename from include/pybind11/tests/test_eigen_tensor.py rename to lib/include/pybind11/tests/test_eigen_tensor.py diff --git a/include/pybind11/tests/test_embed/CMakeLists.txt b/lib/include/pybind11/tests/test_embed/CMakeLists.txt similarity index 100% rename from include/pybind11/tests/test_embed/CMakeLists.txt rename to lib/include/pybind11/tests/test_embed/CMakeLists.txt diff --git a/include/pybind11/tests/test_embed/catch.cpp b/lib/include/pybind11/tests/test_embed/catch.cpp similarity index 100% rename from include/pybind11/tests/test_embed/catch.cpp rename to lib/include/pybind11/tests/test_embed/catch.cpp diff --git a/include/pybind11/tests/test_embed/external_module.cpp b/lib/include/pybind11/tests/test_embed/external_module.cpp similarity index 100% rename from include/pybind11/tests/test_embed/external_module.cpp rename to lib/include/pybind11/tests/test_embed/external_module.cpp diff --git a/include/pybind11/tests/test_embed/test_interpreter.cpp b/lib/include/pybind11/tests/test_embed/test_interpreter.cpp similarity index 100% rename from include/pybind11/tests/test_embed/test_interpreter.cpp rename to lib/include/pybind11/tests/test_embed/test_interpreter.cpp diff --git a/include/pybind11/tests/test_embed/test_interpreter.py b/lib/include/pybind11/tests/test_embed/test_interpreter.py similarity index 100% rename from include/pybind11/tests/test_embed/test_interpreter.py rename to lib/include/pybind11/tests/test_embed/test_interpreter.py diff --git a/include/pybind11/tests/test_embed/test_trampoline.py b/lib/include/pybind11/tests/test_embed/test_trampoline.py similarity index 100% rename from include/pybind11/tests/test_embed/test_trampoline.py rename to lib/include/pybind11/tests/test_embed/test_trampoline.py diff --git a/include/pybind11/tests/test_enum.cpp b/lib/include/pybind11/tests/test_enum.cpp similarity index 100% rename from include/pybind11/tests/test_enum.cpp rename to lib/include/pybind11/tests/test_enum.cpp diff --git a/include/pybind11/tests/test_enum.py b/lib/include/pybind11/tests/test_enum.py similarity index 100% rename from include/pybind11/tests/test_enum.py rename to lib/include/pybind11/tests/test_enum.py diff --git a/include/pybind11/tests/test_eval.cpp b/lib/include/pybind11/tests/test_eval.cpp similarity index 100% rename from include/pybind11/tests/test_eval.cpp rename to lib/include/pybind11/tests/test_eval.cpp diff --git a/include/pybind11/tests/test_eval.py b/lib/include/pybind11/tests/test_eval.py similarity index 100% rename from include/pybind11/tests/test_eval.py rename to lib/include/pybind11/tests/test_eval.py diff --git a/include/pybind11/tests/test_eval_call.py b/lib/include/pybind11/tests/test_eval_call.py similarity index 100% rename from include/pybind11/tests/test_eval_call.py rename to lib/include/pybind11/tests/test_eval_call.py diff --git a/include/pybind11/tests/test_exceptions.cpp b/lib/include/pybind11/tests/test_exceptions.cpp similarity index 100% rename from include/pybind11/tests/test_exceptions.cpp rename to lib/include/pybind11/tests/test_exceptions.cpp diff --git a/include/pybind11/tests/test_exceptions.h b/lib/include/pybind11/tests/test_exceptions.h similarity index 100% rename from include/pybind11/tests/test_exceptions.h rename to lib/include/pybind11/tests/test_exceptions.h diff --git a/include/pybind11/tests/test_exceptions.py b/lib/include/pybind11/tests/test_exceptions.py similarity index 100% rename from include/pybind11/tests/test_exceptions.py rename to lib/include/pybind11/tests/test_exceptions.py diff --git a/include/pybind11/tests/test_factory_constructors.cpp b/lib/include/pybind11/tests/test_factory_constructors.cpp similarity index 100% rename from include/pybind11/tests/test_factory_constructors.cpp rename to lib/include/pybind11/tests/test_factory_constructors.cpp diff --git a/include/pybind11/tests/test_factory_constructors.py b/lib/include/pybind11/tests/test_factory_constructors.py similarity index 100% rename from include/pybind11/tests/test_factory_constructors.py rename to lib/include/pybind11/tests/test_factory_constructors.py diff --git a/include/pybind11/tests/test_gil_scoped.cpp b/lib/include/pybind11/tests/test_gil_scoped.cpp similarity index 100% rename from include/pybind11/tests/test_gil_scoped.cpp rename to lib/include/pybind11/tests/test_gil_scoped.cpp diff --git a/include/pybind11/tests/test_gil_scoped.py b/lib/include/pybind11/tests/test_gil_scoped.py similarity index 100% rename from include/pybind11/tests/test_gil_scoped.py rename to lib/include/pybind11/tests/test_gil_scoped.py diff --git a/include/pybind11/tests/test_iostream.cpp b/lib/include/pybind11/tests/test_iostream.cpp similarity index 100% rename from include/pybind11/tests/test_iostream.cpp rename to lib/include/pybind11/tests/test_iostream.cpp diff --git a/include/pybind11/tests/test_iostream.py b/lib/include/pybind11/tests/test_iostream.py similarity index 100% rename from include/pybind11/tests/test_iostream.py rename to lib/include/pybind11/tests/test_iostream.py diff --git a/include/pybind11/tests/test_kwargs_and_defaults.cpp b/lib/include/pybind11/tests/test_kwargs_and_defaults.cpp similarity index 100% rename from include/pybind11/tests/test_kwargs_and_defaults.cpp rename to lib/include/pybind11/tests/test_kwargs_and_defaults.cpp diff --git a/include/pybind11/tests/test_kwargs_and_defaults.py b/lib/include/pybind11/tests/test_kwargs_and_defaults.py similarity index 100% rename from include/pybind11/tests/test_kwargs_and_defaults.py rename to lib/include/pybind11/tests/test_kwargs_and_defaults.py diff --git a/include/pybind11/tests/test_local_bindings.cpp b/lib/include/pybind11/tests/test_local_bindings.cpp similarity index 100% rename from include/pybind11/tests/test_local_bindings.cpp rename to lib/include/pybind11/tests/test_local_bindings.cpp diff --git a/include/pybind11/tests/test_local_bindings.py b/lib/include/pybind11/tests/test_local_bindings.py similarity index 100% rename from include/pybind11/tests/test_local_bindings.py rename to lib/include/pybind11/tests/test_local_bindings.py diff --git a/include/pybind11/tests/test_methods_and_attributes.cpp b/lib/include/pybind11/tests/test_methods_and_attributes.cpp similarity index 100% rename from include/pybind11/tests/test_methods_and_attributes.cpp rename to lib/include/pybind11/tests/test_methods_and_attributes.cpp diff --git a/include/pybind11/tests/test_methods_and_attributes.py b/lib/include/pybind11/tests/test_methods_and_attributes.py similarity index 100% rename from include/pybind11/tests/test_methods_and_attributes.py rename to lib/include/pybind11/tests/test_methods_and_attributes.py diff --git a/include/pybind11/tests/test_modules.cpp b/lib/include/pybind11/tests/test_modules.cpp similarity index 100% rename from include/pybind11/tests/test_modules.cpp rename to lib/include/pybind11/tests/test_modules.cpp diff --git a/include/pybind11/tests/test_modules.py b/lib/include/pybind11/tests/test_modules.py similarity index 100% rename from include/pybind11/tests/test_modules.py rename to lib/include/pybind11/tests/test_modules.py diff --git a/include/pybind11/tests/test_multiple_inheritance.cpp b/lib/include/pybind11/tests/test_multiple_inheritance.cpp similarity index 100% rename from include/pybind11/tests/test_multiple_inheritance.cpp rename to lib/include/pybind11/tests/test_multiple_inheritance.cpp diff --git a/include/pybind11/tests/test_multiple_inheritance.py b/lib/include/pybind11/tests/test_multiple_inheritance.py similarity index 100% rename from include/pybind11/tests/test_multiple_inheritance.py rename to lib/include/pybind11/tests/test_multiple_inheritance.py diff --git a/include/pybind11/tests/test_numpy_array.cpp b/lib/include/pybind11/tests/test_numpy_array.cpp similarity index 100% rename from include/pybind11/tests/test_numpy_array.cpp rename to lib/include/pybind11/tests/test_numpy_array.cpp diff --git a/include/pybind11/tests/test_numpy_array.py b/lib/include/pybind11/tests/test_numpy_array.py similarity index 100% rename from include/pybind11/tests/test_numpy_array.py rename to lib/include/pybind11/tests/test_numpy_array.py diff --git a/include/pybind11/tests/test_numpy_dtypes.cpp b/lib/include/pybind11/tests/test_numpy_dtypes.cpp similarity index 100% rename from include/pybind11/tests/test_numpy_dtypes.cpp rename to lib/include/pybind11/tests/test_numpy_dtypes.cpp diff --git a/include/pybind11/tests/test_numpy_dtypes.py b/lib/include/pybind11/tests/test_numpy_dtypes.py similarity index 100% rename from include/pybind11/tests/test_numpy_dtypes.py rename to lib/include/pybind11/tests/test_numpy_dtypes.py diff --git a/include/pybind11/tests/test_numpy_vectorize.cpp b/lib/include/pybind11/tests/test_numpy_vectorize.cpp similarity index 100% rename from include/pybind11/tests/test_numpy_vectorize.cpp rename to lib/include/pybind11/tests/test_numpy_vectorize.cpp diff --git a/include/pybind11/tests/test_numpy_vectorize.py b/lib/include/pybind11/tests/test_numpy_vectorize.py similarity index 100% rename from include/pybind11/tests/test_numpy_vectorize.py rename to lib/include/pybind11/tests/test_numpy_vectorize.py diff --git a/include/pybind11/tests/test_opaque_types.cpp b/lib/include/pybind11/tests/test_opaque_types.cpp similarity index 100% rename from include/pybind11/tests/test_opaque_types.cpp rename to lib/include/pybind11/tests/test_opaque_types.cpp diff --git a/include/pybind11/tests/test_opaque_types.py b/lib/include/pybind11/tests/test_opaque_types.py similarity index 100% rename from include/pybind11/tests/test_opaque_types.py rename to lib/include/pybind11/tests/test_opaque_types.py diff --git a/include/pybind11/tests/test_operator_overloading.cpp b/lib/include/pybind11/tests/test_operator_overloading.cpp similarity index 100% rename from include/pybind11/tests/test_operator_overloading.cpp rename to lib/include/pybind11/tests/test_operator_overloading.cpp diff --git a/include/pybind11/tests/test_operator_overloading.py b/lib/include/pybind11/tests/test_operator_overloading.py similarity index 100% rename from include/pybind11/tests/test_operator_overloading.py rename to lib/include/pybind11/tests/test_operator_overloading.py diff --git a/include/pybind11/tests/test_pickling.cpp b/lib/include/pybind11/tests/test_pickling.cpp similarity index 100% rename from include/pybind11/tests/test_pickling.cpp rename to lib/include/pybind11/tests/test_pickling.cpp diff --git a/include/pybind11/tests/test_pickling.py b/lib/include/pybind11/tests/test_pickling.py similarity index 100% rename from include/pybind11/tests/test_pickling.py rename to lib/include/pybind11/tests/test_pickling.py diff --git a/include/pybind11/tests/test_python_multiple_inheritance.cpp b/lib/include/pybind11/tests/test_python_multiple_inheritance.cpp similarity index 100% rename from include/pybind11/tests/test_python_multiple_inheritance.cpp rename to lib/include/pybind11/tests/test_python_multiple_inheritance.cpp diff --git a/include/pybind11/tests/test_python_multiple_inheritance.py b/lib/include/pybind11/tests/test_python_multiple_inheritance.py similarity index 100% rename from include/pybind11/tests/test_python_multiple_inheritance.py rename to lib/include/pybind11/tests/test_python_multiple_inheritance.py diff --git a/include/pybind11/tests/test_pytypes.cpp b/lib/include/pybind11/tests/test_pytypes.cpp similarity index 100% rename from include/pybind11/tests/test_pytypes.cpp rename to lib/include/pybind11/tests/test_pytypes.cpp diff --git a/include/pybind11/tests/test_pytypes.py b/lib/include/pybind11/tests/test_pytypes.py similarity index 100% rename from include/pybind11/tests/test_pytypes.py rename to lib/include/pybind11/tests/test_pytypes.py diff --git a/include/pybind11/tests/test_sequences_and_iterators.cpp b/lib/include/pybind11/tests/test_sequences_and_iterators.cpp similarity index 100% rename from include/pybind11/tests/test_sequences_and_iterators.cpp rename to lib/include/pybind11/tests/test_sequences_and_iterators.cpp diff --git a/include/pybind11/tests/test_sequences_and_iterators.py b/lib/include/pybind11/tests/test_sequences_and_iterators.py similarity index 100% rename from include/pybind11/tests/test_sequences_and_iterators.py rename to lib/include/pybind11/tests/test_sequences_and_iterators.py diff --git a/include/pybind11/tests/test_smart_ptr.cpp b/lib/include/pybind11/tests/test_smart_ptr.cpp similarity index 100% rename from include/pybind11/tests/test_smart_ptr.cpp rename to lib/include/pybind11/tests/test_smart_ptr.cpp diff --git a/include/pybind11/tests/test_smart_ptr.py b/lib/include/pybind11/tests/test_smart_ptr.py similarity index 100% rename from include/pybind11/tests/test_smart_ptr.py rename to lib/include/pybind11/tests/test_smart_ptr.py diff --git a/include/pybind11/tests/test_stl.cpp b/lib/include/pybind11/tests/test_stl.cpp similarity index 100% rename from include/pybind11/tests/test_stl.cpp rename to lib/include/pybind11/tests/test_stl.cpp diff --git a/include/pybind11/tests/test_stl.py b/lib/include/pybind11/tests/test_stl.py similarity index 100% rename from include/pybind11/tests/test_stl.py rename to lib/include/pybind11/tests/test_stl.py diff --git a/include/pybind11/tests/test_stl_binders.cpp b/lib/include/pybind11/tests/test_stl_binders.cpp similarity index 100% rename from include/pybind11/tests/test_stl_binders.cpp rename to lib/include/pybind11/tests/test_stl_binders.cpp diff --git a/include/pybind11/tests/test_stl_binders.py b/lib/include/pybind11/tests/test_stl_binders.py similarity index 100% rename from include/pybind11/tests/test_stl_binders.py rename to lib/include/pybind11/tests/test_stl_binders.py diff --git a/include/pybind11/tests/test_tagbased_polymorphic.cpp b/lib/include/pybind11/tests/test_tagbased_polymorphic.cpp similarity index 100% rename from include/pybind11/tests/test_tagbased_polymorphic.cpp rename to lib/include/pybind11/tests/test_tagbased_polymorphic.cpp diff --git a/include/pybind11/tests/test_tagbased_polymorphic.py b/lib/include/pybind11/tests/test_tagbased_polymorphic.py similarity index 100% rename from include/pybind11/tests/test_tagbased_polymorphic.py rename to lib/include/pybind11/tests/test_tagbased_polymorphic.py diff --git a/include/pybind11/tests/test_thread.cpp b/lib/include/pybind11/tests/test_thread.cpp similarity index 100% rename from include/pybind11/tests/test_thread.cpp rename to lib/include/pybind11/tests/test_thread.cpp diff --git a/include/pybind11/tests/test_thread.py b/lib/include/pybind11/tests/test_thread.py similarity index 100% rename from include/pybind11/tests/test_thread.py rename to lib/include/pybind11/tests/test_thread.py diff --git a/include/pybind11/tests/test_type_caster_pyobject_ptr.cpp b/lib/include/pybind11/tests/test_type_caster_pyobject_ptr.cpp similarity index 100% rename from include/pybind11/tests/test_type_caster_pyobject_ptr.cpp rename to lib/include/pybind11/tests/test_type_caster_pyobject_ptr.cpp diff --git a/include/pybind11/tests/test_type_caster_pyobject_ptr.py b/lib/include/pybind11/tests/test_type_caster_pyobject_ptr.py similarity index 100% rename from include/pybind11/tests/test_type_caster_pyobject_ptr.py rename to lib/include/pybind11/tests/test_type_caster_pyobject_ptr.py diff --git a/include/pybind11/tests/test_union.cpp b/lib/include/pybind11/tests/test_union.cpp similarity index 100% rename from include/pybind11/tests/test_union.cpp rename to lib/include/pybind11/tests/test_union.cpp diff --git a/include/pybind11/tests/test_union.py b/lib/include/pybind11/tests/test_union.py similarity index 100% rename from include/pybind11/tests/test_union.py rename to lib/include/pybind11/tests/test_union.py diff --git a/include/pybind11/tests/test_unnamed_namespace_a.cpp b/lib/include/pybind11/tests/test_unnamed_namespace_a.cpp similarity index 100% rename from include/pybind11/tests/test_unnamed_namespace_a.cpp rename to lib/include/pybind11/tests/test_unnamed_namespace_a.cpp diff --git a/include/pybind11/tests/test_unnamed_namespace_a.py b/lib/include/pybind11/tests/test_unnamed_namespace_a.py similarity index 100% rename from include/pybind11/tests/test_unnamed_namespace_a.py rename to lib/include/pybind11/tests/test_unnamed_namespace_a.py diff --git a/include/pybind11/tests/test_unnamed_namespace_b.cpp b/lib/include/pybind11/tests/test_unnamed_namespace_b.cpp similarity index 100% rename from include/pybind11/tests/test_unnamed_namespace_b.cpp rename to lib/include/pybind11/tests/test_unnamed_namespace_b.cpp diff --git a/include/pybind11/tests/test_unnamed_namespace_b.py b/lib/include/pybind11/tests/test_unnamed_namespace_b.py similarity index 100% rename from include/pybind11/tests/test_unnamed_namespace_b.py rename to lib/include/pybind11/tests/test_unnamed_namespace_b.py diff --git a/include/pybind11/tests/test_vector_unique_ptr_member.cpp b/lib/include/pybind11/tests/test_vector_unique_ptr_member.cpp similarity index 100% rename from include/pybind11/tests/test_vector_unique_ptr_member.cpp rename to lib/include/pybind11/tests/test_vector_unique_ptr_member.cpp diff --git a/include/pybind11/tests/test_vector_unique_ptr_member.py b/lib/include/pybind11/tests/test_vector_unique_ptr_member.py similarity index 100% rename from include/pybind11/tests/test_vector_unique_ptr_member.py rename to lib/include/pybind11/tests/test_vector_unique_ptr_member.py diff --git a/include/pybind11/tests/test_virtual_functions.cpp b/lib/include/pybind11/tests/test_virtual_functions.cpp similarity index 100% rename from include/pybind11/tests/test_virtual_functions.cpp rename to lib/include/pybind11/tests/test_virtual_functions.cpp diff --git a/include/pybind11/tests/test_virtual_functions.py b/lib/include/pybind11/tests/test_virtual_functions.py similarity index 100% rename from include/pybind11/tests/test_virtual_functions.py rename to lib/include/pybind11/tests/test_virtual_functions.py diff --git a/include/pybind11/tests/valgrind-numpy-scipy.supp b/lib/include/pybind11/tests/valgrind-numpy-scipy.supp similarity index 100% rename from include/pybind11/tests/valgrind-numpy-scipy.supp rename to lib/include/pybind11/tests/valgrind-numpy-scipy.supp diff --git a/include/pybind11/tests/valgrind-python.supp b/lib/include/pybind11/tests/valgrind-python.supp similarity index 100% rename from include/pybind11/tests/valgrind-python.supp rename to lib/include/pybind11/tests/valgrind-python.supp diff --git a/include/pybind11/tools/FindCatch.cmake b/lib/include/pybind11/tools/FindCatch.cmake similarity index 100% rename from include/pybind11/tools/FindCatch.cmake rename to lib/include/pybind11/tools/FindCatch.cmake diff --git a/include/pybind11/tools/FindEigen3.cmake b/lib/include/pybind11/tools/FindEigen3.cmake similarity index 100% rename from include/pybind11/tools/FindEigen3.cmake rename to lib/include/pybind11/tools/FindEigen3.cmake diff --git a/include/pybind11/tools/FindPythonLibsNew.cmake b/lib/include/pybind11/tools/FindPythonLibsNew.cmake similarity index 100% rename from include/pybind11/tools/FindPythonLibsNew.cmake rename to lib/include/pybind11/tools/FindPythonLibsNew.cmake diff --git a/include/pybind11/tools/JoinPaths.cmake b/lib/include/pybind11/tools/JoinPaths.cmake similarity index 100% rename from include/pybind11/tools/JoinPaths.cmake rename to lib/include/pybind11/tools/JoinPaths.cmake diff --git a/include/pybind11/tools/check-style.sh b/lib/include/pybind11/tools/check-style.sh similarity index 100% rename from include/pybind11/tools/check-style.sh rename to lib/include/pybind11/tools/check-style.sh diff --git a/include/pybind11/tools/cmake_uninstall.cmake.in b/lib/include/pybind11/tools/cmake_uninstall.cmake.in similarity index 100% rename from include/pybind11/tools/cmake_uninstall.cmake.in rename to lib/include/pybind11/tools/cmake_uninstall.cmake.in diff --git a/include/pybind11/tools/codespell_ignore_lines_from_errors.py b/lib/include/pybind11/tools/codespell_ignore_lines_from_errors.py similarity index 100% rename from include/pybind11/tools/codespell_ignore_lines_from_errors.py rename to lib/include/pybind11/tools/codespell_ignore_lines_from_errors.py diff --git a/include/pybind11/tools/libsize.py b/lib/include/pybind11/tools/libsize.py similarity index 100% rename from include/pybind11/tools/libsize.py rename to lib/include/pybind11/tools/libsize.py diff --git a/include/pybind11/tools/make_changelog.py b/lib/include/pybind11/tools/make_changelog.py similarity index 100% rename from include/pybind11/tools/make_changelog.py rename to lib/include/pybind11/tools/make_changelog.py diff --git a/include/pybind11/tools/pybind11.pc.in b/lib/include/pybind11/tools/pybind11.pc.in similarity index 100% rename from include/pybind11/tools/pybind11.pc.in rename to lib/include/pybind11/tools/pybind11.pc.in diff --git a/include/pybind11/tools/pybind11Common.cmake b/lib/include/pybind11/tools/pybind11Common.cmake similarity index 100% rename from include/pybind11/tools/pybind11Common.cmake rename to lib/include/pybind11/tools/pybind11Common.cmake diff --git a/include/pybind11/tools/pybind11Config.cmake.in b/lib/include/pybind11/tools/pybind11Config.cmake.in similarity index 100% rename from include/pybind11/tools/pybind11Config.cmake.in rename to lib/include/pybind11/tools/pybind11Config.cmake.in diff --git a/include/pybind11/tools/pybind11GuessPythonExtSuffix.cmake b/lib/include/pybind11/tools/pybind11GuessPythonExtSuffix.cmake similarity index 100% rename from include/pybind11/tools/pybind11GuessPythonExtSuffix.cmake rename to lib/include/pybind11/tools/pybind11GuessPythonExtSuffix.cmake diff --git a/include/pybind11/tools/pybind11NewTools.cmake b/lib/include/pybind11/tools/pybind11NewTools.cmake similarity index 100% rename from include/pybind11/tools/pybind11NewTools.cmake rename to lib/include/pybind11/tools/pybind11NewTools.cmake diff --git a/include/pybind11/tools/pybind11Tools.cmake b/lib/include/pybind11/tools/pybind11Tools.cmake similarity index 100% rename from include/pybind11/tools/pybind11Tools.cmake rename to lib/include/pybind11/tools/pybind11Tools.cmake diff --git a/include/pybind11/tools/pyproject.toml b/lib/include/pybind11/tools/pyproject.toml similarity index 100% rename from include/pybind11/tools/pyproject.toml rename to lib/include/pybind11/tools/pyproject.toml diff --git a/include/pybind11/tools/setup_global.py.in b/lib/include/pybind11/tools/setup_global.py.in similarity index 100% rename from include/pybind11/tools/setup_global.py.in rename to lib/include/pybind11/tools/setup_global.py.in diff --git a/include/pybind11/tools/setup_main.py.in b/lib/include/pybind11/tools/setup_main.py.in similarity index 100% rename from include/pybind11/tools/setup_main.py.in rename to lib/include/pybind11/tools/setup_main.py.in diff --git a/include/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake b/lib/include/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake similarity index 100% rename from include/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake rename to lib/include/pybind11/tools/test-pybind11GuessPythonExtSuffix.cmake diff --git a/include/token_granter.hpp b/lib/include/token_granter.hpp similarity index 100% rename from include/token_granter.hpp rename to lib/include/token_granter.hpp diff --git a/lib/src/CMakeLists.txt b/lib/src/CMakeLists.txt new file mode 100644 index 0000000..fc5cdbf --- /dev/null +++ b/lib/src/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.23) +project(TokenGranterWrapper) + +set(CMAKE_CXX_STANDARD 17) + +set(CURL_LIBRARY "-lcurl") +find_package(CURL REQUIRED) + +add_library(token_granter STATIC token_granter.cpp) + +target_link_libraries(token_granter ${CURL_LIBRARIES}) +target_include_directories(token_granter PRIVATE ${CURL_INCLUDE_DIRS}) +set_target_properties(token_granter PROPERTIES POSITION_INDEPENDENT_CODE ON) + diff --git a/src/token_granter.cpp b/lib/src/token_granter.cpp similarity index 100% rename from src/token_granter.cpp rename to lib/src/token_granter.cpp diff --git a/setup.py b/setup.py index 2c92543..e5217bd 100644 --- a/setup.py +++ b/setup.py @@ -10,13 +10,11 @@ from setuptools import setup, find_packages, Extension from setuptools.command.build_ext import build_ext -""" +''' Modified from https://www.benjack.io/2017/06/12/python-cpp-tests.html -""" - - +''' class CMakeExtension(Extension): - def __init__(self, name, sourcedir=""): + def __init__(self, name, sourcedir=''): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) @@ -24,76 +22,66 @@ def __init__(self, name, sourcedir=""): class CMakeBuild(build_ext): def run(self): try: - out = subprocess.check_output(["cmake", "--version"]) + out = subprocess.check_output(['cmake', '--version']) except OSError: raise RuntimeError( - "CMake must be installed to build the following extensions: " - + ", ".join(e.name for e in self.extensions) - ) + "CMake must be installed to build the following extensions: " + + ", ".join(e.name for e in self.extensions)) if platform.system() == "Windows": - cmake_version = LooseVersion( - re.search(r"version\s*([\d.]+)", out.decode()).group(1) - ) - if cmake_version < "3.1.0": + cmake_version = LooseVersion(re.search(r'version\s*([\d.]+)', + out.decode()).group(1)) + if cmake_version < '3.1.0': raise RuntimeError("CMake >= 3.1.0 is required on Windows") for ext in self.extensions: self.build_extension(ext) def build_extension(self, ext): - extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name))) + extdir = os.path.abspath( + os.path.dirname(self.get_ext_fullpath(ext.name))) - cmake_args = [ - "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + extdir, - "-DPYTHON_EXECUTABLE=" + sys.executable, - ] + cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, + '-DPYTHON_EXECUTABLE=' + sys.executable] - cfg = "Debug" if self.debug else "Release" - build_args = ["--config", cfg] + cfg = 'Debug' if self.debug else 'Release' + build_args = ['--config', cfg] if platform.system() == "Windows": - cmake_args += [ - "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}".format(cfg.upper(), extdir) - ] + cmake_args += ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_{}={}'.format( + cfg.upper(), + extdir)] if sys.maxsize > 2**32: - cmake_args += ["-A", "x64"] - build_args += ["--", "/m"] + cmake_args += ['-A', 'x64'] + build_args += ['--', '/m'] else: - cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] - build_args += ["--", "-j2"] + cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] + build_args += ['--', '-j2'] env = os.environ.copy() - env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format( - env.get("CXXFLAGS", ""), self.distribution.get_version() - ) + env['CXXFLAGS'] = '{} -DVERSION_INFO=\\"{}\\"'.format( + env.get('CXXFLAGS', ''), + self.distribution.get_version()) if not os.path.exists(self.build_temp): os.makedirs(self.build_temp) - subprocess.check_call( - ["cmake", ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env - ) - subprocess.check_call( - ["cmake", "--build", "."] + build_args, cwd=self.build_temp - ) - + subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, + cwd=self.build_temp, env=env) + subprocess.check_call(['cmake', '--build', '.'] + build_args, + cwd=self.build_temp) -with open("README.md", "r") as f: - long_description = f.read() setup( name="token-granter-wrapper", - version="0.1.0", - description="A test", - long_description="A test", - packages=setuptools.find_packages("token_granter_wrapper"), - package_dir={"src": "token_granter_wrapper"}, + version="0.2.0", + packages=setuptools.find_packages("src"), + package_dir={"": "src"}, classifiers=[ "Programming Language :: Python :: 3", - "Operating System :: POSIX :: Linux", + "Operating System :: POSIX :: Linux" ], - ext_modules=[CMakeExtension("token_granter_wrapper/")], - python_requires=">=3.6", + ext_modules=[CMakeExtension('token_granter_wrapper/token_granter_bindings')], + python_requires='>=3.6', cmdclass=dict(build_ext=CMakeBuild), zip_safe=False, - install_requires=[], -) + install_requires=[] +) \ No newline at end of file diff --git a/src/token_granter_wrapper/__init__.py b/src/token_granter_wrapper/__init__.py new file mode 100644 index 0000000..f0df4a1 --- /dev/null +++ b/src/token_granter_wrapper/__init__.py @@ -0,0 +1 @@ +from .token_granter_bindings import * diff --git a/token_granter_wrapper/token_granter.pyi b/src/token_granter_wrapper/token_granter.pyi similarity index 100% rename from token_granter_wrapper/token_granter.pyi rename to src/token_granter_wrapper/token_granter.pyi diff --git a/src/token_granter_bindings.cpp b/src/token_granter_wrapper/token_granter_bindings.cpp similarity index 59% rename from src/token_granter_bindings.cpp rename to src/token_granter_wrapper/token_granter_bindings.cpp index 0fd70ae..aea2180 100644 --- a/src/token_granter_bindings.cpp +++ b/src/token_granter_wrapper/token_granter_bindings.cpp @@ -1,13 +1,13 @@ -#include "../include/token_granter.hpp" +#include "../../lib/include/token_granter.hpp" // EXTERNAL IMPORTS START HERE -#include "../include/pybind11/include/pybind11/pybind11.h" -#include "../include/pybind11/include/pybind11/stl.h" +#include "../../lib/include/pybind11/include/pybind11/pybind11.h" +#include "../../lib/include/pybind11/include/pybind11/stl.h" // EXTERNAL IMPORTS END HERE namespace py = pybind11; -PYBIND11_MODULE(token_granter, m) +PYBIND11_MODULE(token_granter_bindings, m) { py::class_(m, "TokenGranter") .def(py::init()) diff --git a/tests/__pycache__/test_package.cpython-311-pytest-8.2.2.pyc b/tests/__pycache__/test_package.cpython-311-pytest-8.2.2.pyc index bfcfcf5..d304b18 100644 Binary files a/tests/__pycache__/test_package.cpython-311-pytest-8.2.2.pyc and b/tests/__pycache__/test_package.cpython-311-pytest-8.2.2.pyc differ diff --git a/tests/test_package.py b/tests/test_package.py index fcc4283..1fdd7b4 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -1,6 +1,6 @@ -from token_granter_wrapper import token_granter +from token_granter_wrapper import token_granter_bindings def test_token_granter(): - tk = token_granter.TokenGranter("here") + tk = token_granter_bindings.TokenGranter("here") assert "" == tk.grant_access_token("TEST", "TEST", False) diff --git a/token_granter_wrapper/__init__.py b/token_granter_wrapper/__init__.py deleted file mode 100644 index e69de29..0000000