-
Notifications
You must be signed in to change notification settings - Fork 15
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
Sources in included files are not found #342
Comments
Thanks for reporting this. I see the issue, however, I'm not sure if it is possible to do anything about it. specfile won't be able to edit tags in included files, but I suppose you are interested only in parsing/read-only access, right? If so, I think you should be able to get what you want like this: from specfile import Specfile
from specfile.sources import Sources
spec = Specfile(...)
for source in Sources(spec.tags(spec.parsed_sections.package).content, []):
print(source.expanded_location) |
Thanks @nforro, that does the trick! I'm indeed only interested in the parsing part. Just FYI, since I had both code paths around: specfile is around 5x slower than |
Yes, that's an unfortunate fact. There is still some room for optimization, but due to focus on modification, parsing with specfile will always be slower than |
What happened? What is the problem?
I have spec files that use "%include" to share common parts, like this (in this case, we have "versioned" packages that are co-installable):
I then want to get all sources with
spec.sources().content
Currently, I only get
["my-name-common.inc"]
.#341 has a failing test which shows the problem in executable form.
Workaround
Participation
The text was updated successfully, but these errors were encountered: