1 import os
2 import subprocess
3 import setuptools
5 def git_hash():
6 if os.path.exists('.git'):
7 hash = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip()
8 return hash[:7] if (hash is not None) else None
9 else:
10 return None
11 #
13 def get_version():
14 from version import __version__
15 hash = git_hash()
16 version_str = __version__ + '+' + hash.strip().decode('ascii') if (hash is not None) else __version__
17 return version_str
19 if __name__ == '__main__':
20 version_str = get_version()
22 long_description = ''
23 with open('README.md') as readme:
24 long_description = readme.read()
26 setuptools.setup(
27 name = 'pytorch-jacinto-ai',
28 version = get_version(),
29 description = 'Jacinto AI DevKit (PyTorch Version)',
30 long_description = long_description,
31 long_description_content_type = 'text/markdown',
32 url = 'http://git.ti.com/jacinto-ai/pytorch-jacinto-ai',
33 author = 'Jacinto AI DevKit Team',
34 author_email = 'jacinto-ai@list.ti.com',
35 classifiers = [
36 'Development Status :: 4 - Beta'
37 'Programming Language :: Pyuthon :: 3.7'
38 ],
39 keywords = 'artifical intelligence, deep learning, image classification, object detection, semantic segmentation, quantization',
40 #packages=[setuptools.find_packages(exclude=[])] #do not have sub packages
41 python_requires = '>=3.7',
42 install_requires = [],
43 package_dir = {'':'modules'},
44 package_data = {'':['*.txt']},
45 project_urls = {
46 'Source': 'http://git.ti.com/jacinto-ai/pytorch-jacinto-ai',
47 'Bug Reports': 'http://e2e.ti.com/search?q=J7&category=forum',
48 },
49 )