Skip to content

Commit

Permalink
Packaging: Debian packaging machinery.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Apr 10, 2024
1 parent c350e28 commit e5bd2a6
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ library/debian/
.coverage
.pytest_cache
.tox
debian/*.substvars
debian/*.debhelper
debian/.debhelper/
debian/rpipins
debian/files
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ endif
@echo "build: build Python distribution files"
@echo "testdeploy: build and upload to test PyPi"
@echo "deploy: build and upload to PyPi"
@echo "tag: tag the repository with the current version\n"
@echo "tag: tag the repository with the current version"
@echo "deb-deps: install debian packaging dependencies"
@echo "deb: build a debian package"
@echo ""

dev-deps:
python3 -m pip install -r requirements-dev.txt
Expand Down Expand Up @@ -50,3 +53,9 @@ testdeploy: build

deploy: nopost build
twine upload dist/*

deb-deps:
sudo apt install debhelper dh-python pybuild-plugin-pyproject python3-hatchling

deb:
dpkg-buildpackage
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rpipins (1.0.0) UNRELEASED; urgency=medium

* Initial Release

-- Phil <[email protected]> Wed, 10 Apr 2024 21:03:39 +0100
20 changes: 20 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: rpipins
Section: utils
Priority: optional
Maintainer: Phil <[email protected]>
Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13), python3, pybuild-plugin-pyproject
Standards-Version: 4.6.2
X-Python3-Version: >= 3.7
Homepage: https://github.com/pinout-xyz/rpipins
Vcs-Browser: https://github.com/pinout-xyz/rpipins
Vcs-Git: https://github.com/pinout-xyz/rpipins.git

Package: rpipins
Architecture: all
Depends:
${misc:Depends}, ${python3:Depends}, python3-rich
Description: A command-line pinout for the Raspberry Pi 5
A beautiful GPIO pinout and pin function guide for the Raspberry Pi
with live pin config, drive and level monitoring.
22 changes: 22 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Files:
debian/*
Copyright:
2024 Phil <[email protected]>
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/make -f

%:
dh $@ --with=python3 --buildsystem=pybuild
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
6 changes: 6 additions & 0 deletions debian/upstream/metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bug-Database: https://github.com/pinout-xyz/rpipins/issues
Bug-Submit: https://github.com/pinout-xyz/rpipins/issues/new
Changelog: https://github.com/pinout-xyz/rpipins/blob/master/CHANGELOG.md
# Documentation: https://github.com/pinout-xyz/rpipins/wiki
Repository-Browse: https://github.com/pinout-xyz/rpipins
Repository: https://github.com/pinout-xyz/rpipins.git
13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "rpipins"
dynamic = ["version", "readme"]
dynamic = ["version"]
description = "A command-line pinout for the Raspberry Pi Pico W"
license = {file = "LICENSE"}
requires-python = ">= 3.7"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{ name = "Philip Howard", email = "[email protected]" },
]
Expand Down Expand Up @@ -62,14 +63,6 @@ exclude = [
"dist"
]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [
{ path = "README.md" },
{ text = "\n" },
{ path = "CHANGELOG.md" }
]

[tool.ruff]
exclude = [
'.tox',
Expand Down

0 comments on commit e5bd2a6

Please sign in to comment.