distutils (packaging) newbie questions please....

Christian Seberino seberino at spawar.navy.mil
Tue Sep 30 19:11:09 EDT 2003


I really want to learn distutils to professionally package some open
source software.

I had some distutils questions after reading python.org distutil docs
on packaging code
if you don't mind.  I would really appreciate some help.....


0. I'm confused about use of the word "package" in setup.py.  
    packages = ["<package1>", "<package2>", ...]
    Does package here just mean "a new directory of source code to
consider"???

1. What exactly goes into the __init__.py files? I know what to put in
setup.py
    and I know __init__.py is used for packages but I don't know what
to put IN this file.

2. About the data_files option for setup.py....

      data_files = [ "<installation directory>", [ "<file1>",
"<file2>", ...] ]

   Is there a way to AVOID having to type EVERY single data file?? Can
I specify
   just the directory or use wild cards??

3.  python setup.py sdist   will make a package of SOURCE code and
    using "bdist" will put BINARIES in package.  What does this
mean???
    Will bdist packages unpack to pyc (bytecode) files and sdist will
unpack
    py (noncompiled) files????  What if I wanted py and pyc files
installed
    from the package?? (i.e. source and compiled versions)

Thanks!

Chris




More information about the Python-list mailing list