Skip to content
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

chore: modernize setup even more (leave only pyproject.toml) #49

Merged
merged 4 commits into from
Aug 23, 2024
Merged
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
30 changes: 12 additions & 18 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ on:
push:
pull_request:


jobs:
run-test:
run-tox:
name: test-${{ matrix.python-version }}
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "pypy-3.7"
- "3.13.0-rc.1 - 3.13"
- "pypy-3.8"
- "pypy-3.9"
- "pypy-3.10"
Expand All @@ -27,49 +25,45 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade tox setuptools
pip list
pip install --upgrade pip
pip install --upgrade tox

- name: Run tests
run: |
tox -e py

run-lint:
name: lint
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.10"
- "3.12"

fail-fast: false

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade tox setuptools
pip list
pip install --upgrade pip
pip install --upgrade tox

- name: Run lint
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use **pip**:

$ pip install python-mimeparse

It supports Python 3.7+ and PyPy.
It supports Python 3.8+ and PyPy.

Functions
---------
Expand Down
2 changes: 1 addition & 1 deletion mimeparse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '1.6.0'
__version__ = '2.0.0a1'
__author__ = 'Joe Gregorio'
__email__ = '[email protected]'
__license__ = 'MIT License'
Expand Down
60 changes: 55 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
]

[project]
name = "python-mimeparse"
readme = "README.rst"
dynamic = ["version"]
dependencies = []
requires-python = ">=3.8"
description = "A module provides basic functions for parsing mime-type names and matching them against a list of media-ranges."
license = {text = "MIT"}
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
authors = [
{name = "DB Tsai", email = "[email protected]"},
]
maintainers = [
{name = "Falconry team", email = "[email protected]"},
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = ["mime-type", "media-type"]

[project.optional-dependencies]
test = ["pytest"]

[project.urls]
Homepage = "https://github.com/falconry/python-mimeparse"
"Issue Tracker" = "https://github.com/falconry/python-mimeparse/issues"
Funding = "https://opencollective.com/falcon"
Chat = "https://gitter.im/falconry/user"

[tool.setuptools]
license-files = ["LICENSE"]
py-modules = ["mimeparse"]

[tool.setuptools.dynamic]
version = {attr = "mimeparse.__version__"}
41 changes: 0 additions & 41 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.