Skip to content

Commit 9a0b8dc

Browse files
matmairLunarEclipse363
authored andcommitted
Moved from setup.py to pyproject.toml and added github publishing action
A cut-down version of matmair#16 - add github publishing action - switch to pyproject.toml - remove unneeded depenencies
1 parent 56cf439 commit 9a0b8dc

File tree

3 files changed

+85
-67
lines changed

3 files changed

+85
-67
lines changed

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
python_version: 3.8
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Setup Python ${{ env.python_version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ env.python_version }}
20+
- name: Install Python build dependencies
21+
run: |
22+
pip install setuptools twine build
23+
- name: Build binary
24+
run: |
25+
python3 -m build
26+
- name: Publish tp PyPi
27+
run: python3 -m twine upload dist/*
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
TWINE_REPOSITORY: pypi

pyproject.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[project]
2+
name = "brother_ql"
3+
version = "0.10.0-alpha"
4+
description = "Python package to talk to Brother QL label printers"
5+
readme = "README.md"
6+
authors = [
7+
{ name = "Philipp Klaus", email = "[email protected]" }
8+
]
9+
license = { text = "GPL-3.0-only" }
10+
dependencies = [
11+
"click",
12+
"future",
13+
"packbits",
14+
"pillow>=3.3.0",
15+
"pyusb",
16+
"attrs",
17+
"typing;python_version<'3.5'",
18+
"enum34;python_version<'3.4'",
19+
]
20+
keywords = [
21+
"Brother",
22+
"QL-500",
23+
"QL-550",
24+
"QL-560",
25+
"QL-570",
26+
"QL-700",
27+
"QL-710W",
28+
"QL-720NW",
29+
"QL-800",
30+
"QL-810W",
31+
"QL-820NWB",
32+
"QL-1050",
33+
"QL-1060N"
34+
]
35+
classifiers = [
36+
"Development Status :: 4 - Beta",
37+
"Operating System :: OS Independent",
38+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
39+
"Programming Language :: Python",
40+
"Programming Language :: Python :: 3",
41+
"Topic :: Scientific/Engineering :: Visualization",
42+
"Topic :: System :: Hardware :: Hardware Drivers",
43+
]
44+
45+
[project.scripts]
46+
brother_ql = "brother_ql.cli:cli"
47+
brother_ql_analyse = "brother_ql.brother_ql_analyse:main"
48+
brother_ql_create = "brother_ql.brother_ql_create:main"
49+
brother_ql_print = "brother_ql.brother_ql_print:main"
50+
brother_ql_debug = "brother_ql.brother_ql_debug:main"
51+
brother_ql_info = "brother_ql.brother_ql_info:main"
52+
53+
[project.urls]
54+
repository = "https://github.com/pklaus/brother_ql"

setup.py

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

0 commit comments

Comments
 (0)