Skip to content

Commit d85f7da

Browse files
authored
Modernize packaging (#22)
* Modernize packaging * Remove travis config * Test Python 3.13 * Update Github actions * Update build-package workflow
1 parent 0f047cd commit d85f7da

File tree

9 files changed

+58
-132
lines changed

9 files changed

+58
-132
lines changed

.github/workflows/build-package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ jobs:
1111
name: Build Wheel
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: Set up Python
16-
uses: actions/setup-python@v2
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.x'
1919
- name: Install build dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install setuptools wheel
22+
pip install build
2323
- name: Build package
2424
run: |
25-
python setup.py sdist bdist_wheel
25+
python -m build
2626
- name: Upload Artifacts
27-
uses: actions/upload-artifact@v2
27+
uses: actions/upload-artifact@v4
2828
with:
2929
path: |
3030
dist/*.whl

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
python-version: [3.9, "3.10", "3.11", "3.12"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: Set up Python
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
cache: "pip"

.github/workflows/release-to-pypi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Set up Python
15-
uses: actions/setup-python@v2
15+
uses: actions/setup-python@v5
1616
with:
1717
python-version: '3.x'
1818
- name: Install dependencies
1919
run: |
2020
python -m pip install --upgrade pip
21-
pip install setuptools wheel twine
21+
pip install build twine
2222
- name: Build
2323
run: |
24-
python setup.py sdist bdist_wheel
24+
python -m build
2525
- name: Upload Artifacts
26-
uses: actions/upload-artifact@v2
26+
uses: actions/upload-artifact@v4
2727
with:
2828
path: |
2929
dist/*.whl

.travis.yml

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

MANIFEST.in

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
include CREDITS.rst
2-
include LICENSE.txt
3-
include README.rst
4-
include MANIFEST.in
5-
include requirements.txt
6-
include setup.cfg
7-
81
include documentation/*.rst
92
include documentation/conf.py
103
include documentation/Makefile
114
include documentation/pyserial-asyncio.png
125

136
include test/__init__.py
147
include test/test_asyncio.py
15-

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Async I/O extension package for the Python Serial Port Extension for OSX, Linux, BSD
66

7-
It depends on pySerial and is compatible with Python 3.5 and later.
7+
It depends on pySerial and is compatible with Python 3.9 and later.
88

99
This version implements eager writes like cpython `asyncio` selector_events does:
1010
https://github.com/python/cpython/blob/b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113/Lib/asyncio/selector_events.py#L1063
@@ -24,4 +24,4 @@ Documentation
2424
:alt: Documentation
2525

2626
.. |codecov| image:: https://codecov.io/gh/home-assistant-libs/pyserial-asyncio-fast/branch/master/graph/badge.svg
27-
:target: https://codecov.io/gh/home-assistant-libs/pyserial-asyncio-fast
27+
:target: https://codecov.io/gh/home-assistant-libs/pyserial-asyncio-fast

pyproject.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools>=77.0"]
4+
5+
[project]
6+
name = "pyserial-asyncio-fast"
7+
license = "BSD-3-Clause"
8+
license-files = ["LICENSE.txt", "CREDITS.rst"]
9+
description = "Python Serial Port Extension - Asynchronous I/O support"
10+
readme = "README.rst"
11+
authors = [{ name = "pySerial-team" }]
12+
requires-python = ">=3.9"
13+
classifiers = [
14+
'Development Status :: 5 - Production/Stable',
15+
'Intended Audience :: Developers',
16+
'Intended Audience :: End Users/Desktop',
17+
'Natural Language :: English',
18+
'Operating System :: POSIX',
19+
'Operating System :: MacOS :: MacOS X',
20+
'Programming Language :: Python',
21+
'Programming Language :: Python :: 3',
22+
'Programming Language :: Python :: 3.9',
23+
'Programming Language :: Python :: 3.10',
24+
'Programming Language :: Python :: 3.11',
25+
'Programming Language :: Python :: 3.12',
26+
'Programming Language :: Python :: 3.13',
27+
'Topic :: Communications',
28+
'Topic :: Software Development :: Libraries',
29+
'Topic :: Software Development :: Libraries :: Python Modules',
30+
'Topic :: Terminals :: Serial',
31+
]
32+
dependencies = [
33+
"pyserial",
34+
]
35+
dynamic = ["version"]
36+
37+
[project.urls]
38+
"Source code" = "https://github.com/home-assistant-libs/pyserial-asyncio-fast"
39+
"Documentation" = "http://pyserial-asyncio.readthedocs.io"
40+
41+
[tool.setuptools.dynamic]
42+
version = { attr = "serial_asyncio_fast.__version__" }

serial_asyncio_fast/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""\
1111
Support asyncio with serial ports.
1212
13-
Posix platforms only, Python 3.5+ only.
13+
Posix platforms only, Python 3.9+ only.
1414
1515
Windows event loops can not wait for serial ports with the current
1616
implementation. It should be possible to get that working though.

setup.py

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

0 commit comments

Comments
 (0)