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

Packages that can be noarch #1840

Open
isuruf opened this issue Oct 26, 2022 · 41 comments
Open

Packages that can be noarch #1840

isuruf opened this issue Oct 26, 2022 · 41 comments

Comments

@isuruf
Copy link
Member

isuruf commented Oct 26, 2022

By dropping support for python<3.8 or by using noarch_platforms as in #1839

Here we collect some packages. PRs are welcome to help

Harder ones

@jaimergp: Feedstocks that have a py{<,<=}3{6,7,8} selector without compiler dependencies, still not noarch and no python_impl mentions (cs.github.com query). Search results say 110+ feedstocks but you can only retrieve 100 at a time so here we are. Some of them might not apply for other reasons( could not review all of them).

cc @conda-forge/core

@h-vetinari
Copy link
Member

Would be amazing to have pytest be noarch!

hypothesis might be a candidate as well. It recently got made yesarch again, but would presumably be noarch-capable if the django workaround for backports.zoneinfo arrives.

@jakirkham
Copy link
Member

It's worth noting that with pytest, it also has some conditional Windows dependencies. So we probably get 4 noarch packages out of it. Still that is probably worthwhile.

Perhaps if we wanted to simplify that, we could turn the backport packages it depends on into noarch packages with the Python version conditioning and then always depend on them in pytest (or anywhere else).

@BastianZim
Copy link
Member

Desert: conda-forge/desert-feedstock#8
Pluggy: conda-forge/pluggy-feedstock#32

@BastianZim
Copy link
Member

BastianZim commented Oct 30, 2022

And some more
conda-forge/manhole-feedstock#7
conda-forge/openpathsampling-feedstock#21
conda-forge/curtsies-feedstock#23

Also, the "CircleCI Pipeline" error pops up on all of them. Is there any way to remove this?

@hmaarrfk
Copy link
Contributor

I think this package could be made a noarch platform, but would require a platform for every package.

Basically, it is a C library, that is loaded with ctypes into a python package:
https://github.com/conda-forge/zaber-motion-feedstock

@jaimergp
Copy link
Member

I made some queries on cs.github.com and found like... 100 feedstocks we could noarchify. I haven't reviewed all cases though, but I am more or less confident most would be eligible. Check the first message!

@BastianZim
Copy link
Member

BastianZim commented Oct 31, 2022

Slightly related project that popped up a couple of times but was never really taken up. If we can create one source of truth for packages where the selectors can be ignored, we could add them all to Grayskull, and I could just run Grayskull on that list.

There is already https://github.com/conda-incubator/grayskull/blob/6955333ee01f83ba6ae6e8dc76ce1f576e7c762e/grayskull/strategy/config.yaml#L465 and https://conda-forge.org/docs/maintainer/knowledge_base.html#non-version-specific-python-packages but it's not connected.

@beckermr
Copy link
Member

I can fix the circle stuff. We can delete the webhooks.

@ocefpaf
Copy link
Member

ocefpaf commented Oct 31, 2022

Folks, how are we handling the old jupyter extensions that have a pre/post script?

cc @xhochy

@jakirkham
Copy link
Member

Folks, how are we handling the old jupyter extensions that have a pre/post script?

cc @bollwyvl

@BastianZim
Copy link
Member

I made some queries on cs.github.com and found like... 100 feedstocks we could noarchify.

Poetry is already noarch

@jakirkham
Copy link
Member

Poetry is already noarch

Looks like that just happened today. Likely the list was made before today and the box wasn't checked yet. Have now checked it

@bollwyvl
Copy link
Contributor

Folks, how are we handling the old jupyter extensions that have a pre/post script?

Haven't looked, but we can likely emit appropriate ${PREFIX}/share/jupyter and ${PREFIX}/etc/jupyter/jupyter_notebook_config.d/<pkg_name>.json that would have the same effect as whatever the scripts were doing.

@carterbox
Copy link
Member

I think this package could be made a noarch platform, but would require a platform for every package.

Basically, it is a C library, that is loaded with ctypes into a python package: https://github.com/conda-forge/zaber-motion-feedstock

@hmaarrfk, TomoPy is like this. I have one noarch python package which depends on platform specific packages which contain the shared libraries. Could have separate feedstocks, but I just have one and build the same noarch package every time.

@jaimergp
Copy link
Member

jaimergp commented Nov 2, 2022

I can fix the circle stuff. We can delete the webhooks.

@beckermr Is it enough to delete the webhooks at e.g. https://github.com/conda-forge/curtsies-feedstock/settings/hooks ?

@BastianZim
Copy link
Member

Is it enough to delete the webhooks at e.g.

Is there any way someone outside of core can do that? I have so many packages that have that, pinging core each time is going to spam your inboxes...

@beckermr
Copy link
Member

beckermr commented Nov 2, 2022

Yes deleting the webhooks is fine.

@BastianZim If you want to write an admin migration to do that, feel free at conda-forge/admin-migrations.

@ocefpaf
Copy link
Member

ocefpaf commented Nov 2, 2022

Is there any way someone outside of core can do that? I have so many packages that have that, pinging core each time is going to spam your inboxes...

I'm OK if you ping me. Every migration we find tons of packages that can be noarch. Last one I converted dozens and it will be easier to merge someone else PR than doing it myself.

