Skip to content

Commit

Permalink
snap: use a newer PyYAML and drop patches (#2274)
Browse files Browse the repository at this point in the history
LP: #1792592

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
  • Loading branch information
sergiusens committed Sep 15, 2018
1 parent 65ba888 commit ca9d121
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
27 changes: 0 additions & 27 deletions patches/pyyaml-support-high-codepoints.diff

This file was deleted.

3 changes: 1 addition & 2 deletions requirements.txt
Expand Up @@ -4,9 +4,8 @@ docopt==0.6.2
jsonschema==2.5.1
paramiko==2.4.1
progressbar33==2.4
PyYAML==3.11; sys_platform == 'linux'
http://pyyaml.org/download/pyyaml/PyYAML-3.13-cp35-cp35m-win_amd64.whl; sys_platform == 'win32'
PyYAML==3.13; sys_platform == 'darwin'
PyYAML==3.13; sys_platform != 'win32'
pyxdg==0.25
requests==2.9.1
requests_unixsocket==0.1.5
Expand Down
9 changes: 0 additions & 9 deletions snap/snapcraft.yaml
Expand Up @@ -67,21 +67,12 @@ parts:
PYTHON_PACKAGE_PATH="$SNAPCRAFT_PART_INSTALL/usr/lib/python3.5/"
[ -f "patched/ctypes/__init__.py.orig" ] && mv "patched/ctypes/__init__.py.orig" "$PYTHON_PACKAGE_PATH/ctypes/__init__.py"
SITE_PACKAGES_PATH="$SNAPCRAFT_PART_INSTALL/lib/python3.5/site-packages"
[ -f "patched/yaml/emitter.py.orig" ] && mv "patched/yaml/emitter.py.orig" "$SITE_PACKAGES_PATH/yaml/emitter.py"
[ -f "patched/yaml/reader.py.orig" ] && mv "patched/yaml/reader.py.orig" "$SITE_PACKAGES_PATH/yaml/reader.py"
# Apply patches
patch -b "$PYTHON_PACKAGE_PATH/ctypes/__init__.py" patches/ctypes_init.diff
patch -b -d "$SITE_PACKAGES_PATH/" -p1 < patches/pyyaml-support-high-codepoints.diff
# Save patches to allow rebuilding
mkdir -p patched/ctypes
[ -f "$PYTHON_PACKAGE_PATH/ctypes/__init__.py.orig" ] && mv "$PYTHON_PACKAGE_PATH/ctypes/__init__.py.orig" patched/ctypes
mkdir -p patched/yaml
[ -f "$SITE_PACKAGES_PATH/yaml/emitter.py.orig" ] && mv "$SITE_PACKAGES_PATH/yaml/emitter.py.orig" patched/yaml
[ -f "$SITE_PACKAGES_PATH/yaml/reader.py.orig" ] && mv "$SITE_PACKAGES_PATH/yaml/reader.py.orig" patched/yaml
override-prime: |
snapcraftctl prime
# Now that everything is built, let's disable user site-packages
Expand Down

0 comments on commit ca9d121

Please sign in to comment.