Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
a22ce6cb
Commit
a22ce6cb
authored
Jun 02, 2016
by
Wenzel Jakob
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #220 from dean0x7d/fixes
A few smaller fixes and a test output improvement
parents
38d8b8cf
ba0a0c06
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
.appveyor.yml
+2
-4
.travis.yml
+6
-6
CMakeLists.txt
+1
-0
example/example2.cpp
+1
-1
example/issues.cpp
+1
-1
example/run_test.py
+6
-5
include/pybind11/descr.h
+1
-1
No files found.
.appveyor.yml
View file @
a22ce6cb
...
@@ -19,8 +19,6 @@ install:
...
@@ -19,8 +19,6 @@ install:
build_script
:
build_script
:
-
echo Running cmake...
-
echo Running cmake...
-
cd c:\projects\pybind11
-
cd c:\projects\pybind11
-
cmake -G "%CMAKE_PLATFORM%" -DPYTHON_
INCLUDE_DIR:PATH=%PYTHON_DIR%/include -DPYTHON_LIBRARY:FILEPATH=%PYTHON_DIR%/libs/python34.lib -DPYTHON_
EXECUTABLE:FILEPATH=%PYTHON_DIR%/python.exe
-
cmake -G "%CMAKE_PLATFORM%" -DPYTHON_EXECUTABLE:FILEPATH=%PYTHON_DIR%/python.exe
-
set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-
set MSBuildOptions=/v:m /p:Configuration=%Configuration% /logger:%MSBuildLogger%
-
cmake --build . --config %Configuration% --target check -- /v:m /logger:%MSBuildLogger%
-
msbuild %MSBuildOptions% pybind11.sln
-
ctest -C %Configuration%
.travis.yml
View file @
a22ce6cb
...
@@ -23,19 +23,19 @@ matrix:
...
@@ -23,19 +23,19 @@ matrix:
include
:
include
:
-
os
:
linux
-
os
:
linux
compiler
:
gcc-4.8
compiler
:
gcc-4.8
script
:
install
:
-
pyvenv-3.5 venv
-
pyvenv-3.5 venv
-
cmake -DPYBIND11_PYTHON_VERSION=3.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_EXECUTABLE:FILEPATH=`pwd`/venv/bin/python3.5 -DCMAKE_CXX_COMPILER=g++-4.8
-
make -j 2
-
source venv/bin/activate
-
source venv/bin/activate
-
pip install -U pip wheel
-
pip install numpy
-
pip install numpy
-
CTEST_OUTPUT_ON_FAILURE=TRUE make test
script
:
-
CXX=g++-4.8 cmake -DPYBIND11_PYTHON_VERSION=3.5
-
CTEST_OUTPUT_ON_FAILURE=TRUE make check -j 2
-
os
:
osx
-
os
:
osx
compiler
:
clang
compiler
:
clang
script
:
script
:
-
cmake -DPYBIND11_PYTHON_VERSION=2.7
-
cmake -DPYBIND11_PYTHON_VERSION=2.7
-
make -j 2
-
CTEST_OUTPUT_ON_FAILURE=TRUE make check -j 2
-
CTEST_OUTPUT_ON_FAILURE=TRUE make test
#- os: linux
#- os: linux
#compiler: gcc-4.8
#compiler: gcc-4.8
#script:
#script:
...
...
CMakeLists.txt
View file @
a22ce6cb
...
@@ -145,6 +145,7 @@ endfunction()
...
@@ -145,6 +145,7 @@ endfunction()
if
(
PYBIND11_TEST
)
if
(
PYBIND11_TEST
)
enable_testing
()
enable_testing
()
add_subdirectory
(
example
)
add_subdirectory
(
example
)
add_custom_target
(
check COMMAND
${
CMAKE_CTEST_COMMAND
}
-C $<CONFIGURATION> DEPENDS example
)
endif
()
endif
()
if
(
PYBIND11_INSTALL
)
if
(
PYBIND11_INSTALL
)
...
...
example/example2.cpp
View file @
a22ce6cb
...
@@ -154,7 +154,7 @@ void init_ex2(py::module &m) {
...
@@ -154,7 +154,7 @@ void init_ex2(py::module &m) {
.
def
(
"get_list"
,
&
Example2
::
get_list
,
"Return a Python list"
)
.
def
(
"get_list"
,
&
Example2
::
get_list
,
"Return a Python list"
)
.
def
(
"get_list_2"
,
&
Example2
::
get_list_2
,
"Return a C++ list"
)
.
def
(
"get_list_2"
,
&
Example2
::
get_list_2
,
"Return a C++ list"
)
.
def
(
"get_set"
,
&
Example2
::
get_set
,
"Return a Python set"
)
.
def
(
"get_set"
,
&
Example2
::
get_set
,
"Return a Python set"
)
.
def
(
"get_set2"
,
&
Example2
::
get_set
,
"Return a C++ set"
)
.
def
(
"get_set2"
,
&
Example2
::
get_set
_2
,
"Return a C++ set"
)
.
def
(
"get_array"
,
&
Example2
::
get_array
,
"Return a C++ array"
)
.
def
(
"get_array"
,
&
Example2
::
get_array
,
"Return a C++ array"
)
.
def
(
"print_dict"
,
&
Example2
::
print_dict
,
"Print entries of a Python dictionary"
)
.
def
(
"print_dict"
,
&
Example2
::
print_dict
,
"Print entries of a Python dictionary"
)
.
def
(
"print_dict_2"
,
&
Example2
::
print_dict_2
,
"Print entries of a C++ dictionary"
)
.
def
(
"print_dict_2"
,
&
Example2
::
print_dict_2
,
"Print entries of a C++ dictionary"
)
...
...
example/issues.cpp
View file @
a22ce6cb
...
@@ -135,7 +135,7 @@ void init_issues(py::module &m) {
...
@@ -135,7 +135,7 @@ void init_issues(py::module &m) {
try
{
try
{
py
::
class_
<
Placeholder
>
(
m2
,
"Placeholder"
);
py
::
class_
<
Placeholder
>
(
m2
,
"Placeholder"
);
throw
std
::
logic_error
(
"Expected an exception!"
);
throw
std
::
logic_error
(
"Expected an exception!"
);
}
catch
(
std
::
runtime_error
&
e
)
{
}
catch
(
std
::
runtime_error
&
)
{
/* All good */
/* All good */
}
}
}
}
example/run_test.py
View file @
a22ce6cb
...
@@ -2,6 +2,7 @@ import sys
...
@@ -2,6 +2,7 @@ import sys
import
os
import
os
import
re
import
re
import
subprocess
import
subprocess
import
difflib
remove_unicode_marker
=
re
.
compile
(
r'u(\'[^\']*\')'
)
remove_unicode_marker
=
re
.
compile
(
r'u(\'[^\']*\')'
)
remove_long_marker
=
re
.
compile
(
r'([0-9])L'
)
remove_long_marker
=
re
.
compile
(
r'([0-9])L'
)
...
@@ -36,11 +37,7 @@ def sanitize(lines):
...
@@ -36,11 +37,7 @@ def sanitize(lines):
line
=
""
line
=
""
lines
[
i
]
=
line
lines
[
i
]
=
line
lines
=
'
\n
'
.
join
(
sorted
([
l
for
l
in
lines
if
l
!=
""
]))
return
'
\n
'
.
join
(
sorted
([
l
for
l
in
lines
if
l
!=
""
]))
print
(
'=================='
)
print
(
lines
)
return
lines
path
=
os
.
path
.
dirname
(
__file__
)
path
=
os
.
path
.
dirname
(
__file__
)
if
path
!=
''
:
if
path
!=
''
:
...
@@ -69,4 +66,8 @@ elif output == reference:
...
@@ -69,4 +66,8 @@ elif output == reference:
exit
(
0
)
exit
(
0
)
else
:
else
:
print
(
'Test "
%
s" FAILED!'
%
name
)
print
(
'Test "
%
s" FAILED!'
%
name
)
print
(
'--- output'
)
print
(
'+++ reference'
)
print
(
''
.
join
(
difflib
.
ndiff
(
output
.
splitlines
(
keepends
=
True
),
reference
.
splitlines
(
keepends
=
True
))))
exit
(
-
1
)
exit
(
-
1
)
include/pybind11/descr.h
View file @
a22ce6cb
...
@@ -139,7 +139,7 @@ protected:
...
@@ -139,7 +139,7 @@ protected:
const
T
*
it
=
ptr
;
const
T
*
it
=
ptr
;
while
(
*
it
++
!=
(
T
)
0
)
while
(
*
it
++
!=
(
T
)
0
)
;
;
return
it
-
ptr
;
return
static_cast
<
size_t
>
(
it
-
ptr
)
;
}
}
const
std
::
type_info
**
m_types
=
nullptr
;
const
std
::
type_info
**
m_types
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment