-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix macOS wheel build for datajoint
(Issue #249)
#406
Merged
glopesdev
merged 30 commits into
SainsburyWellcomeCentre:gl-ruff-check
from
MilagrosMarin:main
Sep 20, 2024
Merged
Fix macOS wheel build for datajoint
(Issue #249)
#406
glopesdev
merged 30 commits into
SainsburyWellcomeCentre:gl-ruff-check
from
MilagrosMarin:main
Sep 20, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datajoint
(Issue #249)
glopesdev
reviewed
Sep 19, 2024
glopesdev
approved these changes
Sep 20, 2024
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 looks great as a whole and we can deal with the remaining conversations directly on the CI squash branch, so I'm merging this.
81bbfa1
into
SainsburyWellcomeCentre:gl-ruff-check
4 checks passed
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR addresses issue #249, which involves a wheel build failure for
datajoint
on macOS 12 when using mamba, and proposes three solutions for macOS users.Also, this PR:
Build env and run tests on macos-latest
build_env_run_tests.yml
workflow.Context: On macOS, when attempting to install
datajoint
through a conda/mamba environment using an.yml
file (see below), the following error occurs during the installation:setuptools
no longer recommends usingsetup.py
for package installation. Specifically,setuptools
is now raising warnings thatsetup.py
install is deprecated in favor of using modern standards-based tools such as PEP 517 to build packages.This deprecation is affecting how
datajoint
package is resolved during the build process for Apple Silicon (M1/M2) Macs. The python packages listed in thesetup.py
ofdatajoint
dependency are not properly installed.Solution: As python evolves to modernize package building and installation, the transition from
setup.py
topyproject.toml
(following PEP 517 and PEP 518) will help standardize the process. To stay aligned with these best practices,datajoint-python
can consider updating its dependency management to usepyproject.toml
for smoother builds and installations for mac users.Temporal solutions are:
datajoint
wheel using pip manually in the shell to bypass the issue:pip install datajoint
setuptools
to version 58.2.0 would remove the warning but may create conflicts with other dependencies in the environment [1, 2]Passing the
--use-pep517
flag topip
to solve the wheel-building issue on macOS [3, 4]Proposed solution in this PR for macOS installation process:
env_macos.yml
file for conda/mamba, excluding the pip installation ofdatajoint
anddatajoint-utilities
.pip
from the shell within the conda/mamba environment, while passing the required flag. This is also indicated in theenv_macos.yml
for the macOS user reference.Tests:
Locally using conda, and using GHA with mamba.
Environment details:
macOS: 12, 14.5
python: 3.11, 3.12.6
conda/mamba: installation attempted via
conda/mamba env create -f env.yml
Main packages: