Skip to content

Commit

Permalink
snap: use python3-apt stage-package
Browse files Browse the repository at this point in the history
Currently python3-apt package is not installable with pip without
a patch.  Switch to the stage-package, which has the benefit
of matching the base (and up-to-date).

pypa/pip#8654

Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
  • Loading branch information
Chris Patterson committed Jul 30, 2020
1 parent 8363e8e commit a6fa420
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PyYAML==5.3
pyxdg==0.26
requests==2.20.0
requests_unixsocket==0.1.5
http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt_1.6.5ubuntu0.2.tar.xz; sys_platform == 'linux'
https://launchpad.net/python-distutils-extra/trunk/2.39/+download/python-distutils-extra-2.39.tar.gz
requests-toolbelt==0.8.0
responses==0.5.1
Expand Down
2 changes: 2 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ parts:
plugin: python
requirements:
- requirements.txt
stage-packages:
- python3-apt
organize:
# Put snapcraftctl into its own directory that can be included in the PATH
# without including other binaries.
Expand Down
11 changes: 10 additions & 1 deletion spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ suites:
libxml2-dev \
libxslt-dev \
libyaml-dev \
python3-apt \
python3-venv \
python3-yaml \
python3.6-dev \
Expand All @@ -286,6 +287,14 @@ suites:
# shellcheck source=/dev/null
source "$HOME/venv/snapcraft/bin/activate"
pip install --upgrade pip wheel setuptools
# Install python-apt using pip 20.1, last known working version.
# https://github.com/pypa/pip/issues/8654
pip install --upgrade pip==20.1
pip install http://archive.ubuntu.com/ubuntu/pool/main/p/python-apt/python-apt_1.6.5ubuntu0.2.tar.xz
pip install --upgrade pip
# Install remaining snapcraft dependencies.
cd /snapcraft
pip install -r requirements.txt -r requirements-devel.txt codecov
pip install -e .
Expand Down Expand Up @@ -542,7 +551,7 @@ suites:
SNAPCRAFT_PACKAGE_TYPE: "snap"
prepare: |
apt-get update
apt-get install --yes gcc g++ make python3-dev python3-pip python3-wheel libffi-dev libsodium-dev libapt-pkg-dev squashfs-tools xdelta3 bzr git mercurial subversion libxml2-dev libxslt-dev
apt-get install --yes gcc g++ make python3-apt python3-dev python3-pip python3-wheel libffi-dev libsodium-dev libapt-pkg-dev squashfs-tools xdelta3 bzr git mercurial subversion libxml2-dev libxslt-dev
pip3 install --user --upgrade pip
$PIP_COMMAND install --user --upgrade wheel setuptools
$PIP_COMMAND install --user -r /snapcraft/requirements.txt -r /snapcraft/requirements-devel.txt
Expand Down
1 change: 1 addition & 0 deletions tools/environment-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ lxc exec snapcraft-dev -- apt install --yes \
libyaml-dev \
make \
patchelf \
python3-apt \
python3-dev \
python3-pip \
python3-venv \
Expand Down

0 comments on commit a6fa420

Please sign in to comment.