Commit Graph

30 Commits

Author SHA1 Message Date
Wenzel Jakob
2b92a49115 updated check-style.sh docs 2016-11-08 10:58:22 +01:00
Wenzel Jakob
cc4efe69c2 more code style checks in Travis CI :) 2016-11-08 10:53:30 +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
Wenzel Jakob
f66610153f FindPythonLibsNew: wasn't actually setting PYTHONLIBS_FOUND contrary to specs 2016-10-09 14:12:24 +02:00
Wenzel Jakob
fe34241e50 minor doc & style fixes 2016-09-06 13:02:29 +09:00
Wenzel Jakob
85f07e18cc minor code style checker update 2016-09-04 23:00:49 +09:00
Jason Rhinelander
d472f0f058 Add line numbers; show and highlight found tabs
This makes the output considerably easier to use: it now highlights (in
red) matched tabs (instead of just listing the filenames), and adds
line numbers to both the tabs check and the space-less if check outputs.
2016-08-29 21:25:11 -04:00
Jason Rhinelander
5a3570c47c Fix check-style exit status
The check-style exit status wasn't being propagated properly because
the loops were running in a subshell (and so the change the the
`errors` variable wasn't in the active command shell).  This fixes it
by running the greps in subshells and the loops in the main shell.

This also avoids the if(/for(/while( style check on
tests/CMakeLists.txt, since it *does* have if() statements with no space
that are producing error messages, but that is (acceptable) CMake style.
2016-08-29 19:04:12 -04:00
Jason Rhinelander
dbc4bf68ed check-style: also report no space in if(/for(/while( 2016-08-28 14:53:04 -04:00
Jason Rhinelander
ac4278970c Check for tabs instead of spaces in the doc build
This adds a tool that checks style (currently just for tabs instead of
spaces in files under include/tests/docs) and produces a travis-ci build
failure if any problems are found.
2016-08-28 14:11:23 -04:00
Dean Moldovan
7b4f8dc048 Fix module file name when working with debug builds of Python
Fixes #365. `sysconfig.get_config_var('SO')` already returns the correct
PYTHON_MODULE_EXTENSION, even for debug builds, so there is no need to
add anything else manually.
2016-08-27 20:34:33 +02:00
Christian Ewald
b81c500ce2 Fixed finding python libraries on windows in venv
When run on windows in a venv, PYTHON_LIBRARY pointet to a non-existant
location in the virtual environment directory.

This has been fixed by testing if the path exists and, if not, trying
an alternative path, relative to the PYTHON_INCLUDE_DIR.

If the alternative path doesn't exit as well, an error will be raised.
2016-08-08 08:31:08 +02:00
Wenzel Jakob
5766c3a609 cindex.py updated 2016-07-01 12:21:53 +02:00
Dean Moldovan
e782eb86e9 Skip FindPythonLibsNew if PYTHONLIBS_FOUND is defined (fix #236)
Also:
- Update documented result variables
- Remove long-ago-deprecated variable
2016-06-12 11:06:08 +02:00
Dean Moldovan
928fff649f Include a more robust FindPythonLibs module for CMake 2016-05-22 20:49:35 +02:00
Wenzel Jakob
f64ff575d7 mkdoc.py: improved formatting of code segments and enums 2016-05-20 16:37:13 +02:00
Wenzel Jakob
9e0a0568fe transparent conversion of dense and sparse Eigen types 2016-05-05 21:44:29 +02:00
Wenzel Jakob
65f0c2aeb7 mkdoc.py: handle conversion operators and template arguments in function names 2016-05-01 22:39:46 +02:00
Wenzel Jakob
c993bcec19 mkdoc.py: document enumerations 2016-05-01 02:32:38 +02:00
Wenzel Jakob
87810d8e91 mkdoc.py: fixed DOC() macro 2016-04-30 23:55:10 +02:00
Wenzel Jakob
295acb2da0 mkdoc.py: handle \ingroup attributes 2016-04-30 23:36:57 +02:00
Wenzel Jakob
f02f41656b support longer argument lists in expansion of variadic DOC() macro 2016-04-29 14:32:10 +02:00
Merlin Nimier-David
77173d6347 mkdoc.py: fix typo in __DOC5 macro
This prevented `DOC(...)` calls with 5 arguments to resolve correctly.
2016-04-29 14:25:39 +02:00
Wenzel Jakob
a57e51c5d8 mkdoc.py: sanitize_name fixes, PEP 8 cleanups 2016-04-27 00:35:06 +02:00
Wenzel Jakob
d361a57863 minor mkdoc name sanitation fix 2016-04-26 00:12:22 +02:00
Wenzel Jakob
afb9c1776a make mkdoc now works with the libclang distribution from Apple 2016-04-19 13:33:21 +02:00
Wenzel Jakob
efd9e987f5 windows fixes 2015-08-04 18:53:18 +02:00
Wenzel Jakob
281aa0e668 nicer code separation, cleanup logic, std::function type caster 2015-07-31 04:10:38 +02:00
Wenzel Jakob
fa70d30248 documentation extraction improvements 2015-07-23 14:43:34 +02:00
Wenzel Jakob
ad06e76f9f Documentation extraction tool 2015-07-22 01:05:41 +02:00