Skip to content

Commit 8e30e56

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

9 files changed

+68
-84
lines changed

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
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

.github/workflows/pypi-publish.yaml

Lines changed: 1 addition & 4 deletions
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:

INSTALL

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

MANIFEST.in

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

dev_requirements.txt

Lines changed: 1 addition & 0 deletions
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

pyproject.toml

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

requirements.txt

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

setup.py

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

tasks.py

Lines changed: 1 addition & 1 deletion
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)