Skip to content

Commit 169e15e

Browse files
mkurdejvianneyPL
authored andcommitted
[thirdparty] [pybind11] Update to pybind11-2.6.2 to fix crash on Python 3.9.
See: * https://github.com/pybind/pybind11/releases/tag/v2.6.2 * pybind/pybind11#2657 and related: * pytorch/pytorch@6f3aa58 * pytorch/pytorch#50014
1 parent 02a2fce commit 169e15e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4544
-2384
lines changed

quasardb/pybind11/.appveyor.yml

+9-42
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,37 @@
11
version: 1.0.{build}
22
image:
3-
- Visual Studio 2017
43
- Visual Studio 2015
54
test: off
65
skip_branch_with_pr: true
76
build:
87
parallel: true
98
platform:
10-
- x64
119
- x86
1210
environment:
1311
matrix:
1412
- PYTHON: 36
15-
CPP: 14
1613
CONFIG: Debug
1714
- PYTHON: 27
18-
CPP: 14
1915
CONFIG: Debug
20-
- CONDA: 36
21-
CPP: latest
22-
CONFIG: Release
23-
matrix:
24-
exclude:
25-
- image: Visual Studio 2015
26-
platform: x86
27-
- image: Visual Studio 2015
28-
CPP: latest
29-
- image: Visual Studio 2017
30-
CPP: latest
31-
platform: x86
3216
install:
3317
- ps: |
34-
if ($env:PLATFORM -eq "x64") { $env:CMAKE_ARCH = "x64" }
35-
if ($env:APPVEYOR_JOB_NAME -like "*Visual Studio 2017*") {
36-
$env:CMAKE_GENERATOR = "Visual Studio 15 2017"
37-
$env:CMAKE_INCLUDE_PATH = "C:\Libraries\boost_1_64_0"
38-
$env:CXXFLAGS = "-permissive-"
39-
} else {
40-
$env:CMAKE_GENERATOR = "Visual Studio 14 2015"
41-
}
42-
if ($env:PYTHON) {
43-
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
44-
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
45-
python -W ignore -m pip install --upgrade pip wheel
46-
python -W ignore -m pip install pytest numpy --no-warn-script-location
47-
} elseif ($env:CONDA) {
48-
if ($env:CONDA -eq "27") { $env:CONDA = "" }
49-
if ($env:PLATFORM -eq "x64") { $env:CONDA = "$env:CONDA-x64" }
50-
$env:PATH = "C:\Miniconda$env:CONDA\;C:\Miniconda$env:CONDA\Scripts\;$env:PATH"
51-
$env:PYTHONHOME = "C:\Miniconda$env:CONDA"
52-
conda --version
53-
conda install -y -q pytest numpy scipy
54-
}
18+
$env:CMAKE_GENERATOR = "Visual Studio 14 2015"
19+
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
20+
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
21+
python -W ignore -m pip install --upgrade pip wheel
22+
python -W ignore -m pip install pytest numpy --no-warn-script-location pytest-timeout
5523
- ps: |
56-
Start-FileDownload 'http://bitbucket.org/eigen/eigen/get/3.3.3.zip'
57-
7z x 3.3.3.zip -y > $null
58-
$env:CMAKE_INCLUDE_PATH = "eigen-eigen-67e894c6cd8f;$env:CMAKE_INCLUDE_PATH"
24+
Start-FileDownload 'https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip'
25+
7z x eigen-3.3.7.zip -y > $null
26+
$env:CMAKE_INCLUDE_PATH = "eigen-3.3.7;$env:CMAKE_INCLUDE_PATH"
5927
build_script:
6028
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%"
61-
-DPYBIND11_CPP_STANDARD=/std:c++%CPP%
29+
-DCMAKE_CXX_STANDARD=14
6230
-DPYBIND11_WERROR=ON
6331
-DDOWNLOAD_CATCH=ON
6432
-DCMAKE_SUPPRESS_REGENERATION=1
6533
.
6634
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
6735
- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
6836
- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%
69-
- if "%CPP%"=="latest" (cmake --build . --config %CONFIG% --target test_cmake_build -- /m /v:m /logger:%MSBuildLogger%)
7037
on_failure: if exist "tests\test_cmake_build" type tests\test_cmake_build\*.log*

