What to do if setuptools is not installed?

I am just learning the art of writing a file setup.pyfor my project. I see a lot of talk about setuptoolswhich distutils are supposed to outperform. There is one thing, although I do not understand, and I did not see it in any textbook that I read about this: What if setuptools is not installed? I understand that this is not part of the standard library, since you can assume that anyone who wants to install your program will install it?

+3
source share
6 answers

You cannot assume that it is installed. There are ways around this, you can go back to distutils (but then why do you have setuptools in the first place), or you can install setuptools in setup.py (but I think this is evil).

Use setuptools only if you need it.

When it comes to setuptools vs distribubute, they are compatible, and choosing one over the other is largely up to the user. Setup.py is identical.

+1
source

The standard way to distribute packages using setuptools includes a ez_setup.pyscript that will automatically download and install setuptools on its own - on Windows, I assume that it will actually install the executable for easy_install. You can get this from the standard setuptools / easy_install distribution.

+4

, - python, : " setuptools". , , , .

+2

setuptools python, Windows EXE. , ( ), , EXE, .

,

+2

Windows EXE RPM Linux

http://pypi.python.org/pypi/setuptools

, setuptools, easy_install . easy_install , virtualenv, . , , Python .

, , setuptools . , setuptools, NSIS . , - , , , setuptools.

0

, , .

, Python, , setuptools . , .

distutils.

- setuptools .

-, , . , - , setuptools? - , .

0

Source: https://habr.com/ru/post/1721769/


All Articles