-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
108 lines (91 loc) · 3.42 KB
/
setup.py
File metadata and controls
108 lines (91 loc) · 3.42 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import os
import re
from codecs import open
from distutils.core import setup
from setuptools import find_packages
_MODULE_NAME = "hfutils"
_PACKAGE_NAME = 'hfutils'
here = os.path.abspath(os.path.dirname(__file__))
meta = {}
with open(os.path.join(here, _MODULE_NAME, 'config', 'meta.py'), 'r', 'utf-8') as f:
exec(f.read(), meta)
def _load_req(file: str):
with open(file, 'r', 'utf-8') as f:
return [line.strip() for line in f.readlines() if line.strip()]
requirements = _load_req('requirements.txt')
_REQ_PATTERN = re.compile(r'^requirements-(\w+)\.txt$')
_REQ_BLACKLIST = {'zoo'}
group_requirements = {
item.group(1): _load_req(item.group(0))
for item in [_REQ_PATTERN.fullmatch(reqpath) for reqpath in os.listdir()] if item
if item.group(1) not in _REQ_BLACKLIST
}
with open('README.md', 'r', 'utf-8') as f:
readme = f.read()
setup(
# information
name=_PACKAGE_NAME,
version=meta['__VERSION__'],
packages=find_packages(include=(_MODULE_NAME, "%s.*" % _MODULE_NAME)),
package_data={
package_name: ['*.yaml', '*.yml', '*.json', '*.png']
for package_name in find_packages(include=('*'))
},
description=meta['__DESCRIPTION__'],
long_description=readme,
long_description_content_type='text/markdown',
author=meta['__AUTHOR__'],
author_email=meta['__AUTHOR_EMAIL__'],
license='Apache License, Version 2.0',
keywords='huggingface, download, upload, batch processing, data processing, machine learning, ai',
url='https://github.com/deepghs/hfutils',
# environment
python_requires=">=3.8",
install_requires=requirements,
tests_require=group_requirements['test'],
extras_require=group_requirements,
classifiers=[
'Development Status :: 5 - Production/Stable',
# Intended Audience
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: Information Technology',
# License
'License :: OSI Approved :: MIT License',
# Programming Language
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
# Operating System
'Operating System :: OS Independent',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS',
# Technical Topics
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet :: File Transfer Protocol (FTP)',
'Topic :: Utilities',
# Data Processing Features
'Typing :: Typed',
'Natural Language :: English'
],
entry_points={
'console_scripts': [
'hfutils=hfutils.entry:hfutilscli'
]
},
project_urls={
'Bug Reports': 'https://github.com/deepghs/hfutils/issues',
'Source': 'https://github.com/deepghs/hfutils',
'Documentation': 'https://hfutils.deepghs.org/',
},
)