From 7b01ab779a5486d8b7607c433c2984b552c29aa1 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Thu, 30 Jul 2009 14:32:47 -0400 Subject: [PATCH] editing --- packaging.html | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packaging.html b/packaging.html index 99c519e..d637de9 100644 --- a/packaging.html +++ b/packaging.html @@ -25,9 +25,9 @@ mark{display:inline}

Python 3 comes with a packaging framework called Distutils. Distutils is many things: a build tool (for you), an installation tool (for your users), a package metadata format (for search engines), and more. It integrates with the Python Package Index (“PyPI”), a central repository for open source Python libraries. -

All of these facets of Distutils center around the setup script, traditionally called setup.py. In fact, you’ve already seen several Distutils setup scripts in this book: you used one to install httplib2 in “HTTP Web Services,” and another to install chardet in “Case Study: Porting chardet to Python 3.” +

All of these facets of Distutils center around the setup script, traditionally called setup.py. In fact, you’ve already seen several Distutils setup scripts in this book. You used Distutils to install httplib2 in HTTP Web Services and again to install chardet in Case Study: Porting chardet to Python 3. -

In this chapter, you’ll learn how the setup script for chardet works and step through the process of releasing your own Python software. +

In this chapter, you’ll learn how the setup scripts for chardet and httplib2 work, and you’ll step through the process of releasing your own Python software.

# chardet's setup.py
 from distutils.core import setup
@@ -205,15 +205,11 @@ setup(
 
 

Classifying Your Package

-

The Python Package Index (“PyPI”) contains thousands of Python libraries. Proper classification metadata will allow people to find yours more easily. +

The Python Package Index (“PyPI”) contains thousands of Python libraries. Proper classification metadata will allow people to find yours more easily. PyPI lets you browse packages by classifier. You can even select multiple classifiers to narrow your search. Classifiers are not invisible metadata that you can just ignore! -

The classifiers parameter to the Distutils setup() function is a list of strings. These strings are not freeform. All of your classifier strings should come from this master list on PyPI. +

To classify your software, pass a classifiers parameter to the Distutils setup() function. The classifers parameter is a list of strings. These strings are not freeform. All classifier strings should come from this list on PyPI. -

-

The Python Package Index lets you browse packages by classifier. You can even select multiple classifiers to narrow your search. Classifiers are not invisible metadata that you can just ignore! They’re quite visible and very useful. -

- -

The entire classifiers parameter is optional. You can write a Distutils setup script without any classifiers at all. Don’t do that. You should always include at least these classifiers: +

Classifiers are optional. You can write a Distutils setup script without any classifiers at all. Don’t do that. You should always include at least these classifiers:

  • Programming Language. In particular, you should include both "Programming Language :: Python" and "Programming Language :: Python :: 3". If you do not include these, your package will not show up in this list of Python 3-compatible libraries, which linked from the sidebar of every single page of pypi.python.org.