summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-12 18:56:03 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-12 18:56:03 (GMT)
commit45cd4ff95d46f7a52e8717c80a47fbdece865775 (patch)
tree3423fb6ccc595622e84725470efd0990d9228ce5 /Lib/distutils/command
parent36cbc08f3fd57b41bcde8c1ec19d79e59d95f9ca (diff)
downloadcpython-45cd4ff95d46f7a52e8717c80a47fbdece865775.zip
cpython-45cd4ff95d46f7a52e8717c80a47fbdece865775.tar.gz
cpython-45cd4ff95d46f7a52e8717c80a47fbdece865775.tar.bz2
Patch #1360200: Use unmangled_version RPM spec field to deal with
file name mangling. Will backport to 2.5.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/bdist_rpm.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 03ef070..6f0e0d8 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -391,6 +391,7 @@ class bdist_rpm (Command):
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 @@ class bdist_rpm (Command):
# 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 @@ class bdist_rpm (Command):
# 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 "