-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
63 lines (53 loc) · 1.44 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from setuptools import find_packages, setup
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy as np
def readme():
with open('README.md') as f:
content = f.read()
return content
def find_version():
version_file = 'torchreid/__init__.py'
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']
def numpy_include():
try:
numpy_include = np.get_include()
except AttributeError:
numpy_include = np.get_numpy_include()
return numpy_include
ext_modules = [
Extension(
'torchreid.metrics.rank_cylib.rank_cy',
['torchreid/metrics/rank_cylib/rank_cy.pyx'],
include_dirs=[numpy_include()],
)
]
setup(
name='torchreid',
version=find_version(),
description='Pytorch framework for deep-learning person re-identification',
author='Kaiyang Zhou',
author_email='[email protected]',
license='MIT',
long_description=readme(),
url='https://github.com/KaiyangZhou/deep-person-reid',
packages=find_packages(),
install_requires=[
'numpy',
'Cython',
'h5py',
'Pillow',
'six',
'scipy>=1.0.0',
'torch>=0.4.1',
'torchvision>=0.2.1'
],
keywords=[
'Person Re-Identification',
'Deep Learning',
'Computer Vision'
],
ext_modules=cythonize(ext_modules)
)