Skip to content

Commit ed5fc82

Browse files
link2xthpk42
authored andcommitted
python: move most of setup.py to pyproject.toml
1 parent 248d960 commit ed5fc82

File tree

4 files changed

+38
-53
lines changed

4 files changed

+38
-53
lines changed

python/pyproject.toml

+35-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
11
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2", "cffi>=1.0.0", "pkgconfig"]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2", "cffi>=1.0.0", "pkgconfig"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "deltachat"
7+
description = "Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat"
8+
readme = "README.rst"
9+
requires-python = ">=3.7"
10+
authors = [
11+
{ name = "holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors" },
12+
]
13+
classifiers = [
14+
"Development Status :: 4 - Beta",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
17+
"Programming Language :: Python :: 3",
18+
"Topic :: Communications :: Email",
19+
"Topic :: Software Development :: Libraries",
20+
]
21+
dependencies = [
22+
"cffi>=1.0.0",
23+
"imap-tools",
24+
"pluggy",
25+
"requests",
26+
]
27+
dynamic = [
28+
"version"
29+
]
30+
31+
[project.urls]
32+
"Home" = "https://github.com/deltachat/deltachat-core-rust/"
33+
"Bug Tracker" = "https://github.com/deltachat/deltachat-core-rust/issues"
34+
"Documentation" = "https://py.delta.chat/"
35+
36+
[project.entry-points.pytest11]
37+
"deltachat.testplugin" = "deltachat.testplugin"
38+
539
[tool.setuptools_scm]
640
root = ".."
741
tag_regex = '^(?P<prefix>py-)?(?P<version>[^\+]+)(?P<suffix>.*)?$'

python/setup.py

+2-38
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,4 @@
1-
import os
2-
import re
3-
4-
import setuptools
5-
6-
7-
def main():
8-
with open("README.rst") as f:
9-
long_description = f.read()
10-
setuptools.setup(
11-
name="deltachat",
12-
description="Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat",
13-
long_description=long_description,
14-
author="holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors",
15-
install_requires=["cffi>=1.0.0", "pluggy", "imap-tools", "requests"],
16-
setup_requires=[
17-
"setuptools_scm", # required for compatibility with `python3 setup.py sdist`
18-
"pkgconfig",
19-
],
20-
packages=setuptools.find_packages("src"),
21-
package_dir={"": "src"},
22-
cffi_modules=["src/deltachat/_build.py:ffibuilder"],
23-
entry_points={
24-
"pytest11": [
25-
"deltachat.testplugin = deltachat.testplugin",
26-
],
27-
},
28-
classifiers=[
29-
"Development Status :: 4 - Beta",
30-
"Intended Audience :: Developers",
31-
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
32-
"Programming Language :: Python :: 3",
33-
"Topic :: Communications :: Email",
34-
"Topic :: Software Development :: Libraries",
35-
],
36-
)
37-
1+
from setuptools import setup
382

393
if __name__ == "__main__":
40-
main()
4+
setup(cffi_modules=["src/deltachat/_build.py:ffibuilder"])

python/tests/package_wheels.py

-13
This file was deleted.

python/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ envlist =
99
[testenv]
1010
commands =
1111
pytest -n6 --extra-info --reruns 2 --reruns-delay 5 -v -rsXx --ignored --strict-tls {posargs: tests examples}
12-
python tests/package_wheels.py {toxworkdir}/wheelhouse
12+
pip wheel . -w {toxworkdir}/wheelhouse
1313
passenv =
1414
DCC_RS_DEV
1515
DCC_RS_TARGET

0 commit comments

Comments
 (0)