Skip to content
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

Unable to specify wheel version for building #11867

Open
GrowlingM1ke opened this issue Dec 19, 2024 · 2 comments
Open

Unable to specify wheel version for building #11867

GrowlingM1ke opened this issue Dec 19, 2024 · 2 comments
Labels
Support Support question

Comments

@GrowlingM1ke
Copy link

GrowlingM1ke commented Dec 19, 2024

Details

Expected Result

Successfully build with the correct version of wheel being used.

Actual Result

My builds have been recently failing due to a specific library I'm using (mayavi). I've managed to figure out how to get the build to run successfully locally however it still fails when it builds on readthedocs. I've noticed that even when specifying in pyproject.toml

[build-system]
requires = [
    "setuptools>=42",
    "wheel==0.45.1",
]

The output logs shows that it is using wheel version 0.40.0:

python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
created virtual environment CPython3.10.15.final.0-64 in 667ms
  creator CPython3Posix(dest=/home/docs/checkouts/readthedocs.org/user_builds/calcium-transient-analysis/envs/latest, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/docs/.local/share/virtualenv)
    added seed packages: pip==23.1, setuptools==67.6.1, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

This confuses me because I thought it did recognize my pyproject.toml:

  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'

I'm not quite sure what the exact culprit is but my best guess is that it has to do something with wheel.

@stsewd stsewd added the Support Support question label Dec 23, 2024
@humitos
Copy link
Member

humitos commented Jan 2, 2025

The output logs shows that it is using wheel version 0.40.0:

That's the wheel version installed by default when running python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH.

Then, when running python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt it seems that pip detects your pyproject.toml as you noticed but I don't know why it doesn't upgrade the wheel requirement automatically or refuse to install your package due to mismatch required dependencies.

I'm not sure this issue is related to Read the Docs, tho. It seems more related to pip/python.

If you want to be able to build on Read the Docs, you should probably run pip install -U wheel before installing your dependencies. Example:

build:
  jobs:
    pre_install:
      - pip install -U wheel

Read more about build customization at https://docs.readthedocs.io/en/latest/build-customization.html

Let me know if that helps.

@GrowlingM1ke
Copy link
Author

GrowlingM1ke commented Jan 2, 2025

@humitos Thank you I will look into the pre_install and see if it helps. As a sidenote is there any guide on running readthedocs builds locally? I don't want to spam readthedocs with builds for every small change that may potentially fix an issue that has to do with displaying documentation. I've attempted to docker pull readthedocs builds and tried to get it to build my documentation locally but I have been so far unsuccessful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

3 participants