TITLE OF PAPER: Distribution Basics - Using distutils URL OF PRESENTATION: _URL_of_powerpoint_presentation_ PRESENTED BY: Anna Ravenscroft REPRESENTING: _name_of_the_company_they_represent_ CONFERENCE: PyCON 2004 DATE: 20040326 LOCATION: _venue_and_room_in_venue_ -------------------------------------------------------------------------- REAL-TIME NOTES / ANNOTATIONS OF THE PAPER: {If you've contributed, add your name, e-mail & URL at the bottom} "Bullets don't kill people" "Bad speakers bore them to death" Who am I Not a morning person Novice Pythonista Background in Training and Coaching Office apps Not a developer Program in Python only Technical editing Tutor list and c.l.py Why distutils? My own project frustrations Current documentation Questions on tutor and c.l.py Chatting with other Pythonistas Who are you Novice Pythonistas Can program in Python Can import modules New to Packaging first Time Review fundamentals Lots of people never used dist utils Some people tried to use distutils and gave up, including David Ascher -- this should be a reality check. Focus Smple stuff: just enough to get started Cross-platform, pure distributions What is a package A module that contains other modules A distribution is a group of files used to create a module? What's in a distribution: Packages Modules Python scripts ... Pure vs non-pure distributions Pure : python only Non pure c-coded extensions pyrex C++ / fortran may be supported Prepping your distribution Distribution root dir setup.py README/README.txt manifest.in setup.cfg Directory Issues All files in Distribution root directory setup.py readme or readme.txt manifest.in setup.cfg scripts and top-level modules Subdirectories of the distribution root test/test.py Any packages: Own package specific subdir subdir name = pkg name Include __init__.py in pkg subdir User friendly setup.py from distutils.core import setup [, Extension] setup (keyword, arguments) Call setup w/ keyword arguments Meta data args Content args Slides are going by too fast to keep up - see URL below Detailed examples of config files It seems that even in the Python community distutils is a kind of voodoo. One person cited boilerplate stolen from PyGame for data files. Another tried to do cross platform dist on windows/linux - had probs there was forced to use platform specific relative paths. MANIFEST.in is order specific There are some options besides distutils. Q: setup.py need to hack sys. A: no - there isn't really - it would be good to add Q: if you have a package that has another package sub referenced to it - can you use the command line to point to the sub-package A: --install-lib - points to where the lib parts will be installed Q: source distrib on windows they go to certain extensions - can they be overridden A: --formats Q: A: Q: A: -------------------------------------------------------------------------- REFERENCES: {as documents / sites are referenced add them below} Paper: http://www.python.org/pycon/dc2004/papers/26/pycon_distutils -------------------------------------------------------------------------- QUOTES: -------------------------------------------------------------------------- CONTRIBUTORS: {add your name, e-mail address and URL below} Ted Leung, twl@osafoundation.org, http://www.sauria.com/blog -------------------------------------------------------------------------- E-MAIL BOUNCEBACK: {add your e-mail address separated by commas } -------------------------------------------------------------------------- NOTES ON / KEY TO THIS TEMPLATE: A headline (like a field in a database) will be CAPITALISED This differentiates from the text that follows A variable that you can change will be surrounded by _underscores_ Spaces in variables are also replaced with under_scores This allows people to select the whole variable with a simple double-click A tool-tip is lower case and surrounded by {curly brackets / parentheses} These supply helpful contextual information. -------------------------------------------------------------------------- Copyright shared between all the participants unless otherwise stated...