Skip to content

Commit 13cdb99

Browse files
authored
Merge pull request #78 from tekktrik/dev/use-pyproject-toml
Switch to pyproject.toml
2 parents cd1da8c + 83ef846 commit 13cdb99

File tree

4 files changed

+62
-68
lines changed

4 files changed

+62
-68
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,15 @@ jobs:
6060
- name: Build docs
6161
working-directory: docs
6262
run: sphinx-build -E -W -b html . _build/html
63-
- name: Check For setup.py
63+
- name: Check For pyproject.toml
6464
id: need-pypi
6565
run: |
66-
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
66+
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
6767
- name: Build Python package
68-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
68+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
6969
run: |
70-
pip install --upgrade setuptools wheel twine readme_renderer testresources
71-
python setup.py sdist
72-
python setup.py bdist_wheel --universal
70+
pip install --upgrade build twine
71+
python -m build
7372
twine check dist/*
7473
- name: Setup problem matchers
7574
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,25 +61,25 @@ jobs:
6161
runs-on: ubuntu-latest
6262
steps:
6363
- uses: actions/checkout@v1
64-
- name: Check For setup.py
64+
- name: Check For pyproject.toml
6565
id: need-pypi
6666
run: |
67-
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
67+
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
6868
- name: Set up Python
69-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
69+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
7070
uses: actions/setup-python@v2
7171
with:
7272
python-version: '3.x'
7373
- name: Install dependencies
74-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
74+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
7575
run: |
7676
python -m pip install --upgrade pip
77-
pip install setuptools wheel twine
77+
pip install --upgrade build twine
7878
- name: Build and publish
79-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
79+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
8080
env:
8181
TWINE_USERNAME: ${{ secrets.pypi_username }}
8282
TWINE_PASSWORD: ${{ secrets.pypi_password }}
8383
run: |
84-
python setup.py sdist
84+
python -m build
8585
twine upload dist/*

pyproject.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-FileCopyrightText: 2022 Alec Delaney for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
[build-system]
6+
requires = [
7+
"setuptools",
8+
"wheel",
9+
"setuptools-scm",
10+
]
11+
12+
[project]
13+
name = "adafruit-circuitpython-rfm9x"
14+
description = "CircuitPython library for RFM95/6/7/8 LoRa 433/915mhz radio modules."
15+
readme = "README.rst"
16+
authors = [
17+
{name = "Adafruit Industries", email = "[email protected]"}
18+
]
19+
urls = {Homepage = "https://github.com/adafruit/Adafruit_CircuitPython_RFM9x"}
20+
keywords = [
21+
"adafruit",
22+
"lora",
23+
"radio",
24+
"rfm95",
25+
"rfm9x",
26+
"rfm96",
27+
"rfm97",
28+
"rfm98",
29+
"hardware",
30+
"micropython",
31+
"circuitpython",
32+
]
33+
license = {text = "MIT"}
34+
classifiers = [
35+
"Intended Audience :: Developers",
36+
"Topic :: Software Development :: Libraries",
37+
"Topic :: Software Development :: Embedded Systems",
38+
"Topic :: System :: Hardware",
39+
"License :: OSI Approved :: MIT License",
40+
"Programming Language :: Python :: 3",
41+
]
42+
dynamic = ["version", "dependencies"]
43+
44+
[tool.setuptools]
45+
py-modules = ["adafruit_rfm9x"]
46+
47+
[tool.setuptools.dynamic]
48+
dependencies = {file = ["requirements.txt"]}
49+
50+
[tool.setuptools_scm]

setup.py

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

0 commit comments

Comments
 (0)