3 ms·
> Finally, a big upside of setup.py, is that I can programatically generate information, whereas pbr's cfg file doesn't seem to allow that. The problem with pa
by shaded-enmity 9y ago
> Finally, a big upside of setup.py, is that I can programatically generate information, whereas pbr's cfg file doesn't seem to allow that.
The problem with package manifests that are arbitrary scripts (Python, Ruby and probably others) is that you lose even basic introspectability into rudimentary parameters like name, version, dependencies unless your threat model allows for executing random code that people put into the setup.py. This can be mitigated by using complex static analysis carefully crafted for the specific task, but this isn't easy to implement and there is a non-insignificant amount of cases where the data cannot be legitimately decided. I'm just wondering how this is conceptually different from Pipfiles:
https://github.com/pypa/pipfile https://github.com/pypa/pipfile
(Previous discussion https://news.ycombinator.com/item?id=13011932 https://news.ycombinator.com/item?id=13011932)
- daenney 9y agoPipfile isn't a replacement for setup.py, it's meant to replace requirements.txt / how you specify the dependencies of your project. As you've noted, setup.py can do a lot more than that.
- ubernostrum 9y agoAlso, executable package scripts with arbitrary code are the reason why 'pip install rickroll' does exactly what it sounds like it'll do.