Skip to content

Commit bc99401

Browse files
committed
Use pyproject.toml replace setup.py
1 parent fa841fb commit bc99401

File tree

4 files changed

+80
-116
lines changed

4 files changed

+80
-116
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. raw:: html
22

33
<img align="right" width="auto" height="auto" src="https://www.elastic.co/static-res/images/elastic-logo-200.png">
4-
4+
<!-- cut after this -->
55

66
Elasticsearch Python Client
77
===========================
@@ -81,10 +81,10 @@ Quick Start
8181
8282
# Import the client from the 'elasticsearch' module
8383
>>> from elasticsearch import Elasticsearch
84-
84+
8585
# Instantiate a client instance
8686
>>> client = Elasticsearch("http://localhost:9200")
87-
87+
8888
# Call an API, in this example `info()`
8989
>>> resp = client.info()
9090

pyproject.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-fancy-pypi-readme"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "elasticsearch"
7+
dynamic = ["version", "readme"]
8+
description = "Python client for Elasticsearch"
9+
license = "Apache-2.0"
10+
requires-python = ">=3.6, <4"
11+
authors = [
12+
{ name = "Honza Král", email = "honza.kral@gmail.com" },
13+
{ name = "Nick Lang", email = "nick@nicklang.com" },
14+
]
15+
maintainers = [
16+
{ name = "Seth Michael Larson", email = "seth.larson@elastic.co" },
17+
]
18+
classifiers = [
19+
"Development Status :: 5 - Production/Stable",
20+
"Intended Audience :: Developers",
21+
"License :: OSI Approved :: Apache Software License",
22+
"Operating System :: OS Independent",
23+
"Programming Language :: Python",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.6",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: Implementation :: CPython",
31+
"Programming Language :: Python :: Implementation :: PyPy",
32+
]
33+
dependencies = [
34+
"elastic-transport>=8,<9",
35+
]
36+
37+
[project.optional-dependencies]
38+
async = [
39+
"aiohttp>=3,<4",
40+
]
41+
requests = [
42+
"requests>=2.4.0, <3.0.0",
43+
]
44+
45+
[project.urls]
46+
Documentation = "https://elasticsearch-py.readthedocs.io"
47+
Homepage = "https://github.com/elastic/elasticsearch-py"
48+
"Issue Tracker" = "https://github.com/elastic/elasticsearch-py/issues"
49+
"Source Code" = "https://github.com/elastic/elasticsearch-py"
50+
51+
[tool.hatch.version]
52+
path = "elasticsearch/_version.py"
53+
pattern = '__versionstr__ = "(?P<version>.+)"'
54+
55+
[tool.hatch.metadata.hooks.fancy-pypi-readme]
56+
content-type = "text/x-rst"
57+
58+
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
59+
path = "README.rst"
60+
start-after = "<!-- cut after this -->\n\n"
61+
62+
[tool.hatch.build.targets.sdist]
63+
exclude = ["/test_elasticsearch"]
64+
65+
[tool.isort]
66+
profile = "black"
67+
68+
[tool.pytest]
69+
junit_family = "legacy"
70+
addopts = "-vvv -p no:logging --cov-report=term-missing --cov=elasticsearch --cov-config=.coveragerc"
71+
72+
[tool.coverage.report]
73+
exclude_lines = [
74+
"raise NotImplementedError*",
75+
]
76+
[tool.mypy]
77+
ignore_missing_imports = true

setup.cfg

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,2 @@
11
[flake8]
22
ignore = E203, E266, E501, W503
3-
4-
[tool:pytest]
5-
junit_family=legacy
6-
addopts = -vvv -p no:logging --cov-report=term-missing --cov=elasticsearch --cov-config=.coveragerc
7-
8-
[tool:isort]
9-
profile=black
10-
11-
[report]
12-
exclude_lines=
13-
raise NotImplementedError*
14-
15-
[mypy]
16-
ignore_missing_imports = True

setup.py

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)