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

Better parsing of README files in RST format #238

Open
andy-maier opened this issue Jul 2, 2020 · 2 comments
Open

Better parsing of README files in RST format #238

andy-maier opened this issue Jul 2, 2020 · 2 comments

Comments

@andy-maier
Copy link

In our Pypi packages, we often have README files in RST format. pyp2rpm seems to simply copy the first few line of the README file into the generated RPM file, without parsing it to eliminate RST comments.

For an example, look at https://raw.githubusercontent.com/pywbem/pywbem/master/README_PYPI.rst. Here is what pyp2rpm generates from that:

%description
.. README file for Pypi.. Note: On Pypi, variable substitution with raw content
is not enabled, so .. we have to specify the package version directly in the
links... begin of customization for the current version .. |pywbem-version-mn|
replace:: 0.17 .. _Readme file on GitHub: .. _Documentation on RTD: .. _Change
log on RTD: .. end of customization for the current versionPywbem is a WBEM...

It does not even get beyond the comment section.

Proposal:

  • An easy first stage would be to simply omit RST comment lines.
  • Better would be to properly render the RST file into a text file and use that.
@gordonmessmer
Copy link
Member

I'm unable to reproduce the behavior you're reporting, which will make it difficult to address the request. When I run simply "pyp2rpm pywbem", the %description sections don't appear to contain any RST markup.

How are you invoking the application?

@nkadel
Copy link

nkadel commented Jun 12, 2022

I can confirm that this is aproblem with a fresh pyp2rpm on RHEL 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants