conda-forge / cyclus-feedstock

A conda-smithy repository for cyclus.
BSD 3-Clause "New" or "Revised" License
1 stars 14 forks source link

(copy) Cleanup dependencies #81

Open bennibbelink opened 4 months ago

bennibbelink commented 4 months ago

Checklist

conda-forge-webservices[bot] commented 4 months ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

bennibbelink commented 4 months ago

@h-vetinari I found the source of the linker error upstream and fixed it in a branch on my fork of cyclus. I think the errors I'm now seeing are because a numpy package doesn't exist for python3.11 or python3.12, is this interpretation correct?

I have another question about the dependencies that should be listed in meta.yaml. We execute some python scripts and compile cython code in our build process, should python and cython be listed under build:?

(sorry to move this conversation to a different PR, we can continue it back in https://github.com/conda-forge/cyclus-feedstock/pull/80 if you prefer)

h-vetinari commented 4 months ago

I think the errors I'm now seeing are because a numpy package doesn't exist for python3.11 or python3.12, is this interpretation correct?

No, since you used an unpinned - numpy in run and you didn't rerender the feedstock, conda-build tries to pick an old default version that never saw releases for py311 & py312. However, as I tried to explain, numpy has a run-export from host: -> run:, so don't add it to run: yourself.

You can ask the bot to rerender the feedstock for you by writing: @conda-forge-admin, please rerender Or you have a local environment with conda-smithy installed, then you can do (from the feedstock root): conda smithy rerender.

I have another question about the dependencies that should be listed in meta.yaml. We execute some python scripts and compile cython code in our build process, should python and cython be listed under build:?

Python is a bit confusing from the POV of a build tool, because you generally need to run the interpreter to do it, which needs to match the host architecture to be able to run at all. So python-related build steps end up moving from build: to host:, unless the build can be done completely without calling into python/pip/etc.

bennibbelink commented 4 months ago
WARNING (cyclus): plugin library (Python) package conda-forge/linux-64::pandas==2.2.2=py312hfb8ada1_0 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
WARNING (cyclus): run-exports library package conda-forge/linux-64::numpy==1.26.4=py312heda63a1_0 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)

We want to specify pandas and numpy as run: requirements because they are imported via the python interpreter. Is it okay to ignore these warnings? How does conda-build determine that they are not being used?

h-vetinari commented 4 months ago

Is it okay to ignore these warnings?

For numpy is it okay, because conda-build cannot see the linkage, as everything is loaded only at runtime.

It probably warns about pandas because you have it as a host dependency (because the CMake build fails without - which is incorrect though; it's not needed at build time, just at runtime). That's not a big deal though