it is created/modified by PLY, the library that is used internally for language parsing.

flanker is likewise using PLY:


> grep -r 'ply'

> addresslib/_parser/parser.py: import ply.yacc as yacc

> addresslib/_parser/lexer.py: import ply.lex as lex

> addresslib/address.py: from ply.lex import LexError

> addresslib/address.py: from ply.yacc import YaccError


This file is updated automatically if you're using a different version of the library than the one with which the file was created originally.

This seems to confirm that for each version of the package, these files should be generated from debian/rules at build time.


Another possible approach (not ideal) would be to save the generated files under /var/lib/python3-flanker. However, that approach would require maintaining a patch to save/load the generated files from that location. Also, most sysadmins would not expect Python files (or executable files in general) to be under /var. On my system, the only Python or executable files under /var are for dpkg, docker, and snap. However, as long as a particular version of flanker generates a consistent set of files, there is no need to generate at run time, and much better to generate at build time and package.


However, even if it fails to update it, it should still be working.

In the case of python3-flanker, the package does not work until the file is generated. Generating the files (correctly) fails due to lack of permissions.

Reply via email to