quasardb/pybind11/.clang-format

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# See all possible options and defaults with:
3+
# clang-format --style=llvm --dump-config
4+
BasedOnStyle: LLVM
5+
AccessModifierOffset: -4
6+
AlignConsecutiveAssignments: true
7+
AlwaysBreakTemplateDeclarations: Yes
8+
BinPackArguments: false
9+
BinPackParameters: false
10+
BreakBeforeBinaryOperators: All
11+
BreakConstructorInitializers: BeforeColon
12+
ColumnLimit: 99
13+
IndentCaseLabels: true
14+
IndentPPDirectives: AfterHash
15+
IndentWidth: 4
16+
Language: Cpp
17+
SpaceAfterCStyleCast: true
18+
# SpaceInEmptyBlock: true # too new
19+
Standard: Cpp11
20+
TabWidth: 4
21+
...

quasardb/pybind11/.clang-tidy

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FormatStyle: file
2+
3+
Checks: '
4+
llvm-namespace-comment,
5+
modernize-use-override,
6+
readability-container-size-empty,
7+
modernize-use-using,
8+
modernize-use-equals-default,
9+
modernize-use-auto,
10+
modernize-use-emplace,
11+
'
12+
13+
HeaderFilterRegex: 'pybind11/.*h'

quasardb/pybind11/.cmake-format.yaml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
parse:
2+
additional_commands:
3+
pybind11_add_module:
4+
flags:
5+
- THIN_LTO
6+
- MODULE
7+
- SHARED
8+
- NO_EXTRAS
9+
- EXCLUDE_FROM_ALL
10+
- SYSTEM
11+
12+
format:
13+
line_width: 99
14+
tab_size: 2
15+
16+
# If an argument group contains more than this many sub-groups
17+
# (parg or kwarg groups) then force it to a vertical layout.
18+
max_subgroups_hwrap: 2
19+
20+
# If a positional argument group contains more than this many
21+
# arguments, then force it to a vertical layout.
22+
max_pargs_hwrap: 6
23+
24+
# If a cmdline positional group consumes more than this many
25+
# lines without nesting, then invalidate the layout (and nest)
26+
max_rows_cmdline: 2
27+
separate_ctrl_name_with_space: false
28+
separate_fn_name_with_space: false
29+
dangle_parens: false
30+
31+
# If the trailing parenthesis must be 'dangled' on its on
32+
# 'line, then align it to this reference: `prefix`: the start'
33+
# 'of the statement, `prefix-indent`: the start of the'
34+
# 'statement, plus one indentation level, `child`: align to'
35+
# the column of the arguments
36+
dangle_align: prefix
37+
# If the statement spelling length (including space and
38+
# parenthesis) is smaller than this amount, then force reject
39+
# nested layouts.
40+
min_prefix_chars: 4
41+
42+
# If the statement spelling length (including space and
43+
# parenthesis) is larger than the tab width by more than this
44+
# amount, then force reject un-nested layouts.
45+
max_prefix_chars: 10
46+
47+
# If a candidate layout is wrapped horizontally but it exceeds
48+
# this many lines, then reject the layout.
49+
max_lines_hwrap: 2
50+
51+
line_ending: unix
52+
53+
# Format command names consistently as 'lower' or 'upper' case
54+
command_case: canonical
55+
56+
# Format keywords consistently as 'lower' or 'upper' case
57+
# unchanged is valid too
58+
keyword_case: 'upper'
59+
60+
# A list of command names which should always be wrapped
61+
always_wrap: []
62+
63+
# If true, the argument lists which are known to be sortable
64+
# will be sorted lexicographically
65+
enable_sort: true
66+
67+
# If true, the parsers may infer whether or not an argument
68+
# list is sortable (without annotation).
69+
autosort: false
70+
71+
# Causes a few issues - can be solved later, possibly.
72+
markup:
73+
enable_markup: false

