Skip to content

Commit d1b1931

Browse files
author
Alec Delaney
committed
Change to pyproject.toml
1 parent 06df42d commit d1b1931

File tree

6 files changed

+65
-82
lines changed

6 files changed

+65
-82
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3232
3333
- name: Install library
34-
run: python3 setup.py install
34+
run: pip install .
3535

3636
- name: Install sphinx
3737
run: pip3 install pylint Sphinx sphinx-rtd-theme

.github/workflows/release.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: Check For setup.py
12+
- name: Check For pyproject.toml
1313
id: need-pypi
1414
run: |
15-
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
15+
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
1616
- name: Set up Python
17-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
17+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
1818
uses: actions/setup-python@v1
1919
with:
2020
python-version: '3.x'
2121
- name: Install dependencies
22-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
22+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
2323
run: |
2424
python -m pip install --upgrade pip
25-
pip install setuptools wheel twine
25+
pip install build wheel twine
2626
- name: Build and publish
27-
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
27+
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
2828
env:
2929
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
3030
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3131
run: |
32-
python setup.py sdist
32+
python -m build
3333
twine upload dist/*

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
publish: clean
2-
python setup.py sdist upload
1+
publish: clean build
2+
twine upload dist/*
33

44
clean:
55
#rm -rf Adafruit_BBIO.* build dist
@@ -9,7 +9,7 @@ tests:
99
py.test
1010

1111
build:
12-
python setup.py build --force
12+
python -m build
1313

1414
install: build
15-
python setup.py install --force
15+
pip install .

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Clone or download the contents of this repository. Then navigate to the folder i
5151

5252
.. code-block:: shell
5353
54-
python setup.py install
54+
pip install .
5555
5656
5757

pyproject.toml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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-io"
14+
description = "Python client library for Adafruit IO (http://io.adafruit.com/)."
15+
version = "0.0.0"
16+
readme = "README.rst"
17+
authors = [
18+
{name = "Adafruit Industries", email = "[email protected]"}
19+
]
20+
urls = {Homepage = "https://github.com/adafruit/Adafruit_IO_Python"}
21+
keywords = [
22+
"adafruit",
23+
"blinka",
24+
"circuitpython",
25+
"micropython",
26+
"lis3mdl",
27+
"magnetometer",
28+
"LSM6DS33",
29+
"IMU",
30+
]
31+
license = {text = "MIT"}
32+
classifiers = [
33+
"Development Status :: 5 - Production/Stable",
34+
"Operating System :: POSIX :: Linux",
35+
"Operating System :: Microsoft :: Windows",
36+
"Operating System :: MacOS",
37+
"License :: OSI Approved :: MIT License",
38+
"Intended Audience :: Developers",
39+
"Programming Language :: Python :: 3",
40+
"Programming Language :: Python :: 3.4",
41+
"Programming Language :: Python :: 3.5",
42+
"Programming Language :: Python :: 3.6",
43+
"Topic :: Home Automation",
44+
"Topic :: Software Development",
45+
]
46+
dependencies = [
47+
"requests",
48+
"paho-mqtt"
49+
]
50+
51+
[tool.setuptools]
52+
packages = ["Adafruit_IO"]

setup.py

-69
This file was deleted.

0 commit comments

Comments
 (0)