Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bdist_rpm should enable --fix-python by default #48709

Closed
John5342 mannequin opened this issue Nov 29, 2008 · 7 comments
Closed

bdist_rpm should enable --fix-python by default #48709

John5342 mannequin opened this issue Nov 29, 2008 · 7 comments
Assignees
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@John5342
Copy link
Mannequin

John5342 mannequin commented Nov 29, 2008

BPO 4459
Nosy @vstinner, @tarekziade, @merwok, @akitada, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/merwok'
closed_at = <Date 2021-02-03.18:16:24.753>
created_at = <Date 2008-11-29.14:42:30.493>
labels = ['3.8', 'type-bug', 'library']
title = 'bdist_rpm should enable --fix-python by default'
updated_at = <Date 2021-02-03.18:16:24.753>
user = 'https://bugs.python.org/John5342'

bugs.python.org fields:

activity = <Date 2021-02-03.18:16:24.753>
actor = 'steve.dower'
assignee = 'eric.araujo'
closed = True
closed_date = <Date 2021-02-03.18:16:24.753>
closer = 'steve.dower'
components = ['Distutils']
creation = <Date 2008-11-29.14:42:30.493>
creator = 'John5342'
dependencies = []
files = []
hgrepos = []
issue_num = 4459
keywords = []
message_count = 7.0
messages = ['76596', '82948', '82957', '113876', '119390', '337667', '386309']
nosy_count = 6.0
nosy_names = ['vstinner', 'tarek', 'eric.araujo', 'akitada', 'John5342', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue4459'
versions = ['Python 3.8']

@John5342
Copy link
Mannequin Author

John5342 mannequin commented Nov 29, 2008

When using bdist_rpm the %build section of the generated spec file
contains the following:

env CFLAGS="$RPM_OPT_FLAGS" python setup.py build

This works fine until the python is installed using altinstall. In this
situation the spec file will use the default python rather than the one
currently used.

I am currently using python3.0 with the default python being 2.5. As a
result the spec file is created which then calles python (2.5) and my
setup.py contains 3.0 code so the spec file fails.

When the above line is generated it should use the current interpreters
path and name rather than just "python"

@John5342 John5342 mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 29, 2008
@akitada
Copy link
Mannequin

akitada mannequin commented Feb 28, 2009

There are two options for that in bdist_rpm.

--python path to Python interpreter to hard-code in the .spec
file (default: "python")
--fix-python hard-code the exact path to the current Python
interpreter in the .spec file

@John5342
Copy link
Mannequin Author

John5342 mannequin commented Mar 1, 2009

Thanks.

i had noticed those options since i filed this report but considering
the spec file is generated and then built immediately wouldn't it make
more sense to effectively enable --fix-python by default (perhaps with a
--no-fix-python option if people do in fact want to do something odd).
The rpm would then automatically be built using the same version of
python used for development which is in my experience almost always what
is intended.

I do at least have a workable workaround.

Thanks again.

@akitada akitada mannequin changed the title bdist_rpm assumes python bdist_rpm should enable --fix-python by default Mar 3, 2009
@merwok
Copy link
Member

merwok commented Aug 14, 2010

Considering that bdist_rpm is removed in distutils2, that its use in distutils is not encouraged (platform-specific tools are more adapted and can move quicker than the stdlib), that you have a workaround, and that we can’t change behavior for fear of breaking third-party tools (what happened all the time and lead Tarek to create distutils2), I’m closing this in one week unless Tarek objects.

@merwok merwok self-assigned this Aug 14, 2010
@merwok merwok closed this as completed Sep 8, 2010
@merwok
Copy link
Member

merwok commented Oct 22, 2010

FYI, this is fixed in the new bdist_rpm2 command: https://bitbucket.org/tarek/pypi2rpm/changeset/ce6626df0225

@vstinner
Copy link
Member

I reopen the issue. The command still needs --fix-python and distutils2 project has been abandonned.

Bug report in RHEL:
https://bugzilla.redhat.com/show_bug.cgi?id=1673325

@vstinner vstinner added the 3.8 only security fixes label Mar 11, 2019
@vstinner vstinner reopened this Mar 11, 2019
@zooba
Copy link
Member

zooba commented Feb 3, 2021

Distutils is now deprecated (see PEP-632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools

@zooba zooba closed this as completed Feb 3, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants