Compile python and drop environment dictionary
Classic python snaps require python to be compiled from source. Additionaly, move away from using the environment dictionary until it is fully supported by snapd. Finally, use a fixed python path in order to get the correct site-specific config. These changes were recommended in the following bug: https://bugs.launchpad.net/snapcraft/+bug/1675479 Change-Id: I61be2595bd063f9d7605450e556066b9d72cc90f
This commit is contained in:
parent
8d576d0abb
commit
afc99a1e8c
|
@ -27,7 +27,7 @@ setup:
|
|||
"{snap}/etc/nginx/": "/etc/nginx/keystone"
|
||||
entry_points:
|
||||
keystone-manage:
|
||||
binary: keystone-manage
|
||||
binary: "{snap}/bin/keystone-manage"
|
||||
config-files:
|
||||
- "/etc/keystone/keystone.conf"
|
||||
config-dirs:
|
||||
|
|
|
@ -6,6 +6,6 @@ master = true
|
|||
enable-threads = true
|
||||
processes = 4
|
||||
thunder-lock = true
|
||||
plugins = python
|
||||
lazy-apps = true
|
||||
pyargv = --config-file=/etc/keystone/keystone.conf --config-dir=/etc/keystone/conf.d --log-file=/var/log/keystone/keystone.log
|
||||
home = {{ snap }}/usr
|
||||
|
|
|
@ -6,6 +6,6 @@ master = true
|
|||
enable-threads = true
|
||||
processes = 4
|
||||
thunder-lock = true
|
||||
plugins = python
|
||||
lazy-apps = true
|
||||
pyargv = --config-file=/etc/keystone/keystone.conf --config-dir=/etc/keystone/conf.d --log-file=/var/log/keystone/keystone.log
|
||||
home = {{ snap }}/usr
|
||||
|
|
|
@ -9,23 +9,26 @@ description: |
|
|||
confinement: classic
|
||||
grade: devel
|
||||
|
||||
environment:
|
||||
PATH: $PATH:$SNAP/bin/:$SNAP/usr/sbin
|
||||
PYTHONPATH: $PYTHONPATH:$SNAP/lib/python2.7/site-packages
|
||||
LD_LIBRARY_PATH: $SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||
|
||||
apps:
|
||||
uwsgi:
|
||||
command: snap-openstack keystone-uwsgi
|
||||
command: >
|
||||
env PYTHONPATH=$PYTHONPATH:$SNAP/lib/python2.7/site-packages
|
||||
$SNAP/usr/bin/python2 $SNAP/bin/snap-openstack keystone-uwsgi
|
||||
daemon: simple
|
||||
nginx:
|
||||
command: snap-openstack keystone-nginx
|
||||
command: >
|
||||
env PYTHONPATH=$PYTHONPATH:$SNAP/lib/python2.7/site-packages
|
||||
LD_LIBRARY_PATH=$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
|
||||
$SNAP/usr/bin/python2 $SNAP/bin/snap-openstack keystone-nginx
|
||||
daemon: forking
|
||||
manage:
|
||||
command: snap-openstack keystone-manage
|
||||
command: >
|
||||
env PYTHONPATH=$PYTHONPATH:$SNAP/lib/python2.7/site-packages
|
||||
$SNAP/usr/bin/python2 $SNAP/bin/snap-openstack keystone-manage
|
||||
|
||||
parts:
|
||||
keystone:
|
||||
after: [python]
|
||||
plugin: python
|
||||
python-version: python2
|
||||
source: http://tarballs.openstack.org/keystone/keystone-master.tar.gz
|
||||
|
@ -39,6 +42,11 @@ parts:
|
|||
- libffi-dev
|
||||
- libssl-dev
|
||||
stage-packages: [nginx]
|
||||
stage:
|
||||
- -usr/bin/2to3
|
||||
- -usr/bin/pydoc
|
||||
- -usr/bin/python2.7
|
||||
- -usr/lib/python2.7
|
||||
install:
|
||||
touch $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/paste/__init__.py
|
||||
touch $SNAPCRAFT_PART_INSTALL/lib/python2.7/site-packages/repoze/__init__.py
|
||||
|
@ -63,3 +71,16 @@ parts:
|
|||
- etc/keystone/*.templates
|
||||
stage: [$etc]
|
||||
snap: [$etc]
|
||||
python:
|
||||
source: https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
|
||||
plugin: autotools
|
||||
configflags:
|
||||
- --prefix=/usr
|
||||
- --enable-shared
|
||||
- --enable-unicode=ucs4
|
||||
build-packages:
|
||||
- libssl-dev
|
||||
prime:
|
||||
- -usr/include
|
||||
install:
|
||||
$SNAPCRAFT_PART_INSTALL/usr/bin/python2 -m ensurepip
|
||||
|
|
Loading…
Reference in New Issue