Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the packages in a setup.py?

I was reading this article, and it had this code:

from distutils.core import setup

setup(name='Distutils',
      version='1.0',
      description='Python Distribution Utilities',
      author='Greg Ward',
      author_email='[email protected]',
      url='https://www.python.org/sigs/distutils-sig/',
      packages=['distutils', 'distutils.command'],
     )

And I am wondering what the packages are. Are they folders/directories? or a type of file? or it it a zip or py file?

Any help will be appreciated.

like image 413
Anonymous Avatar asked Oct 24 '25 14:10

Anonymous


1 Answers

Straight from your own link.

(Relevant section)

The packages option tells the Distutils to process (build, distribute, install, etc.) all pure Python modules found in each package mentioned in the packages list.

...

Thus, when you say packages = ['foo'] in your setup script, you are promising that the Distutils will find a file foo/__init__.py

like image 161
jhpratt Avatar answered Oct 28 '25 04:10

jhpratt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!