What is setup.py?
--
Track title: CC M Beethoven - Piano Sonata No 3 in C 3
--
Chapters
00:00 Question
00:17 Accepted answer (Score 1087)
00:56 Answer 2 (Score 758)
06:08 Answer 3 (Score 128)
06:48 Answer 4 (Score 64)
07:11 Thank you
--
Full question
https://stackoverflow.com/questions/1471...
Accepted answer links:
https://docs.python.org/3/installing/ind...
Answer 2 links:
[pypi.org]: https://pypi.org/
[PyPi.org]: https://pypi.org/
[test.pypi.org]: https://packaging.python.org/guides/usin...
[pypi.org]: https://pypi.org/account/register
[pypi.org]: https://pypi.org/account/register
[pypi.org]: https://pypi.org/account/register
[Python packaging suggests the ]: https://packaging.python.org/tutorials/p...
[pypi.org]: https://pypi.org/account/register
[torchvision-setup.py]: https://github.com/pytorch/vision/blob/m...
[PEP 517]: https://www.python.org/dev/peps/pep-0517/
[setuptools]: https://setuptools.readthedocs.io/en/lat...
[why twine? using twine]: https://twine.readthedocs.io/en/latest/#...
Answer 4 links:
[Python documentation on writing the Setup Script]: http://docs.python.org/distutils/setupsc...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #pypi #setuppy #pythonpackaging
#avk47
ACCEPTED ANSWER
Score 1192
setup.py is a Python file, the presence of which is an indication that the module/package you are about to install has likely been packaged and distributed with Distutils, which is the standard for distributing Python Modules.
This allows you to easily install Python packages. Often it's enough to write:
$ pip install .
pip will use setup.py to install your module. Avoid calling setup.py directly.
ANSWER 2
Score 133
setup.py is Python's answer to a multi-platform installer and make file.
If you’re familiar with command line installations, then make && make install translates to python setup.py build && python setup.py install.
Some packages are pure Python, and are only byte compiled. Others may contain native code, which will require a native compiler (like gcc or cl) and a Python interfacing module (like swig or pyrex).
ANSWER 3
Score 66
If you downloaded package that has "setup.py" in root folder, you can install it by running
python setup.py install
If you are developing a project and are wondering what this file is useful for, check Python documentation on writing the Setup Script
ANSWER 4
Score 24
setup.py is a Python script that is usually shipped with libraries or programs, written in that language. It's purpose is the correct installation of the software.
Many packages use the distutils framework in conjuction with setup.py.