On Mon, May 07, 2018 at 11:33:44AM +0300, Marius Gedminas wrote: > On Mon, May 07, 2018 at 08:48:23AM +0200, Carles Sala Cladellas wrote: > > Hello here! > > > > TL;DR: Should I use requirements.txt, or should I have my dependencies only > > listed inside setup.py? > > Short answer: only setup.py, unless you find a reason to also use a > requirements.txt. > > Long answer: > https://packaging.python.org/discussions/install-requires-vs-requirements/ > and especially https://caremad.io/posts/2013/07/setup-vs-requirement/
+1 let me point out one more thing. Suppose you have a project 'myproject' that depends on library1 that depends on library2. library1 doesn't declare dependancies in setup.py but uses requirements.txt. 'pip install' of myproject will not see the dependency on library2 I personally really appreciate what buildout does in this field. It relies on setup.py but allows you to take a 'snapshot' of the packages really used in versions.txt. It's a pinpoint that enter into the play *only if* setup.py requires that package. What I really don't like of requirements.txt is that it doesn't differentiate between required packages and packages that entered as dependacies of others. sandro *:-) -- Sandro Dentella *:-) http://trepalchi.it Il portale degli artisti http://www.reteisi.org Soluzioni libere per le scuole http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy -- Distutils-SIG mailing list distutils-sig@python.org https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/FJU2AKIPW5JWKGBVK5EFBILTB5XUS6KS/