-
Notifications
You must be signed in to change notification settings - Fork 36
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
Update most dependencies to latest (2024-06) #318
Changes from all commits
3be79b2
d1ebe7a
23cf406
7d83c8a
245f6fd
ee15816
b0fe44c
19656b7
619a6ef
6c76aba
63cda4d
dcf10cb
278d11d
5344cb6
184ab35
7459590
36082f5
5317aa0
51bbcf6
faac2a4
5071dbb
e2311fe
55595a4
0dd613c
23da3a9
2889190
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ on: | |
|
||
jobs: | ||
ci: | ||
runs-on: macos-latest | ||
runs-on: macos-13 | ||
strategy: | ||
matrix: | ||
python-version: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expected when Cython generated code gets updated |
||
... | ||
|
||
and the local copy of ``libbezier`` depends on the other dependencies in | ||
|
@@ -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 | ||
... | ||
|
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Handling 2.0 in another PR |
||
"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__)) | ||
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
_SHUTIL_RMTREE_IGNORE_ERRORS = functools.partial( | ||
shutil.rmtree, ignore_errors=True | ||
) | ||
|
||
|
||
def get_path(*names): | ||
|
@@ -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", | ||
Comment on lines
+294
to
+295
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this when debugging (I was worried something was wrong in |
||
"pip", | ||
"wheel", | ||
".", | ||
|
@@ -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) | ||
|
@@ -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", | ||
".", | ||
|
@@ -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) | ||
|
@@ -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 | ||
|
||
|
||
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
# 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 = [ | ||
|
@@ -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") | ||
Comment on lines
+670
to
+671
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is temporary! The default value used by CMake is whatever the current version is on the machine. Here that's 13.6 as of https://github.com/actions/runner-images/blob/3793317199f7f1eebff21ae96c77878546f06389/images/macos/macos-13-Readme.md. However, only 13.0 is allowed, e.g.:
|
||
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, | ||
|
@@ -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 | ||
|
||
|
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is temporary!
See: actions/setup-python#547
In particular, the architecture on
macos-latest
(macos-14
) machines means that mixed-architecture dylibs are produced bygcc
.See for example a failed build: