-
Notifications
You must be signed in to change notification settings - Fork 44
/
setup.py
84 lines (73 loc) · 2.59 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
75
76
77
78
79
80
81
82
83
84
"""PyPI setup script
Script includes primary Python package along with essential
non-Python files, such as QML and .png resources.
Usage:
>>> python setup.py sdist
...
"""
import os
import imp
from setuptools import setup, find_packages
with open("README.txt") as f:
readme = f.read()
version_file = os.path.abspath("pyblish_qml/version.py")
version_mod = imp.load_source("version", version_file)
version = version_mod.version
# Collect non-python data as package data
qml_dir = os.path.abspath('pyblish_qml/qml')
qml_package_data = list()
for root, dirs, files in os.walk(qml_dir):
for suffix in ("ttf", "qml", "js", "txt", "png", "py", "otf"):
relpath = os.path.relpath(root, qml_dir)
relpath = relpath.replace("\\", "/")
qml_package_data.append("qml/" + relpath.strip(".") + "/*." + suffix)
# qmldir file has no suffix
qml_package_data.append(os.path.join("qml", "Pyblish", "qmldir"))
qml_package_data.append(os.path.join("qml", "Pyblish", "Graphs", "qmldir"))
qml_package_data.append(os.path.join("qml", "Pyblish", "ListItems", "qmldir"))
qml_package_data.append(os.path.join("qml", "Perspective", "qmldir"))
# icon file is in root dir
qml_package_data.append("icon.ico")
qml_package_data.append("splash.png")
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities"
]
setup(
name="pyblish-qml",
version=version,
description="Frontend for Pyblish written in PyQt5/QML",
long_description=readme,
author="Abstract Factory and Contributors",
author_email="[email protected]",
url="https://github.com/pyblish/pyblish-qml",
license="LGPL",
packages=find_packages(),
zip_safe=False,
classifiers=classifiers,
package_data={
"pyblish_qml": qml_package_data + [
"vendor/jsonschema/schemas/*.json"
],
"pyblish_qml.ipc": [
"schema/*.json",
]
},
install_requires=[
"pyblish-base>=1.5.3"
],
entry_points={},
)