snap: use a local patch for pyscard

This commit is contained in:
Dag Heyman 2020-02-21 08:49:02 +01:00
parent 608386a03f
commit f4c7e9b431
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338
2 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,22 @@
From 6dd501199c1323a49f2e64e75c886a1d0b652577 Mon Sep 17 00:00:00 2001
From: Dag Heyman <dag@yubico.com>
Date: Thu, 20 Feb 2020 18:05:59 +0100
Subject: [PATCH] setup.py: add typical snapcraft location of PCSC
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 939e60f..ba54c7c 100755
--- a/setup.py
+++ b/setup.py
@@ -76,7 +76,7 @@
platform_swig_opts = ['-DPCSCLITE']
platform_sources = []
platform_libraries = []
- platform_include_dirs = ['/usr/include/PCSC', '/usr/local/include/PCSC']
+ platform_include_dirs = ['/root/stage/usr/include/PCSC']
platform_extra_compile_args = [] # ['-ggdb', '-O0']
platform_extra_link_args = [] # ['-ggdb']

View File

@ -110,7 +110,12 @@ parts:
override-build: |
eval "$(pyenv init -)"
pyenv global 3.8.1
pip3 install git+git://github.com/dagheyman/pyscard.git#egg=pyscard
pip3 download --no-binary :all: pyscard
tar -xvf pyscard*
cd pyscard*
patch setup.py ../.github/workflows/snap-pyscard-patch.patch
pip3 install .
cd ..
pip3 install -r requirements.txt
override-stage: |
snapcraftctl stage