Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ numpy>=1.16.0
scipy>=1.1.0
torch>=1.1.0
torchvision>=0.3.0
opencv-python>= 3.4.2
opencv-python>=3.4.2
22 changes: 20 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import subprocess
import sys
import shutil
from setuptools import setup
from setuptools import find_namespace_packages, setup


def clean_repo():
Expand All @@ -13,6 +14,18 @@ def clean_repo():
if os.path.isdir(build_folder):
shutil.rmtree(build_folder, ignore_errors=True)

def pull_first():
"""This script is in a git directory that can be pulled."""
cwd = os.getcwd()
gitdir = os.path.dirname(os.path.realpath(__file__))
os.chdir(gitdir)
try:
subprocess.call(['git', 'lfs', 'pull'])
except subprocess.CalledProcessError:
raise RuntimeError("Make sure git-lfs is installed!")
os.chdir(cwd)

pull_first()

# Read version string
_version = None
Expand All @@ -33,7 +46,12 @@ def clean_repo():
'description': 'A collection of pretrained face detectors including S3FD and RetinaFace.',
'author': 'Jie Shen',
'author_email': 'js1907@imperial.ac.uk',
'packages': ['ibug.face_detection'],
'packages': find_namespace_packages(),
'package_data': {
'ibug.face_detection.s3fd.weights': ['*.pth'],
'ibug.face_detection.retina_face.weights': ['*.pth'],
'ibug.face_detection.utils.data': ['*.npy'],
},
'install_requires': ['numpy>=1.16.0', 'scipy>=1.1.0', 'torch>=1.1.0',
'torchvision>=0.3.0', 'opencv-python>= 3.4.2'],
'zip_safe': False
Expand Down