Skip to content

Commit

Permalink
Moved from setup.py to pyproject.toml and added github publishing action
Browse files Browse the repository at this point in the history
A cut-down version of matmair#16

- add github publishing action
- switch to pyproject.toml
- remove unneeded depenencies
  • Loading branch information
matmair authored and LunarEclipse363 committed Nov 12, 2023
1 parent 56cf439 commit 9a0b8dc
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 67 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release to PyPi

on:
release:
types: [published]

env:
python_version: 3.8

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python ${{ env.python_version }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.python_version }}
- name: Install Python build dependencies
run: |
pip install setuptools twine build
- name: Build binary
run: |
python3 -m build
- name: Publish tp PyPi
run: python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY: pypi
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[project]
name = "brother_ql"
version = "0.10.0-alpha"
description = "Python package to talk to Brother QL label printers"
readme = "README.md"
authors = [
{ name = "Philipp Klaus", email = "philipp.l.klaus@web.de" }
]
license = { text = "GPL-3.0-only" }
dependencies = [
"click",
"future",
"packbits",
"pillow>=3.3.0",
"pyusb",
"attrs",
"typing;python_version<'3.5'",
"enum34;python_version<'3.4'",
]
keywords = [
"Brother",
"QL-500",
"QL-550",
"QL-560",
"QL-570",
"QL-700",
"QL-710W",
"QL-720NW",
"QL-800",
"QL-810W",
"QL-820NWB",
"QL-1050",
"QL-1060N"
]
classifiers = [
"Development Status :: 4 - Beta",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: System :: Hardware :: Hardware Drivers",
]

[project.scripts]
brother_ql = "brother_ql.cli:cli"
brother_ql_analyse = "brother_ql.brother_ql_analyse:main"
brother_ql_create = "brother_ql.brother_ql_create:main"
brother_ql_print = "brother_ql.brother_ql_print:main"
brother_ql_debug = "brother_ql.brother_ql_debug:main"
brother_ql_info = "brother_ql.brother_ql_info:main"

[project.urls]
repository = "https://github.com/pklaus/brother_ql"
67 changes: 0 additions & 67 deletions setup.py

This file was deleted.

0 comments on commit 9a0b8dc

Please # to comment.