Skip to content

Commit e70a2d5

Browse files
akxofek
andcommitted
Switch to PEP 517 packaging using hatchling
Refs #1316 Refs #1649 Remake of #2388 Co-authored-by: Ofek Lev <[email protected]>
1 parent e3de026 commit e70a2d5

9 files changed

+64
-84
lines changed

Diff for: .github/workflows/integration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
- uses: actions/checkout@v3
3333
- uses: pypa/[email protected]
3434
with:
35-
inputs: requirements.txt dev_requirements.txt
3635
ignore-vulns: |
3736
GHSA-w596-4wvx-j9j6 # subversion related git pull, dependency for pytest. There is no impact here.
37+
inputs: .
3838

3939
lint:
4040
name: Code linters

Diff for: .github/workflows/pypi-publish.yaml

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ jobs:
2323
pip install twine wheel
2424
2525
- name: Build package
26-
run: |
27-
python setup.py build
28-
python setup.py sdist bdist_wheel
29-
26+
run: python -m build .
3027
- name: Publish to Pypi
3128
uses: pypa/gh-action-pypi-publish@release/v1
3229
with:

Diff for: INSTALL

-6
This file was deleted.

Diff for: MANIFEST.in

-6
This file was deleted.

Diff for: dev_requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
click==8.0.4
2+
build>=0.8.0
23
black==22.3.0
34
flake8==5.0.4
45
flake8-isort==6.0.0

Diff for: pyproject.toml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "redis"
7+
version = "5.0.0"
8+
description = "Python client for Redis database and key-value store"
9+
readme = "README.md"
10+
license = "MIT"
11+
requires-python = ">=3.8"
12+
authors = [
13+
{ name = "Redis Inc.", email = "[email protected]" },
14+
]
15+
keywords = [
16+
"Redis",
17+
"database",
18+
"key-value-store",
19+
]
20+
classifiers = [
21+
"Development Status :: 5 - Production/Stable",
22+
"Environment :: Console",
23+
"Intended Audience :: Developers",
24+
"License :: OSI Approved :: MIT License",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3 :: Only",
29+
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: Implementation :: CPython",
32+
"Programming Language :: Python :: Implementation :: PyPy",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
]
36+
dependencies = [
37+
"async-timeout>=4.0.2; python_full_version<=\"3.11.2\"",
38+
]
39+
40+
[project.optional-dependencies]
41+
hiredis = [
42+
"hiredis>=1.0.0",
43+
]
44+
ocsp = [
45+
"cryptography>=36.0.1",
46+
"pyopenssl==20.0.1",
47+
"requests>=2.26.0",
48+
]
49+
50+
[project.urls]
51+
Changes = "https://github.com/redis/redis-py/releases"
52+
Code = "https://github.com/redis/redis-py"
53+
Documentation = "https://redis.readthedocs.io/en/latest/"
54+
Homepage = "https://github.com/redis/redis-py"
55+
"Issue tracker" = "https://github.com/redis/redis-py/issues"
56+
57+
[tool.hatch.build.targets.sdist]
58+
include = [
59+
"/redis",
60+
]

Diff for: requirements.txt

-2
This file was deleted.

Diff for: setup.py

-64
This file was deleted.

Diff for: tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ def clean(c):
9191
@task
9292
def package(c):
9393
"""Create the python packages"""
94-
run("python setup.py sdist bdist_wheel")
94+
run("python -m build .")

0 commit comments

Comments
 (0)