Bug 1241947
| Summary: | Switch atomic to use python3 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> | ||||||||||
| Component: | atomic | Assignee: | Lokesh Mandvekar <lsm5> | ||||||||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||
| Priority: | unspecified | ||||||||||||
| Version: | 23 | CC: | dwalsh, lsm5, mhroncok, rkuska, walters | ||||||||||
| Target Milestone: | --- | Keywords: | Reopened | ||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | atomic-0-0.12.gitfea1b99.fc23 | Doc Type: | Bug Fix | ||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2015-07-17 17:34:30 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: | |||||||||||||
| Bug Depends On: | |||||||||||||
| Bug Blocks: | 1014209 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Miro Hrončok
2015-07-10 13:19:58 UTC
lokesh can we do this via scripting? make PYTHON=python3 install Gets us most of the way their. The only change required is to modify /usr/bin/python to /usr/bin/python3 diff --git a/atomic b/atomic index 6713819..261f832 100755 --- a/atomic +++ b/atomic @@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # Copyright (C) 2014-2015 Red Hat # AUTHOR: Dan Walsh <dwalsh> # see file 'COPYING' for use and warranty information Created attachment 1051816 [details] Patch for specfile to use Python 3 I've updated the package and switched it to Python 3. Note that it fails to build on arm, due to missing docker, but I didn't want to remove it from ExclusiveArch, I guess that's your call. Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=10352602 Most of your changes should not be necessary if you call make PYTHON=python3 install We should not be modifying the Makefile in the specfile. We should use environment variables that the specfile can set. And I forgot one thing, /usr/share/atomic/atomic_dbus.py is now bytecompiled with Python 2, I'll fix that. (In reply to Daniel Walsh from comment #3) > Most of your changes should not be necessary if you call > > make PYTHON=python3 install I do exactly that. What changes exactly should not be necessary? > We should not be modifying the Makefile in the specfile. We should use > environment variables that the specfile can set. The only modifying of Makefile is about pylint. Feel free to fix this upsream, not much that can be done form the spec file, when there is no environment variable about pylint used in there. s/form the spec file/from the spec file/ Created attachment 1051832 [details] Patch for specfile to use Python 3 (with bytecompilation fix) Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=10352768
sed -i 's/pylint/python3-pylint/' Makefile
This should be fixed upstream. Send a patch to Atomic, or I will just throw a fix in.
sed -i 's|#!/usr/bin/python|#!%{__python3}|' atomic
This should not be necessary, since the setup.py does it automatically.
make PYTHON=%{__python3} install
Will cause setup.py to install atomic and atomic_dbus.py with /bin/python3
Created attachment 1051835 [details]
Patch for specfile to use Python 3
Right.
Miro, That looks a lot better. Would love to get rid of sed -i '/pylint/d' Makefile Created attachment 1053036 [details]
Patch for specfile to use Python 3
Me too. Here we go. Shall I push this?
Looks good to me. Oh, so I was too quick closing this. There is still problem with docker on ARM. Error: No Package found for docker Should I disable ARM builds? I guess so, until Lokesh starts building docker for arm. Ok, done that. arm builds were enabled earlier, though iirc I had to disable them for rawhide coz of build problems. I'll check again and enable it if all goes well. |