conda-forge / weasyprint-feedstock

A conda-smithy repository for weasyprint.
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Make noarch #18

Closed BastianZim closed 3 years ago

BastianZim commented 3 years ago

Checklist

Closes #15

This PR makes the following changes:

  1. Makes package noarch.
  2. Re-rendered with new smithy.
  3. Adds console_scripts entry points.
  4. Adds python minimum of >=3.6.
  5. Sorts required packages (Through Grayskull).
  6. Cleans host.
  7. Sets minimum for pango.
  8. Specifies higher pyphen version.
  9. Adds cairo >=1.15.4 as outlined in https://weasyprint.readthedocs.io/en/stable/install.html#id5 If this is not required due to cairocffi etc. I'll remove it again.
  10. Adds gdk-pixbuf. This can also be made optional, let me know.
  11. Drops xorg-libxrender xorg-libxext which is not in the setup.cfg. let me know if that's actually needed and I'll add it back.
  12. Add some more tests to check dependencies.
  13. Updates to 52.3

Edit:

Also closes #19

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

BastianZim commented 3 years ago

@conda-forge-admin, please rerender

github-actions[bot] commented 3 years ago

Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you, but it looks like there was nothing to do.

BastianZim commented 3 years ago

Just to add, I also added the unit tests but removed them again since some of them didn't pass and I wasn't able to confirm whether that is due to conda-forge or upstream The output was similar to the failing tests upstream. Let me know if they should be added.

BastianZim commented 3 years ago

@liZe @mrandrewandrade Would be ready for review, thanks!

BastianZim commented 3 years ago

@conda-forge-admin, please rerender

github-actions[bot] commented 3 years ago

Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you, but it looks like there was nothing to do.

BastianZim commented 3 years ago

I have also updated this to incorporate the new version now.

liZe commented 3 years ago

Thanks a lot for this PR!

Just to add, I also added the unit tests but removed them again since some of them didn't pass and I wasn't able to confirm whether that is due to conda-forge or upstream The output was similar to the failing tests upstream. Let me know if they should be added.

Having weasyprint --help working is really good news. If possible, I’d be interested in having the logs of the failing tests, just to be sure that it’s the same problem as the failing tests upstream.

BastianZim commented 3 years ago

Happy to help! :) Let me just create another PR with the tests, then you can verify everything for yourself.

liZe commented 3 years ago

Let me just create another PR with the tests, then you can verify everything for yourself.

Thanks a lot!

The errors come from missing fonts. Fontconfig complains because no font is installed, and it makes the tests fail.

You can either install fonts before launching tests, or just rely on weasyprint --help.

One last question: is the build tested on macOS and Windows too?

BastianZim commented 3 years ago

The errors come from missing fonts. Fontconfig complains because no font is installed, and it makes the tests fail.

Is it just a case of installing Fontconfig, or does it need extra options? Since Fontconfig is on conda-forge, I could easily include that.

Edit: Just Fontconfig fails as well, so I guess some fonts need to be installed. Do you know if they're available on conda-forge or what the name of them is?

One last question: is the build tested on macOS and Windows too?

No, since it's noarch, only Linux will be tested. Is that a problem?

liZe commented 3 years ago

Is it just a case of installing Fontconfig, or does it need extra options? Since Fontconfig is on conda-forge, I could easily include that.

Fontconfig is already installed, and it is correctly configured accordingly to what I can see. The problem seems to be that no font is installed on Linux.

No, since it's noarch, only Linux will be tested. Is that a problem?

If we can blindly trust that Conda packages behave the same way on different platforms, and that Python can load libraries correctly on Windows and macOS, then there’s no need to check 😄 🤞🏽.

BastianZim commented 3 years ago

Fontconfig is already installed, and it is correctly configured accordingly to what I can see. The problem seems to be that no font is installed on Linux.

Ok, I would then suggest going only with the import and pip tests since this is definitely something on the conda-forge side and not a package error. This is the current approach so the package would be ready for review/merge from my side then.

If we can blindly trust that Conda packages behave the same way on different platforms and that Python can load libraries correctly on Windows and macOS, then there’s no need to check 😄 🤞🏽.

Yes, that basically the premise of noarch packages. If the packages fulfil the requirements in the docs they can be built for a generic host with the "fine-tuning" being done during installation. This applies even if dependencies aren't available on a particular host as conda would then inform the user and not install the package. For this, it is important though that all packages that are required are listed in the recipe and not only, for example, in the docs with a notice to manually install them later, as conda will then not be able to determine if all packages can be installed on the specific host. I did try to add all packages that I could find in the docs etc. but it might be good if you could just double-check that to make sure that I'm not missing anything?

liZe commented 3 years ago

I did try to add all packages that I could find in the docs etc. but it might be good if you could just double-check that to make sure that I'm not missing anything?

OK, I’ll check that nothing’s missing, and merge if everything’s fine. Thanks a lot for your contribution!

BastianZim commented 3 years ago

Perfect, thank you very much! Was a pleasure! :)

BastianZim commented 3 years ago

@liZe Just one last question: I saw the announcement on WeasyPrint that you are/were switching to pydyf but conda-forge is still tracking the releases with Cairo, is that correct? Otherwise, I'd create a new PR with the specs from the pyproject.toml file.

Edit: Disregard my comment, just saw that you're only introducing it with v53, so the current setup should be correct. But let me know if you'd like some help with bringing pydyf to conda-forge.

liZe commented 3 years ago

@liZe Just one last question: I saw the announcement on WeasyPrint that you are/were switching to pydyf but conda-forge is still tracking the releases with Cairo, is that correct?

It’s correct.

But let me know if you'd like some help with bringing pydyf to conda-forge.

Thanks a lot, we’ll let you know when pydyf is ready to be packaged.