tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

Remove use of __file__

Open jayvdb opened this issue 1 year ago • 2 comments

__file__ is an optional attribute of packages. c.f. https://github.com/indygreg/PyOxidizer/issues/69 for why and alternatives.

spdx/config.py:_base_dir = os.path.dirname(__file__)

jayvdb avatar Oct 30 '22 01:10 jayvdb

The link to the promised solution results in a 404, do you have a different one? https://pyoxidizer.readthedocs.io/en/latest/packaging_pitfalls.html#reliance-on-file

nicoweidner avatar Dec 21 '22 17:12 nicoweidner

Seems to be now at https://pyoxidizer.readthedocs.io/en/stable/oxidized_importer_behavior_and_compliance.html?highlight=file#file-and-cached-module-attributes

jayvdb avatar Dec 22 '22 13:12 jayvdb