fixes
This commit is contained in:
parent
99136cd4e3
commit
68f28fdac5
39 changed files with 219 additions and 285 deletions
62
setup.py
62
setup.py
|
|
@ -1,45 +1,15 @@
|
|||
from setuptools import setup
|
||||
from setuptools.command.install import install
|
||||
from platform import system
|
||||
from subprocess import call
|
||||
import main
|
||||
import sys
|
||||
import os
|
||||
from utils.util import curr_directory, join_path
|
||||
from setuptools import setup
|
||||
from setuptools.command.install import install
|
||||
|
||||
version = '1.0.0'
|
||||
|
||||
version = main.__version__ + '.0'
|
||||
|
||||
|
||||
if system() == 'Windows':
|
||||
MODULES = ['PyQt5', 'PyAudio', 'numpy', 'opencv-python', 'pydenticon', 'cv2']
|
||||
else:
|
||||
MODULES = ['pydenticon']
|
||||
MODULES.append('PyQt5')
|
||||
try:
|
||||
import pyaudio
|
||||
except ImportError:
|
||||
MODULES.append('PyAudio')
|
||||
try:
|
||||
import numpy
|
||||
except ImportError:
|
||||
MODULES.append('numpy')
|
||||
try:
|
||||
import cv2
|
||||
except ImportError:
|
||||
MODULES.append('opencv-python')
|
||||
try:
|
||||
import coloredlogs
|
||||
except ImportError:
|
||||
MODULES.append('coloredlogs')
|
||||
try:
|
||||
import pyqtconsole
|
||||
except ImportError:
|
||||
MODULES.append('pyqtconsole')
|
||||
|
||||
MODULES = ['argparse', 'PyQt5', 'PyAudio', 'numpy', 'opencv-python', 'cv2',
|
||||
'pydenticon', 'pyqtconsole', 'toxygen_wrapper'] # qweechat
|
||||
|
||||
def get_packages():
|
||||
directory = join_path(curr_directory(__file__), 'toxygen')
|
||||
directory = os.path.join(os.path.dirname(__file__), 'tox_wrapper')
|
||||
for root, dirs, files in os.walk(directory):
|
||||
packages = map(lambda d: 'toxygen.' + d, dirs)
|
||||
packages = ['toxygen'] + list(packages)
|
||||
|
|
@ -50,22 +20,6 @@ class InstallScript(install):
|
|||
|
||||
def run(self):
|
||||
install.run(self)
|
||||
try:
|
||||
if system() != 'Windows':
|
||||
call(["toxygen", "--clean"])
|
||||
except:
|
||||
try:
|
||||
params = list(filter(lambda x: x.startswith('--prefix='), sys.argv))
|
||||
if params:
|
||||
path = params[0][len('--prefix='):]
|
||||
if path[-1] not in ('/', '\\'):
|
||||
path += '/'
|
||||
path += 'bin/toxygen'
|
||||
if system() != 'Windows':
|
||||
call([path, "--clean"])
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
setup(name='Toxygen',
|
||||
version=version,
|
||||
|
|
@ -81,13 +35,13 @@ setup(name='Toxygen',
|
|||
include_package_data=True,
|
||||
classifiers=[
|
||||
'Programming Language :: Python :: 3 :: Only',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': ['toxygen=toxygen.main:main']
|
||||
},
|
||||
cmdclass={
|
||||
'install': InstallScript
|
||||
'install': InstallScript,
|
||||
},
|
||||
zip_safe=False
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue