* fix(cmake): add required emscripten flags
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update emscripten.yaml
* fix(cmake): add required emscripten flags to headers target
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): incorrect detection of Emscripten
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): allow pybind11::headers to be modified
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): hide a warning when building the tests standalone
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): use explicit variable for is config
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): go back to ALIAS target
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: reduce overall diff
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: reduce overall diff
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: shorten code a bit
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): do not use Python::Interpreter when cross-compiling
* chore: apply cmake-format to pybind11NewTools.cmake
* fix(cmake): do not look for Python Interpreter component when cross-compiling
* feat(cmake): guess Python extension suffix
* fix: add pybind11GuessPythonExtSuffix.cmake to packaging test
* Use PYBIND11_CROSSCOMPILING instead of CMAKE_CROSSCOMPILING
* refactor: require PYBIND11_USE_CROSSCOMPILING
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
* Upgrade maximum supported CMake version to 3.27 to fix warning with CMP0148 policy (#4785)
* Update `macos_brew_install_llvm` pipeline to use expected Python installation
* Fix `Python_EXECUTABLE` Cmake variable typo
* Apply suggestions from code review
* fix: use FindPython for CMake 3.18+ by default for pybind11's tests
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: fix issues with finding Python
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* tests: also set executable on subdir tests
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix(cmake): correct logic for FindPython
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update ci.yml
* Revert "Update ci.yml"
This reverts commit 33798adf3f.
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
* fix(cmake): findpython issues and 3.12 support for pybind11_find_import
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Update pybind11NewTools.cmake
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* cmake: split extension
Into suffix and debug postfix. Pybind11 is currently treating both as
suffix, which is problematic when something else defines the
DEBUG_POSTFIX because they will be concatenated.
pybind11_extension sets SUFFIX to _d.something and if DEBUG_POSTFIX is
set to _d.
_d + _d.something = _d_d.something
The issue has been reported at:
https://github.com/pybind/pybind11/issues/4699
* style: pre-commit fixes
* fix(cmake): support postfix for old FindPythonInterp mode too
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
* docs: update changelog for v2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: bump versions for 2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: fix make changelog script with entry is empty
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: PyPy needs to overrite broken FindPythonInterp values
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* fix: add flag to opt-in to new (cross-compile) behavior
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Apply suggestions from code review
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* First draft of Eigen::Tensor support
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix build errors
* Weird allocator stuff?
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove unused + additional allocator junk
* Disable warning
* Use constexpr
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* clang tidy fixes
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Resolve comments
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove auto constexpr function
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Try again for older C++
* Oops forgot constexpr
* Move to new files as suggested
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix weird tests
* Fix nits
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Oops, forgot import
* Fix clang 3.6 bug
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* More comprehensive test suite
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Refactor allocators to make things more clear
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Switch to std::copy
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Switch to DSizes instead of array
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Address feedback
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix python + dummy c++ change to trigger build
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Alignment
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add include guard
* Forgot inline
* Fix compiler warning
* Remove bad test
* Better type signatures
* Add guards to make compiler requirements more explicit
* style: pre-commit fixes
* Force rerun of tests due to flake
* style: pre-commit fixes
* Keep pragmas & all related comments together, add PLEASE KEEP IN SYNC
* Move headers out of detail
* style: pre-commit fixes
* Fix cmake
* Improve casting
* style: pre-commit fixes
* Add a ton more tests + refactor
* Improve names
* style: pre-commit fixes
* Update include/pybind11/eigen/tensor.h
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* Fix tests
* style: pre-commit fixes
* Update
* Add a test to verify that strange numpy arrays work
* Fix dumb compiler warning
* Better tests
* Better tests
* Fix tests
* style: pre-commit fixes
* More test fixes
* style: pre-commit fixes
* A ton more test coverage
* Fix tests
* style: pre-commit fixes
* style: pre-commit fixes
* Add back constexpr
* Another test
* style: pre-commit fixes
* Improve tests
* Whoops
* Less magic numbers
* Update tests/test_eigen_tensor.py
Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
* Update tests/test_eigen_tensor.py
Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
* style: pre-commit fixes
* Fix tests
* style: pre-commit fixes
* Fix memory leak
* style: pre-commit fixes
* Fix order
* style: pre-commit fixes
* Add test to make sure unsafe casts fail
* Minor bug fix to work on 32 bit machines
* Implement convert flag
* style: pre-commit fixes
* Switch to correct TensorMap const use
* style: pre-commit fixes
* Support older versions of eigen
* Weird c++ compilers
* Fix Eigen bug
* Fix another eigen bug
* Yet another eigen bug
* Potential flakes?
* style: pre-commit fixes
* Rerun tests with dummy exception to find out what is going on
* Another dummy test run
* Ablate more
* Found the broken test?
* One step closer
* one step further
* Double check
* one thing at a time
* Give up and disable the test
* Clang lies about being gcc
* Oops, fix matrix test
* style: pre-commit fixes
* Add tests to verify scalar conversions
* style: pre-commit fixes
* Fix nits
* Support no_array
* Fix tests
* style: pre-commit fixes
* Silence compiler warning
* Improve build system for ancient compilers
* Make clang happy
* Make gcc happy
* Implement Skylion's suggestions
* Fix warning
* Inline const pointer check
* Implement suggestions
* style: pre-commit fixes
* Improve tests
* Typo
* style: pre-commit fixes
* Support Google's build environment
* style: pre-commit fixes
* Update include/pybind11/eigen/tensor.h
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* style: pre-commit fixes
* Test cleanup per Skylion
* Switch to remvove_cv_t
* Cleaner test
* style: pre-commit fixes
* Remove tensor from eigen.h, update tests
* style: pre-commit fixes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Sergiu Deitsch <sergiud@users.noreply.github.com>
* add installation support for pkg-config dependency detection
pkg-config is a buildsystem-agnostic alternative to
`pybind11Config.cmake` that can be used from build systems other than
cmake.
Fixes#230
* tests: add test for pkg config
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
* Use sysconfig in Python >= 3.10
Rely on sysconfig for installation paths for Python >= 3.10. distutils
has been deprecated and will be removed.
Fixes: #3677
* Explicitly select the posix_prefix scheme for platinclude on Debian
Debian's default scheme is posix_local, for installing locally-built
packages to /usr/local/. We want to find the Python headers in /usr/,
so search posix_prefix.
* chore: drop Python 3.5 support
* chore: more fstrings with flynt's help
* ci: drop Python 3.5
* chore: bump dependency versions
* docs: touch up py::args
* tests: remove deprecation warning
* Ban smartquotes
* Very minor tweaks (by-product of reviewing PR #3719).
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
* `#error BYE_BYE_GOLDEN_SNAKE`
* Removing everything related to 2.7 from ci.yml
* Commenting-out Centos7
* Removing `PYTHON: 27` from .appveyor.yml
* "PY2" removal, mainly from tests. C++ code is not touched.
* Systematic removal of `u` prefix from `u"..."` and `u'...'` literals. Collateral cleanup of a couple minor other things.
* Cleaning up around case-insensitive hits for `[^a-z]py.*2` in tests/.
* Removing obsolete Python 2 mention in compiling.rst
* Proper `#error` for Python 2.
* Using PY_VERSION_HEX to guard `#error "PYTHON 2 IS NO LONGER SUPPORTED.`
* chore: bump pre-commit
* style: run pre-commit for pyupgrade 3+
* tests: use sys.version_info, not PY
* chore: more Python 2 removal
* Uncommenting Centos7 block (PR #3691 showed that it is working again).
* Update pre-commit hooks
* Fix pre-commit hook
* refactor: remove Python 2 from CMake
* refactor: remove Python 2 from setup code
* refactor: simplify, better static typing
* feat: fail with nice messages
* refactor: drop Python 2 C++ code
* docs: cleanup for Python 3
* revert: intree
revert: intree
* docs: minor touchup to py2 statement
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>