Skip to content

Switch to PEP 517 packaging using hatchling #2388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pypa/[email protected]
with:
inputs: requirements.txt dev_requirements.txt
inputs: .

lint:
name: Code linters
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dev tools
run: |
pip install -r dev_requirements.txt
pip install twine wheel

- name: Install build
run: pip install build
- name: Build package
run: |
python setup.py build
python setup.py sdist bdist_wheel

run: python -m build .
- name: Publish to Pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
6 changes: 0 additions & 6 deletions INSTALL

This file was deleted.

6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
click==8.0.4
build>=0.8.0
black==22.3.0
flake8==4.0.1
flynt~=0.69.0
Expand Down
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[project]
name = "redis"
description = "Python client for Redis database and key-value store"
keywords = [
"Redis",
"key-value store",
"database",
]
license = "MIT"
version = "4.4.0rc1"
authors = [
{ name = "Redis Inc.", email = "[email protected]" },
]
requires-python = ">=3.7"
dependencies = [
"deprecated>=1.2.3",
"packaging>=20.4",
"importlib-metadata >= 1.0; python_version < '3.8'",
"typing-extensions; python_version<'3.8'",
"async-timeout>=4.0.2",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

[project.urls]
Documentation = "https://redis.readthedocs.io/en/latest/"
Changes = "https://github.com/redis/redis-py/releases"
Code = "https://github.com/redis/redis-py"
"Issue tracker" = "https://github.com/redis/redis-py/issues"

[project.optional-dependencies]
hiredis = [
"hiredis>=1.0.0",
]
ocsp = [
"cryptography>=36.0.1",
"pyopenssl==20.0.1",
"requests>=2.26.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

62 changes: 0 additions & 62 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def clean(c):
@task
def package(c):
"""Create the python packages"""
run("python setup.py sdist bdist_wheel")
run("python -m build .")
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ asyncio_mode = auto
minversion = 3.2.0
requires = tox-docker
envlist = {standalone,cluster}-{plain,hiredis,ocsp}-{uvloop,asyncio}-{py37,py38,py39,pypy3},linters,docs
isolated_build = True

[docker:master]
name = master
Expand Down Expand Up @@ -268,7 +269,6 @@ multi_line_output = 3

[testenv]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/dev_requirements.txt
docker =
unstable
Expand All @@ -295,7 +295,6 @@ commands =

[testenv:redis5]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/dev_requirements.txt
docker =
redis5_master
Expand All @@ -315,7 +314,6 @@ commands =

[testenv:redis4]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/dev_requirements.txt
docker =
redis4_master
Expand Down