Skip to content

Fix the numpy Apple M1 build#18538

Merged
mattip merged 2 commits intonumpy:mainfrom
kulinseth:18532_M1_build_fix
Mar 6, 2021
Merged

Fix the numpy Apple M1 build#18538
mattip merged 2 commits intonumpy:mainfrom
kulinseth:18532_M1_build_fix

Conversation

@kulinseth
Copy link
Contributor

There was a build issue on numpy with M1:
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_universal2')

The issue was fixed in the packaging 20.5 and onwards, but that was not
getting picked by setuptools. So explicitly adding this dependency in
the toml file. The change was tested with:

python3 -m pip install --force-reinstall .

There was a build issue on numpy with M1:
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_universal2')

The issue was fixed in the packaging 20.5 and onwards, but that was not
getting picked by setuptools. So explicitly adding this dependency in
the toml file. The change was tested with:

```
python3 -m pip install --force-reinstall .
```
@kulinseth kulinseth changed the title Fix the numpy Apple M1 build in #18532 Fix the numpy Apple M1 build Mar 3, 2021
Base automatically changed from master to main March 4, 2021 02:05
Co-authored-by: Matti Picus <matti.picus@gmail.com>
@mattip
Copy link
Member

mattip commented Mar 4, 2021

Did you verify this is correct? We don't build/test for M1 here

@kulinseth
Copy link
Contributor Author

Did you verify this is correct? We don't build/test for M1 here

Yes, I used python3 -m pip install --force-reinstall . to check and it builds fine on M1.

@kulinseth
Copy link
Contributor Author

Some of the tests are failing with:

 File "/opt/python/cp38-cp38/lib/python3.8/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

@mattip How to find out if this is related to this change ? Any help would be appreciated.

@charris
Copy link
Member

charris commented Mar 6, 2021

Some of the tests are failing with:

It's a bug in the manylinux2010 image released last Wednesday. Fixed in NumPy by pinning manylinux2010 to the previous version, and now fixed upstream as well.

@mattip mattip merged commit 6a2cd66 into numpy:main Mar 6, 2021
@mattip
Copy link
Member

mattip commented Mar 6, 2021

Thanks @kulinseth

rgommers added a commit to rgommers/numpy that referenced this pull request Jul 10, 2022
Why we don't need this anymore:

- This pin for `packaging` 20.5 was added in numpygh-18538.
- `setuptools` then upgraded its vendored `packaging` version to
  21.2 in its 59.1.0 release (see
  https://setuptools.pypa.io/en/latest/history.html?highlight=%22update%20packaging%22#v59-1-0)
- And we then upgraded to `setuptools` 59.2.0 in commit 1adb70d

We do not depend on `packaging` at all, it was a pin of a transitive
build dependency. So let's clean it up.

Tested locally as well with `python -m build --wheel` (which uses
`pyproject.toml` to build a wheel in an isolated venv), and then
checking the wheel tags and ensuring the wheel can be installed
with Pip.
rgommers added a commit to rgommers/numpy that referenced this pull request Jul 10, 2022
Why we don't need this anymore:

- This pin for `packaging` 20.5 was added in numpygh-18538.
- `setuptools` then upgraded its vendored `packaging` version to
  21.2 in its 59.1.0 release (see
  https://setuptools.pypa.io/en/latest/history.html?highlight=%22update%20packaging%22#v59-1-0)
- And we then upgraded to `setuptools` 59.2.0 in commit 1adb70d

We do not depend on `packaging` at all, it was a pin of a transitive
build dependency. So let's clean it up.

Tested locally as well with `python -m build --wheel` (which uses
`pyproject.toml` to build a wheel in an isolated venv), and then
checking the wheel tags and ensuring the wheel can be installed
with Pip.

[ci skip]
rgommers added a commit to rgommers/numpy that referenced this pull request Jul 10, 2022
Why we don't need this anymore:

- This pin for `packaging` 20.5 was added in numpygh-18538.
- `setuptools` then upgraded its vendored `packaging` version to
  21.2 in its 59.1.0 release (see
  https://setuptools.pypa.io/en/latest/history.html#v59-1-0)
- And we then upgraded to `setuptools` 59.2.0 in commit 1adb70d

We do not depend on `packaging` at all, it was a pin of a transitive
build dependency. So let's clean it up.

Tested locally as well with `python -m build --wheel` (which uses
`pyproject.toml` to build a wheel in an isolated venv), and then
checking the wheel tags and ensuring the wheel can be installed
with Pip.

[ci skip]
NamamiShanker pushed a commit to NamamiShanker/numpy that referenced this pull request Jul 13, 2022
Why we don't need this anymore:

- This pin for `packaging` 20.5 was added in numpygh-18538.
- `setuptools` then upgraded its vendored `packaging` version to
  21.2 in its 59.1.0 release (see
  https://setuptools.pypa.io/en/latest/history.html#v59-1-0)
- And we then upgraded to `setuptools` 59.2.0 in commit 1adb70d

We do not depend on `packaging` at all, it was a pin of a transitive
build dependency. So let's clean it up.

Tested locally as well with `python -m build --wheel` (which uses
`pyproject.toml` to build a wheel in an isolated venv), and then
checking the wheel tags and ensuring the wheel can be installed
with Pip.

[ci skip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants