summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/create.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-01 03:11:29 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-01 03:11:29 (GMT)
commit95fc53f2b378e603dadb3629597b053c13e45965 (patch)
treef37a8730f28839cac28c6ffded0a6bf057af6a22 /Lib/packaging/create.py
parentab3bea6815a236af940b7d25a0d295e6bbf20c5b (diff)
downloadcpython-95fc53f2b378e603dadb3629597b053c13e45965.zip
cpython-95fc53f2b378e603dadb3629597b053c13e45965.tar.gz
cpython-95fc53f2b378e603dadb3629597b053c13e45965.tar.bz2
Clean up packaging.util: add __all__, remove some unused functions.
This huge module is the heir of six distutils modules, and contains a number of miscellaneous functions. I have attempted to help readers of the source code with an annoted __all__. Removed or deprecated functions have been removed from the documentation; I’m working on another patch to document the remaining public functions. For the curious: The unzip_file and untar_file were used by (or intended to be used by) “pysetup install path/to/archive.tar.gz”, but the code presently used shutil.unpack_archive and an helper function, so I just deleted them. They’re still in the repository if we need them in the future. The find_packages function is not used anymore but I want to discuss module and package auto-discovery (in “pysetup create”) again before removing it. subst_vars now lives in sysconfig; rfc822_escape is inlined in packaging.metadata. Other functions are for internal use only, or deprecated; I have left them out of __all__ and sprinkled TODO notes for future cleanups.
Diffstat (limited to 'Lib/packaging/create.py')
-rw-r--r--Lib/packaging/create.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/packaging/create.py b/Lib/packaging/create.py
index 8f39172..ecabca0 100644
--- a/Lib/packaging/create.py
+++ b/Lib/packaging/create.py
@@ -36,7 +36,7 @@ from packaging._trove import all_classifiers as _CLASSIFIERS_LIST
from packaging.version import is_valid_version
_FILENAME = 'setup.cfg'
-_DEFAULT_CFG = '.pypkgcreate'
+_DEFAULT_CFG = '.pypkgcreate' # FIXME use a section in user .pydistutils.cfg
_helptext = {
'name': '''
@@ -127,6 +127,10 @@ def ask_yn(question, default=None, helptext=None):
print('\nERROR: You must select "Y" or "N".\n')
+# XXX use util.ask
+# FIXME: if prompt ends with '?', don't add ':'
+
+
def ask(question, default=None, helptext=None, required=True,
lengthy=False, multiline=False):
prompt = '%s: ' % (question,)