Skip to content

Commit

Permalink
docs and scripts: replace mentions of pybind11 with nanobind
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Sep 9, 2024
1 parent e3b2239 commit 73bcd2e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 20 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ endif()
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)

# Unless it's explicitly specifed, we want LTO for non-debug builds only.
# pybind11Common.cmake has its own logic to set LTO options.
# Having different options in pybind11_add_module than for gemmi_cpp
# may cause problems -- we may need to handle it at some point.
# TODO: check that it's compatible with nanobind_add_module, which has
# its own logic of setting LTO options.
if (NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION)
include(CheckIPOSupported)
check_ipo_supported(RESULT is_ipo_supported OUTPUT ipo_error)
Expand Down
3 changes: 0 additions & 3 deletions docs/cif.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ element found in mmCIF:

More complex examples are shown in the :ref:`cif_examples` section.

Internally, Python bindings use
`pybind11 <https://github.com/pybind/pybind11>`_.


DOM and SAX
===========
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ itself, but are used in command-line utilities, python bindings or tests:

Not distributed with Gemmi:

* `pybind11 <https://github.com/pybind/pybind11>`_ -- used for creating
* `nanobind <https://github.com/wjakob/nanobind>`_ -- used for creating
Python bindings. License: 3-clause BSD.
* `zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ -- optional, can be used
instead of zlib for faster reading of gzipped files.
Expand Down
7 changes: 1 addition & 6 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cd "$(dirname "$0")"
BUILD_DIR="$(pwd)"
[ -e build ] && BUILD_DIR="$(pwd)/build"
if [ -z "${PYTHON-}" ]; then
PYTHON=`grep ^PYBIND11_PYTHON_EXECUTABLE_LAST: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
PYTHON=`grep ^_Python_EXECUTABLE: $BUILD_DIR/CMakeCache.txt | cut -d= -f2`
fi

# Build all, except when we called with an option to avoid full compilation:
Expand Down Expand Up @@ -70,11 +70,6 @@ if [ $1 = x -o $1 = a ]; then
echo 'Run codespell'
codespell include src prog python fortran tests examples docs wasm tools ||:

echo 'Run pybind11-stubgen'
pybind11-stubgen --dry-run --exit-code gemmi \
--enum-class-locations='Ignore:gemmi.ContactSearch' \
--enum-class-locations='.+:gemmi'

echo 'Checking serialize.hpp...'
$PYTHON tools/check_serialize.py
fi
Expand Down
4 changes: 3 additions & 1 deletion tools/linux-wheels.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/bash
#
# NOTE: this script is not used anymore. We use cibuildwheel now.
#
# based on
# https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
set -e -u -x
Expand All @@ -18,7 +21,6 @@ function repair_wheel {
# Compile wheels
#for PYBIN in /opt/python/cp38*/bin; do
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install pybind11
"${PYBIN}/pip" wheel -v /io/ --no-deps -w wheelhouse/
done

Expand Down
12 changes: 6 additions & 6 deletions tools/upstream-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from urllib.request import urlopen

TAGGED_REPOS = {
'pybind/pybind11': 'v2.6.1',
'scikit-build/scikit-build-core': 'v0.9.4',
'wjakob/nanobind': 'v2.1.0',
'scikit-build/scikit-build-core': 'v0.10.5',
'taocpp/PEGTL': '2.8.3',
'cxong/tinydir': '1.2.6',
'fastfloat/fast_float': 'v6.1.5',
Expand All @@ -29,11 +29,11 @@ def load_json(url):

def check_tags():
for repo, version in TAGGED_REPOS.items():
url = 'https://api.github.com/repos/%s/releases/latest' % repo
data = load_json(url)
if 'tag_name' in data:
try:
url = 'https://api.github.com/repos/%s/releases/latest' % repo
data = load_json(url)
latest_tag = data['tag_name']
else:
except IOError:
data = load_json('https://api.github.com/repos/%s/tags' % repo)
latest_tag = data[0]['name']
mark = (' !!!' if version != latest_tag else '')
Expand Down

0 comments on commit 73bcd2e

Please sign in to comment.