Package doesn't ship translate/share/ directory
Description:
The package doesn't have translate/share
directory from the source tarball, but that directory is shipped in PyPI package. This directory contains stoplist-en
file, which is required by poterminology
tool, and also langmodels directory (not sure if it is needed).
Additional info:
Solve this by adding in package() function:
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cp -a translate/share "$pkgdir/$site_packages/translate"
Error output without stoplist-en:
$ poterminology
Traceback (most recent call last):
File "/usr/bin/poterminology", line 33, in <module>
sys.exit(load_entry_point('translate-toolkit==3.12.2', 'console_scripts', 'poterminology')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/translate/tools/poterminology.py", line 550, in main
% file_discovery.get_abs_data_filename("stoplist-en"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/translate/misc/file_discovery.py", line 80, in get_abs_data_filename
raise ValueError('Could not find "%s"' % (os.path.join(*path_parts)))
ValueError: Could not find "stoplist-en"
- package version(s):
- translate-toolkit 3.12.2-2
- config and/or log files:
- link to upstream bug report, if any:
Steps to reproduce:
- run
poterminology