kopia lustrzana https://github.com/OpenDroneMap/ODM
Add PYTHONPATH environment variable to snapcraft.yaml
This fixes #1438: `encodings` module not found The variable replaces the `sitecustomize.py` file from `snap/local` because it is no-longer functional due to changes in snapcraft.pull/1527/head
rodzic
775820c957
commit
5ab34603a6
|
@ -1,22 +0,0 @@
|
|||
import site
|
||||
import os
|
||||
|
||||
snap_dir = os.getenv("SNAP")
|
||||
snapcraft_stage_dir = os.getenv("SNAPCRAFT_STAGE")
|
||||
snapcraft_part_install = os.getenv("SNAPCRAFT_PART_INSTALL")
|
||||
|
||||
# Do not include snap_dir during builds as this will include
|
||||
# snapcraft's in-snap site directory.
|
||||
if snapcraft_stage_dir is not None and snapcraft_part_install is not None:
|
||||
site_directories = [snapcraft_stage_dir, snapcraft_part_install]
|
||||
else:
|
||||
superbuild_dir = os.path.join(snap_dir, 'odm/SuperBuild/install')
|
||||
site_directories = [snap_dir, superbuild_dir]
|
||||
|
||||
for d in site_directories:
|
||||
if d:
|
||||
site_dir = os.path.join(d, "lib/python3.8/site-packages")
|
||||
site.addsitedir(site_dir)
|
||||
|
||||
if snap_dir:
|
||||
site.ENABLE_USER_SITE = False
|
|
@ -209,6 +209,7 @@ apps:
|
|||
environment:
|
||||
# Ensure libraries are found
|
||||
LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$LD_LIBRARY_PATH
|
||||
PYTHONPATH: $SNAP/odm/SuperBuild/install:$SNAP/lib/python3.8/site-packages:$SNAP/usr/lib/python3/dist-packages/:$SNAP/usr/lib/python3.8
|
||||
plugs:
|
||||
- home
|
||||
- network
|
||||
|
|
Ładowanie…
Reference in New Issue