build of python3 snap fails with 'error: option --single-version-externally-managed not recognized'

Bug #1587193 reported by Seth Johnson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Expired
Undecided
Unassigned
snapcraft (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I'm attempting to repackage a desktop app (unity-tweak-tool in this case) as a snap, however 'snapcraft build' always fails with this error:

    error: option --single-version-externally-managed not recognized

As far as I can tell this has something to do with the way pip install is being called by snapcraft, but I'm not completely sure.

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

Does it work with the latest snapcraft and does it work doing `pip install` from the sources?

Changed in snapcraft:
status: New → Incomplete
Changed in snapcraft (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snapcraft because there has been no activity for 60 days.]

Changed in snapcraft:
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapcraft (Ubuntu) because there has been no activity for 60 days.]

Changed in snapcraft (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Jason C. McDonald (codemouse92) wrote :

Slamming into this myself. Here's the relevant information:

snap 2.26.14
snapd 2.26.14
series 16
ubuntu 17.04
kernel 4.10.0-28-generic
python 3.5.2

Full text of both `setup.py` and `snapcraft.yaml` attached.

Full error is as follows:

------------------------------------------------------------

Installing collected packages: appdirs, idna, Kivy, certifi, Omission, docutils, Kivy-Garden, Pygments, urllib3, chardet, requests
Successfully installed Kivy-1.10.0 Kivy-Garden-0.1.4 Omission-1.0 Pygments-2.2.0 appdirs-1.4.3 certifi-2017.7.27.1 chardet-3.0.4 docutils-0.13.1 idna-2.5 requests-2.18.3 urllib3-1.22
/home/jason/Code/Repositories/omission/parts/omission/install/usr/bin/python3 setup.py --no-user-cfg install --single-version-externally-managed --user --record install.txt
/home/jason/Code/Repositories/omission/parts/omission/install/usr/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --single-version-externally-managed not recognized
[Errno 1] Operation not permitted: '/home/jason/Code/Repositories/omission/parts/omission/install/usr/lib/x86_64-linux-gnu/libBrokenLocale.so'

Revision history for this message
Jason C. McDonald (codemouse92) wrote :

That code blindness for you. Note in my 'setup.py', I had 'from distutils.core import setup', but I SHOULD have had 'from setuptools import setup'.

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

Yes, we currently only support pip installable projects, which means `--single-version-externally-managed` is not supported, which means you should use `setuptools` instead of `distutils.core`.

That said, we would welcome a `distutils` plugin in snapcraft.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.