diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py index 52a259469..f85f0f27c 100755 --- a/python/install_python_bindings.py +++ b/python/install_python_bindings.py @@ -18,15 +18,13 @@ if __name__ == "__main__": cmd = ["cargo", "build", "-p", "deltachat_ffi"] - if target == 'release': + if target == "release": os.environ["CARGO_PROFILE_RELEASE_LTO"] = "on" cmd.append("--release") print("running:", " ".join(cmd)) subprocess.check_call(cmd) - subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib src/deltachat/*.dll" , shell=True) + subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib src/deltachat/*.dll", shell=True) if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild": - subprocess.check_call([ - sys.executable, "-m", "pip", "install", "-e", "." - ]) + subprocess.check_call([sys.executable, "-m", "pip", "install", "-e", "."]) diff --git a/python/setup.py b/python/setup.py index b50fcba78..9363812c0 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,36 +1,37 @@ -import setuptools import os import re +import setuptools + def main(): with open("README.rst") as f: long_description = f.read() setuptools.setup( - name='deltachat', - description='Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat', + name="deltachat", + description="Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat", long_description=long_description, - author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors', - install_requires=['cffi>=1.0.0', 'pluggy', 'imap-tools', 'requests'], + author="holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors", + install_requires=["cffi>=1.0.0", "pluggy", "imap-tools", "requests"], setup_requires=[ - 'setuptools_scm', # required for compatibility with `python3 setup.py sdist` - 'pkgconfig', + "setuptools_scm", # required for compatibility with `python3 setup.py sdist` + "pkgconfig", ], - packages=setuptools.find_packages('src'), - package_dir={'': 'src'}, - cffi_modules=['src/deltachat/_build.py:ffibuilder'], - entry_points = { - 'pytest11': [ - 'deltachat.testplugin = deltachat.testplugin', + packages=setuptools.find_packages("src"), + package_dir={"": "src"}, + cffi_modules=["src/deltachat/_build.py:ffibuilder"], + entry_points={ + "pytest11": [ + "deltachat.testplugin = deltachat.testplugin", ], }, classifiers=[ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', - 'Programming Language :: Python :: 3', - 'Topic :: Communications :: Email', - 'Topic :: Software Development :: Libraries', + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", + "Programming Language :: Python :: 3", + "Topic :: Communications :: Email", + "Topic :: Software Development :: Libraries", ], ) diff --git a/python/tox.ini b/python/tox.ini index 803065a6e..8aa0896c7 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -42,8 +42,8 @@ deps = pygments restructuredtext_lint commands = - isort --check src/deltachat examples/ tests/ - black --check src/deltachat examples/ tests/ + isort --check setup.py install_python_bindings.py src/deltachat examples/ tests/ + black --check setup.py install_python_bindings.py src/deltachat examples/ tests/ flake8 src/deltachat flake8 tests/ examples/ rst-lint --encoding 'utf-8' README.rst @@ -89,4 +89,4 @@ markers = [flake8] max-line-length = 120 -ignore = E203, E266, E501, W503 \ No newline at end of file +ignore = E203, E266, E501, W503