mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
python: autoformat setup.py and install_python_bindings.py
This commit is contained in:
@@ -18,15 +18,13 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
cmd = ["cargo", "build", "-p", "deltachat_ffi"]
|
cmd = ["cargo", "build", "-p", "deltachat_ffi"]
|
||||||
|
|
||||||
if target == 'release':
|
if target == "release":
|
||||||
os.environ["CARGO_PROFILE_RELEASE_LTO"] = "on"
|
os.environ["CARGO_PROFILE_RELEASE_LTO"] = "on"
|
||||||
cmd.append("--release")
|
cmd.append("--release")
|
||||||
|
|
||||||
print("running:", " ".join(cmd))
|
print("running:", " ".join(cmd))
|
||||||
subprocess.check_call(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":
|
if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
|
||||||
subprocess.check_call([
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "-e", "."])
|
||||||
sys.executable, "-m", "pip", "install", "-e", "."
|
|
||||||
])
|
|
||||||
|
|||||||
@@ -1,36 +1,37 @@
|
|||||||
import setuptools
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
import setuptools
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
with open("README.rst") as f:
|
with open("README.rst") as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='deltachat',
|
name="deltachat",
|
||||||
description='Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat',
|
description="Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors',
|
author="holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors",
|
||||||
install_requires=['cffi>=1.0.0', 'pluggy', 'imap-tools', 'requests'],
|
install_requires=["cffi>=1.0.0", "pluggy", "imap-tools", "requests"],
|
||||||
setup_requires=[
|
setup_requires=[
|
||||||
'setuptools_scm', # required for compatibility with `python3 setup.py sdist`
|
"setuptools_scm", # required for compatibility with `python3 setup.py sdist`
|
||||||
'pkgconfig',
|
"pkgconfig",
|
||||||
],
|
],
|
||||||
packages=setuptools.find_packages('src'),
|
packages=setuptools.find_packages("src"),
|
||||||
package_dir={'': 'src'},
|
package_dir={"": "src"},
|
||||||
cffi_modules=['src/deltachat/_build.py:ffibuilder'],
|
cffi_modules=["src/deltachat/_build.py:ffibuilder"],
|
||||||
entry_points = {
|
entry_points={
|
||||||
'pytest11': [
|
"pytest11": [
|
||||||
'deltachat.testplugin = deltachat.testplugin',
|
"deltachat.testplugin = deltachat.testplugin",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
"Development Status :: 4 - Beta",
|
||||||
'Intended Audience :: Developers',
|
"Intended Audience :: Developers",
|
||||||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
|
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
|
||||||
'Programming Language :: Python :: 3',
|
"Programming Language :: Python :: 3",
|
||||||
'Topic :: Communications :: Email',
|
"Topic :: Communications :: Email",
|
||||||
'Topic :: Software Development :: Libraries',
|
"Topic :: Software Development :: Libraries",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ deps =
|
|||||||
pygments
|
pygments
|
||||||
restructuredtext_lint
|
restructuredtext_lint
|
||||||
commands =
|
commands =
|
||||||
isort --check src/deltachat examples/ tests/
|
isort --check setup.py install_python_bindings.py src/deltachat examples/ tests/
|
||||||
black --check src/deltachat examples/ tests/
|
black --check setup.py install_python_bindings.py src/deltachat examples/ tests/
|
||||||
flake8 src/deltachat
|
flake8 src/deltachat
|
||||||
flake8 tests/ examples/
|
flake8 tests/ examples/
|
||||||
rst-lint --encoding 'utf-8' README.rst
|
rst-lint --encoding 'utf-8' README.rst
|
||||||
@@ -89,4 +89,4 @@ markers =
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
ignore = E203, E266, E501, W503
|
ignore = E203, E266, E501, W503
|
||||||
|
|||||||
Reference in New Issue
Block a user