From f4c7e9b4312d37755f6065f74056cc666fc1ccf5 Mon Sep 17 00:00:00 2001 From: Dag Heyman Date: Fri, 21 Feb 2020 08:49:02 +0100 Subject: [PATCH] snap: use a local patch for pyscard --- .github/workflows/snap-pyscard-patch.patch | 22 ++++++++++++++++++++++ snap/snapcraft.yaml | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/snap-pyscard-patch.patch diff --git a/.github/workflows/snap-pyscard-patch.patch b/.github/workflows/snap-pyscard-patch.patch new file mode 100644 index 00000000..abb39c0a --- /dev/null +++ b/.github/workflows/snap-pyscard-patch.patch @@ -0,0 +1,22 @@ +From 6dd501199c1323a49f2e64e75c886a1d0b652577 Mon Sep 17 00:00:00 2001 +From: Dag Heyman +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'] + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index fcdf026c..c878422d 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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