1. 10
  1.  

  2. 2

    That…seems quite a bit more complicated than it really needs to be. In my experience it’s also good to avoid executing code at import time in these modules, because this code is imported both during packaging and during runtime (for pkg_resources and such). For instance, is README.rst really going to be present in $PWD at runtime?

    This really could be trimmed down to just that call to setup and nothing more.

    1. 2

      For instance, is README.rst really going to be present in $PWD at runtime?

      I’ve seen variations of this one go wrong myself. Strongly agree that i/o in setup.py is a terrible idea.

      1. 3

        Requests has been doing it for like 6 years! Never once been an issue, and we’ve been installed like… more than almost anything else.

        Just need to specify it in MANIFEST.in.

        1. 1

          By the way, I heard about PEP 518 being implemented in pip 10. Do you think setup.py will eventually die as a consequence? In that case, how long do you think the adoption would take?

          1. 1

            Given that people are still using Python2.6, quite a while :)