Skip to content

Commit

Permalink
Fix setup.py for source distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lonami committed Jul 4, 2017
1 parent 127e5f7 commit 3585fb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# 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:
Expand All @@ -27,6 +26,7 @@

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...')
Expand All @@ -39,6 +39,7 @@
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.')
Expand Down

0 comments on commit 3585fb8

Please sign in to comment.