-
Notifications
You must be signed in to change notification settings - Fork 17
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
Instantiate Specfile with a string #248
Comments
This should definitely be possible, let me think about implementation. |
That's great, let me know If I can help with this. |
Still relevant. @danishprakash by any chance, would you be interested in contributing this? (We can definitely help.) |
is the usage something like mentioned in #206 ? |
My idea is to be able to create an object by passing in a string, this is assuming I have a string buffer with the specfile contents. #206 seems to be suggesting to allow a file handle to be passed to to the constructor. |
What i think is the string can be passed from a method with the spec_content = """\
Name: example
Version: 1.0
Release: 1%{?dist}
Summary: Example Package
"""
specfile = Specfile.from_str(spec_content, sourcedir="/abc") the method will take string buffer and write to a tempfile to maintain the file behaviour that returns a path and avoid touching parts |
Wouldn't it make more sense to first implement #206 and then use a |
Yeah, that's why i had a thought if #206 is somehow related. If this approach is alright i can work on it. |
Description
Currently, it's possible to do this via a file path. In my use case, all I'm doing is fetching the specfile for multiple packages via OSC API and then trying to parse them using Specfile. I'm currently creating a temp file and then passing it on to the package.
Is this something that can be supported or have there been any discussions in the past about this that ruled it out?
Benefit
No response
Importance
No response
Workaround
Participation
The text was updated successfully, but these errors were encountered: