Adding support for `wsgi_scripts` entrypoint?

After reading the whole thread a few times, it’s still not really clear to me what you’re looking for…

IIUC, you want a way to install Python files (a) in a location that’s on $PATH because you have something that searches them on $PATH, and (b) that are not meant to be run, instead they are imported and some special attribute (application) is looked up on them.

Is that correct? Or am I misunderstanding completely? It’s pretty weird to put something on $PATH if you don’t want to run it…

Anyway: the current standards do have support for installing arbitrary scripts in bin/. You just put them in the scripts/ subdirectory of the .data directory inside the wheel. See the spec and Pradyun’s reply on the previous thread. What is not supported is generating these scripts at install time. You must generate them at build time and include them in the wheel. If your generated “script” depends on the project metadata but doesn’t depend on the user environment, then you can use that. I don’t know much about setuptools, so I can’t tell you if it has an easy way to use this feature of the wheel format.

2 Likes