I use paths defined as constants, e.g. TF_CONSTS = 'consts/tf_keras_param_config.json'
and they work fine during development.
However, when the package is built with Poetry (i.e. poetry build --format sdist
) and deployed, these references become invalid even though the JSON files are copied along with the Python scripts:
FileNotFoundError: [Errno 2] No such file or directory: 'some_package/consts/tf_keras_param_config.json'
Why?