mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +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
|
# Always prefer setuptools over distutils
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
from telethon_generator.tl_generator import TLGenerator
|
|
||||||
try:
|
try:
|
||||||
from telethon import TelegramClient
|
from telethon import TelegramClient
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -27,6 +26,7 @@ except ImportError:
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(argv) >= 2 and argv[1] == 'gen_tl':
|
if len(argv) >= 2 and argv[1] == 'gen_tl':
|
||||||
|
from telethon_generator.tl_generator import TLGenerator
|
||||||
generator = TLGenerator('telethon/tl')
|
generator = TLGenerator('telethon/tl')
|
||||||
if generator.tlobjects_exist():
|
if generator.tlobjects_exist():
|
||||||
print('Detected previous TLObjects. Cleaning...')
|
print('Detected previous TLObjects. Cleaning...')
|
||||||
|
@ -39,6 +39,7 @@ if __name__ == '__main__':
|
||||||
print('Done.')
|
print('Done.')
|
||||||
|
|
||||||
elif len(argv) >= 2 and argv[1] == 'clean_tl':
|
elif len(argv) >= 2 and argv[1] == 'clean_tl':
|
||||||
|
from telethon_generator.tl_generator import TLGenerator
|
||||||
print('Cleaning...')
|
print('Cleaning...')
|
||||||
TLGenerator('telethon/tl').clean_tlobjects()
|
TLGenerator('telethon/tl').clean_tlobjects()
|
||||||
print('Done.')
|
print('Done.')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user