[Tutor] About (dev-)requirements.txt

dn PyTutor at DancesWithMice.info
Thu Mar 11 15:01:38 EST 2021


On 12/03/2021 03.37, Albert-Jan Roskam wrote:
>    Hi,
>    How do I generate separate (i.e., disjoint) lists of requirements for the
>    app itself and the dev-requirements? I know I can use pip freeze, but how
>    do I separate dev and non-dev? Let's say I use nose, pdoc3 and tox for
>    dev-requirements.txt. How do I separate those packages AND their
>    dependencies from the non-dev requirements.txt?
>    And what do I do with libraries like setuptools, wheel and pip? Should
>    they be in both lists? Or should they be installed first, before anything
>    else? I recently experienced many problems related to old pip/wheel
>    versions after I tried to recreate a virtualenv with existing
>    requirement.txt's but a higher Python version so I hope next time this
>    process will be less "trial and error".


This is an interesting question: there are a number of methodologies
which aim to ensure that whatever was needed in the dev.env,
'everything' is carried-forward into "prod".

However, there are indeed some things we don't (necessarily) want!


Perhaps an opposite view is to ask: why bother? What does it matter if
some test or debug tool is replicated in "prod". It should never be
used/called. Is the storage-space it occupies, significant?

Thus, is it worth the brain-time?


Rather than listing the components of the environment, which tool are
you using to parcel-up the code and deliver it/replicate it?
-- 
Regards,
=dn


More information about the Tutor mailing list