Python setuptools: Difference between revisions
From wikinotes
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
{{ WARNING | | {{ WARNING | | ||
It's now encouraged to use <code>pyproject.toml</code> instead of <code>setup.py</code> to configure your project.<br> | |||
setuptools may still be used as your build system of choice under the hood. | |||
}} | }} | ||
Latest revision as of 23:25, 14 February 2024
Setuptools is the primary tool for packaging python projects for distriution.
A setup.py
file serves as both a makefile, a dependency resolver, and a place for project information.
WARNING:
It's now encouraged to use pyproject.toml
instead of setup.py
to configure your project.
setuptools may still be used as your build system of choice under the hood.
Documentation
official docs https://setuptools.readthedocs.io/en/latest/
Examples
import setuptools setuptools.setup( name = 'my_package_name', version = '0.0.0', author = 'Will Pittman', author_email = 'willjpittman@gmail.com' url = 'http://blah.com', licence = 'BSD', keywords = 'foo bar baz', classifiers = [ 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3', 'Operating System :: POSIX :: Linux', 'Operating System :: POSIX :: BSD', ], )