mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Fix setup.py for source distributions
This commit is contained in:
parent
127e5f70d8
commit
3585fb8cc6
3
setup.py
3
setup.py
|
@ -18,7 +18,6 @@ from os import path
|
|||
# Always prefer setuptools over distutils
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from telethon_generator.tl_generator import TLGenerator
|
||||
try:
|
||||
from telethon import TelegramClient
|
||||
except ImportError:
|
||||
|
@ -27,6 +26,7 @@ except ImportError:
|
|||
|
||||
if __name__ == '__main__':
|
||||
if len(argv) >= 2 and argv[1] == 'gen_tl':
|
||||
from telethon_generator.tl_generator import TLGenerator
|
||||
generator = TLGenerator('telethon/tl')
|
||||
if generator.tlobjects_exist():
|
||||
print('Detected previous TLObjects. Cleaning...')
|
||||
|
@ -39,6 +39,7 @@ if __name__ == '__main__':
|
|||
print('Done.')
|
||||
|
||||
elif len(argv) >= 2 and argv[1] == 'clean_tl':
|
||||
from telethon_generator.tl_generator import TLGenerator
|
||||
print('Cleaning...')
|
||||
TLGenerator('telethon/tl').clean_tlobjects()
|
||||
print('Done.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user