os x and freebsd support (untested)
This commit is contained in:
parent
af5db43248
commit
08ef8294df
3 changed files with 23 additions and 15 deletions
23
setup.py
23
setup.py
|
@ -7,10 +7,15 @@ from toxygen.util import program_version
|
|||
|
||||
version = program_version + '.0'
|
||||
|
||||
MODULES = ['PyAudio']
|
||||
MODULES = []
|
||||
|
||||
if system() == 'Windows':
|
||||
MODULES.append('PySide')
|
||||
if system() in ('Windows', 'Darwin'):
|
||||
MODULES = ['PyAudio', 'PySide']
|
||||
else:
|
||||
try:
|
||||
import pyaudio
|
||||
except ImportError:
|
||||
MODULES = ['PyAudio']
|
||||
|
||||
|
||||
class InstallScript(install):
|
||||
|
@ -18,11 +23,13 @@ class InstallScript(install):
|
|||
|
||||
def run(self):
|
||||
install.run(self)
|
||||
OS = system()
|
||||
if OS == 'Windows':
|
||||
call(["toxygen", "--configure"])
|
||||
elif OS == 'Linux':
|
||||
call(["toxygen", "--clean"])
|
||||
try:
|
||||
if system() == 'Windows':
|
||||
call(["toxygen", "--configure"])
|
||||
else:
|
||||
call(["toxygen", "--clean"])
|
||||
except:
|
||||
pass
|
||||
|
||||
setup(name='Toxygen',
|
||||
version=version,
|
||||
|
|
|
@ -8,6 +8,7 @@ try:
|
|||
from PySide import QtCore
|
||||
except ImportError:
|
||||
from PyQt4 import QtCore
|
||||
QtCore.Signal = QtCore.pyqtSignal
|
||||
|
||||
# TODO: threads!
|
||||
|
||||
|
@ -34,10 +35,8 @@ ALLOWED_FILES = ('toxygen_inline.png', 'utox-inline.png', 'sticker.png')
|
|||
|
||||
|
||||
class StateSignal(QtCore.QObject):
|
||||
try:
|
||||
signal = QtCore.Signal(int, float, int) # state and progress
|
||||
except:
|
||||
signal = QtCore.pyqtSignal(int, float, int) # state and progress - pyqt4
|
||||
|
||||
signal = QtCore.Signal(int, float, int) # state and progress
|
||||
|
||||
|
||||
class FileTransfer(QtCore.QObject):
|
||||
|
|
|
@ -204,10 +204,12 @@ class Settings(dict, Singleton):
|
|||
|
||||
@staticmethod
|
||||
def get_default_path():
|
||||
if system() == 'Linux':
|
||||
return os.getenv('HOME') + '/.config/tox/'
|
||||
elif system() == 'Windows':
|
||||
if system() == 'Windows':
|
||||
return os.getenv('APPDATA') + '/Tox/'
|
||||
elif system() == 'Darwin':
|
||||
return os.getenv('HOME') + '/Library/Application Support/Tox/'
|
||||
else:
|
||||
return os.getenv('HOME') + '/.config/tox/'
|
||||
|
||||
|
||||
class ProfileHelper(Singleton):
|
||||
|
|
Loading…
Reference in a new issue