Merge lp:~yashi/snapcraft/snapcraft into lp:~snappy-dev/snapcraft/core
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~yashi/snapcraft/snapcraft |
| Merge into: | lp:~snappy-dev/snapcraft/core |
| Diff against target: |
12 lines (+1/-1) 1 file modified
snapcraft/plugins/python3_project.py (+1/-1) |
| To merge this branch: | bzr merge lp:~yashi/snapcraft/snapcraft |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Snappy Developers | 2015-09-25 | Pending | |
|
Review via email:
|
|||
This proposal has been superseded by a proposal from 2015-10-02.
Description of the Change
This fixes snapcraft on wily with multiple supported python version, lp:#1499429. The patch takes the least supported version, 3.4, because scanpcraft did not work with python 3.5 on my wily yet.
| Zygmunt Krynicki (zyga) wrote : | # |
| Yasushi SHOJI (yashi) wrote : | # |
On Tue, 29 Sep 2015 19:27:40 +0900,
Zygmunt Krynicki wrote:
>
> This works but it's a bit weird. Unless there's something I'm missing I'd just use this:
>
> >>> 'python3.4 python3.5'.split()
> ['python3.4', 'python3.5']
>
> So personally I'd remove the (None, 1) arguments
Ah, that's just an optimization I use when I just want to pop the head
element from a list. The supported-versions list won't be long, so I
agreee that there is no need for it.
Now how should I go about this? Just force push a new version to the
branch, or create another branch? (apologize for my ignorace about
launchpad workflow.)
--
yashi
| Leo Arias (elopio) wrote : | # |
If you still have the bzr folder you used to make this change, you just need to go in there, make the change, bzr commit -m 'Cleaned up the split' && bzr push
| Leo Arias (elopio) wrote : | # |
I would add this as a comment before the statement you changed:
# py3versions can return more than one version.
# take the first entry of the list. It's ususally the oldest
# supported version available and safer to rely on.
And this needs to be fixed for the python2_project too. If you have time, please make the change in this branch. Otherwise, leave it and we'll make another branch for py2.
| Leo Arias (elopio) wrote : | # |
Yashi already sent the contributor's agreement.
| Zygmunt Krynicki (zyga) wrote : | # |
Please force-push. That would be best.
- 210. By Yasushi SHOJI on 2015-10-03
-
Handle multiple supported-versions returned by pyversions and py3versions
On Wily with python3-minimal 3.4.3-4ubuntu1,
/usr/share/python3/ debian_ defaults has multiple version listed in
supported-versions.supported-versions = python3.4, python3.5
Those versions return when `py3version -i` is run.
$ py3versions -i
python3.4 python3.5pyversions, with /usr/share/
python/ debian_ defaults, behaves the same. `pyversions -i` and `py3version -i` is used in snapcraft to generate
PYTHONPATH in Python3ProjectPlugin:: python_ version( ), but due to the
multiple return values separated by a space, it generates the
following PYTHONPATH:"....spongesha
ker/install/ usr/lib/ python3. 4 python3. 5/dist- packages" and dies with "export: python3.
5/dist- packages: bad variable name". To fix this, just take the first entry of the list. It's usually the
oldest supported version available and safer to rely on.
Unmerged revisions
- 210. By Yasushi SHOJI on 2015-10-03
-
Handle multiple supported-versions returned by pyversions and py3versions
On Wily with python3-minimal 3.4.3-4ubuntu1,
/usr/share/python3/ debian_ defaults has multiple version listed in
supported-versions.supported-versions = python3.4, python3.5
Those versions return when `py3version -i` is run.
$ py3versions -i
python3.4 python3.5pyversions, with /usr/share/
python/ debian_ defaults, behaves the same. `pyversions -i` and `py3version -i` is used in snapcraft to generate
PYTHONPATH in Python3ProjectPlugin:: python_ version( ), but due to the
multiple return values separated by a space, it generates the
following PYTHONPATH:"....spongesha
ker/install/ usr/lib/ python3. 4 python3. 5/dist- packages" and dies with "export: python3.
5/dist- packages: bad variable name". To fix this, just take the first entry of the list. It's usually the
oldest supported version available and safer to rely on.


This works but it's a bit weird. Unless there's something I'm missing I'd just use this:
>>> 'python3.4 python3.5'.split()
['python3.4', 'python3.5']
So personally I'd remove the (None, 1) arguments