[Python-checkins] distutils2: Merge from Josip
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:46 CEST 2010
tarek.ziade pushed 0f543ed42707 to distutils2:
http://hg.python.org/distutils2/rev/0f543ed42707
changeset: 443:0f543ed42707
parent: 441:593b7db7a5b4
parent: 442:74e5249b479f
user: ?ric Araujo <merwok at netwok.org>
date: Thu Aug 05 16:23:54 2010 +0200
summary: Merge from Josip
files: src/distutils2/command/install.py, src/distutils2/command/install_distinfo.py, src/distutils2/tests/test_install_distinfo.py
diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py
--- a/src/distutils2/command/install.py
+++ b/src/distutils2/command/install.py
@@ -82,13 +82,10 @@
# .dist-info related arguments, read by install_dist_info
('no-distinfo', None, 'do not create a .dist-info directory'),
- ('distinfo-dir=', None,
- 'directory where the the .dist-info directory will '
- 'be installed'),
('installer=', None, 'the name of the installer'),
('requested', None, 'generate a REQUESTED file'),
('no-requested', None, 'do not generate a REQUESTED file'),
- ('no-distinfo-record', None, 'do not generate a RECORD file'),
+ ('no-record', None, 'do not generate a RECORD file'),
]
boolean_options = ['compile', 'force', 'skip-build', 'no-dist-info',
@@ -173,10 +170,9 @@
# .dist-info related options
self.no_distinfo = None
- self.distinfo_dir = None
self.installer = None
self.requested = None
- self.no_distinfo_record = None
+ self.no_record = None
# -- Option finalizing methods -------------------------------------
diff --git a/src/distutils2/command/install_distinfo.py b/src/distutils2/command/install_distinfo.py
--- a/src/distutils2/command/install_distinfo.py
+++ b/src/distutils2/command/install_distinfo.py
@@ -10,6 +10,8 @@
automatically by the ``install`` command.
"""
+# This file was created from the code for the former command install_egg_info
+
import os
import csv
import re
@@ -34,12 +36,12 @@
('installer=', None, 'the name of the installer'),
('requested', None, 'generate a REQUESTED file'),
('no-requested', None, 'do not generate a REQUESTED file'),
- ('no-distinfo-record', None, 'do not generate a RECORD file'),
+ ('no-record', None, 'do not generate a RECORD file'),
]
boolean_options = [
'requested',
- 'no-dist-record',
+ 'no-record',
]
negative_opt = {'no-requested': 'requested'}
@@ -48,15 +50,13 @@
self.distinfo_dir = None
self.installer = None
self.requested = None
- self.no_distinfo_record = None
+ self.no_record = None
def finalize_options(self):
self.set_undefined_options('install',
- ('distinfo_dir', 'distinfo_dir'),
('installer', 'installer'),
('requested', 'requested'),
- ('no_distinfo_record',
- 'no_distinfo_record'))
+ ('no_record', 'no_record'))
self.set_undefined_options('install_lib',
('install_dir', 'distinfo_dir'))
@@ -65,8 +65,8 @@
self.installer = 'distutils'
if self.requested is None:
self.requested = True
- if self.no_distinfo_record is None:
- self.no_distinfo_record = False
+ if self.no_record is None:
+ self.no_record = False
metadata = self.distribution.metadata
@@ -111,7 +111,7 @@
f.close()
self.outputs.append(requested_path)
- if not self.no_distinfo_record:
+ if not self.no_record:
record_path = os.path.join(self.distinfo_dir, 'RECORD')
log.info('Creating %s' % (record_path,))
f = open(record_path, 'wb')
diff --git a/src/distutils2/tests/test_install_distinfo.py b/src/distutils2/tests/test_install_distinfo.py
--- a/src/distutils2/tests/test_install_distinfo.py
+++ b/src/distutils2/tests/test_install_distinfo.py
@@ -123,7 +123,7 @@
cmd.initialize_options()
cmd.distinfo_dir = install_dir
- cmd.no_distinfo_record = True
+ cmd.no_record = True
cmd.ensure_finalized()
cmd.run()
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list