martinthomson / i-d-template

A template for IETF internet draft git repositories
Other
204 stars 180 forks source link

"No package metadata was found for weasyprint" #427

Closed SpencerDawkins closed 5 months ago

SpencerDawkins commented 5 months ago

This

No package metadata was found for weasyprint

popped up at the end of my make for my Internet Draft.

I assume this might be https://pypi.org/project/weasyprint/. If so, it looks cool.

I just typed "weasyprint", and got

Command 'weasyprint' not found, but can be installed with: sudo apt install weasyprint

Should this be installed at Initial Repository Setup?

martinthomson commented 5 months ago

Damn, I hope that we don't have to install that. It's the tippy-top of a whole tree of dependencies that you probably don't want.

Getting all the infrastructure into a reasonable state to generate PDFs takes a fair bit of lifting. Even the fonts you have installed on your machine tend to change whether you are successful.

If you want PDFs, then you can install it by creating a requirements.txt that lists weasyprint. I caution that the PDF-generation pipeline in this repo is pretty much untested right now. I'm fairly sure that it doesn't use xml2rfc. And it has been far too long since someone used it in anger. Ultimately, I might even prefer making a network request to author-tools.ietf.org rather than install weasyprint.

kesara commented 5 months ago

No need to install weasyptint unless you are planning to produce PDF files. That log message is a bug in xml2rfc, but doesn't affect the output. This will be fixed in the next release: https://github.com/ietf-tools/xml2rfc/issues/1091

SpencerDawkins commented 5 months ago

@martinthomson and @kesara - thank you both for the clues!

I was curious because Martin had JUST repaired the /lib directory in that repo (thank you again, Martin), and I'd never seen that message before. I don't actually need to produce PDFs directly from GitHub, so I'll sit quietly with my hands folded while the smart people make the right things happen!