Skip to content

Replace setup.{cfg,py} with pyproject.toml #216

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
25 changes: 18 additions & 7 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,36 @@ name: tox
on: [push, pull_request]

jobs:
tox:
flake8-and-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install Tox and any other packages
run: pip install tox
- name: Run flake8 / docs
run: tox -e flake8,docs

test:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.11", "3.12"]
python: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Start Redis
uses: supercharge/[email protected]
uses: supercharge/[email protected]
with:
redis-version: 6
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: tox -e py
- name: Run flake8 / docs
run: tox -e flake8,docs
if: matrix.python == 3.12
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include Makefile *.rst *.cfg *.ini *.txt
global-exclude *.pyc *.swp
global-exclude __pycache__
include conftest.py
exclude bootstrap.py
exclude .installed.cfg
exclude .coveragerc
exclude update.sh
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A pluggable irc client library based on python's `asyncio
:target: http://thenounproject.com/term/hydra/46963/


Requires python 3.5+
Requires python 3.11+

Python 2 is no longer supported, but if you don't have a choice you can use
an older version::
Expand Down
2 changes: 1 addition & 1 deletion examples/wsgiapp.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import asyncio
from aiohttp import wsgi
from aiohttp_wsgi import wsgi
from irc3 import plugin
import json

Expand Down
4 changes: 2 additions & 2 deletions irc3/plugins/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

Introduce a web interface to post messages

Install aiohttp::
Install aiohttp and aiohttp-wsgi::

$ pip install aiohttp
$ pip install aiohttp aiohttp-wsgi

..
>>> from irc3.testing import IrcBot
Expand Down
66 changes: 66 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "irc3"
version = "1.1.11.dev0"
description = "plugable irc client library based on asyncio with DCC and SASL support"
readme = "README.rst"
requires-python = ">=3.11"
license = { file = "LICENSE" }
authors = [{ name = "Gael Pasgrimaud", email = "[email protected]" }]
keywords = ["irc", "dcc", "asyncio"]
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Communications :: Chat :: Internet Relay Chat",
"Development Status :: 5 - Production/Stable",
]
dependencies = ["venusian>=3.0", "docopt"]

[project.optional-dependencies]
test = [
"aiocron",
"aiohttp",
"aiohttp-wsgi",
"feedparser",
"irc3-plugins-test",
"pysocks",
"pytest",
"pytest-aiohttp",
"pytest-asyncio",
"redis",
"requests",
"twitter",
]
web = [
"aiohttp",
"aiohttp-wsgi",
]

[project.scripts]
irc3 = "irc3:run"
irc3d = "irc3d:run"

[project.urls]
Homepage = "https://github.com/gawel/irc3/"

[tool.setuptools.packages.find]
exclude = ["docs", "tests"]

[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
addopts = [
"-p no:warnings",
"-p no:unraisableexception",
"--doctest-modules",
"--doctest-glob='*.rst'",
]
ignore = [
"CHANGES.rst",
"examples/*",
"docs/conf.py",
"irc3/_*.py",
"irc3/testing.py",
]
21 changes: 0 additions & 21 deletions setup.cfg

This file was deleted.

68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

15 changes: 13 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tox]
envlist = py311,py312,flake8,docs
envlist = py311,py312,py313,flake8,docs
isolated_build=true

[testenv]
skipsdist=true
Expand All @@ -8,7 +9,7 @@ allowlist_externals =
rm
commands =
rm -f .coverage
coverage run {envbindir}/py.test -xv []
coverage run {envbindir}/py.test -xv tests
coverage report -m
deps =
-e .[test,web]
Expand Down Expand Up @@ -44,3 +45,13 @@ commands =
python -m irc3._parse_rfc
python -m irc3._gen_doc
deps =

[flake8]
exclude =
./irc3/compat.py
./.tox/*
./src/*
./docs*
./.eggs/
./.venv/
ignore = W605
Loading