@BastianZim If you want to write an admin migration to do that, feel free at conda-forge/admin-migrations.

That would be quite complicated b/c the new semi-noarch recipes are not a one-size fits all.

@BastianZim
Copy link
Member

If you want to write an admin migration to do that, feel free at conda-forge/admin-migrations.

Ahh true, forgot that. Is there any guideline on that? I've never written one.

@BastianZim
Copy link
Member

I'm OK if you ping me.

Thank you! But the CircleCI stuff also appears in my normal feedstocks so it would be quite a lot...?

That would be quite complicated b/c the new semi-noarch recipes are not a one-size fits all.

I think this is just about removing the CircleCI hook?

@ocefpaf
Copy link
Member

ocefpaf commented Nov 2, 2022

I think this is just about removing the CircleCI hook?

Ah. Then it is definitely worth a try with a migrator.

@BastianZim
Copy link
Member

Rest would be nice but probably impossible. Although, if we have a list of empty packages we can ignore (#1840 (comment)), I can run Grayskull on most and probably automate ~80% of the PRs to the point where they just need to be merged.

@beckermr
Copy link
Member

beckermr commented Nov 2, 2022

@ocefpaf I am talking about an admin migration at conda-forge/admin-migrations, not a bot migration.

@jaimergp
Copy link
Member

jaimergp commented Nov 3, 2022

org:conda-forge path:meta.yaml "- python" "- pip" "# [win" NOT compiler NOT noarch: returns 240 matches in cs.github.com. These have the potential to be pure Python packages with Windows-only dependencies that are not currently noarch... A migrator might indeed be the best solution.

These feedstocks are using MxP jobs when they could be using 2... (M = number of enabled architectures, between 3 and 6; P = number of Pythons, currently 3 or 4). This is 9 jobs at best, 24 at worst!

@jaimergp
Copy link
Member

jaimergp commented Nov 3, 2022

org:conda-forge path:meta.yaml /pywin32\s+#\s+\[win/ NOT compiler NOT noarch: gives you 20 results for potential noarch packages that are not just because they require pywin32, but we could use the pywin32-on-windows metapackage instead!

@jakirkham
Copy link
Member

Couldn't we do the same thing with pywin32 dependents as other OS specific dependencies? Namely add an OS specific branch and still build with noarch?

@jaimergp
Copy link
Member

jaimergp commented Nov 3, 2022

Yes, sure, that will always work. But it's a simpler modification to replace just pywin32 in those cases (and a single job instead of two). It could even be done at the repodata level if we had the right metadata.

@jakirkham
Copy link
Member

Maybe we can move conda-forge-ci-setup to noarch

@h-vetinari
Copy link
Member

Maybe we can move conda-forge-ci-setup to noarch

I'm not sure that's compatible with work such as conda-forge/conda-forge-ci-setup-feedstock#210? Or would the suggestion be - for debugging purposes - to switch off noarch when preparing a PR?

@jakirkham
Copy link
Member

Have different thoughts on how to approach that as well, but that's a discussion for a different issue

@mbargull
Copy link
Member

Just an FYI:

  • Added in conda 4.8: __osx
  • Added in conda 4.9: __win, __unix
  • Added in conda 4.10: __linux

We appear to still have people a non-negligible amount of users with conda 4.9 (more than all of <4.9 combined).
We thus might not want to make broad use of __linux just yet.
(But our main use case here is to have a __win/__unix distinction so that shouldn't impose much of a restriction.)

@jakirkham
Copy link
Member

Wonder if we could just create those as arch packages and stick them under a special label (like legacy) and advise users on older Conda versions to use them. As they will encounter an error message about a missing package, we could put this in the docs under FAQ so it is easily discoverable.

@mbargull
Copy link
Member

@jakirkham, not a bad idea.
I'm +1 on offering (otherwise non-intrusive) ways to reduce the amount of brick walls users could hit when they want to upgrade old installations.
We'd have to do some testing beforehand, though (1. does anaconda.org/anaconda-client still allow uploads of __* packages, 2. how do conda/mamba behave when updated if there is still a conda-forge/label/legacy/__* package installed, etc.).

@jakirkham
Copy link
Member

Even if the uploads are blocked, we could include the recipe in the docs. It is probably a couple lines. Once built it should be installable from the local package cache.

@jaimergp
Copy link
Member

Do we need the actual packages or can we mock them in a repodata patch? Just an idea in case that's easier to implement.

@jakirkham
Copy link
Member

Thinking about this more I think it is on end users to build these packages themselves. Not all cases check simply for the existence of these packages. Some of them (like __osx or __glibc) check the version as well. So it really depends on end users to know their system and build these packages with the right versions baked in. That way they behave correctly when performing a solve.

@hmaarrfk
Copy link
Contributor

Is the following issue known: conda-forge/spyder-kernels-feedstock#87

@bollwyvl
Copy link
Contributor

bollwyvl commented Dec 21, 2022 via email

@hmaarrfk
Copy link
Contributor

Is https://github.com/conda-forge/xcb-proto-feedstock a candidate? It seem like it puts things outside the python directory so I'm not sure if it would work. But the noarch platforms would help reduce the build matrix size quite a bit.

@jaimergp
Copy link
Member

Is https://github.com/conda-forge/xcb-proto-feedstock a candidate?

Maybe but you'd need packages for all the platforms (six so far?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

12 participants