When is it (not) appropriate to bundle dependencies with an application?

后端 未结 8 2229
忘掉有多难
忘掉有多难 2021-02-19 13:43

Summary

I recently had a conversation with the creator of a framework that one of my applications depends on. During that conversation he mentioned as

8条回答
  •  抹茶落季
    2021-02-19 13:52

    Can't you just rely on a certain version of those dependencies? E.g. in Python with setuptools you can specify which exact version it needs or even give some conditions like <= > etc. This of course only applies to Python and on the specifc package manager but I would personally always first try not to bundle everything. With shipping it as a Python egg you will also have all the dependencies installed automatically.

    You might of course also use a two-way strategy in providing your own package with just links to the dependencies and nevertheless provide a complete setup in some installer like fashion. But even then (in the python case) I would suggest to simply bundle the eggs with it.

    For some introduction into eggs see this post of mine.

    Of course this is very Python specific but I assume that other language might have similar packaging tools.

提交回复
热议问题