FS#57186 - [python-babel] missing 'locale-data' dir and files
Attached to Project:
Community Packages
Opened by Josip Ponjavic (metak) - Monday, 22 January 2018, 01:04 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 23 January 2018, 12:12 GMT
Opened by Josip Ponjavic (metak) - Monday, 22 January 2018, 01:04 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 23 January 2018, 12:12 GMT
|
Details
Description:
Latest change doesn't include *.dat files in 'locale-data'. [ 107s] writing... streamlink.1 { } [ 107s] Exception occurred: [ 107s] File "/usr/lib/python3.6/site-packages/babel/localedata.py", line 66, in locale_identifiers [ 107s] os.path.splitext(filename) for filename in os.listdir(_dirname) [ 107s] FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/babel/locale-data' [ 107s] The full traceback has been saved in /tmp/sphinx-err-xbselpys.log, if you want to report the issue to the developers. [ 107s] Please also report this if it was a user error, so that a better error message can be provided next time. [ 107s] A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! Additional info: * package version(s) python-babel-2.5.3-1 Packages to fail to build with this error: [code] [ 107s] writing... streamlink.1 { } [ 107s] Exception occurred: [ 107s] File "/usr/lib/python3.6/site-packages/babel/localedata.py", line 66, in locale_identifiers [ 107s] os.path.splitext(filename) for filename in os.listdir(_dirname) [ 107s] FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/babel/locale-data' [ 107s] The full traceback has been saved in /tmp/sphinx-err-xbselpys.log, if you want to report the issue to the developers. [ 107s] Please also report this if it was a user error, so that a better error message can be provided next time. [ 107s] A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! [/code] Steps to reproduce: recent change where '--skip-build' was introduced seems to cause this. |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Tuesday, 23 January 2018, 12:12 GMT
Reason for closing: Fixed
Additional comments about closing: python-babel 2.5.3-4
Tuesday, 23 January 2018, 12:12 GMT
Reason for closing: Fixed
Additional comments about closing: python-babel 2.5.3-4
- with '--skip-build', no 'usr/lib/python3.6/site-packages/babel/locale-data' directory which leads to the error "FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/site-packages/babel/locale-data'" when using the babel library.
- without '--skip-build', 'usr/lib/python3.6/site-packages/babel/locale-data' exists and the library works fine.
the locale-data directory does not get installed and filled correctly for python2.7.
So OK on python 3 but still needs fixing for python 2.
so PKGBUILD still needing patching.... we'll get there yet.
but if one just removes the --skip-build from lines 43 and 52 AND removes lines 44 and 54, it seems to build and run fine, no errors.
Why introduce those changes and lines?
It doesn't fix it for me for python3. python-babel-2.5.3-3
[ 107s] Exception occurred:
[ 107s] File "/usr/lib/python3.6/site-packages/babel/core.py", line 27, in _raise_no_data_error
[ 107s] raise RuntimeError('The babel data files are not available. '
[ 107s] RuntimeError: The babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files. Just make sure to run "python setup.py import_cldr" before installing the library.
[ 107s] The full traceback has been saved in /tmp/sphinx-err-79bwn6qj.log, if you want to report the issue to the developers.
[ 107s] Please also report this if it was a user error, so that a better error message can be provided next time.
[ 107s] A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Removing --skip-build, means that build will be called again during package() which is of course after import_cldr was called.
As long as build is run after import_cldr, there is no need to manually copy the data files, as MANIFEST.in will detect them via a glob pattern.
Note that even when manually copying the files, the file babel/global.dat was not being copied.
Foxboron, I would generally recommend using the `checkpkg` script to compare the before and after versions of updated PKGBUILDs before uploading them -- it is a nifty script that can catch things like this. e.g. after implementing the changes I mentioned above, I get the following checkpkg output: https://paste.xinu.at/oAYb2U/
...
This is entirely down to an upstream quirk where subcommands without a dependency graph are used for something that is an absolute requirement for the build, without any truly reliable way to detect and abort on errors in the build process. It usually works, because they generate known good dist tarballs via PyPI.