REF: Use soname package for Windows too - #25
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 ( I do have some suggestions for making it better though... For recipe:
|
…nda-forge-pinning 2023.12.31.22.41.20
61732d5 to
c2c8b6b
Compare
|
@conda-forge-admin, please rerender |
…nda-forge-pinning 2024.02.05.13.52.48
…nda-forge-pinning 2024.01.31.01.24.54
…nda-forge-pinning 2024.02.05.13.52.48
|
Hi! This is the friendly automated conda-forge-linting service. I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug. |
|
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 ( I do have some suggestions for making it better though... For recipe:
|
|
do you actually need my review? It looks pretty good. not sure i love the install.py script but willing to see where it goes! |
|
Yes, I want your review because this is a new idea that I plan to copy to other feedstocks! The install.py script is supposed to be reusable across multiple recipes. It saves recipe writing maintenance time because it allows the author to avoid writing custom file lists like: - include/avif # [unix]
- Library\\include\\avif # [win]
- lib/libavif.so # [linux]
- lib/libavif.dylib # [osx]
- Library\\bin\\avif.dll # [win]
- Library\\lib\\avif.lib # [win]
- lib/pkgconfig/libavif.pc # [unix]
- Library\\lib\\pkgconfig\\libavif.pc # [win]
- lib/cmake/libavif # [unix]
- Library\\lib\\cmake\\libavif # [win]for each output of a multi-output recipe. Do you have any more specific feedback about the install.py script? Any way that I could make it simpler or easier to understand? |
|
|
||
| # libfoo-static | ||
| # libdav1d-static, libv8-static, libm-static, libsecp256k1-static | ||
| if re.match(f"^lib{ basename }-static$", PKG_NAME): |
There was a problem hiding this comment.
| if re.match(f"^lib{ basename }-static$", PKG_NAME): | |
| if "lib{ basename }-static" == PKG_NAME: |
keep it simple?
There was a problem hiding this comment.
I agree, for the non-complicated pattern matches, I should probably just use equality instead of regex.
| print(f"Installing {PKG_NAME} to {PREFIX} for {target_platform}") | ||
| print("Based on the package name, ", end="") | ||
|
|
||
| if re.match(r"^.+\-split$", PKG_NAME): |
There was a problem hiding this comment.
| if re.match(r"^.+\-split$", PKG_NAME): | |
| if PKG_NAME.endswith("-split"): |
| ) | ||
| for match in sorted(included - excluded): | ||
| match = pathlib.Path(match) | ||
| if match.exists(): |
There was a problem hiding this comment.
| if match.exists(): | |
| if match.is_dir(): | |
| continue | |
| if not match.exists(): | |
| # runtime error? or just continue? |
There was a problem hiding this comment.
I can't recall now why glob was returning paths that did not exist. I think a summary of the things that I want to install (copy) are files and symlinks to files (even if broken). I don't want to copy directories.
There was a problem hiding this comment.
I have updated the script to explicitly check for file or symlink.
| if not match.is_dir(): | ||
| print(relative) | ||
| os.makedirs((PREFIX / relative).parent, exist_ok=True) | ||
| shutil.copy( |
There was a problem hiding this comment.
does this work for synlinks too?
There was a problem hiding this comment.
i mean, .so -> .so.0 type of symlinks are quite common.
There was a problem hiding this comment.
Yes, it does. Because follow_symlinks=False, the link itself is copied and not the file to which the link points.
I think |
|
this looks much easier to use. There was some discussion on trying to standardize the multi-output names. did you consider that discussion in this script? |
|
That's a good idea! I remember reading that discussion a while back, but I didn't actively refer to it while writing this script. Looking at it now, it seems that main conclusions were to use |
|
So actually, the one deviation from my script and the output naming discussion is that here the install script assumes the library has a SONAME. In another library without a SONAME, it was suggested that libfoo should not contain headers. The headers should be located in foo-dev or libfoo-dev. But I didn't want to make that change here because it would break downstream recipes. The changes in this PR are backwards compatible. |
|
ok great. well i think that we considered things to death at this point! ^_^ All good on my side. |
|
Thanks! |
Checklist
0(if the version changed)conda-smithy(Use the phrase@conda-forge-admin, please rerenderin a comment in this PR for automated rerendering)