Commit Graph

21 Commits

Author SHA1 Message Date
Éric Araujo 7724a6c10c Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available
in 3.3; the distutils2 backport still has the conditionals.

I also renamed an internal misnamed method and fixed a few things
(“packaging2” name, stray print, unused import, fd leak).
2011-09-17 03:31:51 +02:00
Éric Araujo 95fc53f2b3 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.
2011-09-01 05:11:29 +02:00
Éric Araujo 29f6297605 Fix wrong use of root logger in packaging (also a NameError) 2011-08-04 17:17:07 +02:00
Éric Araujo ce5fe83878 Factor out code used by packaging commands for HTTP requests (#12169).
We now have one function to prepare multipart POST requests, and we use
CRLF, as recommended by the HTTP spec (#10150).  Initial patch by John
Edmonds.
2011-07-08 16:27:12 +02:00
Ned Deily fceb4120fc Issue #9516: Port the revised deployment target processing for OSX from
distutils to packaging.
2011-06-28 20:04:24 -07:00
Éric Araujo 8d233f2cb0 Also specify encoding when reading setup.cfg (#12320) 2011-06-12 23:02:57 +02:00
Éric Araujo 6280606a57 Adjust logging in packaging.util.spawn (related to #11599) 2011-06-11 09:46:07 +02:00
Éric Araujo 3605030c9b Fix assorted bugs in packaging.util.cfg_to_args (#11595).
Original patch by Erik Bray.
2011-06-10 23:52:26 +02:00
Éric Araujo 1c1d9a5026 Move useful function to packaging.util.
Original patch by Erik Bray as part of #11595, changed by me to improve
readability.
2011-06-10 23:26:31 +02:00
Éric Araujo 3cab2f150c Packaging cleanup: normalize print calls.
Namely: use default arguments instead of explicit empty string; use multiple
arguments instead of building strings.
2011-06-08 04:10:57 +02:00
Éric Araujo d5d831b74d Update doctring now that Python has real booleans 2011-06-06 01:13:48 +02:00
Éric Araujo 35a4d01a92 Improve a few docstrings in packaging.
Also beautify import lists.  Having them grouped by lenght makes it slightly
easier to look for a module.
2011-06-04 22:24:59 +02:00
Éric Araujo 088025fc5b Use list constructor or built-in method instead of copy module 2011-06-04 18:45:40 +02:00
Tarek Ziade 721ccd0ce1 added the generate-setup action 2011-06-02 12:00:44 +02:00
Tarek Ziade b1b6e1384c Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an
installation. That also fixes the remaining environment alteration issue in
test_packaging.
2011-05-30 12:07:49 +02:00
Tarek Ziade ec9b76d282 fixed the separator issues in packaging/resources+config 2011-05-21 11:48:16 +02:00
Victor Stinner 9904b22b78 Close #12114: fix a potential deadlock in packaging.util._find_exe_version()
Avoid also zombi processes: Popen.communicate() calls its wait() method.
2011-05-21 02:20:36 +02:00
Victor Stinner 9cf6d13141 Issue #12112: fix the encoding of setup.py in the packaging module
* read: use tokenize.detect_encoding()
 * write: use 'utf-8'
2011-05-19 21:42:47 +02:00
Victor Stinner 4c9706bd27 package: replace open(fn, 'w').close() by open(fn, 'wb').close()
We don't need to open the files in text mode just to create them (or update
their modification time).
2011-05-19 15:52:59 +02:00
Victor Stinner 21a9c748aa packaging: use with open() instead of try/finally: close 2011-05-19 15:51:27 +02:00
Tarek Ziade 1231a4e097 initial import of the packaging package in the standard library 2011-05-19 13:07:25 +02:00