Commit Graph

24 Commits

Author SHA1 Message Date
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
jbarlow83 b8863698d6
Improve documentation of Python and C++ exceptions (#2408)
The main change is to treat error_already_set as a separate category
of exception that arises in different circumstances and needs to be
handled differently. The asymmetry between Python and C++ exceptions
is further emphasized.
2020-08-23 00:11:09 +02:00
Henry Schreiner 04fdc44f50
tests: avoid putting build products into source directory (#2353)
* tests: keep source dir clean

* ci: make first build inplace

* ci: drop dev setting (wasn't doing anything)

* tests: warn if source directory is dirty
2020-08-19 13:11:57 -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 b8047245bb
fix: uninstall cleanup (#2346) 2020-07-31 10:16:40 +02:00
acxz 6f6e9394ce
feat: add uninstall target for CMake (#2265)
* add uninstall target for cmake

* only add target when built as master project

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2020-07-30 21:16:50 -04:00
Henry Schreiner 73dc978683 style: avoid adding virtual environment directories 2020-07-23 17:42:53 -04:00
Wenzel Jakob 8c0cd94465 ignore another type of visual studio project file 2020-06-18 12:14:59 +02:00
Antony Lee 55dc131944 Clarify docs for functions taking bytes and not str. 2018-05-24 11:09:41 -03:00
Lori A. Burns 5cafc99884 add CMake exported interface library and Config detection file 2016-12-13 21:44:19 +01:00
Jason Rhinelander dc0b4bd2c9 Add debugging info about .so size to build output (#477)
* Add debugging info about so size to build output

This adds a small python script to tools that captures before-and-after
.so sizes between builds and outputs this in the build output via a
string such as:

------ pybind11_tests.cpython-35m-x86_64-linux-gnu.so file size: 924696 (decrease of 73680 bytes = 7.38%)

------ pybind11_tests.cpython-35m-x86_64-linux-gnu.so file size: 998376 (increase of 73680 bytes = 7.97%)

------ pybind11_tests.cpython-35m-x86_64-linux-gnu.so file size: 998376 (no change)

Or, if there was no .so during the build, just the .so size by itself:

------ pybind11_tests.cpython-35m-x86_64-linux-gnu.so file size: 998376

This allows you to, for example, build, checkout a different branch,
rebuild, and easily see exactly the change in the pybind11_tests.so
size.

It also allows looking at the travis and appveyor build logs to get an
idea of .so/.dll sizes across different build systems.

* Minor libsize.py script changes

- Use RAII open
- Remove unused libsize=-1
- Report change as [+-]xyz bytes = [+-]a.bc%
2016-11-04 14:47:41 +01:00
Dean Moldovan a0c1ccf0a9 Port tests to pytest
Use simple asserts and pytest's powerful introspection to make testing
simpler. This merges the old .py/.ref file pairs into simple .py files
where the expected values are right next to the code being tested.

This commit does not touch the C++ part of the code and replicates the
Python tests exactly like the old .ref-file-based approach.
2016-08-19 13:19:38 +02:00
Ivan Smirnov 5db82353f7 Rename example20 -> example-numpy-dtypes 2016-08-13 12:43:16 +01:00
Ivan Smirnov f7143dc589 Update gitignore to ignore debug test builds 2016-08-13 12:43:16 +01:00
Wenzel Jakob 452da8884f minor .gitignore update 2016-06-14 15:25:53 +02:00
Boris Schäling fc19c19804 Fix Cygwin support 2016-05-29 16:56:15 +02:00
Boris Schäling 8965644536 Make examples build and run on Cygwin 2016-05-26 22:42:07 +02:00
Wenzel Jakob 4e455dde0b updated changelog, added build directory to gitignore file 2016-03-09 16:50:40 +01:00
Wenzel Jakob bf72a76dd3 added 'dist' to .gitignore file 2016-02-22 10:29:27 +01:00
Sylvain Corlay 97dc81057f Add version info and release instructions for pybind11 2016-02-01 10:23:52 -05:00
Wenzel Jakob 4c1a6be4bd minor cleanups in numpy.h, updated gitignore file for ninja 2016-01-17 22:31:15 +01:00
Wenzel Jakob 929fd7e694 PyPI setup.py file; v1.0 release 2015-10-15 22:21:50 +02:00
Wenzel Jakob bd4a529319 more flexible function creation syntax 2015-07-11 18:55:41 +02:00
Wenzel Jakob 38bd71134a Initial commit 2015-07-09 15:27:32 +02:00