Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cae9e67

Browse files
committed
Patch #970015: Replace - by _ in version and release.
1 parent cf52524 commit cae9e67

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/distutils/command/bdist_rpm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ def _make_spec_file(self):
332332
# definitions and headers
333333
spec_file = [
334334
'%define name ' + self.distribution.get_name(),
335-
'%define version ' + self.distribution.get_version(),
336-
'%define release ' + self.release,
335+
'%define version ' + self.distribution.get_version().replace('-','_'),
336+
'%define release ' + self.release.replace('-','_'),
337337
'',
338338
'Summary: ' + self.distribution.get_description(),
339339
]

Misc/NEWS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Extension modules
5757
Library
5858
-------
5959

60-
- bdist_rpm now includes version and release in the BuildRoot.
60+
- bdist_rpm now includes version and release in the BuildRoot, and
61+
replaces - by ``_`` in version and release.
6162

6263
- distutils build/build_scripts now has an -e option to specify the
6364
path to the Python interpreter for installed scripts.

0 commit comments

Comments
 (0)