updates for pip3
This commit is contained in:
parent
c21e39b158
commit
d06982b38a
3 changed files with 15 additions and 37 deletions
|
@ -37,11 +37,12 @@ Note: 32-bit Python isn't supported due to bug with videocalls. It is strictly r
|
||||||
1. [Download and install latest Python 3 64-bit](https://www.python.org/downloads/windows/)
|
1. [Download and install latest Python 3 64-bit](https://www.python.org/downloads/windows/)
|
||||||
2. Install PyQt5: ``pip install pyqt5``
|
2. Install PyQt5: ``pip install pyqt5``
|
||||||
3. Install PyAudio: ``pip install pyaudio``
|
3. Install PyAudio: ``pip install pyaudio``
|
||||||
4. Download [numpy](http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) and [OpenCV](http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv). Install it using ``pip install <file_name>``.
|
4. Install numpy: ``pip install numpy``
|
||||||
5. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip)
|
5. Install OpenCV: ``pip install opencv-python``
|
||||||
6. Unpack archive
|
6. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip)
|
||||||
7. Download latest libtox.dll build, download latest libsodium.a build, put it into \src\libs\
|
7. Unpack archive
|
||||||
8. Run \toxygen\main.py.
|
8. Download latest libtox.dll build, download latest libsodium.a build, put it into \src\libs\
|
||||||
|
9. Run \toxygen\main.py.
|
||||||
|
|
||||||
Optional: install toxygen using setup.py: ``python setup.py install``
|
Optional: install toxygen using setup.py: ``python setup.py install``
|
||||||
|
|
||||||
|
|
18
setup.py
18
setup.py
|
@ -8,13 +8,10 @@ import sys
|
||||||
|
|
||||||
version = program_version + '.0'
|
version = program_version + '.0'
|
||||||
|
|
||||||
MODULES = ['PyQt5', 'PyAudio']
|
MODULES = ['PyQt5', 'PyAudio', 'numpy']
|
||||||
DEP_LINKS = []
|
|
||||||
|
|
||||||
if system() != 'Windows':
|
if system() == 'Windows':
|
||||||
MODULES.append('numpy')
|
MODULES.append('opencv-python')
|
||||||
else:
|
|
||||||
DEP_LINKS = [] # TODO: add opencv wheel and numpy wheel
|
|
||||||
|
|
||||||
|
|
||||||
class InstallScript(install):
|
class InstallScript(install):
|
||||||
|
@ -23,9 +20,7 @@ class InstallScript(install):
|
||||||
def run(self):
|
def run(self):
|
||||||
install.run(self)
|
install.run(self)
|
||||||
try:
|
try:
|
||||||
if system() == 'Windows':
|
if system() != 'Windows':
|
||||||
call(["toxygen", "--configure"])
|
|
||||||
else:
|
|
||||||
call(["toxygen", "--clean"])
|
call(["toxygen", "--clean"])
|
||||||
except:
|
except:
|
||||||
try:
|
try:
|
||||||
|
@ -35,9 +30,7 @@ class InstallScript(install):
|
||||||
if path[-1] not in ('/', '\\'):
|
if path[-1] not in ('/', '\\'):
|
||||||
path += '/'
|
path += '/'
|
||||||
path += 'bin/toxygen'
|
path += 'bin/toxygen'
|
||||||
if system() == 'Windows':
|
if system() != 'Windows':
|
||||||
call([path, "--configure"])
|
|
||||||
else:
|
|
||||||
call([path, "--clean"])
|
call([path, "--clean"])
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -53,7 +46,6 @@ setup(name='Toxygen',
|
||||||
license='GPL3',
|
license='GPL3',
|
||||||
packages=['toxygen', 'toxygen.plugins', 'toxygen.styles'],
|
packages=['toxygen', 'toxygen.plugins', 'toxygen.styles'],
|
||||||
install_requires=MODULES,
|
install_requires=MODULES,
|
||||||
dependency_links=DEP_LINKS,
|
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python :: 3 :: Only',
|
'Programming Language :: Python :: 3 :: Only',
|
||||||
|
|
|
@ -457,22 +457,10 @@ def clean():
|
||||||
def configure():
|
def configure():
|
||||||
"""Removes unused libs"""
|
"""Removes unused libs"""
|
||||||
d = curr_directory() + '/libs/'
|
d = curr_directory() + '/libs/'
|
||||||
is_64bits = is_64_bit()
|
if os.path.exists(d + 'libtox.dll'):
|
||||||
if not is_64bits:
|
os.remove(d + 'libtox.dll')
|
||||||
if os.path.exists(d + 'libtox64.dll'):
|
if os.path.exists(d + 'libsodium.a'):
|
||||||
os.remove(d + 'libtox64.dll')
|
os.remove(d + 'libsodium.a')
|
||||||
if os.path.exists(d + 'libsodium64.a'):
|
|
||||||
os.remove(d + 'libsodium64.a')
|
|
||||||
else:
|
|
||||||
if os.path.exists(d + 'libtox.dll'):
|
|
||||||
os.remove(d + 'libtox.dll')
|
|
||||||
if os.path.exists(d + 'libsodium.a'):
|
|
||||||
os.remove(d + 'libsodium.a')
|
|
||||||
try:
|
|
||||||
os.rename(d + 'libtox64.dll', d + 'libtox.dll')
|
|
||||||
os.rename(d + 'libsodium64.a', d + 'libsodium.a')
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
|
@ -490,9 +478,6 @@ def main():
|
||||||
elif arg == '--help':
|
elif arg == '--help':
|
||||||
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version\ntoxygen --reset')
|
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version\ntoxygen --reset')
|
||||||
return
|
return
|
||||||
elif arg == '--configure':
|
|
||||||
configure()
|
|
||||||
return
|
|
||||||
elif arg == '--clean':
|
elif arg == '--clean':
|
||||||
clean()
|
clean()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue