From 52b0f0ad9686bc906fea286baeb799c36d4cc66d Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Wed, 16 Oct 2024 13:11:52 +0300 Subject: [PATCH 1/6] Add Debian packaging stuff --- debian/changelog | 5 +++++ debian/control | 26 ++++++++++++++++++++++++++ debian/copyright | 28 ++++++++++++++++++++++++++++ debian/lintian-overrides | 1 + debian/python3-python-osc.docs | 1 + debian/rules | 6 ++++++ debian/source/format | 1 + debian/source/options | 1 + pyproject.toml | 8 +++++++- 9 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/lintian-overrides create mode 100644 debian/python3-python-osc.docs create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/options diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..3fb0bd6 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-osc (1.9.0.1) stable; urgency=medium + + * Initial release. + + -- Albert Stefanov Mon, 07 Oct 2024 20:04:34 +0300 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..a8756fc --- /dev/null +++ b/debian/control @@ -0,0 +1,26 @@ +Source: python-osc +Section: python +Priority: optional +Build-Depends: + debhelper (>= 11~), + dh-python, + pybuild-plugin-pyproject, + debhelper-compat (= 12), + python3-all, + python3-setuptools, +Testsuite: autopkgtest-pkg-pybuild +Maintainer: Albert Stefanov +Standards-Version: 4.6.2 + +Package: python3-osc +X-Python3-Version: >= 3.10 +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends} +Description: Open Sound Control server and client implementations in **pure python**. + Features: + * UDP blocking/threading/forking/asyncio server implementations + * UDP client + * int, int64, float, string, double, MIDI, timestamps, blob, nil OSC arguments + * simple OSC address<->callback matching system + * extensive unit test coverage + * basic client and server examples diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..550b3e9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,28 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python-osc +Source: https://github.com/attwad/python-osc + +Files: * +Copyright: 2013-2024 attwad +License: unlicense + +Files: debian/* +Copyright: 2024- FOSDEM Team +License: MIT + +Files: pythonosc/slip.py +Copyright: Copyright (c) 2015 Ruud de Jong +License: MIT + + +License: unlicense + This is free and unencumbered software released into the public domain. + Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. + In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. + 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 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. + For more information, please refer to + +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. diff --git a/debian/lintian-overrides b/debian/lintian-overrides new file mode 100644 index 0000000..f1ce511 --- /dev/null +++ b/debian/lintian-overrides @@ -0,0 +1 @@ +python3-osc: initial-upload-closes-no-bugs diff --git a/debian/python3-python-osc.docs b/debian/python3-python-osc.docs new file mode 100644 index 0000000..a1320b1 --- /dev/null +++ b/debian/python3-python-osc.docs @@ -0,0 +1 @@ +README.rst diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..64e3c21 --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +export PYBUILD_NAME=osc + +%: + dh $@ --buildsystem=pybuild --with=python3 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..fb8b37b --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore="^[^/]+.(egg-info|dist-info)/" diff --git a/pyproject.toml b/pyproject.toml index 40585da..9bb9381 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,4 +18,10 @@ classifiers=[ 'Topic :: System :: Networking', ] [project.urls] -Repository = "https://github.com/attwad/python-osc" \ No newline at end of file +Repository = "https://github.com/attwad/python-osc" + +[tool.setuptools.packages.find] +where = ["."] # list of folders that contain the packages (["."] by default) +include = ["pythonosc"] # package names should match these glob patterns (["*"] by default) +exclude = [] # exclude packages matching these glob patterns (empty by default) +namespaces = false # to disable scanning PEP 420 namespaces (true by default) From 041f2edf76f3635c582b72529bc7d886d1f1433c Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Wed, 16 Oct 2024 19:52:20 +0300 Subject: [PATCH 2/6] Add circleci config --- .circleci/config.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..8ad581b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,55 @@ +--- +version: 2.1 + +executors: + debian: + docker: + - image: debian:bookworm + ruby: + docker: + - image: circleci/ruby:latest + +jobs: + build: + executor: debian + + steps: + - run: apt-get update + - run: apt-get -y install build-essential git openssh-client dpkg-dev debhelper dh-python pybuild-plugin-pyproject python3-all python3-setuptools + - checkout + - run: make -f debian/rules binary + - run: mkdir -p /root/build + - run: mv ../*.deb /root/build + - persist_to_workspace: + root: /root/build + paths: + - . + - store_artifacts: + path: /root/build + + package: + executor: ruby + + steps: + - attach_workspace: + at: . + - run: gem install package_cloud + - run: find . + - run: package_cloud push fosdem/video-team/debian/bookworm *deb + +workflows: + version: 2 + python-osc: + jobs: + - build: + filters: + tags: + only: /.*/ + - package: + requires: + - build + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ From 25d1f52d58f0a5fd3f085074ce29cdd7f3428e3a Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Thu, 17 Oct 2024 12:08:15 +0300 Subject: [PATCH 3/6] Add the subpackages to the build --- pyproject.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9bb9381..16a4dd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,6 @@ classifiers=[ Repository = "https://github.com/attwad/python-osc" [tool.setuptools.packages.find] -where = ["."] # list of folders that contain the packages (["."] by default) -include = ["pythonosc"] # package names should match these glob patterns (["*"] by default) -exclude = [] # exclude packages matching these glob patterns (empty by default) -namespaces = false # to disable scanning PEP 420 namespaces (true by default) +include = ['pythonosc', 'pythonosc.*'] # package names should match these glob patterns (["*"] by default) +exclude = ['pythonosc.test'] # exclude packages matching these glob patterns (empty by default) +#namespaces = false # to disable scanning PEP 420 namespaces (true by default) From 0390b12e63732c32e8670e2c284fb1207fdf3a7f Mon Sep 17 00:00:00 2001 From: Albert Stefanov Date: Thu, 17 Oct 2024 15:32:57 +0300 Subject: [PATCH 4/6] Automatically generate version numbers from CI --- .circleci/config.yml | 1 + debian/.gitignore | 1 + debian/changelog | 5 ----- debian/changelog.template | 5 +++++ debian/rules | 1 + generate_release.sh | 13 +++++++++++++ 6 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 debian/.gitignore delete mode 100644 debian/changelog create mode 100644 debian/changelog.template create mode 100755 generate_release.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ad581b..04ea0df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: - run: apt-get update - run: apt-get -y install build-essential git openssh-client dpkg-dev debhelper dh-python pybuild-plugin-pyproject python3-all python3-setuptools - checkout + - run: ./generate_release.sh - run: make -f debian/rules binary - run: mkdir -p /root/build - run: mv ../*.deb /root/build diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000..6d10dce --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1 @@ +changelog diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 3fb0bd6..0000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -python-osc (1.9.0.1) stable; urgency=medium - - * Initial release. - - -- Albert Stefanov Mon, 07 Oct 2024 20:04:34 +0300 diff --git a/debian/changelog.template b/debian/changelog.template new file mode 100644 index 0000000..bffb9e1 --- /dev/null +++ b/debian/changelog.template @@ -0,0 +1,5 @@ +python-osc ($RELEASE) stable; urgency=medium + + * Released + + -- FOSDEM Team $DATE diff --git a/debian/rules b/debian/rules index 64e3c21..cdc4478 100755 --- a/debian/rules +++ b/debian/rules @@ -3,4 +3,5 @@ export PYBUILD_NAME=osc %: + ./generate_release.sh dh $@ --buildsystem=pybuild --with=python3 diff --git a/generate_release.sh b/generate_release.sh new file mode 100755 index 0000000..8681d91 --- /dev/null +++ b/generate_release.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +if [[ $CIRCLE_TAG =~ ^v[0-9].* ]]; then + RVERSION="${CIRCLE_TAG:1}" +else + RVERSION="0.0.${CIRCLE_BUILD_NUM:=1}" +fi + +#RVERSION="$(${CIRCLE_TAG:=0.0.${CIRCLE_BUILD_NUM:-1}} | sed 's/[^0-9\.]*//g')" +RDATE="$(date -R)" + +sed -e 's/$RELEASE/'"$RVERSION"'/' -e 's/$DATE/'"$RDATE"'/' debian/changelog.template > debian/changelog From 4c72ae416e2d7667fe401bd37976e3c1be5f3123 Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Fri, 20 Mar 2026 17:28:40 +0100 Subject: [PATCH 5/6] circleci: build also for trixie --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 04ea0df..b254d5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,7 @@ jobs: - run: gem install package_cloud - run: find . - run: package_cloud push fosdem/video-team/debian/bookworm *deb + - run: package_cloud push fosdem/video-team/debian/trixie *deb workflows: version: 2 From c949df467f853e73ababb99d85354cd201b4cedd Mon Sep 17 00:00:00 2001 From: Vasil Kolev Date: Fri, 20 Mar 2026 17:34:10 +0100 Subject: [PATCH 6/6] circleci: checkout over https, not ssh --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b254d5e..c163701 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: steps: - run: apt-get update - run: apt-get -y install build-essential git openssh-client dpkg-dev debhelper dh-python pybuild-plugin-pyproject python3-all python3-setuptools - - checkout + - run: git clone https://github.com/FOSDEM/video-python-osc.git . - run: ./generate_release.sh - run: make -f debian/rules binary - run: mkdir -p /root/build