diff --git a/.gitignore b/.gitignore index a9f7111a..dbfd60b5 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ # Builds and testing __pycache__/ /dist/ +/build/ /*.egg-info/ /readthedocs/_build/ /.tox/ diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 0eed5bd4..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include LICENSE -include README.rst - -recursive-include telethon * diff --git a/setup.py b/setup.py index 3446369d..676eda28 100755 --- a/setup.py +++ b/setup.py @@ -165,8 +165,14 @@ def main(argv): print('Packaging for PyPi aborted, importing the module failed.') return - for x in ('build', 'dist', 'Telethon.egg-info'): + remove_dirs = ['__pycache__', 'build', 'dist', 'Telethon.egg-info'] + for root, _dirs, _files in os.walk(LIBRARY_DIR, topdown=False): + # setuptools is including __pycache__ for some reason (#1605) + if root.endswith('/__pycache__'): + remove_dirs.append(root) + for x in remove_dirs: shutil.rmtree(x, ignore_errors=True) + run('python3 setup.py sdist', shell=True) run('python3 setup.py bdist_wheel', shell=True) run('twine upload dist/*', shell=True) @@ -218,11 +224,13 @@ def main(argv): 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6' + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', ], keywords='telegram api chat client library messaging mtproto', packages=find_packages(exclude=[ - 'telethon_*', 'run_tests.py', 'try_telethon.py' + 'telethon_*', 'tests' ]), install_requires=['pyaes', 'rsa'], extras_require={ diff --git a/telethon/version.py b/telethon/version.py index 9594a416..f6050a6c 100644 --- a/telethon/version.py +++ b/telethon/version.py @@ -1,3 +1,3 @@ # Versions should comply with PEP440. # This line is parsed in setup.py: -__version__ = '1.17.4' +__version__ = '1.17.5'