-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (57 loc) · 1.91 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
63
64
65
66
"""Define application dependencies and entry points."""
from os import path
from setuptools import find_packages, setup
cwd = path.abspath(path.dirname(__file__))
def find_version(file):
"""Read version number from source file."""
version = {}
try:
with open(path.join(cwd, file), "r") as f:
version_file = f.read()
except Exception:
raise RuntimeError(f"Unable to open '{file}' to get version.")
exec(version_file, version)
try:
version_str = version["__version__"]
except IndexError:
raise RuntimeError(f"Unable to get version from '{file}'")
return version_str
def get_long_description(readme_file):
"""Read long description from README file."""
try:
with open(path.join(cwd, readme_file), "r", encoding="utf-8") as fh:
return fh.read()
except Exception:
return ""
setup(
name="pyimgtool",
version=find_version("pyimgtool/version.py"),
author="Nick Murphy",
author_email="[email protected]",
description="Tool to help prep images for web sharing and printing",
long_description=get_long_description("README.md"),
long_description_content_type="text/markdown",
url="https://github.com/comfortablynick/pyimgtool",
packages=find_packages(),
include_package_data=True,
install_requires=[
"pillow",
"piexif",
"sty",
"opencv-python",
"numpy",
"plotille",
"matplotlib",
],
entry_points={"console_scripts": ["pyimgtool = pyimgtool.cli:main"]},
python_requires=">=3.7",
project_urls={
"Bug Reports": "https://github.com/comfortablynick/pyimgtool/issues",
"Source": "https://github.com/comfortablynick/pyimgtool",
},
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
],
)