Python site-packages are not found in core18 classic snaps
Bug #1815202 reported by
Martin Wimpress
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Invalid
|
Medium
|
Sergio Schvezov |
Bug Description
When creating a classic Python snap using core18 python modules in site-packages are not loadable. This can be worked around by adding the following environment:
environment:
PYTHONPATH: $PYTHONPATH:
Changed in snapcraft: | |
milestone: | none → 3.2 |
assignee: | nobody → Sergio Schvezov (sergiusens) |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in snapcraft: | |
status: | New → Incomplete |
Changed in snapcraft: | |
milestone: | 3.2 → none |
Changed in snapcraft: | |
status: | Incomplete → Invalid |
To post a comment you must log in.
I cannot seem to reproduce your issue. Mind adding more information or trying again? Here's what I tried out:
snapcraft-black # cat project/ snap/snapcraft. yaml
name: black
base: core18
version: git
summary: boo
description: boo
grade: devel
confinement: classic
apps:
black:
command: bin/black
parts: python3. 6/site- packages/ 40.8.0. dist-info 1.4.3.dist- info blib2to3 toml 10.0.dist- info 2.0.dist- info pip wheel 9b0-py3. 6.egg-info pip-19. 0.2.dist- info wheel-0. 32.3.dist- info 9b0.dist- info pkg_resources
black:
source: .
plugin: python
snapcraft-black # ls prime/lib/
Click-7.0.dist-info blackd.py setuptools-
appdirs-
appdirs.py click toml-0.
attr easy_install.py toml.py
attrs-18.
black-18.
black-18.
black.py setuptools
snapcraft-black # snap try prime --classic
black 0+git.250ba7f mounted from /root/prime
snapcraft-black # black --help
Usage: black [OPTIONS] [SRC]...
The uncompromising code formatter.
Options:
[ default: 88] cpy27|cpy33| cpy34|cpy35| cpy36|cpy37| cpy38]
Python versions that should be supported by
Black' s output. [default: per-file auto-
detection ]
input files. This will put trailing commas
in function signatures and calls also after
* args and **kwargs. [default: per-file
auto- detection]
regardles s of file extension (useful when
piping source on standard input). string- normalization
Don' t normalize string quotes or prefixes.
status. Return code 0 means nothing would
change. Return code 1 means some files
would be reformatted. Return code 123 means
there was an internal error.
diff for each file on stdout.
checks. [default: --safe]
directori es that should be included on
recursive searches. An empty value means
all files are included regardless of the
name. Use forward slashes for directories
on all platforms (Windows, too). Exclusions
...
-l, --line-length INTEGER How many characters per line to allow.
-t, --target-version [pypy35|
--py36 Allow using Python 3.6-only syntax on all
--pyi Format all input files like typing stubs
-S, --skip-
--check Don't write the files back, just return the
--diff Don't write the files back, just output a
--fast / --safe If --fast given, skip temporary sanity
--include TEXT A regular expression that matches files and