-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
specify patches in conandata.yaml #90
Comments
Could you provide how the patch looks like in the recipe using the conandata, might we consider some improvement? |
current code in boost:
with YML:
|
@conan-io/barbarians Let's decide something here about this.
@memsharded about our conversation about "peeling" the conandata being exported to avoid creating new recipe revisions when only new version keys are added we would be ok, but only if we agree on the "standard" key and introduce checks of known keys in the CI. |
Each item in the list of patches: is just a filename? is there a directory for patches? relative path from |
another option - consider adopting patch series file approach (used by debian) https://linux.die.net/man/1/quilt |
I think it is overkill, don't you think so? |
I agree, since we don't use some naming restriction. e.g. We only accept patch files using the follow pattern: "\d\d\d-.*.patch" |
let's use the proposed format then (KISS) - looks simple and neat |
I like the approach and this also includes a "standard" patch folder to store the patches with the names indicated. That way this could evolve in the future into a built-in Conan tool |
We propose this in case the patch is remote or local. The function to process this should be documented as a snippet, we could think later about creating a specific tool.
|
When a package requires only one patch, you could optimize: # conandata.yml
patches:
"8.0.17":
base_path: "source_subfolder"
patch_file: "patches/0001-find-cmake.patch" # conanfile.py
def build(self):
tools.patch(**self.conan_data["patches"][self.version]) |
Maybe we should keep it uniform no matter if it is a single patch or several. By that way we would always get a list back or could maybe improve |
As I said: |
it's often needed to specify patches to apply, and list of patches may vary from version to version.
we may use something like:
it also would be nice to ensure every recipe uses the same format. consider use some sort of schema to validate
conandata.yml
has only allowed fields.The text was updated successfully, but these errors were encountered: