[Python-checkins] r52742 - in python/branches/release25-maint: Lib/distutils/command/bdist_rpm.py Misc/NEWS

martin.v.loewis python-checkins at python.org
Sun Nov 12 19:56:19 CET 2006


Author: martin.v.loewis
Date: Sun Nov 12 19:56:18 2006
New Revision: 52742

Modified:
   python/branches/release25-maint/Lib/distutils/command/bdist_rpm.py
   python/branches/release25-maint/Misc/NEWS
Log:
Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling.


Modified: python/branches/release25-maint/Lib/distutils/command/bdist_rpm.py
==============================================================================
--- python/branches/release25-maint/Lib/distutils/command/bdist_rpm.py	(original)
+++ python/branches/release25-maint/Lib/distutils/command/bdist_rpm.py	Sun Nov 12 19:56:18 2006
@@ -391,6 +391,7 @@
         spec_file = [
             '%define name ' + self.distribution.get_name(),
             '%define version ' + self.distribution.get_version().replace('-','_'),
+            '%define unmangled_version ' + self.distribution.get_version(),
             '%define release ' + self.release.replace('-','_'),
             '',
             'Summary: ' + self.distribution.get_description(),
@@ -412,9 +413,9 @@
         # but only after it has run: and we create the spec file before
         # running "sdist", in case of --spec-only.
         if self.use_bzip2:
-            spec_file.append('Source0: %{name}-%{version}.tar.bz2')
+            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2')
         else:
-            spec_file.append('Source0: %{name}-%{version}.tar.gz')
+            spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz')
 
         spec_file.extend([
             'License: ' + self.distribution.get_license(),
@@ -489,7 +490,7 @@
         # are just text that we drop in as-is.  Hmmm.
 
         script_options = [
-            ('prep', 'prep_script', "%setup"),
+            ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"),
             ('build', 'build_script', def_build),
             ('install', 'install_script',
              ("%s install "

Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS	(original)
+++ python/branches/release25-maint/Misc/NEWS	Sun Nov 12 19:56:18 2006
@@ -99,6 +99,9 @@
 Library
 -------
 
+- Patch #1360200: Use unmangled_version RPM spec field to deal with
+  file name mangling.
+
 - Patch #1359217: Process 2xx response in an ftplib transfer
   that precedes an 1xx response.
 


More information about the Python-checkins mailing list