Skip to content

Conversation

hoodmane
Copy link
Member

@hoodmane hoodmane commented Nov 11, 2024

Resolves pyodide/pyodide#5187. In that issue, the build requires a package called cmake-build-extension but because we have cmake in the list of requirements to avoid we drop it and it breaks the build.

This logic was introduced in pyodide/pyodide#2272 and did not come up in the review. Surprisingly this is the first problem it has caused. Let's see if this change breaks anything in Pyodide CI.

@hoodmane hoodmane force-pushed the less-sloppy-remove-avoided-reqs branch from a612e38 to 953269d Compare November 11, 2024 14:28
hoodmane added a commit to hoodmane/pyodide that referenced this pull request Nov 11, 2024
See upstream PR:
pyodide/pyodide-build#60

Resolves pyodide#5187. In that issue, the build requires a package
called `cmake-build-extension` but because we have `cmake` in the list of
requirements to avoid we drop it and it breaks the build.

This logic was introduced in pyodide#2272 and
did not come up in the review. Surprisingly this is the first problem it has
caused. Let's see if this change breaks anything in Pyodide CI.
Resolves pyodide/pyodide#5187. In that issue, the
build requires a package called `cmake-build-extension` but because we have
`cmake` in the list of requirements to avoid we drop it and it breaks the build.

This logic was introduced in pyodide/pyodide#2272 and
did not come up in the review. Surprisingly this is the first problem it has
caused. Let's see if this change breaks anything in Pyodide CI.
@hoodmane hoodmane force-pushed the less-sloppy-remove-avoided-reqs branch from 953269d to 8ea7f43 Compare February 17, 2025 21:51
hoodmane added a commit to hoodmane/pyodide that referenced this pull request Feb 17, 2025
See upstream PR:
pyodide/pyodide-build#60

Resolves pyodide#5187. In that issue, the build requires a package
called `cmake-build-extension` but because we have `cmake` in the list of
requirements to avoid we drop it and it breaks the build.

This logic was introduced in pyodide#2272 and
did not come up in the review. Surprisingly this is the first problem it has
caused. Let's see if this change breaks anything in Pyodide CI.
@agriyakhetarpal
Copy link
Member

As CMake is no longer an avoided requirement post #141, I think packages that use cmake-build-extension should work now, and this PR can be revisited.

@agriyakhetarpal
Copy link
Member

agriyakhetarpal commented Apr 7, 2025

Actually, if patchelf is the only avoided requirement now, do we even need this PR? (cross-posting from pyodide/pyodide#5188 (comment))

I think this change would make sense if we were to add another requirement we need to avoid which causes troubles with building, and in principle it's a good change as we match the name of the requirement exactly.

At the same time, things are fixed now and I'm inclined to say "don't fix what isn't broken"...

Leaving it up to you to decide, @hoodmane :)

@ryanking13
Copy link
Member

I think this is still useful, but we need to fix the problem with oldest-supported-numpy. For now, this buggy behavior is unintentionally prevents the oldest-supported-numpy meta-package from being installed (which is what we want). However, modifying this behaviour with this PR will probably cause an issue.

@hoodmane
Copy link
Member Author

hoodmane commented Apr 7, 2025

Could we explicitly add oldest-supported-numpy to the avoided requirements?

@ryanking13
Copy link
Member

Could we explicitly add oldest-supported-numpy to the avoided requirements?

Yes, if it works, then I am okay with adding it as a workaround. I'll work on #68 later to handle it in a better way.

Co-Authored-By: Hood Chatham <[email protected]>
Co-Authored-By: Gyeongjae Choi <[email protected]>
@agriyakhetarpal
Copy link
Member

Is there an offending package that requires oldest-supported-numpy that we can use as an integration test?

@ryanking13
Copy link
Member

Is there an offending package that requires oldest-supported-numpy that we can use as an integration test?

Not in our integration test I think.

@agriyakhetarpal
Copy link
Member

Is there an offending package that requires oldest-supported-numpy that we can use as an integration test?

Not in our integration test I think.

Could you please clarify? As in, do you mean we don't t have a package like this, or that we don't want to add an integration test for such a package?

I think this should be good to go, but CI in the Pyodide repo has been failing since quite some time now, which makes things difficult to verify.

@ryanking13
Copy link
Member

ryanking13 commented Apr 9, 2025

Could you please clarify? As in, do you mean we don't t have a package like this, or that we don't want to add an integration test for such a package?

"do you mean we don't t have a package like this" this one. I think it is good idea to add a package that depends on NumPy.

@agriyakhetarpal
Copy link
Member

Okay, I've added PyWavelets, as it depends on NumPy and Cython at build time. It has a small codebase and is fairly fast to build as a result. However, oldest-supported-numpy is deprecated for quite some time now ever since NumPy v2 came out, so it's difficult to find maintained packages that still depend on it.

@ryanking13
Copy link
Member

oldest-supported-numpy is deprecated for quite some time now ever since NumPy v2 came out, so it's difficult to find maintained packages that still depend on it.

Makes sense. I think it is okay for now. Maybe we can make AVOIDED_REQUIREMENTS configurable by user, so we can help users fix it when they face errors without updating the pyodide-build version.

@agriyakhetarpal
Copy link
Member

Maybe we can make AVOIDED_REQUIREMENTS configurable by user, so we can help users fix it when they face errors without updating the pyodide-build version.

That sounds like a good idea. Do you think we should leave that for a follow-up PR? If yes, @hoodmane, please feel free to merge. :)

Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think we should merge this now, as:

  • it fixes the original error, and
  • it adds PyWavelets as a recipe that depends on NumPy, and
  • adds oldest-supported-numpy, and
  • my PR #187 currently builds on top of this PR.

Thanks, @hoodmane and @ryanking13!

@agriyakhetarpal agriyakhetarpal changed the title Use a less sloppy check in remove_avoided_requirements Use a more careful check in remove_avoided_requirements, and add PyWavelets recipe for testing Apr 10, 2025
@agriyakhetarpal agriyakhetarpal merged commit 2ba1878 into pyodide:main Apr 10, 2025
18 checks passed
@hoodmane hoodmane deleted the less-sloppy-remove-avoided-reqs branch April 25, 2025 21:07
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.

ModuleNotFoundError: No module named 'cmake_build_extension' when building package

3 participants