[Python-checkins] python/nondist/sandbox/setuptools/setuptools/command bdist_rpm.py, NONE, 1.1 __init__.py, 1.8, 1.9 egg_info.py, 1.13, 1.14
pje@users.sourceforge.net
pje at users.sourceforge.net
Mon Aug 22 01:33:52 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27590/setuptools/command
Modified Files:
__init__.py egg_info.py
Added Files:
bdist_rpm.py
Log Message:
Fix problem w/bdist_rpm and setuptools, reported by Walter Doerwald. I
was trying to have setuptools fix distutils' broken filename handling that
assumes people haven't put punctuation in their distribution names,
including '-' (which prevents unambiguous parsing of distribution names).
However, bdist_rpm's attempt to guess a source distribution's filename
isn't compatible with this fix, without making other changes. I decided
therefore to drop the fixes for the sake of backward compatibility, but
monkeypatch bdist_rpm so that it runs "egg_info" first, to ensure that any
--tag-svn-revision or other tagging options take effect.
--- NEW FILE: bdist_rpm.py ---
# This is just a kludge so that bdist_rpm doesn't guess wrong about the
# distribution name and version, if the egg_info command is going to alter them
from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm
class bdist_rpm(_bdist_rpm):
def run(self):
self.run_command('egg_info') # ensure distro name is up-to-date
_bdist_rpm.run(self)
Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/__init__.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- __init__.py 6 Aug 2005 19:29:49 -0000 1.8
+++ __init__.py 21 Aug 2005 23:33:39 -0000 1.9
@@ -1,5 +1,5 @@
__all__ = [
- 'alias', 'bdist_egg', 'build_ext', 'build_py', 'develop',
+ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
'sdist', 'setopt', 'test', 'upload',
]
Index: egg_info.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/command/egg_info.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- egg_info.py 21 Aug 2005 21:49:39 -0000 1.13
+++ egg_info.py 21 Aug 2005 23:33:39 -0000 1.14
@@ -60,13 +60,13 @@
self.ensure_dirname('egg_base')
self.egg_info = os.path.join(self.egg_base, self.egg_name+'.egg-info')
- # Set package version and name for the benefit of dumber commands
- # (e.g. sdist, bdist_wininst, etc.) We escape '-' so filenames will
- # be more machine-parseable.
+ # Set package version for the benefit of dumber commands
+ # (e.g. sdist, bdist_wininst, etc.)
#
- metadata = self.distribution.metadata
- metadata.version = self.egg_version.replace('-','_')
- metadata.name = self.egg_name.replace('-','_')
+ self.distribution.metadata.version = self.egg_version
+
+
+
More information about the Python-checkins
mailing list