Convert feedstock to v1 recipe format#361
Conversation
|
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 ( |
|
Thanks for working on this @lgray! I'm definitely keen to migrate to CI logs look quite good, one question about the warnings visible at the bottom for the Windows and macOS builds - are these expected? |
|
Cool, nice to have that pleasant side effect concerning the blas tests! The "overlinking against libSystem.B.dylib and python3XY.dll" complaints I've seen in other packages I've converted. They appear to be harmless, since logically your python module shall eventually need symbols from python and anything eventually needs symbols from core system libraries. It may just be indirect depending on what part of the package you're looking at in a specific shared lib. That's my personal understanding, at least. If there's a serious performance reason (some memory mapping or locality issue) I don't understand that's critical here, we can dig. I'll go ahead and open an issue over in rattler-build, unless there already is one in which case I will link this PR. |
|
Ah yeah the main developer sees it too for macos: But seems fine with it? |
recipe/recipe.yaml
Outdated
|
|
||
| context: | ||
| version: 2.3.1 | ||
| dev: nodev |
There was a problem hiding this comment.
can we use something like "null" here instead of some arbitrary string?
There was a problem hiding this comment.
I never tried null specifically but it complained loudly on empty strings. Shall give it a go.
There was a problem hiding this comment.
Ah, yeah same complaint when using null:
Error:
× expected a scalar value.
╭─[recipe/recipe.yaml:6:8]
5 │ version: 2.3.1
6 │ dev: null
· ──┬─
· ╰── here
7 │ # numpy will by default use the ABI feature level for the first numpy version
╰────
help: `context` values must always be scalars (booleans, integers or strings) or uniform lists of scalars
What would you prefer instead of "nodev"?
There was a problem hiding this comment.
I guess you may have meant "null" as a string as opposed to null the keyword? Still at that point it is some arbitrary string.
I could use a number? -1 works. I have done this for now and added a comment as to intended usage.
There was a problem hiding this comment.
I guess you may have meant "null" as a string as opposed to null the keyword?
No, I meant the keyword. As you mention, "null" would just be yet another arbitrary string, and a very confusing one at that.
Given that we can't use empty strings, I'd like to switch this to something like rc_num. If it's -1, we ignore it, if it's >=0, we construct a rc${{ rc_num }} suffix.
There was a problem hiding this comment.
Yeah but then you're doing
if: (rc_num | int) > -1whenever we need to do control flow.
if: rc_num != "-1"
There was a problem hiding this comment.
Whatever you're cool with, but that will accept "-2" or "nosegoblins" as viable rc_num values.
There was a problem hiding this comment.
I fully understand that, but we still have human reviewers in the loop here (and trivially, no tag for that would be found, so CI would be deep red). Making this fool-proof or "fuzzing" the recipe is not the right trade-off.
There was a problem hiding this comment.
No prob! Will make the change when back at a computer with a keyboard.
e9c8d59 to
4fe376a
Compare
80fdea0 to
59250ac
Compare
|
I see in Does this need to remain or it's an obsolete artifact from the release of numpy 2? |
It's an obsolete artefact of the fact that conda{,-smithy} sees that the recipe mentions numpy, thinks it depends on it, and thus needs to apply the values from the global pinning. It's harmless but good to remove these values from the variant configs. |
a3b1c7a to
ca72588
Compare
|
Good - one of the rattler-build devs finds the overlinking complaints in windows benign. |
|
Is there any further review for this PR? |
|
Can you reduce this to two commits please: one for the recipe transformation, and one for rerendering. |
|
certainly! |
ca72588 to
80d7143
Compare
h-vetinari
left a comment
There was a problem hiding this comment.
getting close, but a few nits remain
recipe/recipe.yaml
Outdated
|
|
||
| package: | ||
| name: numpy | ||
| version: ${{ version }}${{ "rc" + rc_num if rc_num != "-1" else "" }} |
There was a problem hiding this comment.
I'd like the precedence clearer here. Also, string concatenation in jinja should use ~ AFAIU; + is unreliable.
| version: ${{ version }}${{ "rc" + rc_num if rc_num != "-1" else "" }} | |
| version: ${{ version }}${{ ("rc" ~ rc_num) if rc_num != "-1" else "" }} |
There was a problem hiding this comment.
Ah, I did not know about the ~ operator in jinja! As it performs conversion to string, this would allow us to use an integer for rc_num in a pleasant way, as originally discussed. Up to you, it lints and re-renders fine locally.
There was a problem hiding this comment.
done, using an int for rc_num.
recipe/recipe.yaml
Outdated
| - pytz | ||
| - if: match(python, "<=3.11") | ||
| then: setuptools <60.0.0 | ||
| - if: match(python, ">=3.12") |
recipe/recipe.yaml
Outdated
| - if: linux | ||
| then: ${{ compiler('fortran') }} | ||
| - pkg-config | ||
|
|
There was a problem hiding this comment.
remove this newline, those two blocks form a unit
recipe/recipe.yaml
Outdated
|
|
||
| context: | ||
| version: 2.3.1 | ||
| # -1 means "not a dev version", a number > -1 will emit postfix "rc${{ rc_num }}" |
There was a problem hiding this comment.
comment is out-dated
| # -1 means "not a dev version", a number > -1 will emit postfix "rc${{ rc_num }}" | |
| # "-1" means "not a dev version", a string != "-1" will emit postfix "rc${{ rc_num }}" |
There was a problem hiding this comment.
see commentary on being able to actually use numbers in a non-ugly way for rc_num
recipe/recipe.yaml
Outdated
|
|
||
| schema_version: 1 | ||
|
|
There was a problem hiding this comment.
I think these lines can be deleted.
recipe/recipe.yaml
Outdated
| - ${{ compiler('c') }} | ||
| - ${{ stdlib('c') }} |
There was a problem hiding this comment.
Let's use this opportunity to order the stdlib before the compilers
| - ${{ compiler('c') }} | |
| - ${{ stdlib('c') }} | |
| - ${{ stdlib('c') }} | |
| - ${{ compiler('c') }} |
| # some linux tests need a C/C++ compiler; | ||
| # extra f2py tests need a fortran compiler | ||
| - {{ compiler('c') }} # [unix] | ||
| - {{ compiler('cxx') }} # [unix] | ||
| - {{ compiler('fortran') }} # [linux] | ||
| # For some cython tests | ||
| - pkg-config |
recipe/recipe.yaml
Outdated
| - jakirkham | ||
| - msarahan | ||
| - pelson | ||
| - rgommers | ||
| - ocefpaf | ||
| - isuruf | ||
| - xhochy | ||
| - h-vetinari |
There was a problem hiding this comment.
Also, let's alphabetize that list in the rewrite commit.
80d7143 to
5d278fd
Compare
…nda-forge-pinning 2025.07.15.07.42.52
5d278fd to
b97f7b6
Compare
h-vetinari
left a comment
There was a problem hiding this comment.
Thank you for your work and patience on this. :)
From reading discussions at numpy conda-forge/numpy-feedstock#361 (comment) and the GO-recipe https://github.com/conda-forge/go-feedstock/blob/main/recipe/meta.yaml#L51 this seems to be ok to overlink against.
…30301) * add go4 recipe * remove explicit python variants * skip win and osx builds for now * fix homepage link * clean up recipe - raising errors on overdepending/overlinking helped to figure out more reasonable dependencies - removing variants.yaml as they are anyways set by conda-forge pins - switching dependency from root to root_base - did a test run building a user analysis and running it on real data * add python to run dependencies again * add GO4License.txt to recipe * Add comment on ${{ compiler('cxx') }} resolution for the test environment. * try building on osx * only use libgl-devel host dependency on linux * remove globstar shell option for osx build * clean up and avoid using globstar as osx does not support it * try different sed commands for osx * try if cleanup is even necessary at all anymore * add osx libSystem.B.dylib to allowlist From reading discussions at numpy conda-forge/numpy-feedstock#361 (comment) and the GO-recipe https://github.com/conda-forge/go-feedstock/blob/main/recipe/meta.yaml#L51 this seems to be ok to overlink against. * remove the sed cleanups as they do not seem necessary any more * adjust test requirements for osx * try again on osx without compiler macro * clean up * further cleanup * patch compiler selection in Go4s Makefile.Linux Now it should read CXX from environment variables * adjust cmake invocation to conda-forge * build on of the test cases with cmake * try matching the library on both linux / osx * set extglob for test examples * remove special settings for dynamic_linking * try using CMAKE_ARGS.. but leads to errors * use CMAKE_ARGS * use CPU_COUNT parameter instead of trying to call nproc * remove manual pins The updated conda-forge-pinning solved the issue * patch lipthread linking * take DCMAKE_INSTALL_LIBDIR out of CMAKE_ARGS * adjust patches to docker building * handle linking issues only on linux * remove CMAKE argument with pattern mattching instead of array position * fix cmake argument expansion in example runs * remove optional hdf5 The linking issues on sysroot_linux seem to happen only in hdf5 dependencies * explicitly turn hdf5 feature off
This PR converts numpy-feedstock to a v1 recipe and switches the conda build tool to rattler-build.
It has been partially generated with feedrattler v0.3.13 and portions fixed by hand.
Changes:
meta.yamltorecipe.yamlconda-forge.ymlto userattler-buildandpixi(optional)python_minandpython_versionPlease merge this as you like, if you're waiting on the spec or rattler-build to become more stable that's fine.
Mostly, I'm playing with it in my spare time with more difficult packages, it shouldn't hurt to see where there are rough edges.
If this is somehow a major draw to someone's time aside from my own, please let me know, I'm fine with doing something else.