=== modified file 'snapcraft/plugins/python2.py'
--- snapcraft/plugins/python2.py 2015-08-04 21:54:52 +0000
+++ snapcraft/plugins/python2.py 2015-08-05 11:56:16 +0000
@@ -24,7 +24,7 @@
super().__init__(name, options)
class UbuntuOptions:
- package = "python-dev"
+ packages = ["python-dev", "python-setuptools"]
self.ubuntu = ubuntu.UbuntuPlugin(name, UbuntuOptions())
# note that we don't need to set PYTHONHOME here,
=== modified file 'snapcraft/plugins/python2_project.py'
--- snapcraft/plugins/python2_project.py 2015-08-03 18:21:58 +0000
+++ snapcraft/plugins/python2_project.py 2015-08-05 12:01:24 +0000
@@ -14,6 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import os
+
import snapcraft
@@ -26,6 +28,9 @@
return self.handle_source_options()
def build(self):
+ env = os.environ.copy()
+ env['PYTHONPATH'] = '{}/usr/lib/python2.7/dist-packages'.format(self.installdir)
return self.run(
["python2", "setup.py", "install", "--install-layout=deb",
- "--prefix={}/usr".format(self.installdir)])
+ "--prefix={}/usr".format(self.installdir)],
+ env=env)
=== modified file 'snapcraft/plugins/ubuntu.py'
--- snapcraft/plugins/ubuntu.py 2015-07-23 14:23:29 +0000
+++ snapcraft/plugins/ubuntu.py 2015-08-05 11:55:56 +0000
@@ -33,8 +33,8 @@
super().__init__(name, options)
self.downloadable_packages = []
self.included_packages = []
- if options.package:
- self.included_packages.append(options.package)
+ if options.packages:
+ [self.included_packages.append(p)for p in options.packages]
else:
# User didn't specify a package, use the part name
if name == 'ubuntu':
@@ -89,7 +89,7 @@
for p in packages:
if p not in alldeps:
exit = True
- logger.error('Package %s not recognized' % p, file=sys.stderr)
+ logger.error('Package %s not recognized' % p)
if exit:
sys.exit(1)