mesonbuild / meson-python

Meson PEP 517 Python build backend
https://mesonbuild.com/meson-python/
MIT License
120 stars 59 forks source link

Upgrade GitHub Actions #496

Closed cclauss closed 9 months ago

cclauss commented 9 months ago
dnicolodi commented 9 months ago

What did prompt these changes?

cclauss commented 9 months ago

I am trying to upgrade dependent projects to Python 3.12 release candidate 2 so I am trying to add some lines to a requirements.txt file that will build a Python 3.12 compatible version of meson-python.

I tried: % docker run --rm -it python:3.12.0rc2 bash

Inside the Docker container...


root@9b993550be2e:/# python --version
Python 3.12.0rc2
root@9b993550be2e:/# python -m pip install mesonpy
Collecting mesonpy
Downloading MesonPy-0.0.1.tar.gz (14 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-pvhvk28s/mesonpy_9e8aa5df0dea4d859e4425583276a65f/setup.py", line 4, in with open('requirements.txt') as f: ^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.


So, I am trying to learn how this project gets built and why it cannot find its `requirements.txt`.

This seems a bit odd...
> MesonPy-0.0.1.tar.gz

The comments about `setup.py` and `requirements.txt` seem odd for a repo that does not seem to have either.
rgommers commented 9 months ago

python -m pip install mesonpy

It's meson-python as the package name, not mesonpy.

cclauss commented 9 months ago

This seems to work... (testing) python -m pip install -e 'git+https://github.com/mesonbuild/meson-python@main#egg=meson-python'

dnicolodi commented 9 months ago

@rgommers Do you think that we can have the MesonPy project removed from PyPI? The last release is from 6 years ago and AFAICT it is not even installable with a modern pip.

cclauss commented 9 months ago

Oh. scikit-image seems to use it. https://github.com/scikit-image/scikit-image/blob/80442f1cdb55e75ed4b8bb826e0632b4e1aea430/pyproject.toml#L116

rgommers commented 9 months ago

@rgommers Do you think that we can have the MesonPy project removed from PyPI? The last release is from 6 years ago and AFAICT it is not even installable with a modern pip.

Good idea. I can give it a try - I've been through that process successfully before with a couple of other packages.

Oh. scikit-image seems to use it.

No, it's this:

requires = [
    'meson-python>=0.14',

The build-backend identifies the import name, not the package name.

cclauss commented 9 months ago

Thanks for the guidance!! Now I see the error of my ways.

rgommers commented 9 months ago

I made a request to transfer the name on PyPI: https://github.com/Bartpab/meson-py/issues/6.

No worries at all @cclauss.

I think we can still merge this, after undoing the pypy-3.9 change. The rest of the changes seem fine as regular maintenance. WDYT @dnicolodi?

rgommers commented 9 months ago

I made a request to transfer the name on PyPI: https://github.com/Bartpab/meson-py/issues/6.

This may take a while if we get no response: https://peps.python.org/pep-0541/#implementation.

dnicolodi commented 9 months ago

@rgommers Thanks. The confusion is compounded by the fact that some distributions decided to package meson-python as python3-mesonpy

dnicolodi commented 9 months ago

I think we can still merge this, after undoing the pypy-3.9 change. The rest of the changes seem fine as regular maintenance.

Sure. I'm just a bit wary of PRs touching project infrastructure from passers by.