quasardb/pybind11/.gitignore

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CMakeCache.txt
22
CMakeFiles
33
Makefile
44
cmake_install.cmake
5+
cmake_uninstall.cmake
56
.DS_Store
67
*.so
78
*.pyd
@@ -10,6 +11,7 @@ cmake_install.cmake
1011
*.sdf
1112
*.opensdf
1213
*.vcxproj
14+
*.vcxproj.user
1315
*.filters
1416
example.dir
1517
Win32
@@ -30,9 +32,12 @@ MANIFEST
3032
.*.swp
3133
.DS_Store
3234
/dist
33-
/build
34-
/cmake/
35+
/*build*
3536
.cache/
3637
sosize-*.txt
3738
pybind11Config*.cmake
3839
pybind11Targets.cmake
40+
/*env*
41+
/.vscode
42+
/pybind11/include/*
43+
/pybind11/share/*

quasardb/pybind11/.gitmodules

-3
This file was deleted.
+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# To use:
2+
#
3+
# pre-commit run -a
4+
#
5+
# Or:
6+
#
7+
# pre-commit install # (runs every time you commit in git)
8+
#
9+
# To update this file:
10+
#
11+
# pre-commit autoupdate
12+
#
13+
# See https://github.com/pre-commit/pre-commit
14+
15+
repos:
16+
# Standard hooks
17+
- repo: https://github.com/pre-commit/pre-commit-hooks
18+
rev: v3.4.0
19+
hooks:
20+
- id: check-added-large-files
21+
- id: check-case-conflict
22+
- id: check-merge-conflict
23+
- id: check-symlinks
24+
- id: check-yaml
25+
- id: debug-statements
26+
- id: end-of-file-fixer
27+
- id: mixed-line-ending
28+
- id: requirements-txt-fixer
29+
- id: trailing-whitespace
30+
- id: fix-encoding-pragma
31+
32+
# Black, the code formatter, natively supports pre-commit
33+
- repo: https://github.com/psf/black
34+
rev: 20.8b1
35+
hooks:
36+
- id: black
37+
# By default, this ignores pyi files, though black supports them
38+
types: [text]
39+
files: \.pyi?$
40+
41+
# Changes tabs to spaces
42+
- repo: https://github.com/Lucas-C/pre-commit-hooks
43+
rev: v1.1.9
44+
hooks:
45+
- id: remove-tabs
46+
47+
# Flake8 also supports pre-commit natively (same author)
48+
- repo: https://gitlab.com/pycqa/flake8
49+
rev: 3.8.4
50+
hooks:
51+
- id: flake8
52+
additional_dependencies: [flake8-bugbear, pep8-naming]
53+
exclude: ^(docs/.*|tools/.*)$
54+
55+
# CMake formatting
56+
- repo: https://github.com/cheshirekow/cmake-format-precommit
57+
rev: v0.6.13
58+
hooks:
59+
- id: cmake-format
60+
additional_dependencies: [pyyaml]
61+
types: [file]
62+
files: (\.cmake|CMakeLists.txt)(.in)?$
63+
64+
# Check static types with mypy
65+
- repo: https://github.com/pre-commit/mirrors-mypy
66+
rev: v0.800
67+
hooks:
68+
- id: mypy
69+
# The default Python type ignores .pyi files, so let's rerun if detected
70+
types: [text]
71+
files: ^pybind11.*\.pyi?$
72+
# Running per-file misbehaves a bit, so just run on all files, it's fast
73+
pass_filenames: false
74+
75+
# Checks the manifest for missing files (native support)
76+
- repo: https://github.com/mgedmin/check-manifest
77+
rev: "0.46"
78+
hooks:
79+
- id: check-manifest
80+
# This is a slow hook, so only run this if --hook-stage manual is passed
81+
stages: [manual]
82+
additional_dependencies: [cmake, ninja]
83+
84+
# The original pybind11 checks for a few C++ style items
85+
- repo: local
86+
hooks:
87+
- id: disallow-caps
88+
name: Disallow improper capitalization
89+
language: pygrep
90+
entry: PyBind|Numpy|Cmake|CCache
91+
exclude: .pre-commit-config.yaml
92+
93+
- repo: local
94+
hooks:
95+
- id: check-style
96+
name: Classic check-style
97+
language: system
98+
types:
99+
- c++
100+
entry: ./tools/check-style.sh

0 commit comments

Comments
 (0)