Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: Build using Python 3.10 limited API (LP: #2050881) #448

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
# Installs the build dependencies
- name: Install build depends
run: |
echo "APT::Get::Always-Include-Phased-Updates \"true\";" | sudo tee /etc/apt/apt.conf.d/90phased-updates
sudo sed -i 's/Types: deb/Types: deb deb-src/g' /etc/apt/sources.list.d/ubuntu.sources
sudo apt update
sudo apt install meson python3-coverage python3-pytest python3-pytest-cov libcmocka-dev python3-cffi libpython3-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rpmbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
container:
- fedora:latest
# - fedora:rawhide
- rockylinux:9
# - rockylinux:9 # lacking meson >= 1.3.0
container:
image: ${{ matrix.container }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project('netplan', 'c',
'warning_level=2',
'werror=true',
],
meson_version: '>= 0.61.0',
meson_version: '>= 1.3.0',
)

glib = dependency('glib-2.0')
Expand Down
1 change: 1 addition & 0 deletions python-cffi/netplan/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cffi_pyext = python.extension_module(
link_with: [libnetplan],
subdir: 'netplan',
install: true,
limited_api: '3.10',
)

bindings_sources = [
Expand Down
40 changes: 40 additions & 0 deletions rpm/meson-python-no-limited-api.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From d3ac742b25df0b495968003bf695a1e202455e19 Mon Sep 17 00:00:00 2001
From: Lukas Märdian <[email protected]>
Date: Thu, 28 Mar 2024 17:37:44 +0100
Subject: [PATCH] Revert "meson: Build using Python 3.10 limited API (LP:
#2050881)"

This reverts commit 5377b8c856f3f7a5b19ee7c486759adfac582d91.
---
meson.build | 2 +-
python-cffi/netplan/meson.build | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 8755ebe4..9556836a 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project('netplan', 'c',
'warning_level=2',
'werror=true',
],
- meson_version: '>= 1.3.0',
+ meson_version: '>= 0.61.0',
)

glib = dependency('glib-2.0')
diff --git a/python-cffi/netplan/meson.build b/python-cffi/netplan/meson.build
index 17b66140..2f820d13 100644
--- a/python-cffi/netplan/meson.build
+++ b/python-cffi/netplan/meson.build
@@ -24,7 +24,6 @@ cffi_pyext = python.extension_module(
link_with: [libnetplan],
subdir: 'netplan',
install: true,
- limited_api: '3.10',
)

bindings_sources = [
--
2.40.1

3 changes: 2 additions & 1 deletion rpm/netplan.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
%endif

Name: netplan
Version: 0.106
Version: 1.0
Release: 0%{?dist}
Summary: Network configuration tool using YAML
Group: System Environment/Base
License: GPL-3.0-only
URL: http://netplan.io/
Source0: https://github.com/canonical/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
#Patch0: meson-python-no-limited-api.diff

BuildRequires: gcc
BuildRequires: meson >= 0.61
Expand Down
Loading