Commit Graph

135 Commits

Author SHA1 Message Date
Akira Kawata 417fd120cc
Fix: fix typo of WITHOUT_SOABI (#2992) 2021-05-06 00:19:05 -07:00
Weiming Zhao 4f0727f280
Fix the enabling of default extension handling (#2938) 2021-04-05 23:50:50 -04:00
Axel Huebl c78dfb69f2
MSVC but not Clang: /MP (#2824)
On Windows, clang-cl does not understand /MP.
```
clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
```
with Clang 10.0.0
2021-02-08 15:40:04 -05:00
Henry Schreiner 08bca374fd
docs: update changelog, nicer output for script (#2811) 2021-01-21 11:34:39 -05:00
Henry Schreiner eb83feefff
style: avoid using unintialized variables (#2806)
* style: avoid using unintialized variables

Tested with cmake --warn-unintialized -S . -B build

* refactor: use function for possibly uninit vars
2021-01-19 18:48:22 -05:00
heyer2 76a160070b
fix: STATIC and SHARED flags not being detected (#2796)
* Fix STATIC and SHARED flags not being detected

* fix: use classic naming for all lib types

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2021-01-14 19:51:41 +01:00
Henry Schreiner 230fa53f16
fix: Don't override global settings for VISIBILITY if set (#2793)
Sometimes programmers want to control this, and while it can be changed after the fact, it's commonly set via a CMAKE_ variable; if that variable is set, we should respect that (like the CMAKE_INTERPROCEDURAL_OPTIMIZATION setting).
2021-01-14 08:31:48 -05:00
Yannick Jadoul f243450e89
ci: disable builds for 3.10.0a4, and enable a nightly 3.10-dev build (#2792)
* Disable builds for 3.10.0a4, and enable a nightly 3.10-dev build

* Fix job name

* Remove deadsnakes job for now

* Add deadsnakes jobs

* There's no deadsnakes 2.7

* Add 3.10 to versions to be discovered by legacy FindPython, and fix debug input to deadsnakes/action

* Try out branch with fix

* Update to deadsnakes/action@v2.1.1
2021-01-13 23:13:19 -05:00
Henry Schreiner 5bd766bf6c
docs: update changelog and add script to help generate it (#2733) 2020-12-21 21:04:33 -05:00
Henry Schreiner ffb113d1d8
fix: regression with installed pybind11 overriding local one (#2716)
* fix: regression with installed pybind11 overriding discovered one

Closes #2709

* docs: wording incorrect
2020-12-15 21:55:14 -05:00
Frank f8b8107b46
fix: make FindPython2 and FindPython3 work (#2662) 2020-11-15 11:55:42 -05:00
Henry Schreiner 3e4d54bc01
fix: match new extension discovery with changes to classic discovery (#2640)
* fix: match new extension discovery with changes to classic discovery

Followup to #2638 - this was fixed in 2.6.0, but only for classic Python

* fix: followup to avoid warnings
2020-11-05 14:37:11 -05:00
Henry Schreiner b8dc60ec8f
fix: Python include directory was missing from DIRS (#2636) 2020-11-02 20:45:54 -05:00
Henry Schreiner a42211536b fix: new line in PYPY_VERSION 2020-10-15 17:38:49 -04:00
Henry Schreiner ad2fe0ee7b fix: pypy3 windows extension issue 2020-10-15 17:38:49 -04:00
Henry Schreiner 645d83813b
feat: typing support for helpers (#2588)
* feat: basic typing support

* docs: mention syncing as suggested by @rwgk

* docs: update changelog

* docs: copy of warning in limitations
2020-10-14 14:08:41 -04:00
Henry Schreiner a8c2e3eec5
fix: ipo should be off for debug or relwithdebinfo (#2590)
* fix: ipo should be off for debug or relwithdebinfo

Closes #2587

* docs: slightly more detailed about IPO

* Update pybind11Common.cmake
2020-10-14 13:43:31 -04:00
Henry Schreiner d46f3322a4
fix: allow cmake varibles from Python calls to be cached (#2570) 2020-10-09 17:33:45 -04:00
Henry Schreiner 2a2f52201d
fix: find_import didn't work properly for classic tools (#2550)
* fix: find_import didn't work properly for classic tools

* ci: fix all files not being checked in style run
2020-10-05 15:31:00 -04:00
Henry Schreiner 3488494a81
refactor: import check as a common function (#2526)
* feat: import check as a common function

* docs: add cmake to docs
2020-10-02 22:34:22 -04:00
Henry Schreiner 6d2d08db00
fix: conda-forge patch (#2540) 2020-10-02 09:56:54 -04:00
Wenzel Jakob 3232e59b83
Check if module file extension could be queried correctly (#2538)
On very incomplete python installations (e.g. within Docker), it's
possible that distutils is not installed. In that case, the
``execute_command`` statement that queries distutils for the Python
module extension fails, and pybind11 uses the empty string. This commit
adds an extra check that causes a CMake failure with more actionable
information (just spent a lot of time trying to track down this problem :))
2020-09-30 17:49:11 -04:00
Henry Schreiner 82dbc5b78f
ci: releases (#2530)
* ci: releases

* docs: minor update form @wjakob

* fix: enforce reasonable version of setuptools
2020-09-30 15:48:08 -04:00
Henry Schreiner e01f492462
fix: Add a nice CMake error when Interpreter component is missing. (#2519)
Closes #2515, found by @rhjdjong
2020-09-21 18:34:48 -04:00
Henry Schreiner e37921d761
refactor: drop mkdoc and update changelog (#2491)
* refactor: drop mkdoc

* docs: update changelog
2020-09-16 17:14:06 -04:00
Henry Schreiner fd61f5038e
feat: setup.py redesign and helpers (#2433)
* feat: setup.py redesign and helpers

* refactor: simpler design with two outputs

* refactor: helper file update and Windows support

* fix: review points from @YannickJadoul

* refactor: fixes to naming and more docs

* feat: more customization points

* feat: add entry point pybind11-config

* refactor: Try Extension-focused method

* refactor: rename alt/inplace to global

* fix: allow usage with git modules, better docs

* feat: global as an extra (@YannickJadoul's suggestion)

* feat: single version location

* fix: remove the requirement that setuptools must be imported first

* fix: some review points from @wjacob

* fix: use .in, add procedure to docs

* refactor: avoid monkeypatch copy

* docs: minor typos corrected

* fix: minor points from @YannickJadoul

* fix: typo on Windows C++ mode

* fix: MSVC 15 update 3+ have c++14 flag

See <https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2019>

* docs: discuss making SDists by hand

* ci: use pep517.build instead of manual setup.py

* refactor: more comments from @YannickJadoul

* docs: updates from @ktbarrett

* fix: change to newly recommended tool instead of pep517.build

This was intended as a proof of concept; build seems to be the correct replacement.

See https://github.com/pypa/pep517/pull/83

* docs: updates from @wjakob

* refactor: dual version locations

* docs: typo spotted by @wjakob
2020-09-16 17:13:41 -04:00
Wenzel Jakob 36c666f027 pybind11_add_module(): OPT_SIZE target 2020-09-06 16:46:38 +02:00
Henry Schreiner ce1a07ef45
fix: use classic extension handling unless otherwise requested (#2462)
* fix: use classic extension handling unless otherwise requested

* fix: variable must be cached to be used externally
2020-09-04 21:54:09 -04:00
Henry Schreiner 9b8cb02030
fix: respect PYTHON_VERSION if set in classic mode (#2414)
* fix: respect PYTHON_VERSION if set in classic mode

* fix: add warning when using PYTHON_VERSION
2020-08-26 09:07:30 -04:00
Henry Schreiner c58f7b745b
fix: reduce target collision in add_submodule mode (#2423)
* fix: reduce target collision in add_submodule mode

Closes #2420

* fix: update CMakeLists.txt
2020-08-22 09:06:01 -04:00
Henry Schreiner 56df3c4649
fix: a couple more places where pybind11 is missing 11 (#2421) 2020-08-21 15:27:21 -04:00
Bjorn d4d7ef5d27
Update pybind11Tools.cmake (#2419)
CPython configured with `--with-pydebug` could not use `pybind11_add_module`
2020-08-21 14:52:38 -04:00
Henry Schreiner 1729aae96f
feat: new FindPython support (#2370)
* feat: FindPython support

* refactor: rename to PYBIND11_FINDPYTHON

* docs: Caps fixes

* feat: NOPYTHON mode

* test: check simple call

* docs: add changelog/upgrade guide

* feat: Support Python3 and Python2

* refactor: Use targets in tests

* fix: support CMake 3.4+

* feat: classic search also finds virtual environments

* docs: some updates from @wjakob's review

* fix: wrong name for QUIET mode variable, reported by @skoslowski

* refactor: cleaner output messaging

* fix: support debug Python's in FindPython mode too

* fixup! refactor: cleaner output messaging

* fix: missing pybind11_FOUND and pybind11_INCLUDE_DIR restored to subdir mode

* fix: nicer reporting of Python / PyPy

* fix: out-of-order variable fix

* docs: minor last-minute cleanup
2020-08-19 12:26:26 -04:00
Henry Schreiner 0af7fe6c19
fix: typo in pybind11_add_module (#2374) 2020-08-08 17:34:38 -04:00
Henry Schreiner 227170dc2f fix: better handling of PYBIND11_CPP_STANDARD 2020-08-06 11:54:41 -04:00
Henry Schreiner ed6de125c9 format: include .in files 2020-08-06 11:54:41 -04:00
Henry Schreiner df115977df chore: cleanup 2020-08-06 11:54:41 -04:00
Henry Schreiner b8047245bb
fix: uninstall cleanup (#2346) 2020-07-31 10:16:40 +02:00
Henry Schreiner 94db5c5ed1 format: apply cmake-format 2020-07-30 20:27:55 -04:00
Henry Schreiner 1b92cd1703 fix: address review points from @YannickJadoul 2020-07-30 20:27:55 -04:00
Henry Schreiner 6ec1775fff feat: drop CMake 3.6 and below, modernize CMake
fix: include PYTHON_IS_DEBUG
2020-07-30 20:27:55 -04:00
Henry Schreiner 1f53c373e4 fix: C++17 mode on Clang may error 2020-07-26 09:25:27 -04:00
tuxmaster5000 7e0a4fb7d0
Fix for #2168 (#2299) 2020-07-24 19:00:48 +02:00
Henry Schreiner 8b0ccf7657 style: adding pre-commit check-style.sh 2020-07-23 19:47:53 -04:00
Liam Keegan c4fd1fd987
CMake improvement: support windows python on msys (#2312)
- look for windows python lib when using mingw & msys
  - if not found, then look for system python lib as before
2020-07-21 19:17:22 +02:00
Henry Schreiner d8c7ee00a6
ci: GHA basic format & pre-commit (#2309) 2020-07-20 13:35:21 -04:00
Yannick Jadoul 964ab956e0
Fix DeprecationWarning about 'invalid escape sequence' in tools/docs Python scripts (#2281) 2020-07-10 16:30:44 +02:00
Nils Leif Fischer 141e8cc0af Fix uninitialized-variables cmake warnings 2020-07-01 00:19:25 +02:00
Takahiro Ishikawa 3618807dca Fix python.lib name
pybind11_add_module fails because FindPythonLibsNew.cmake try to link PythonXX.lib, but the first letter "p" should be lowercase.
2020-07-01 00:14:24 +02:00
MRocholl b14aeb7cfa fix typo in sorted function call argument reverse 2020-04-26 09:29:29 +02:00