-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
58 lines (52 loc) · 2.14 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
import setuptools
import os
from pkg_resources import parse_requirements
def load_requirements(fname: str) -> list:
"""
This allows us to store all project requirements in `requirements*.txt`
files, lots of people are used to. And here in setup.py we dynamically
read them from txt-files to avoid duplication.
"""
requirements = []
with open(fname, 'r') as fp:
for req in parse_requirements(fp.read()):
extras = '[{}]'.format(','.join(req.extras)) if req.extras else ''
requirements.append(
'{}{}{}'.format(req.name, extras, req.specifier)
)
return requirements
if __name__ == "__main__":
SETUP_CWD = os.path.dirname(os.path.abspath(__file__))
README = open(os.path.join(SETUP_CWD, 'README.md')).read()
setuptools.setup(
# metadata
name = 'yadiskapi',
version = '0.0.1',
author = 'Yuriy Zemskov',
author_email = 'zemskyura@gmail.com',
license = 'MIT',
license_files = ('LICENSE',),
description = 'your description here',
long_description = README,
long_description_content_type = "text/markdown; charset=UTF-8",
url = 'https://github.com/kilgoretrout1985/yadiskapi-shbr',
platforms = 'unix, linux, osx, cygwin, win32',
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
# options
python_requires = '>=3.9',
# packages = find_packages(exclude=['tests']),
packages = ['yadiskapi'],
include_package_data = True,
# for package_data see MANIFEST.in file
package_dir = {'': 'src'},
install_requires = load_requirements(os.path.join(SETUP_CWD, 'requirements.txt')),
extras_require = {'dev': load_requirements(os.path.join(SETUP_CWD, 'requirements.dev.txt'))}
)