Skip to content

Commit 57bf140

Browse files
authored
chore: modernize setup even more (leave only pyproject.toml) (#49)
* chore: modernize setup even more (leave only `pyproject.toml`) * chore(CI): clean up Actions workflows * docs: bump info on required Py version * chore: specify test deps
1 parent 77e46f0 commit 57bf140

File tree

6 files changed

+69
-69
lines changed

6 files changed

+69
-69
lines changed

.github/workflows/run-test.yaml

+12-18
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ on:
44
push:
55
pull_request:
66

7-
87
jobs:
9-
run-test:
8+
run-tox:
109
name: test-${{ matrix.python-version }}
1110
runs-on: "ubuntu-latest"
1211
strategy:
1312
matrix:
1413
python-version:
15-
- "3.7"
1614
- "3.8"
1715
- "3.9"
1816
- "3.10"
1917
- "3.11"
2018
- "3.12"
21-
- "pypy-3.7"
19+
- "3.13.0-rc.1 - 3.13"
2220
- "pypy-3.8"
2321
- "pypy-3.9"
2422
- "pypy-3.10"
@@ -27,49 +25,45 @@ jobs:
2725

2826
steps:
2927
- name: Checkout repo
30-
uses: actions/checkout@v2
28+
uses: actions/checkout@v4
3129

3230
- name: Set up python
33-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v5
3432
with:
3533
python-version: ${{ matrix.python-version }}
36-
architecture: ${{ matrix.architecture }}
3734

3835
- name: Install dependencies
3936
run: |
40-
python -m pip install --upgrade pip
41-
pip install --upgrade tox setuptools
42-
pip list
37+
pip install --upgrade pip
38+
pip install --upgrade tox
4339
4440
- name: Run tests
4541
run: |
4642
tox -e py
47-
43+
4844
run-lint:
4945
name: lint
5046
runs-on: "ubuntu-latest"
5147
strategy:
5248
matrix:
5349
python-version:
54-
- "3.10"
50+
- "3.12"
5551

5652
fail-fast: false
5753

5854
steps:
5955
- name: Checkout repo
60-
uses: actions/checkout@v2
56+
uses: actions/checkout@v4
6157

6258
- name: Set up python
63-
uses: actions/setup-python@v2
59+
uses: actions/setup-python@v5
6460
with:
6561
python-version: ${{ matrix.python-version }}
66-
architecture: ${{ matrix.architecture }}
6762

6863
- name: Install dependencies
6964
run: |
70-
python -m pip install --upgrade pip
71-
pip install --upgrade tox setuptools
72-
pip list
65+
pip install --upgrade pip
66+
pip install --upgrade tox
7367
7468
- name: Run lint
7569
run: |

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Use **pip**:
1515
1616
$ pip install python-mimeparse
1717
18-
It supports Python 3.7+ and PyPy.
18+
It supports Python 3.8+ and PyPy.
1919

2020
Functions
2121
---------

mimeparse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.6.0'
1+
__version__ = '2.0.0a1'
22
__author__ = 'Joe Gregorio'
33
__email__ = 'joe@bitworking.org'
44
__license__ = 'MIT License'

pyproject.toml

+55-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,56 @@
11
[build-system]
2-
build-backend = "setuptools.build_meta"
3-
requires = [
4-
"setuptools>=47",
5-
"wheel>=0.34",
6-
]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools>=47",
5+
"wheel>=0.34",
6+
]
7+
8+
[project]
9+
name = "python-mimeparse"
10+
readme = "README.rst"
11+
dynamic = ["version"]
12+
dependencies = []
13+
requires-python = ">=3.8"
14+
description = "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges."
15+
license = {text = "MIT"}
16+
authors = [
17+
{name = "DB Tsai", email = "dbtsai@dbtsai.com"},
18+
]
19+
maintainers = [
20+
{name = "Falconry team", email = "mail@kgriffs.com"},
21+
]
22+
classifiers = [
23+
"Programming Language :: Python",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.8",
26+
"Programming Language :: Python :: 3.9",
27+
"Programming Language :: Python :: 3.10",
28+
"Programming Language :: Python :: 3.11",
29+
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
31+
"Programming Language :: Python :: Implementation :: CPython",
32+
"Programming Language :: Python :: Implementation :: PyPy",
33+
"License :: OSI Approved :: MIT License",
34+
"Operating System :: OS Independent",
35+
"Development Status :: 6 - Mature",
36+
"Intended Audience :: Developers",
37+
"Topic :: Internet :: WWW/HTTP",
38+
"Topic :: Software Development :: Libraries :: Python Modules",
39+
]
40+
keywords = ["mime-type", "media-type"]
41+
42+
[project.optional-dependencies]
43+
test = ["pytest"]
44+
45+
[project.urls]
46+
Homepage = "https://github.com/falconry/python-mimeparse"
47+
"Issue Tracker" = "https://github.com/falconry/python-mimeparse/issues"
48+
Funding = "https://opencollective.com/falcon"
49+
Chat = "https://gitter.im/falconry/user"
50+
51+
[tool.setuptools]
52+
license-files = ["LICENSE"]
53+
py-modules = ["mimeparse"]
54+
55+
[tool.setuptools.dynamic]
56+
version = {attr = "mimeparse.__version__"}

setup.cfg

-41
This file was deleted.

setup.py

-3
This file was deleted.

0 commit comments

Comments
 (0)