updates for pip3

This commit is contained in:
ingvar1995 2017-07-06 21:32:35 +03:00
parent c21e39b158
commit d06982b38a
3 changed files with 15 additions and 37 deletions

View file

@ -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/)
2. Install PyQt5: ``pip install pyqt5``
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>``.
5. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip)
6. Unpack archive
7. Download latest libtox.dll build, download latest libsodium.a build, put it into \src\libs\
8. Run \toxygen\main.py.
4. Install numpy: ``pip install numpy``
5. Install OpenCV: ``pip install opencv-python``
6. [Download toxygen](https://github.com/toxygen-project/toxygen/archive/master.zip)
7. Unpack archive
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``

View file

@ -8,13 +8,10 @@ import sys
version = program_version + '.0'
MODULES = ['PyQt5', 'PyAudio']
DEP_LINKS = []
MODULES = ['PyQt5', 'PyAudio', 'numpy']
if system() != 'Windows':
MODULES.append('numpy')
else:
DEP_LINKS = [] # TODO: add opencv wheel and numpy wheel
if system() == 'Windows':
MODULES.append('opencv-python')
class InstallScript(install):
@ -23,9 +20,7 @@ class InstallScript(install):
def run(self):
install.run(self)
try:
if system() == 'Windows':
call(["toxygen", "--configure"])
else:
if system() != 'Windows':
call(["toxygen", "--clean"])
except:
try:
@ -35,9 +30,7 @@ class InstallScript(install):
if path[-1] not in ('/', '\\'):
path += '/'
path += 'bin/toxygen'
if system() == 'Windows':
call([path, "--configure"])
else:
if system() != 'Windows':
call([path, "--clean"])
except:
pass
@ -53,7 +46,6 @@ setup(name='Toxygen',
license='GPL3',
packages=['toxygen', 'toxygen.plugins', 'toxygen.styles'],
install_requires=MODULES,
dependency_links=DEP_LINKS,
include_package_data=True,
classifiers=[
'Programming Language :: Python :: 3 :: Only',

View file

@ -457,22 +457,10 @@ def clean():
def configure():
"""Removes unused libs"""
d = curr_directory() + '/libs/'
is_64bits = is_64_bit()
if not is_64bits:
if os.path.exists(d + 'libtox64.dll'):
os.remove(d + 'libtox64.dll')
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():
@ -490,9 +478,6 @@ def main():
elif arg == '--help':
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version\ntoxygen --reset')
return
elif arg == '--configure':
configure()
return
elif arg == '--clean':
clean()
return