Merge lp://qastaging/~mterry/snapcraft/python2 into lp://qastaging/~snappy-dev/snapcraft/core

Proposed by Michael Terry
Status: Merged
Approved by: Leo Arias
Approved revision: 95
Merged at revision: 120
Proposed branch: lp://qastaging/~mterry/snapcraft/python2
Merge into: lp://qastaging/~snappy-dev/snapcraft/core
Diff against target: 159 lines (+117/-0)
8 files modified
examples/py2-project/Makefile (+8/-0)
examples/py2-project/meta/package.yaml (+5/-0)
examples/py2-project/meta/readme.md (+1/-0)
examples/py2-project/sha3sum.py (+15/-0)
examples/py2-project/snapcraft.yaml (+7/-0)
plugins/python2-project.yaml (+9/-0)
snapcraft/plugins/python2.py (+41/-0)
snapcraft/plugins/python2_project.py (+31/-0)
To merge this branch: bzr merge lp://qastaging/~mterry/snapcraft/python2
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Sergio Schvezov Approve
John Lenton (community) Needs Fixing
Review via email: mp+265134@code.qastaging.launchpad.net

Commit message

Add python2 and python2-project plugins.

I did this branch when testing the python3 branch (to make sure there was no python bits on the system interfering with the bundled python).

It's basically a straight copy of python3, with appropriate string changes.

I also dropped the configflags option from python3-project. I think that was a copy/paste error.

Description of the change

Add python2 and python2-project plugins.

I did this branch when testing the python3 branch (to make sure there was no python bits on the system interfering with the bundled python).

It's basically a straight copy of python3, with appropriate string changes.

I also dropped the configflags option from python3-project. I think that was a copy/paste error.

To post a comment you must log in.
Revision history for this message
John Lenton (chipaca) wrote :

This does no byte-compiling, which means you get a ton of DENIED when it tries to do so. I'd recommend generating the .pyc files at least -- you could even ship *only* the pyc files and it would still be happy. Nobody really uses .pyo AFAIK so those would be fine to skip.

Another thing you could do is zip all the standard library, but that's probably for down the road.

review: Needs Fixing
Revision history for this message
John Lenton (chipaca) wrote :

re-reading i notice i wasn't clear. The .pyo files would be superfluous, so i don't recommend packaging them. The .py files are not strictly needed as long as the .pyc files are present; if installed size is a concern, I'd suggest not shipping them.

Revision history for this message
Leo Arias (elopio) wrote :

A small comment about using format.

92. By Michael Terry

Merge from trunk

93. By Michael Terry

Update to use new trunk code

Revision history for this message
Michael Terry (mterry) wrote :

Updated to trunk and addressed Leo's comment about format.

Chipaca, I'm going to leave the byte-compiling question to bug 1478093 since it should be addressed for both python3 and python2. This plugin makes the situation no worse than it already is (the current python3 plugin has the same problem).

I think this is ready for review again.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Since Chipaca's comment is already a bug I feel that approving this is ok (looks exactly like the py3 plugin)

review: Approve
94. By Michael Terry

Merge from trunk

95. By Michael Terry

Some fixes to match trunk

Revision history for this message
Leo Arias (elopio) wrote :

Build, installed and ran.

The example can probably be improved, because the snap has no permission to access files outside of /writable/system-data/apps/spongeshaker.sideload/current, so I can't get the sha of any files in my system.

Top-approving anyway.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches