-
Notifications
You must be signed in to change notification settings - Fork 41
Add archiving option, fix exceptions, caused by multiline content in rpm spec files, remove shebangs, fix missing provides_extra field #215
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
Conversation
…rpm spec files, remove shebangs, fix missing provides_extra field
danigm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good. I think that the optional libarchive dep can be avoided using the python standard library.
Also the sanitize of multiline fields can be done in the fix_data function instead of in templates.
py2pack/__init__.py
Outdated
|
|
||
|
|
||
| def pypi_archive_file(file_path): | ||
| if libarchive is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add if libarchive is None: pypi_archive_file_using_tarfile_or_zipfile(file_path) later here
py2pack/templates/fedora.spec
Outdated
| Version: {{ version }} | ||
| Release: %autorelease | ||
| Summary: {{ summary }} | ||
| Summary: {{ summary|replace('\n','') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not needed to modify the templates, you have defined the new fix_data function, what if we do this sanitize operation there instead of doing it in the templates? We can add to the fix_data function something like:
single_line_fields = ['summary', 'license', 'home_page', 'source_url']
for field in single_line_fields:
if field not in data_info:
continue
# remove line breaks to avoid multiline rpm spec file
data_info[field] = data_info[field].replace('\n', ' ')There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you removing these example files?
Co-authored-by: danigm <daniel.garcia@suse.com>
No description provided.