Skip to content

Commit

Permalink
python-atsha204: Force distutils-based python package builds
Browse files Browse the repository at this point in the history
In OpenWRT main / 23.05 the new build process chokes on
the OpenWRT package names differing from the python package
names. Force the use of the previous build process for now.

Alternative solutions include providing a PYPI_SOURCE_NAME that
contains the python package name, or renaming the OpenWRT packages
to have the same name as the python package.

Also fix up the version number in setup.py, as otherwise
the new build system would generate the wrong whl file and fail.

Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net>
  • Loading branch information
kesslerm committed Aug 29, 2023
1 parent 7272904 commit 9021fab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lang/python-libatsha204/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE

PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1

include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From cbccf6ed6ebb0d65f00ddb75997dffd44a8ddcc6 Mon Sep 17 00:00:00 2001
From: Magnus Kessler <Magnus.Kessler@gmx.net>
Date: Wed, 2 Aug 2023 09:08:27 +0200
Subject: [PATCH] python: adjust version number to release version

This is needed so that the correct python wheel archive is generated
with recent OpenWRT build scripts (23.05 / master).

Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net>
---
src/python/setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/python/setup.py b/src/python/setup.py
index 23a4abc..23fa3fb 100644
--- a/src/python/setup.py
+++ b/src/python/setup.py
@@ -18,4 +18,4 @@
from distutils.core import setup, Extension

extension = Extension('atsha204', ['atsha204.c'], libraries=['atsha204'], library_dirs=['../../lib'])
-setup(name='atsha204', version='0.2', ext_modules=[extension], provides=['atsha204'])
+setup(name='atsha204', version='29.2', ext_modules=[extension], provides=['atsha204'])
--
2.34.1

0 comments on commit 9021fab

Please sign in to comment.