Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack as a snap #49

Open
techtonik opened this issue Nov 18, 2018 · 2 comments
Open

Pack as a snap #49

techtonik opened this issue Nov 18, 2018 · 2 comments

Comments

@techtonik
Copy link

I think it deserves to be packed as a snap - https://docs.snapcraft.io/python-apps/6741 - to make it installable with snap install pss.

@eliben
Copy link
Owner

eliben commented Nov 25, 2018

Go for it :)

@techtonik
Copy link
Author

Can not build it. Because of:

ImportError: cannot import name 'sysconfig'

Full log
pss$ snapcraft
Get:1 http://repo.steampowered.com/steam precise InRelease [2842 B]                                    
Get:2 http://by.archive.ubuntu.com/ubuntu cosmic InRelease [242 kB]                                    
Get:3 http://by.archive.ubuntu.com/ubuntu cosmic-updates InRelease [83.2 kB]                           
Get:4 http://by.archive.ubuntu.com/ubuntu cosmic-backports InRelease [74.6 kB]                         
Ign http://dl.google.com/linux/chrome/deb stable InRelease                                             
Get:5 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu cosmic InRelease [21.3 kB]                  
Get:6 http://dl.google.com/linux/chrome/deb stable Release [943 B]                                     
Get:7 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]                                 
Get:8 http://security.ubuntu.com/ubuntu cosmic-security InRelease [83.2 kB]                            
Get:9 http://by.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages [1018 kB]                         
Get:10 http://by.archive.ubuntu.com/ubuntu cosmic/main i386 Packages [1007 kB]                         
Get:11 http://by.archive.ubuntu.com/ubuntu cosmic/main Translation-en [513 kB]                         
Get:12 http://by.archive.ubuntu.com/ubuntu cosmic/main amd64 DEP-11 Metadata [475 kB]                  
Get:13 http://by.archive.ubuntu.com/ubuntu cosmic/main DEP-11 48x48 Icons [123 kB]                     
Get:14 http://by.archive.ubuntu.com/ubuntu cosmic/main DEP-11 64x64 Icons [238 kB]                     
Get:15 http://by.archive.ubuntu.com/ubuntu cosmic/restricted amd64 Packages [9304 B]                   
Get:16 http://by.archive.ubuntu.com/ubuntu cosmic/restricted i386 Packages [9564 B]                    
Get:17 http://by.archive.ubuntu.com/ubuntu cosmic/restricted Translation-en [3888 B]                   
Get:18 http://by.archive.ubuntu.com/ubuntu cosmic/universe amd64 Packages [8803 kB]                    
Get:19 http://by.archive.ubuntu.com/ubuntu cosmic/universe i386 Packages [8755 kB]                     
Get:20 http://repo.steampowered.com/steam precise/steam Sources [550 B]                                
Get:21 http://by.archive.ubuntu.com/ubuntu cosmic/universe Translation-en [5063 kB]                    
Get:22 http://by.archive.ubuntu.com/ubuntu cosmic/universe amd64 DEP-11 Metadata [3378 kB]             
Get:23 http://by.archive.ubuntu.com/ubuntu cosmic/universe DEP-11 48x48 Icons [2549 kB]                
Get:24 http://by.archive.ubuntu.com/ubuntu cosmic/universe DEP-11 64x64 Icons [8441 kB]                
Get:25 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu cosmic/main amd64 Packages [18.0 kB]       
Get:26 http://repo.steampowered.com/steam precise/steam amd64 Packages [606 B]                         
Get:27 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse amd64 Packages [158 kB]                   
Get:28 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse i386 Packages [147 kB]                    
Get:29 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse Translation-en [113 kB]                   
Get:30 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse amd64 DEP-11 Metadata [48.4 kB]           
Get:31 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse DEP-11 48x48 Icons [8931 B]               
Get:32 http://by.archive.ubuntu.com/ubuntu cosmic/multiverse DEP-11 64x64 Icons [218 kB]               
Get:33 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 Packages [91.5 kB]                
Get:34 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu cosmic/main i386 Packages [15.0 kB]        
Get:35 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main i386 Packages [83.7 kB]                 
Get:36 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main Translation-en [40.0 kB]                
Get:37 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 DEP-11 Metadata [91.4 kB]         
Get:38 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main DEP-11 48x48 Icons [18.0 kB]            
Get:39 http://by.archive.ubuntu.com/ubuntu cosmic-updates/main DEP-11 64x64 Icons [28.3 kB]            
Get:40 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe amd64 Packages [50.1 kB]            
Get:41 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe i386 Packages [50.1 kB]             
Get:42 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1126 B]                       
Get:43 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe Translation-en [28.7 kB]            
Get:44 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe amd64 DEP-11 Metadata [33.7 kB]     
Get:45 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe DEP-11 48x48 Icons [13.5 kB]        
Get:46 http://by.archive.ubuntu.com/ubuntu cosmic-updates/universe DEP-11 64x64 Icons [19.0 kB]        
Get:47 http://by.archive.ubuntu.com/ubuntu cosmic-updates/multiverse amd64 Packages [1172 B]           
Get:48 http://by.archive.ubuntu.com/ubuntu cosmic-updates/multiverse i386 Packages [1340 B]            
Get:49 http://by.archive.ubuntu.com/ubuntu cosmic-updates/multiverse Translation-en [632 B]            
Get:50 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe amd64 Packages [2888 B]           
Get:51 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe i386 Packages [2884 B]            
Get:52 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe Translation-en [1268 B]           
Get:53 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe amd64 DEP-11 Metadata [5812 B]    
Get:54 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe DEP-11 48x48 Icons [29 B]         
Get:55 http://by.archive.ubuntu.com/ubuntu cosmic-backports/universe DEP-11 64x64 Icons [29 B]         
Get:56 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu cosmic/main Translation-en [4944 B]        
Get:57 http://security.ubuntu.com/ubuntu cosmic-security/main amd64 Packages [58.0 kB]                 
Get:58 http://repo.steampowered.com/steam precise/steam i386 Packages [803 B]                          
Get:59 http://security.ubuntu.com/ubuntu cosmic-security/main i386 Packages [50.9 kB]                  
Get:60 http://security.ubuntu.com/ubuntu cosmic-security/main Translation-en [25.9 kB]                 
Get:61 http://security.ubuntu.com/ubuntu cosmic-security/main amd64 DEP-11 Metadata [204 B]            
Get:62 http://security.ubuntu.com/ubuntu cosmic-security/main DEP-11 48x48 Icons [29 B]                
Get:63 http://security.ubuntu.com/ubuntu cosmic-security/main DEP-11 64x64 Icons [29 B]                
Get:64 http://security.ubuntu.com/ubuntu cosmic-security/universe amd64 Packages [29.9 kB]             
Get:65 http://security.ubuntu.com/ubuntu cosmic-security/universe i386 Packages [29.8 kB]              
Get:66 http://security.ubuntu.com/ubuntu cosmic-security/universe Translation-en [18.0 kB]             
Get:67 http://security.ubuntu.com/ubuntu cosmic-security/universe amd64 DEP-11 Metadata [2456 B]       
Get:68 http://security.ubuntu.com/ubuntu cosmic-security/universe DEP-11 48x48 Icons [4031 B]          
Get:69 http://security.ubuntu.com/ubuntu cosmic-security/universe DEP-11 64x64 Icons [4058 B]          
Get:70 http://security.ubuntu.com/ubuntu cosmic-security/multiverse amd64 Packages [1172 B]            
Get:71 http://security.ubuntu.com/ubuntu cosmic-security/multiverse i386 Packages [1340 B]             
Get:72 http://security.ubuntu.com/ubuntu cosmic-security/multiverse Translation-en [632 B]             
Fetched 42.4 MB in 6s (6907 kB/s)                                                                      
Get:1 libpython3.6-minimal_3.6.7-1~18.10_amd64.deb [531 kB]                                            
Fetched 531 kB in 0s (0 B/s)                                                                           
Get:1 libsqlite3-0_3.24.0-1_amd64.deb [506 kB]                                                         
Fetched 506 kB in 0s (0 B/s)                                                                           
Get:1 libpython3.6-stdlib_3.6.7-1~18.10_amd64.deb [1708 kB]                                            
Fetched 1708 kB in 0s (0 B/s)                                                                          
Get:1 python3.6_3.6.7-1~18.10_amd64.deb [197 kB]                                                       
Fetched 197 kB in 0s (0 B/s)                                                                           
Get:1 python3_3.6.7-1~18.10_amd64.deb [47.2 kB]                                                        
Fetched 47.2 kB in 0s (0 B/s)                                                                          
Get:1 mime-support_3.60ubuntu1_all.deb [30.1 kB]                                                       
Fetched 30.1 kB in 0s (0 B/s)                                                                          
Get:1 libmpdec2_2.4.2-2_amd64.deb [84.1 kB]                                                            
Fetched 84.1 kB in 0s (0 B/s)                                                                          
Get:1 libncursesw6_6.1+20180210-4ubuntu1_amd64.deb [130 kB]                                            
Fetched 130 kB in 0s (0 B/s)                                                                           
Get:1 libexpat1_2.2.6-1_amd64.deb [87.2 kB]                                                            
Fetched 87.2 kB in 0s (0 B/s)                                                                          
Get:1 python3.6-minimal_3.6.7-1~18.10_amd64.deb [1606 kB]                                              
Fetched 1606 kB in 0s (0 B/s)                                                                          
Get:1 python3-minimal_3.6.7-1~18.10_amd64.deb [23.7 kB]                                                
Fetched 23.7 kB in 0s (0 B/s)                                                                          
Get:1 libtinfo6_6.1+20180210-4ubuntu1_amd64.deb [84.0 kB]                                              
Fetched 84.0 kB in 0s (0 B/s)                                                                          
Get:1 libpython3-stdlib_3.6.7-1~18.10_amd64.deb [7164 B]                                               
Fetched 7164 B in 0s (0 B/s)                                                                           
Get:1 libreadline7_7.0-5_amd64.deb [123 kB]                                                            
Fetched 123 kB in 0s (0 B/s)                                                                           
Get:1 libffi6_3.2.1-8_amd64.deb [17.9 kB]                                                              
Fetched 17.9 kB in 0s (0 B/s)                                                                          
Get:1 libssl1.1_1.1.1-1ubuntu2_amd64.deb [1296 kB]                                                     
Fetched 1296 kB in 0s (0 B/s)                                                                          
Pulling pss 
Cloning into '/home/techtonik/p/pss/parts/pss/src'...
done.
Fetching and installing pip...
Collecting pip
  Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 826kB/s 
  Saved ./parts/pss/python-packages/pip-18.1-py2.py3-none-any.whl
Successfully downloaded pip
Collecting pip
Installing collected packages: pip
Successfully installed pip-18.1
Traceback (most recent call last):
  File "/home/techtonik/p/pss/parts/pss/install/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/techtonik/p/pss/parts/pss/install/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 17, in <module>
    from pip._internal.locations import USER_CACHE_DIR, src_prefix
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/locations.py", line 10, in <module>
    from distutils import sysconfig as distutils_sysconfig
ImportError: cannot import name 'sysconfig'
Traceback (most recent call last):
  File "/home/techtonik/p/pss/parts/pss/install/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/techtonik/p/pss/parts/pss/install/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/cli/cmdoptions.py", line 17, in <module>
    from pip._internal.locations import USER_CACHE_DIR, src_prefix
  File "/home/techtonik/p/pss/parts/pss/install/lib/python3.6/site-packages/pip/_internal/locations.py", line 10, in <module>
    from distutils import sysconfig as distutils_sysconfig
ImportError: cannot import name 'sysconfig'
Failed to run '/home/techtonik/p/pss/parts/pss/install/usr/bin/python3 -m pip list': Exited with code 1.

I am not sure why pip doesn't work out of the box. pypa/pip#5367 is closed, but the bug is still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants