From c6a7e06d5a534c6172d9864bc4a193f46c989e7b Mon Sep 17 00:00:00 2001 From: boltgolt Date: Fri, 9 Nov 2018 12:43:10 +0100 Subject: [PATCH] Removinf dlib build from installation --- .travis.yml | 13 ++++++++----- debian/control | 2 +- debian/postinst | 8 ++++---- debian/preinst | 2 +- debian/prerm | 2 +- debian/rules | 3 --- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24f6411..2417750 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,18 @@ sudo: required language: python -python: - - "3.4" - - "3.6" +python: "3.6" install: # Install build tools and ack-grep for checks - - sudo apt install devscripts dh-make ack-grep -y + # - sudo apt install devscripts dh-make ack-grep -y script: # Build the binary (.deb) - debuild -i -us -uc -b - # Install the binary, also fireing the debian scripts + # Install the binary, running the debian scripts in the process - sudo apt install ../*.deb -y + # Confirm the face_recognition module has been installed correctly + - 'python3 -c "import face_recognition; print(\"OK\")" | ack-grep --passthru "OK"' # Check if the username passthough works correctly with sudo - 'howdy | ack-grep --passthru --color "current active user: travis"' - 'sudo howdy | ack-grep --passthru --color "current active user: travis"' @@ -27,3 +27,6 @@ notifications: addons: apt: update: true + packages: + - dh-make + - ack-grep diff --git a/debian/control b/debian/control index 0bf354c..117c8f7 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Vcs-Git: https://github.com/boltgolt/howdy Package: howdy Homepage: https://github.com/boltgolt/howdy Architecture: all -Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, build-essential, libpam-python, fswebcam, libopencv-dev, python-opencv, cmake +Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, libpam-python, fswebcam, libopencv-dev, python-opencv Description: Howdy: Windows Hello style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are. diff --git a/debian/postinst b/debian/postinst index 665b2f3..b80b0b9 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # Installation script to install howdy # Executed after primary apt install @@ -83,12 +83,12 @@ handleStatus(subprocess.call(["pip3 install --upgrade pip"], shell=True)) log("Cloning dlib") # Clone the dlib git to /tmp, but only the last commit -handleStatus(subprocess.call(["git", "clone", "--depth", "1", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"])) +# handleStatus(subprocess.call(["git", "clone", "--depth", "1", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"])) log("Building dlib") # Start the build without GPU -handleStatus(subprocess.call(["cd /tmp/dlib_clone/; python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA"], shell=True)) +# handleStatus(subprocess.call(["cd /tmp/dlib_clone/; python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA"], shell=True)) log("Cleaning up dlib") @@ -99,7 +99,7 @@ print("Temporary dlib files removed") log("Installing python dependencies") # Install face_recognition though pip -handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition_models==0.3.0", "Click>=6.0", "numpy", "Pillow"])) +handleStatus(subprocess.call(["pip3", "install", "--cache-dir", "/tmp/pip_howdy", "face_recognition_models==0.3.0", "Click>=6.0", "numpy", "Pillow", "dlib", "opencv-python"])) log("Installing face_recognition") diff --git a/debian/preinst b/debian/preinst index a918b1b..09dd0ae 100755 --- a/debian/preinst +++ b/debian/preinst @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # Used to check cameras before commiting to install # Executed before primary apt install of files diff --git a/debian/prerm b/debian/prerm index 542a63c..e0c5126 100755 --- a/debian/prerm +++ b/debian/prerm @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # Executed on deinstallation # Completely remove howdy from the system diff --git a/debian/rules b/debian/rules index 6d3bdcb..08b0880 100755 --- a/debian/rules +++ b/debian/rules @@ -6,6 +6,3 @@ include /usr/share/dpkg/default.mk %: dh $@ - -binary: - dh binary