RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1177613 - setup.py bdist_rpm NameError: global name 'get_python_version' is not defined
Summary: setup.py bdist_rpm NameError: global name 'get_python_version' is not defined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Matej Stuchlik
QA Contact: Filip Holec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-29 13:06 UTC by daryl herzmann
Modified: 2016-04-18 10:27 UTC (History)
6 users (show)

Fixed In Version: python-2.7.5-22.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 12:43:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Python 18045 0 None None None Never
Red Hat Product Errata RHSA-2015:2101 0 normal SHIPPED_LIVE Moderate: python security, bug fix, and enhancement update 2015-11-19 11:04:15 UTC

Description daryl herzmann 2014-12-29 13:06:05 UTC
Description of problem:
Running the bdist_rpm setup.py target results in:
Traceback (most recent call last):
  File "setup.py", line 73, in <module>
    main(sys.argv[1:])
  File "setup.py", line 68, in main
    setup(**setup_args)
  File "./twisted/python/dist.py", line 81, in setup
    return core.setup(**get_setup_args(**kw))
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py", line 28, in run
    _bdist_rpm.run(self)
  File "/usr/lib64/python2.7/distutils/command/bdist_rpm.py", line 383, in run
    pyversion = get_python_version()
NameError: global name 'get_python_version' is not defined


Version-Release number of selected component (if applicable):
$ rpm -qf /usr/lib64/python2.7/distutils/command/bdist_rpm.py
python-libs-2.7.5-16.el7.x86_64


How reproducible: 100%


Steps to Reproduce:
1. python setup.py bdist_rpm

Actual results:
traceback

Expected results:
I get a fancy RPM

Additional info:
Fedora's bug: https://bugzilla.redhat.com/show_bug.cgi?id=1029082
Python: http://bugs.python.org/issue18045
Patch: https://hg.python.org/cpython/rev/677327810121/

Comment 2 Bohuslav "Slavek" Kabrda 2015-01-05 12:34:01 UTC
dev_ack+ (for rhel 7.2, it's too late for 7.1 now), this can easily be fixed with the referenced upstream commit.

Comment 4 daryl herzmann 2015-05-01 21:07:00 UTC
Sorry to be a bother, but just wanted to confirm that this bug is on the RADAR for RHEL 7.2 release?

Comment 5 Bohuslav "Slavek" Kabrda 2015-05-04 09:32:39 UTC
(In reply to Daryl Herzmann from comment #4)
> Sorry to be a bother, but just wanted to confirm that this bug is on the
> RADAR for RHEL 7.2 release?

Yes, it is on the radar for RHEL 7.2.

Comment 8 errata-xmlrpc 2015-11-19 12:43:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2101.html


Note You need to log in before you can comment on or make changes to this bug.