Improve a few docstrings in packaging.

Also beautify import lists.  Having them grouped by lenght makes it slightly
easier to look for a module.
This commit is contained in:
Éric Araujo 2011-06-04 22:24:59 +02:00
parent 459b452b98
commit 35a4d01a92
2 changed files with 12 additions and 20 deletions

View File

@ -1,15 +1,8 @@
#!/usr/bin/env python
"""Interactive helper used to create a setup.cfg file. """Interactive helper used to create a setup.cfg file.
This script will generate a packaging configuration file by looking at This script will generate a packaging configuration file by looking at
the current directory and asking the user questions. It is intended to the current directory and asking the user questions. It is intended to
be called as be called as *pysetup create*.
pysetup create
or
python3.3 -m packaging.create
""" """
# Original code by Sean Reifschneider <jafo@tummy.com> # Original code by Sean Reifschneider <jafo@tummy.com>
@ -26,17 +19,17 @@ or
# Detect scripts (not sure how. #! outside of package?) # Detect scripts (not sure how. #! outside of package?)
import os import os
import re
import imp import imp
import sys import sys
import glob import glob
import re
import shutil import shutil
import sysconfig import sysconfig
import tokenize import tokenize
from configparser import RawConfigParser
from textwrap import dedent
from hashlib import md5 from hashlib import md5
from textwrap import dedent
from functools import cmp_to_key from functools import cmp_to_key
from configparser import RawConfigParser
# importing this with an underscore as it should be replaced by the # importing this with an underscore as it should be replaced by the
# dict form or another structures for all purposes # dict form or another structures for all purposes
from packaging._trove import all_classifiers as _CLASSIFIERS_LIST from packaging._trove import all_classifiers as _CLASSIFIERS_LIST
@ -230,7 +223,7 @@ class MainProgram:
self._write_cfg() self._write_cfg()
def has_setup_py(self): def has_setup_py(self):
"""Test for the existance of a setup.py file.""" """Test for the existence of a setup.py file."""
return os.path.exists('setup.py') return os.path.exists('setup.py')
def define_cfg_values(self): def define_cfg_values(self):

View File

@ -1,19 +1,18 @@
"""packaging.util """Miscellaneous utility functions."""
Miscellaneous utility functions.
"""
import errno
import csv
import hashlib
import os import os
import sys
import re import re
import csv
import sys
import errno
import shutil import shutil
import string import string
import hashlib
import tarfile import tarfile
import zipfile import zipfile
import posixpath import posixpath
import sysconfig
import subprocess import subprocess
import sysconfig
from glob import iglob as std_iglob from glob import iglob as std_iglob
from fnmatch import fnmatchcase from fnmatch import fnmatchcase
from inspect import getsource from inspect import getsource