-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
62 lines (46 loc) · 1.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
#!/usr/bin/env python
from distutils.core import setup
import os, sys
def check_dependencies():
""" Make sure we have python and pyQt with their
proper versions installed.
"""
# python
if sys.version_info < (3, 2, 0):
print('Sorry, sconcho needs python version 3.2 or later')
print("Python Version detected: %d.%d.%d" % sys.version_info[:3])
exit(5)
print("Python Version: %d.%d.%d" % sys.version_info[:3])
try:
from PyQt4.QtCore import qVersion
except ImportError as msg:
print('Sorry, please install PyQt4.')
print('Error: %s' % msg)
exit(1)
print("Found PyQt")
def get_symbol_files():
""" get a list of all symbol files.
NOTE: This is only one level deep!
"""
fileList = []
for root, subFolders, files in os.walk("sconcho/symbols"):
newRoot = root.replace("sconcho/","")
for aFile in files:
fileList.append(os.path.join(newRoot, aFile))
return fileList
if __name__ == "__main__":
check_dependencies()
dataFiles = get_symbol_files()
#make sure we copy the manual
dataFiles.append('doc/manual.html')
setup(name='sconcho',
version='0.2.0_b7',
description='Program for Generating Knitting Charts',
author='Markus Dittrich',
author_email='[email protected]',
url='http://sconcho.sourceforge.net/',
license='GNU GPLv3',
packages=['sconcho', 'sconcho.util', 'sconcho.gui'],
package_data = {'sconcho': dataFiles},
scripts=['sconcho.pyw']
)