Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
f5806498
Commit
f5806498
authored
Aug 14, 2017
by
Dean Moldovan
Browse files
Move internal headers into `detail` subdirectory
parent
76e06c89
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
24 deletions
+23
-24
CMakeLists.txt
CMakeLists.txt
+6
-7
include/pybind11/buffer_info.h
include/pybind11/buffer_info.h
+1
-1
include/pybind11/cast.h
include/pybind11/cast.h
+2
-2
include/pybind11/detail/class.h
include/pybind11/detail/class.h
+2
-2
include/pybind11/detail/common.h
include/pybind11/detail/common.h
+1
-1
include/pybind11/detail/descr.h
include/pybind11/detail/descr.h
+1
-1
include/pybind11/detail/typeid.h
include/pybind11/detail/typeid.h
+1
-1
include/pybind11/options.h
include/pybind11/options.h
+1
-1
include/pybind11/pybind11.h
include/pybind11/pybind11.h
+1
-1
include/pybind11/pytypes.h
include/pybind11/pytypes.h
+2
-2
include/pybind11/stl_bind.h
include/pybind11/stl_bind.h
+1
-1
setup.py
setup.py
+4
-4
No files found.
CMakeLists.txt
View file @
f5806498
...
@@ -36,14 +36,15 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
...
@@ -36,14 +36,15 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
# NB: when adding a header don't forget to also add it to setup.py
# NB: when adding a header don't forget to also add it to setup.py
set
(
PYBIND11_HEADERS
set
(
PYBIND11_HEADERS
include/pybind11/detail/class.h
include/pybind11/detail/common.h
include/pybind11/detail/descr.h
include/pybind11/detail/typeid.h
include/pybind11/attr.h
include/pybind11/attr.h
include/pybind11/buffer_info.h
include/pybind11/buffer_info.h
include/pybind11/cast.h
include/pybind11/cast.h
include/pybind11/chrono.h
include/pybind11/chrono.h
include/pybind11/class_support.h
include/pybind11/common.h
include/pybind11/complex.h
include/pybind11/complex.h
include/pybind11/descr.h
include/pybind11/options.h
include/pybind11/options.h
include/pybind11/eigen.h
include/pybind11/eigen.h
include/pybind11/embed.h
include/pybind11/embed.h
...
@@ -55,7 +56,6 @@ set(PYBIND11_HEADERS
...
@@ -55,7 +56,6 @@ set(PYBIND11_HEADERS
include/pybind11/pytypes.h
include/pybind11/pytypes.h
include/pybind11/stl.h
include/pybind11/stl.h
include/pybind11/stl_bind.h
include/pybind11/stl_bind.h
include/pybind11/typeid.h
)
)
string
(
REPLACE
"include/"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/"
string
(
REPLACE
"include/"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/"
PYBIND11_HEADERS
"
${
PYBIND11_HEADERS
}
"
)
PYBIND11_HEADERS
"
${
PYBIND11_HEADERS
}
"
)
...
@@ -68,7 +68,7 @@ include(GNUInstallDirs)
...
@@ -68,7 +68,7 @@ include(GNUInstallDirs)
include
(
CMakePackageConfigHelpers
)
include
(
CMakePackageConfigHelpers
)
# extract project version from source
# extract project version from source
file
(
STRINGS
"
${
PYBIND11_INCLUDE_DIR
}
/pybind11/common.h"
pybind11_version_defines
file
(
STRINGS
"
${
PYBIND11_INCLUDE_DIR
}
/pybind11/
detail/
common.h"
pybind11_version_defines
REGEX
"#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) "
)
REGEX
"#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) "
)
foreach
(
ver
${
pybind11_version_defines
}
)
foreach
(
ver
${
pybind11_version_defines
}
)
if
(
ver MATCHES
"#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$"
)
if
(
ver MATCHES
"#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$"
)
...
@@ -110,8 +110,7 @@ if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
...
@@ -110,8 +110,7 @@ if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
endif
()
endif
()
if
(
PYBIND11_INSTALL
)
if
(
PYBIND11_INSTALL
)
install
(
FILES
${
PYBIND11_HEADERS
}
install
(
DIRECTORY
${
PYBIND11_INCLUDE_DIR
}
/pybind11 DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/pybind11
)
# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
set
(
PYBIND11_CMAKECONFIG_INSTALL_DIR
"share/cmake/
${
PROJECT_NAME
}
"
CACHE STRING
"install path for pybind11Config.cmake"
)
set
(
PYBIND11_CMAKECONFIG_INSTALL_DIR
"share/cmake/
${
PROJECT_NAME
}
"
CACHE STRING
"install path for pybind11Config.cmake"
)
...
...
include/pybind11/buffer_info.h
View file @
f5806498
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#pragma once
#pragma once
#include "common.h"
#include "
detail/
common.h"
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
...
...
include/pybind11/cast.h
View file @
f5806498
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
#pragma once
#pragma once
#include "pytypes.h"
#include "pytypes.h"
#include "typeid.h"
#include "
detail/
typeid.h"
#include "descr.h"
#include "
detail/
descr.h"
#include <array>
#include <array>
#include <limits>
#include <limits>
#include <tuple>
#include <tuple>
...
...
include/pybind11/
class_support
.h
→
include/pybind11/
detail/class
.h
View file @
f5806498
/*
/*
pybind11/
class_support
.h: Python C API implementation details for py::class_
pybind11/
detail/class
.h: Python C API implementation details for py::class_
Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>
Copyright (c) 2017 Wenzel Jakob <wenzel.jakob@epfl.ch>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#pragma once
#pragma once
#include "attr.h"
#include "
../
attr.h"
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
NAMESPACE_BEGIN
(
detail
)
NAMESPACE_BEGIN
(
detail
)
...
...
include/pybind11/common.h
→
include/pybind11/
detail/
common.h
View file @
f5806498
/*
/*
pybind11/common.h -- Basic macros
pybind11/
detail/
common.h -- Basic macros
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
...
...
include/pybind11/descr.h
→
include/pybind11/
detail/
descr.h
View file @
f5806498
/*
/*
pybind11/descr.h: Helper type for concatenating type signatures
pybind11/
detail/
descr.h: Helper type for concatenating type signatures
either at runtime (C++11) or compile time (C++14)
either at runtime (C++11) or compile time (C++14)
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
...
...
include/pybind11/typeid.h
→
include/pybind11/
detail/
typeid.h
View file @
f5806498
/*
/*
pybind11/typeid.h: Compiler-independent access to type identifiers
pybind11/
detail/
typeid.h: Compiler-independent access to type identifiers
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
...
...
include/pybind11/options.h
View file @
f5806498
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#pragma once
#pragma once
#include "common.h"
#include "
detail/
common.h"
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
...
...
include/pybind11/pybind11.h
View file @
f5806498
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
#include "attr.h"
#include "attr.h"
#include "options.h"
#include "options.h"
#include "
class_support
.h"
#include "
detail/class
.h"
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
NAMESPACE_BEGIN
(
PYBIND11_NAMESPACE
)
...
...
include/pybind11/pytypes.h
View file @
f5806498
/*
/*
pybind11/type
id
.h: Convenience wrapper classes for basic Python types
pybind11/
py
type
s
.h: Convenience wrapper classes for basic Python types
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#pragma once
#pragma once
#include "common.h"
#include "
detail/
common.h"
#include "buffer_info.h"
#include "buffer_info.h"
#include <utility>
#include <utility>
#include <type_traits>
#include <type_traits>
...
...
include/pybind11/stl_bind.h
View file @
f5806498
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#pragma once
#pragma once
#include "common.h"
#include "
detail/
common.h"
#include "operators.h"
#include "operators.h"
#include <algorithm>
#include <algorithm>
...
...
setup.py
View file @
f5806498
...
@@ -12,14 +12,15 @@ if os.environ.get('PYBIND11_USE_CMAKE'):
...
@@ -12,14 +12,15 @@ if os.environ.get('PYBIND11_USE_CMAKE'):
headers
=
[]
headers
=
[]
else
:
else
:
headers
=
[
headers
=
[
'include/pybind11/detail/class.h'
,
'include/pybind11/detail/common.h'
,
'include/pybind11/detail/descr.h'
,
'include/pybind11/detail/typeid.h'
'include/pybind11/attr.h'
,
'include/pybind11/attr.h'
,
'include/pybind11/buffer_info.h'
,
'include/pybind11/buffer_info.h'
,
'include/pybind11/cast.h'
,
'include/pybind11/cast.h'
,
'include/pybind11/chrono.h'
,
'include/pybind11/chrono.h'
,
'include/pybind11/class_support.h'
,
'include/pybind11/common.h'
,
'include/pybind11/complex.h'
,
'include/pybind11/complex.h'
,
'include/pybind11/descr.h'
,
'include/pybind11/eigen.h'
,
'include/pybind11/eigen.h'
,
'include/pybind11/embed.h'
,
'include/pybind11/embed.h'
,
'include/pybind11/eval.h'
,
'include/pybind11/eval.h'
,
...
@@ -31,7 +32,6 @@ else:
...
@@ -31,7 +32,6 @@ else:
'include/pybind11/pytypes.h'
,
'include/pybind11/pytypes.h'
,
'include/pybind11/stl.h'
,
'include/pybind11/stl.h'
,
'include/pybind11/stl_bind.h'
,
'include/pybind11/stl_bind.h'
,
'include/pybind11/typeid.h'
]
]
setup
(
setup
(
...
...
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