-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
60 lines (50 loc) · 1.7 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
# -*- coding: utf-8 -*-
"""setup.py."""
import setuptools
def read_file(fname):
"""Read file and return the its content."""
with open(fname, "r") as f:
return f.read()
def get_attr(fname, attr):
"""Read file and return specific "attribute" content."""
lines = read_file(fname)
for line in lines.splitlines():
if line.startswith(attr):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find string.")
ver_file = "s3_client/__version__.py"
init_file = "s3_client/__init__.py"
setuptools.setup(
name=get_attr(init_file, "__name__"),
version=get_attr(ver_file, "__version__"),
description=get_attr(init_file, "__description__"),
author=get_attr(init_file, "__author__"),
url=get_attr(init_file, "__url__"),
license=get_attr(init_file, "__license__"),
long_description=read_file("README.md"),
long_description_content_type="text/markdown",
install_requires=read_file("requirements.txt").splitlines(),
packages=setuptools.find_packages(
exclude=(["tests", "*.tests", "*.tests.*", "tests.*"])
),
include_package_data=True,
classifiers=[
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Topic :: Software Development",
"Topic :: Terminals",
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
],
# flake8: noqa: E231
entry_points={
"console_scripts": [
"s3-client=s3_client.s3_client:main",
],
},
)
# vim: ts=4