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

Document "how to overwrite/undefine macros" #243

Closed
2 tasks
praiskup opened this issue Jun 28, 2023 · 1 comment · Fixed by #244
Closed
2 tasks

Document "how to overwrite/undefine macros" #243

praiskup opened this issue Jun 28, 2023 · 1 comment · Fixed by #244
Assignees
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/documentation Documentation needs updates.

Comments

@praiskup
Copy link

Description

We discussed in a copr PR there's a way how to override macros, namely:

spec = Specfile("python-specfile.spec", macros=[("fedora", "39"), ("rhel", "")])

Is this documented somewhere? Is there a way to "undefine" (e.g. %rhel or %fedora macro), not replace with an emtpy string?

Benefit

I checked the README.md, and wasn't able to quickly find this topic. Sorry if I'm just blind.

Importance

No response

Workaround

  • There is an existing workaround that can be used until this feature is implemented.

Participation

  • I am willing to submit a pull request for this issue. (Packit team is happy to help!)
@majamassarini majamassarini added kind/documentation Documentation needs updates. area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. labels Jun 29, 2023
@nforro
Copy link
Member

nforro commented Jun 29, 2023

No, unfortunately it's not documented anywhere, except for the docstring.
It's not possible to undefine a macro, but that could be easily implemented.

softwarefactory-project-zuul bot added a commit that referenced this issue Jun 30, 2023
…EADME (#244)

Make it possible to undefine macros and add a macros example to the README

Fixes #243.

Reviewed-by: František Lachman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/documentation Documentation needs updates.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants