Skip to content

Commit e036ef0

Browse files
committed
Add the smallest possibly pyproject.toml to support the
python build command and editable installs. Added the github action for building python packages. Updated the readme to provide instructions for the editable install and use of the build command.
1 parent 0452fca commit e036ef0

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

README.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ directory:
160160

161161
.. code:: shell
162162
163-
python setup.py install
163+
pip install -e .
164164
165165
If pip fails to install *dragonfly* or any of its required or extra
166166
dependencies, then you may need to upgrade pip with the following command:
@@ -169,6 +169,14 @@ dependencies, then you may need to upgrade pip with the following command:
169169
170170
pip install --upgrade pip
171171
172+
To build the dragonfly python package, run these commands in the projects root directory.
173+
174+
.. code:: shell
175+
176+
pip install build
177+
Python -m build
178+
179+
172180
173181
Speech recognition engine back-ends
174182
----------------------------------------------------------------------------

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"

python-publish.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish Package 📦 to PyPI
2+
on:
3+
release:
4+
types: [published] # with prerelease and release
5+
6+
permissions:
7+
contents: read
8+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
9+
jobs:
10+
build_and_publish:
11+
# Set up the environment `CI` references the secret `PYPI_API_TOKEN` in repository settings
12+
# https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#referencing-an-environment
13+
environment: CI
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Installing build Dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install build
21+
- name: Build package
22+
run: python -m build
23+
- name: Publish package
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+

0 commit comments

Comments
 (0)