4 ms·
Pip and Docker and i never had any issues with python packaging.
by lysecret 5y ago
Pip and Docker and i never had any issues with python packaging.
- ducktective 5y ago>Docker It's like paying someone else to do the thing
- mindwok 5y agoWorks fine if you’re distributing an app, but you can’t distribute a library this way. That’s where something like this is invaluable (although I haven’t used it, I went down this path and landed on Poetry)
- lysecret 5y agoAh that I totally understand.
- mixmastamyk 5y agoDistribute a library by uploading to pypi, and/or cloning from version control. Setup.py still works.
- iknownothow 5y agoHow do you keep your builds reproducible? I understand that once it's built, a docker image makes that specific build immutable and you can distribute it without worry. However, if you were to run the build stage again i.e. rebuild the docker image and redownload the python packages, without changing any package versions, the resulting docker image *may* be quite different from the previous docker image, even though you haven't changed a single line in the entire repository. This is because the dependencies of dependencies may change. So while this works for you, it's not a general solution for the community. Tools like poetry have solved this problem to a large extent.
- prepend 5y agoNot GP, but I solve this problem by pip freezing a requirements.txt with specific package versions and using that when I do a pip install. I don’t use docker, but probably should. This is pretty reproducible across my own, co-workers, and external collaborators to get the exact version.
- lysecret 5y agoWell the way I mostly solve it is by using the cache from docker. As well as versioning important packages. As well as multiple requirements files. However, i feel like if with every small change to your libraries your code breaks there would be something wrong haha. Also I'm not saying it's a perfect solutions. Only that I had a lot of python apps this was never any issue (an d I had a lot of issues) If you are building a library though, i totally get the point of using