Skip to content

[smart_holder] git merge master #4512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -1075,9 +1072,6 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Run pip installs
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci_sh_def.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -1101,9 +1098,6 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Run pip installs
run: |
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/ci_sh_def.yml.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ci.yml 2023-02-07 23:54:04.279545875 -0800
+++ ci_sh_def.yml 2023-02-07 23:54:24.677604204 -0800
--- ci.yml 2023-02-16 15:01:55.421851299 -0800
+++ ci_sh_def.yml 2023-02-16 15:03:24.958936294 -0800
@@ -1,4 +1,16 @@
-name: CI
+# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES:
Expand Down Expand Up @@ -27,47 +27,47 @@
cancel-in-progress: true

env:
@@ -117,6 +129,7 @@
@@ -114,6 +126,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build C++11
@@ -146,6 +159,7 @@
@@ -143,6 +156,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build
@@ -167,6 +181,7 @@
@@ -164,6 +178,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
-DPYBIND11_INTERNALS_VERSION=10000000
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
${{ matrix.args }}
@@ -254,6 +269,7 @@
@@ -251,6 +266,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build build -j 2
@@ -319,6 +335,7 @@
@@ -316,6 +332,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -348,7 +365,7 @@
@@ -345,7 +362,7 @@
run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy

- name: Configure
Expand All @@ -76,7 +76,7 @@

- name: Build
run: cmake --build build -j2 --verbose
@@ -428,7 +445,7 @@
@@ -425,7 +442,7 @@
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=11 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
Expand All @@ -85,71 +85,71 @@
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"

# Building before installing Pip should produce a warning but not an error
@@ -487,6 +504,7 @@
@@ -484,6 +501,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -542,6 +560,7 @@
@@ -539,6 +557,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -574,6 +593,7 @@
@@ -571,6 +590,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=17 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -641,6 +661,7 @@
@@ -638,6 +658,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -691,6 +712,7 @@
@@ -688,6 +709,7 @@
cmake ../pybind11-tests
-DDOWNLOAD_CATCH=ON
-DPYBIND11_WERROR=ON
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests

@@ -786,6 +808,7 @@
@@ -783,6 +805,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build -j 2
@@ -840,6 +863,7 @@
@@ -837,6 +860,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build --config Debug -j 2
@@ -880,6 +904,7 @@
@@ -877,6 +901,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=20
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build C++20
run: cmake --build build -j 2
@@ -927,7 +952,7 @@
@@ -924,7 +949,7 @@
- name: Configure C++11
# LTO leads to many undefined reference like
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
Expand All @@ -158,7 +158,7 @@

- name: Build C++11
run: cmake --build build -j 2
@@ -945,7 +970,7 @@
@@ -942,7 +967,7 @@
run: git clean -fdx

- name: Configure C++14
Expand All @@ -167,7 +167,7 @@

- name: Build C++14
run: cmake --build build2 -j 2
@@ -963,7 +988,7 @@
@@ -960,7 +985,7 @@
run: git clean -fdx

- name: Configure C++17
Expand All @@ -176,15 +176,15 @@

- name: Build C++17
run: cmake --build build3 -j 2
@@ -1030,6 +1055,7 @@
@@ -1027,6 +1052,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build . -j 2
@@ -1098,6 +1124,7 @@
@@ -1092,6 +1118,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Pip

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- stable
- smart_holder
- v*
release:
types:
- published

env:
PIP_ONLY_BINARY: numpy

jobs:
# This builds the sdists and wheels and makes sure the files are exactly as
# expected. Using Windows and Python 3.6, since that is often the most
# challenging matrix element.
test-packaging:
name: 🐍 3.6 • 📦 tests • windows-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Setup 🐍 3.6
uses: actions/setup-python@v4
with:
python-version: 3.6

- name: Prepare env
run: |
python -m pip install -r tests/requirements.txt

- name: Python Packaging tests
run: pytest tests/extra_python_package/


# This runs the packaging tests and also builds and saves the packages as
# artifacts.
packaging:
name: 🐍 3.8 • 📦 & 📦 tests • ubuntu-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup 🐍 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Prepare env
run: |
python -m pip install -r tests/requirements.txt build twine

- name: Python Packaging tests
run: pytest tests/extra_python_package/

- name: Build SDist and wheels
run: |
python -m build
PYBIND11_GLOBAL_SDIST=1 python -m build

- name: Check metadata
run: twine check dist/*

- name: Save standard package
uses: actions/upload-artifact@v3
with:
name: standard
path: dist/pybind11-*

- name: Save global package
uses: actions/upload-artifact@v3
with:
name: global
path: dist/pybind11_global-*



# When a GitHub release is made, upload the artifacts to PyPI
upload:
name: Upload to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
needs: [packaging]

steps:
- uses: actions/setup-python@v4
with:
python-version: "3.x"

# Downloads all to directories matching the artifact names
- uses: actions/download-artifact@v3

- name: Publish standard package
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}
packages_dir: standard/

- name: Publish global package
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password_global }}
packages_dir: global/
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
prune tests
prune ubench
include README_smart_holder.rst
recursive-include pybind11/include/pybind11 *.h
Expand Down
Loading