Skip to content

Commit

Permalink
BLD: improve M1 build support
Browse files Browse the repository at this point in the history
* the changes here allow me to build MDAnalysis and its
dependencies on an M1 Mac on the gcc compile farm using
`python3 -m pip install --user .`

* the full test suite passes, except for 1 extra `xfail`
I've added in here--which is also documented by gh-1389
(it has apparently been failing on "exotic platforms"
for almost 5 years)
  • Loading branch information
tylerjereddy committed Apr 2, 2022
1 parent bf95f9c commit da4165e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ requires = [
"numpy==1.21.4; python_version=='3.10' and platform_python_implementation != 'PyPy'",
"setuptools",
"wheel",
# arm64 on Darwin supports Python 3.8 and above and requires numpy>=1.20.0
"numpy==1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'",
"numpy==1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'",
]
3 changes: 3 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_encore.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import sys
import os
import warnings
import platform

import pytest
from numpy.testing import assert_equal, assert_almost_equal
Expand Down Expand Up @@ -444,6 +445,8 @@ def test_clustering_two_ensembles(self, ens1, ens2):
assert len(cluster_collection) == expected_value, "Unexpected " \
"results: {0}".format(cluster_collection)

@pytest.mark.xfail(platform.machine() == "arm64" and platform.system() == "Darwin",
reason="Fails on M1 Mac")
def test_clustering_three_ensembles_two_identical(self, ens1, ens2):
cluster_collection = encore.cluster([ens1, ens2, ens1])
expected_value = 40
Expand Down

0 comments on commit da4165e

Please sign in to comment.