File tree 4 files changed +63
-71
lines changed 4 files changed +63
-71
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,15 @@ jobs:
60
60
- name : Build docs
61
61
working-directory : docs
62
62
run : sphinx-build -E -W -b html . _build/html
63
- - name : Check For setup.py
63
+ - name : Check For pyproject.toml
64
64
id : need-pypi
65
65
run : |
66
- echo ::set-output name=setup-py ::$( find . -wholename './setup.py ' )
66
+ echo ::set-output name=pyproject-toml ::$( find . -wholename './pyproject.toml ' )
67
67
- 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 ')
69
69
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
73
72
twine check dist/*
74
73
- name : Setup problem matchers
75
74
uses : adafruit/circuitpython-action-library-ci-problem-matchers@v1
Original file line number Diff line number Diff line change @@ -61,25 +61,25 @@ jobs:
61
61
runs-on : ubuntu-latest
62
62
steps :
63
63
- uses : actions/checkout@v1
64
- - name : Check For setup.py
64
+ - name : Check For pyproject.toml
65
65
id : need-pypi
66
66
run : |
67
- echo ::set-output name=setup-py ::$( find . -wholename './setup.py ' )
67
+ echo ::set-output name=pyproject-toml ::$( find . -wholename './pyproject.toml ' )
68
68
- 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 ')
70
70
uses : actions/setup-python@v2
71
71
with :
72
72
python-version : ' 3.x'
73
73
- 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 ')
75
75
run : |
76
76
python -m pip install --upgrade pip
77
- pip install setuptools wheel twine
77
+ pip install --upgrade build twine
78
78
- 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 ')
80
80
env :
81
81
TWINE_USERNAME : ${{ secrets.pypi_username }}
82
82
TWINE_PASSWORD : ${{ secrets.pypi_password }}
83
83
run : |
84
- python setup.py sdist
84
+ python -m build
85
85
twine upload dist/*
Original file line number Diff line number Diff line change
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-ina219"
14
+ description = " CircuitPython library for INA219 high side DC current sensor."
15
+ readme = " README.rst"
16
+ authors = [
17
+ {
name =
" Adafruit Industries" ,
email =
" [email protected] " }
18
+ ]
19
+ urls = {Homepage = " https://github.com/adafruit/Adafruit_CircuitPython_INA219" }
20
+ keywords = [
21
+ " adafruit" ,
22
+ " blinka" ,
23
+ " circuitpython" ,
24
+ " micropython" ,
25
+ " ina219" ,
26
+ " sensor" ,
27
+ " current" ,
28
+ " high" ,
29
+ " voltage" ,
30
+ " featherwing" ,
31
+ " breakout" ,
32
+ " hardware" ,
33
+ ]
34
+ license = {text = " MIT" }
35
+ classifiers = [
36
+ " Intended Audience :: Developers" ,
37
+ " Topic :: Software Development :: Libraries" ,
38
+ " Topic :: Software Development :: Embedded Systems" ,
39
+ " Topic :: System :: Hardware" ,
40
+ " License :: OSI Approved :: MIT License" ,
41
+ " Programming Language :: Python :: 3" ,
42
+ ]
43
+ dynamic = [" version" , " dependencies" ]
44
+
45
+ [tool .setuptools ]
46
+ py-modules = [" adafruit_ina219" ]
47
+
48
+ [tool .setuptools .dynamic ]
49
+ dependencies = {file = [" requirements.txt" ]}
50
+
51
+ [tool .setuptools_scm ]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments