Commit Graph

40 Commits

Author SHA1 Message Date
Éric Araujo
4b5a5f7bd5 More fixes for PEP 3147 compliance in packaging (#11254) 2011-10-19 08:18:05 +02:00
Éric Araujo
8022314fc2 Cleanup in packaging: super considered super 2011-10-14 17:04:39 +02:00
Éric Araujo
d139b99426 Fix writing of the RESOURCES file by packaging (#12386) 2011-10-14 16:58:23 +02:00
Éric Araujo
dd2d55c8a1 Remove two unneeded attributes in packaging 2011-09-21 16:28:03 +02:00
Éric Araujo
1cbd2ab404 Avoid matching '' or 'yn' when asking for 'y' or 'n' in interactive code 2011-09-19 16:21:37 +02:00
Éric Araujo
505f0ebf88 Final bag of small changes coming from distutils2.
- minor cleanup in Metadata
- trigger creation of the sysconfig._CONFIG_VARS dict
- home_page is used over home-page: it’s not a compound word, it’s an
  escaped space

Distutils2 is now synchronized with Packaging.
2011-09-19 15:12:23 +02:00
Éric Araujo
c1b7e7f8bb A few style changes originally done in the distutils2 repo 2011-09-18 23:12:30 +02:00
Éric Araujo
cc06ad187d Fix typo and wording 2011-09-18 20:36:19 +02:00
Éric Araujo
cc95dd81f3 Branch merge 2011-09-18 20:24:27 +02:00
Éric Araujo
229011d949 Make a number of small changes to ease the backport to distutils2 2011-09-18 20:11:48 +02:00
É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
Jeremy Kloth
3ac4f59a82 The value is the dotted module name to the command class. 2011-09-13 08:26:25 -06:00
Jeremy Kloth
aa2b442bdc Factor out the distribution file-system safe name functions from install_distinfo to allow all metadata consumers access to them. 2011-09-12 11:12:42 -06:00
Éric Araujo
fb7d24492f Remove obsolete comment (yes, build_ext supports C++) 2011-09-10 18:22:31 +02:00
Éric Araujo
c6d52eddaa Fix usage of bytes in packaging's bdist_wininst.
This is copied from the namesake distutils command; there is no
automated test, so buildbots won’t call for my head this time, but it
should be okay as Python 3 users have tested the distutils command.
2011-09-10 18:14:08 +02:00
Éric Araujo
c8f9c81cfa Fix usage of dry-run in packaging bdist_wininst and install_distinfo.
In dry-run mode, packaging commands should log the same info as in real
operation and should collect the same files in self.outputs, so that
users can run a command in verbose and dry-run mode to see exactly what
operations will be done in the real run.
2011-09-10 18:10:23 +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
5bb7345132 Fix packaging command registry to let Windows machines find bdist_msi 2011-08-31 16:12:31 +02:00
Éric Araujo
61543b1afc Fix typo I introduced in f93acf8844ec 2011-08-30 22:13:21 +02:00
Éric Araujo
b9fe54cccc Make bdist_* commands respect --skip-build passed to bdist (#10946).
There was already a test for this, but it was complicated and had a
subtle bug (custom command objects need to be put in dist.command_obj so
that other command objects may see them) that rendered it moot.
2011-08-30 01:42:50 +02:00
Éric Araujo
83ab3f319b Remove obsolete mentions of the compress program and .Z archives.
Packaging uses the shutil.make_archive function copied from distutils,
which does not support compress.  There is no test to check that
“bdist --format whatever” works, so this slipped by.
2011-08-30 01:19:02 +02:00
Éric Araujo
acddb38602 Cleanup: move code out of a try block 2011-08-30 00:45:59 +02:00
Éric Araujo
b741313ca8 Cleanup: use sys.version_info instead of convoluted hexversion lshifts 2011-08-29 21:43:48 +02:00
Victor Stinner
e67474725b Issue #12326: refactor usage of sys.platform
* Use str.startswith(tuple): I didn't know this Python feature, Python rocks!
 * Replace sometimes sys.platform.startswith('linux') with
   sys.platform == 'linux'
 * sys.platform doesn't contain the major version on Cygwin on Mac OS X
   (it's just 'cygwin' and 'darwin')
2011-08-21 00:39:18 +02:00
Éric Araujo
ba9b2689be Minor cleanup
- Rename an attribute and create it in initialize_options instead of
  finalize_options to match the other install_* classes
- Remove unnecessary method call in tests
2011-08-20 09:19:25 +02:00