opengisch / pum

Postgres Upgrades Manager
GNU General Public License v2.0
30 stars 7 forks source link

Installing the entrypoint in a "scripts" folder could be dangerous #84

Closed ewjoachim closed 4 years ago

ewjoachim commented 4 years ago

When installing a package, its python files are put together in the site-packages directory. While the package name could differ from the top-level module, there is an implicit expectation that each package will install a single top level module or package, whose name is unambiguously linked to the package.

pum installs both a pum top-level package (👌) and a scripts top-level that could clash with potentially a lot of things (e.g. the scripts pypi package).

It would be much safer to put the script inside of pum, ideally in __main__ so we could use python -m pum.

(I can do the PR if you want)