mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Assert that module was generated correctly on setup.py pypi
This commit is contained in:
parent
605c103f29
commit
7509ba9067
10
setup.py
10
setup.py
|
@ -71,6 +71,16 @@ def main():
|
||||||
print('Done.')
|
print('Done.')
|
||||||
|
|
||||||
elif len(argv) >= 2 and argv[1] == 'pypi':
|
elif len(argv) >= 2 and argv[1] == 'pypi':
|
||||||
|
# (Re)generate the code to make sure we don't push without it
|
||||||
|
gen_tl()
|
||||||
|
|
||||||
|
# Try importing the telethon module to assert it has no errors
|
||||||
|
try:
|
||||||
|
import telethon
|
||||||
|
except:
|
||||||
|
print('Packaging for PyPi aborted, importing the module failed.')
|
||||||
|
return
|
||||||
|
|
||||||
# Need python3.5 or higher, but Telethon is supposed to support 3.x
|
# Need python3.5 or higher, but Telethon is supposed to support 3.x
|
||||||
# Place it here since noone should be running ./setup.py pypi anyway
|
# Place it here since noone should be running ./setup.py pypi anyway
|
||||||
from subprocess import run
|
from subprocess import run
|
||||||
|
|
Loading…
Reference in New Issue
Block a user