This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
forked from KaiyangZhou/deep-person-reid
-
Notifications
You must be signed in to change notification settings - Fork 17
/
setup.py
62 lines (50 loc) · 1.68 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
# Copyright (c) 2018-2021 Kaiyang Zhou
# SPDX-License-Identifier: MIT
#
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import os.path as osp
from setuptools import setup, Extension, find_packages
import numpy as np
repo_root = osp.dirname(osp.realpath(__file__))
def readme():
with open(osp.join(repo_root, 'README.rst')) as f:
content = f.read()
return content
def find_version():
version_file = osp.join(repo_root, 'torchreid/version.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
def get_requirements(filename):
requires = []
links = []
with open(osp.join(repo_root, filename), 'r') as f:
for line in f.readlines():
line = line.replace('\n', '')
if '-f http' in line:
links.append(line)
else:
requires.append(line)
return requires, links
packages, links = get_requirements('requirements.txt')
setup(
name='torchreid',
version=find_version(),
description='A library for deep learning object re-ID and classification in PyTorch',
author='Kaiyang Zhou, Intel Corporation',
license='Apache-2.0',
long_description=readme(),
url='https://github.com/openvinotoolkit/deep-object-reid',
dependency_links=links,
packages=find_packages(),
install_requires=packages,
keywords=['Object Re-Identification', 'Image Classification', 'Deep Learning', 'Computer Vision'],
)