Bug 1254728
Summary: | Passing arguments to %py*_compile and friends | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Thomas Spura <tomspur> |
Component: | python | Assignee: | Charalampos Stratakis <cstratak> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 27 | CC: | bkabrda, carl, dmalcolm, ivazqueznet, jberan, jonathansteffan, jorti, makowski.fedora, ncoghlan, pviktori, redhat-bugzilla, tomspur, tradej, ville.skytta |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-10-31 15:15:42 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Thomas Spura
2015-08-18 17:43:34 UTC
In addition to the additional arguments, it is necessary to build in a defined build directory, see bug #1251464. This seems to be working for the py_build macro: %py2_build %{expand:CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" --build-lib=build/lib.%{_os}-%{_target_cpu}-%{python2_version}} But as the install command doesn't understand --build-lib one would need something like this to work around that: %py2_install %{expand: CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install_lib -O1 --skip-build --root %{buildroot} --build-lib=build/lib.%{_os}-%{_target_cpu}-%{python2_version} \ CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install_headers -O1 --skip-build --root %{buildroot} --build-lib=build/lib.%{_os}-%{_target_cpu}-%{python2_version} \ CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install_scripts -O1 --skip-build --root %{buildroot} --build-lib=build/lib.%{_os}-%{_target_cpu}-%{python2_version} \ CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install_data -O1 --skip-build --root %{buildroot} --build-lib=build/lib.%{_os}-%{_target_cpu}-%{python2_version} \ } Do you also need additional arguments to the install command? Would the above work for you? I don't know if the %expand can be removed. (In reply to Thomas Spura from comment #1) Not sure if these were questions to me, but I'll answer anyway. > Do you also need additional arguments to the install command? I haven't come across anything where I'd need it. But I see no reason to disallow them either. > Would the above work for you? Haven't tested, not sure if it applies to python-libdiscid -- it builds fine with just my proposed change as far as I can tell. > I don't know if the %expand can be removed. I *guess* it's there in order to have the macro expand only once per build, a micro-optimization for which I fail to see a reason as the macro is used only once anyway and it doesn't contain any shell execs or the like that would make it slow or anything. I had to use a macro [1] to pass the arguments, because writing the arguments directly after %py3_install didn't work This doesn't work: %py3_install --my-parameter This works: %py3_install "--my-parameter" This works: %global my_parameters --my-parameter %py3_install %my_parameters [1] http://pkgs.fedoraproject.org/cgit/rhythmbox-ampache.git/tree/rhythmbox-ampache.spec#n30 We're also having the same issue at Mageia's, and more than patching it ourselves we'd prefer to see a fix added upstream. See this example for a use case where parsing %py3_install parameters would not work and had to be worked around as shown in comment 3: http://svnweb.mageia.org/packages/cauldron/auale/current/SPECS/auale.spec?r1=905081&r2=905080&pathrev=905081 This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'. Sorry for everything being so quiet here; the issue fell through the cracks %py2_build/%py2_install have been in the wild for some time already, and from the lack of updates here I gather that the shortcomings can be worked around (for the advanced use cases that need them). I'm going to close this issue, but if you want us to take another look at it, please do reopen! |