Skip to content

Commit

Permalink
Update most dependencies to latest (2024-06) (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes authored Jun 18, 2024
1 parent 1e6f8ea commit 62d62cd
Show file tree
Hide file tree
Showing 10 changed files with 894 additions and 782 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:

jobs:
ci:
runs-on: macos-latest
runs-on: macos-13
strategy:
matrix:
python-version:
Expand Down
13 changes: 10 additions & 3 deletions docs/python/binary-extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ The ``bezier._speedup`` module depends on this local copy of ``libbezier``:

$ readelf -d _speedup.cpython-311-x86_64-linux-gnu.so

Dynamic section at offset 0x498000 contains 27 entries:
Dynamic section at offset 0x49c000 contains 27 entries:
Tag Type Name/Value
0x000000000000000f (RPATH) Library rpath: [$ORIGIN/../bezier.libs]
0x0000000000000001 (NEEDED) Shared library: [libbezier-631d8eda.so.2023.7.28]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x6000
0x000000000000000d (FINI) 0x7ef80
0x000000000000000d (FINI) 0x7f630
...

and the local copy of ``libbezier`` depends on the other dependencies in
Expand Down Expand Up @@ -419,8 +419,15 @@ and the local copy of ``libbezier`` depends on the other dependencies in

libgcc_s_seh-1-5c71c85c0ca01174917203266ba98140.dll
libgfortran-5-08073c6868a1df2cbc5609e49cbe3ad8.dll
api-ms-win-crt-environment-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
KERNEL32.dll
msvcrt.dll

Summary
...
Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# NumPy is required for building `bezier` from source.
numpy >= 1.25.2
numpy >= 1.26.4, < 2
# Sphinx and related are required for building documentation.
Sphinx >= 6.2.1
Sphinx >= 7.3.7
# See: https://github.com/readthedocs/sphinx_rtd_theme/issues/1463
sphinx-copybutton >= 0.5.2
sphinx-docstring-typing >= 0.0.4
sphinx-rtd-theme >= 1.2.2
sphinx-rtd-theme >= 2.0.0
75 changes: 50 additions & 25 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import functools
import glob
import os
import pathlib
Expand All @@ -28,29 +29,29 @@
IS_MACOS = sys.platform == "darwin"
IS_WINDOWS = os.name == "nt"
DEPS = {
"black": "black >= 23.7.0",
"black": "black >= 24.4.2",
"cmake-format": "cmake-format >= 0.6.13",
"cmake": "cmake >= 3.27.0",
"cmake": "cmake >= 3.29.5.1",
"coverage": "coverage",
"Cython": "Cython >= 3.0.2",
"delocate": "delocate >= 0.10.4",
"delvewheel": "delvewheel >= 1.4.0",
"Cython": "Cython >= 3.0.10",
"delocate": "delocate >= 0.11.0",
"delvewheel": "delvewheel >= 1.6.0",
"docutils": "docutils",
"flake8": "flake8",
"flake8-import-order": "flake8-import-order",
"jsonschema": "jsonschema >= 4.18.4",
"jsonschema": "jsonschema >= 4.22.0",
"lcov-cobertura": "lcov-cobertura >= 2.0.2",
"matplotlib": "matplotlib >= 3.7.2",
"numpy": "numpy >= 1.25.2",
"pycobertura": "pycobertura >= 3.2.1",
"matplotlib": "matplotlib >= 3.9.0",
"numpy": "numpy >= 1.26.4, < 2",
"pycobertura": "pycobertura >= 3.3.2",
"Pygments": "Pygments",
"pylint": "pylint >= 2.17.5",
"pytest": "pytest >= 7.4.0",
"pylint": "pylint >= 3.2.3",
"pytest": "pytest >= 8.2.2",
"pytest-cov": "pytest-cov",
"referencing": "referencing >= 0.30.0",
"scipy": "scipy >= 1.11.1",
"sympy": "sympy >= 1.12",
"seaborn": "seaborn >= 0.12.2",
"referencing": "referencing >= 0.35.1",
"scipy": "scipy >= 1.13.1",
"sympy": "sympy >= 1.12.1",
"seaborn": "seaborn >= 0.13.2",
}
BASE_DEPS = (DEPS["numpy"], DEPS["pytest"])
NOX_DIR = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -67,6 +68,10 @@
RELEASE_SESSION_NAME = "libbezier-release"
INSTALL_PREFIX_ENV = "BEZIER_INSTALL_PREFIX"
EXTRA_DLL_ENV = "BEZIER_EXTRA_DLL"
_OS_MAKEDIRS_EXIST_OK = functools.partial(os.makedirs, exist_ok=True)
_SHUTIL_RMTREE_IGNORE_ERRORS = functools.partial(
shutil.rmtree, ignore_errors=True
)


def get_path(*names):
Expand Down Expand Up @@ -286,6 +291,8 @@ def _macos_doctest_install(session, install_prefix):
# 2. Build the wheel from source.
basic_dir = tempfile.mkdtemp()
session.run(
"python",
"-m",
"pip",
"wheel",
".",
Expand All @@ -307,7 +314,14 @@ def _macos_doctest_install(session, install_prefix):
)
# 4. Install from the repaired wheel.
session.run(
"pip", "install", "bezier", "--no-index", "--find-links", repaired_dir
"python",
"-m",
"pip",
"install",
"bezier",
"--no-index",
"--find-links",
repaired_dir,
)
# 5. Clean up temporary directories.
shutil.rmtree(basic_dir, ignore_errors=True)
Expand All @@ -320,6 +334,8 @@ def _windows_doctest_install(session, install_prefix):
# 2. Build the wheel from source.
basic_dir = tempfile.mkdtemp()
session.run(
"python",
"-m",
"pip",
"wheel",
".",
Expand All @@ -342,7 +358,14 @@ def _windows_doctest_install(session, install_prefix):
)
# 4. Install from the repaired wheel.
session.run(
"pip", "install", "bezier", "--no-index", "--find-links", repaired_dir
"python",
"-m",
"pip",
"install",
"bezier",
"--no-index",
"--find-links",
repaired_dir,
)
# 5. Clean up temporary directories.
shutil.rmtree(basic_dir, ignore_errors=True)
Expand Down Expand Up @@ -592,7 +615,7 @@ def _cmake_libbezier_root(session, build_type):
relative_path = session.cache_dir / build_session_name
# Convert to an absolute path.
libbezier_root = get_path(relative_path)
session.run(os.makedirs, libbezier_root, exist_ok=True)
session.run(_OS_MAKEDIRS_EXIST_OK, libbezier_root)
return libbezier_root


Expand Down Expand Up @@ -627,13 +650,13 @@ def _cmake(session, build_type):
session.install(DEPS["cmake"])
cmake_external = False
else:
session.run_always(print, "Using pre-installed ``cmake``")
session.run_always("cmake", "--version", external=cmake_external)
session.run_install(print, "Using pre-installed ``cmake``")
session.run_install("cmake", "--version", external=cmake_external)

# Prepare build and install directories.
build_dir = os.path.join(libbezier_root, "build")
install_prefix = os.path.join(libbezier_root, "usr")
session.run_always(os.makedirs, build_dir, exist_ok=True)
session.run_install(_OS_MAKEDIRS_EXIST_OK, build_dir)

# Run ``cmake`` to prepare for / configure the build.
build_args = [
Expand All @@ -644,14 +667,16 @@ def _cmake(session, build_type):
]
if IS_WINDOWS:
build_args.extend(["-G", "MinGW Makefiles"])
if IS_MACOS:
build_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0")
if os.environ.get("TARGET_NATIVE_ARCH") == "OFF":
build_args.append("-DTARGET_NATIVE_ARCH:BOOL=OFF")

build_args.extend(["-S", os.path.join("src", "fortran"), "-B", build_dir])
session.run_always(*build_args, external=cmake_external)
session.run_install(*build_args, external=cmake_external)

# Build and install.
session.run_always(
session.run_install(
"cmake",
"--build",
build_dir,
Expand All @@ -663,7 +688,7 @@ def _cmake(session, build_type):
)

# Get information on how the build was configured.
session.run_always("cmake", "-L", build_dir, external=cmake_external)
session.run_install("cmake", "-L", build_dir, external=cmake_external)

return install_prefix

Expand Down Expand Up @@ -722,7 +747,7 @@ def clean(session):
get_path("tests", "unit", "*.pyc"),
)
for dir_path in clean_dirs:
session.run(shutil.rmtree, dir_path, ignore_errors=True)
session.run(_SHUTIL_RMTREE_IGNORE_ERRORS, dir_path)
for glob_path in clean_globs:
for filename in glob.glob(glob_path):
session.run(os.remove, filename)
2 changes: 1 addition & 1 deletion scripts/manylinux/build-wheel-for-doctest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

# 0. Install the Python dependencies
"${PY_ROOT}/bin/python" -m pip install --upgrade pip
"${PY_ROOT}/bin/python" -m pip install --upgrade auditwheel cmake nox numpy
"${PY_ROOT}/bin/python" -m pip install --upgrade auditwheel cmake nox 'numpy >= 1.26.4, < 2'

# 1. Make sure no previous build artifacts are still around
cd "${BEZIER_ROOT}"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
""".format(
install_prefix=INSTALL_PREFIX_ENV, no_extension=NO_EXTENSION_ENV
)
REQUIREMENTS = ("numpy >= 1.25.2",)
REQUIREMENTS = ("numpy >= 1.26.4, < 2",)
# See: https://www.python.org/dev/peps/pep-0508/
# Dependency specification for Python Software Packages
EXTRAS_REQUIRE = {
Expand Down
Loading

0 comments on commit 62d62cd

Please sign in to comment.