-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
74 lines (65 loc) · 2.51 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
67
68
69
70
71
72
73
74
import sys
import os
import re
from setuptools import setup
# Python 3.6+ required
PYTHON_MINVER = (3, 6)
if sys.version_info < PYTHON_MINVER:
sys.exit("Python %s.%s or later is required.\n" % PYTHON_MINVER)
INSTALL_REQUIRES = [
"PyGObject",
"pycairo",
"humanize",
"attrs",
"psutil",
"sdnotify",
"requests",
"urllib3",
"pyyaml"
]
# Notes to self (IMMV):
# [Optional] Install build tools
# $ sudo apt install git build-essential pkg-config
# X11 requirements if console only system installed. Ex: Raspbian Lite
# $ sudo apt install xorg
# [Hardware/vendor specific] Install/configure display drivers and setup for X11
# Install the necessary Python3 environment and GTK+3 dependencies
# General python3 installation requirements
# $ sudo apt install python3-pip python3-dev python3-setuptools python3-virtualenv virtualenv
# Install system PyGObject, pycairo, pyyaml
# $ sudo apt install python3-yaml python3-gi python3-gi-cairo gir1.2-gtk-3.0
# Create and enter virtual environment
# $ virtualenv --python=python3 --system-site-packages venv
# $ source venv/bin/activate
# $ pip install pip --upgrade
# $ pip install --no-cache-dir octopyclient
# [testing repo]
# $ pip install --index-url https://test.pypi.org/simple/ --no-cache-dir --no-deps octopyclient
EXTRAS_REQUIRE = {}
version = re.search('^__version__\\s*=\\s*"(.*)"',
open('octopyclient/octopyclient.py').read(), re.M).group(1)
if 'DEBIAN_DESCRIPTION' in os.environ:
readmeDoc = os.environ['DEBIAN_DESCRIPTION']
else:
readmeDoc = "README.md"
with open(readmeDoc, "r") as fh:
readme = fh.read()
setup(
name="OctoPyClient", version=version,
packages=['octopyclient', 'octopyclient/octorest', 'octopyclient/panels'],
package_data={'octopyclient': ["styles/*", "styles/images/*"]},
install_requires=INSTALL_REQUIRES, extras_require=EXTRAS_REQUIRE,
author="Ted Hess", author_email="[email protected]", license="LICENSE",
maintainer="Ted Hess", maintainer_email="[email protected]",
url="https://github.com/thess/OctoPyClient",
description="OctoPyClient - A touchscreen client for OctoPrint",
long_description=readme,
long_description_content_type="text/markdown",
entry_points={'console_scripts': ['octopyclient = octopyclient.octopyclient:main']},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6'
)