-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
92 lines (79 loc) · 2.8 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
85
86
87
88
89
90
91
92
# coding=utf-8
"""
usage:
(sudo) python setup.py +
install ... local
register ... at http://pypi.python.org/pypi
sdist ... create *.tar to be uploaded to pyPI
sdist upload ... build the package and upload in to pyPI
"""
#########################
import fancywidgets as package
#########################
from setuptools import setup, find_packages
import os
import sys
def read(*paths):
"""Build a file path from *paths* and return the contents."""
try:
f_name = os.path.join(*paths)
with open(f_name, 'r') as f:
return f.read()
except IOError:
print('%s not existing ... skipping' % f_name)
return ''
setup(
name=package.__name__,
version=package.__version__,
author=package.__author__,
author_email=package.__email__,
url=package.__url__,
license=package.__license__,
install_requires=[
"fancytools",
"pkginfo",
"qtpy"
#'pyqtgraph_karl', #optional
],
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: Other Audience',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Software Development :: Libraries :: Python Modules',
],
description=package.__doc__,
packages=find_packages(exclude=['tests*']),
include_package_data=True,
scripts=[] if not os.path.exists('bin') else [
os.path.join('bin', x) for x in os.listdir('bin')],
long_description=(
read('README.rst') + '\n\n' +
read('CHANGES.rst') + '\n\n' +
read('AUTHORS.rst')
),
)
# LAUNCHER NEEDS SOME WORK - UNTIL THATS DONE: DONT RUN THE FOLLOWING
INSTALL_QDESIGNER_STARTER = False
if INSTALL_QDESIGNER_STARTER:
if 'install' in sys.argv:
while True:
answer = raw_input(
'Do you want to a start menu entry for the QDesigner with included fancyWidgets plugins? [Y,N] ')
if answer.lower() in ('y', 'n', ''):
break
print("Please answer with 'Y' or 'N'")
if answer == 'Y':
from fancytools.os import PathStr, StartMenuEntry
prog_path = PathStr(
sys.executable).dirname().join(
'Scripts',
'fwdesigner.pyw')
print(
'create start menu entry for Fw_QtDesigner located in %s' %
prog_path)
StartMenuEntry('Fw_QtDesigner', prog_path).create()