Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679346 - dev-python/weasyprint-43 : ValueError: Only strings are accepted for the license field, files are not accepted
Summary: dev-python/weasyprint-43 : ValueError: Only strings are accepted for the lice...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-03 17:11 UTC by Toralf Förster
Modified: 2020-03-23 12:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.01 KB, text/plain)
2019-03-03 17:12 UTC, Toralf Förster
Details
dev-python:weasyprint-43:20190303-165424.log (dev-python:weasyprint-43:20190303-165424.log,3.90 KB, text/plain)
2019-03-03 17:12 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,68.21 KB, text/plain)
2019-03-03 17:12 UTC, Toralf Förster
Details
environment (environment,111.19 KB, text/plain)
2019-03-03 17:12 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.11 KB, application/x-bzip)
2019-03-03 17:12 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,24.51 KB, application/x-bzip)
2019-03-03 17:12 UTC, Toralf Förster
Details
Modify setup.cfg to be compatible with the more recent setuptools version (weasyprint-43-setup-license-fix.patch,498 bytes, patch)
2019-04-28 10:37 UTC, Emanuele A. Bagnaschi (Zephyrus)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2019-03-03 17:11:58 UTC
  File "/usr/lib64/python3.6/site-packages/setuptools/config.py", line 265, in parser
    'files are not accepted'.format(key))
ValueError: Only strings are accepted for the license field, files are not accepted
 * ERROR: dev-python/weasyprint-43::gentoo failed (compile phase):
 *   (no error message)
 * 

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1-desktop-gnome_libressl_20190302-092752

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems)
  [3]   ruby26 (with Rubygems) *

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.10.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpvO dev-python/weasyprint
[ebuild  N    ] dev-python/weasyprint-43  USE="jpeg tiff -jpeg2k -test" PYTHON_TARGETS="python3_6 -python3_4 -python3_5"
Comment 1 Toralf Förster gentoo-dev 2019-03-03 17:12:01 UTC
Created attachment 567644 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2019-03-03 17:12:04 UTC
Created attachment 567646 [details]
dev-python:weasyprint-43:20190303-165424.log
Comment 3 Toralf Förster gentoo-dev 2019-03-03 17:12:07 UTC
Created attachment 567648 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2019-03-03 17:12:10 UTC
Created attachment 567650 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2019-03-03 17:12:12 UTC
Created attachment 567652 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2019-03-03 17:12:15 UTC
Created attachment 567654 [details]
temp.tbz2
Comment 7 Emanuele A. Bagnaschi (Zephyrus) 2019-04-28 10:30:22 UTC
It seems that this issue has been reported upstream a while ago, see https://github.com/Kozea/WeasyPrint/issues/806, and it is fixed in more recent releases (>=45) of weasyprint. It is caused by a change in the handling of the license in setup.cfg when using the more recent setuptools versions. The fix seems to be quite straightforward (use the field 'license_file' to point to the file with the license instead of the field 'license'). I attach a patch file with the required changes. I have tested the patch on my system and with it weasyprint compiles correctly.
Comment 8 Emanuele A. Bagnaschi (Zephyrus) 2019-04-28 10:37:59 UTC
Created attachment 574502 [details, diff]
Modify setup.cfg to be compatible with the more recent setuptools version

Tested with setuptools 41.0.1. 
With setuptools versions older than 40.8.0 the license_file field will be silently ignored. While this is not optimal, it reflects the behavior of the more recent weasyprint versions, see https://github.com/Kozea/WeasyPrint/commit/95217c6c48795806821c715e18021c4b8fb817d3#diff-380c6a8ebbbce17d55d50ef17d3cf906 .
Comment 9 Aaron W. Swenson gentoo-dev 2020-03-23 12:11:16 UTC
Weasyprint has been bumped to 51, which contains the fix.