You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
configured, files in the source "data" directory appear in {package}-{version}.data/data/ inside the wheel, and are written to the root of the venv on installation, alongside pyvenv.cfg.
According to the PyPA specification the {package}-{ver}.data directory can contain other directories: (purelib|platlib|headers|scripts|data)
I have use cases for writing to both the purelib and scripts directories too, in various projects:
purelib - I have a .pth file I'd like to write here to install a monkey patch
scripts - I have shell scripts to write here, as well as some legacy Python scripts that use if __name__ == '__main__' or no guard at all.
In both cases I'm having to fall back to setuptools, which is awkward because it drops all of the convenience and good opinions of flit (I'm providing technology in a corporate environment and less divergence is good.)
The structure of the config keys is a bit awkward because ideally it would be
[tool.flit.external-data]
data = "data"purelib = "purelib"scripts = "purelib"
but the current schema is tool.flit.external-data.directory not tool.flit.external-data.data. It would be possible just to add other keys, or add data as an alias for directory (but disallow both).
With
configured, files in the source "data" directory appear in
{package}-{version}.data/data/
inside the wheel, and are written to the root of the venv on installation, alongsidepyvenv.cfg
.According to the PyPA specification the
{package}-{ver}.data
directory can contain other directories:(purelib|platlib|headers|scripts|data)
I have use cases for writing to both the
purelib
andscripts
directories too, in various projects:purelib
- I have a.pth
file I'd like to write here to install a monkey patchscripts
- I have shell scripts to write here, as well as some legacy Python scripts that useif __name__ == '__main__'
or no guard at all.In both cases I'm having to fall back to
setuptools
, which is awkward because it drops all of the convenience and good opinions of flit (I'm providing technology in a corporate environment and less divergence is good.)The structure of the config keys is a bit awkward because ideally it would be
but the current schema is
tool.flit.external-data.directory
nottool.flit.external-data.data
. It would be possible just to add other keys, or adddata
as an alias fordirectory
(but disallow both).For comparison,
uv_build
supports this feature already, it'sHowever
uv_build
doesn't supportproject.dynamic
so I would prefer to continue using flit.The text was updated successfully, but these errors were encountered: