You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
2 months ago
|
From af6273b4fbc1c9439a9b1e69761838479ba4bd71 Mon Sep 17 00:00:00 2001
|
||
|
From: Karolina Surma <ksurma@redhat.com>
|
||
|
Date: Thu, 18 Apr 2024 09:48:04 +0200
|
||
|
Subject: [PATCH] Allow unsupported Python versions in RPM builds
|
||
|
|
||
|
Downstream-only patch: always allow unsupported versions of Python.
|
||
|
In Fedora, we constantly attempt to integrate alpha and beta releases of Python
|
||
|
and rebuild all dependent packages in Copr. We need to be able to build the
|
||
|
packages that use pyo3-ffi without patching each and every one of them,
|
||
|
hence we explicitly allow to skip version check when building RPMs.
|
||
|
---
|
||
|
build.rs | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/build.rs b/build.rs
|
||
|
index 286767d..ef666d7 100644
|
||
|
--- a/build.rs
|
||
|
+++ b/build.rs
|
||
|
@@ -36,6 +36,11 @@ fn ensure_python_version(interpreter_config: &InterpreterConfig) -> Result<()> {
|
||
|
return Ok(());
|
||
|
}
|
||
|
|
||
|
+ // Skip version check when building RPMs - we want to build them with unsupported Python versions too
|
||
|
+ if std::env::var("RPM_BUILD_ROOT").as_deref().is_ok() {
|
||
|
+ return Ok(());
|
||
|
+ }
|
||
|
+
|
||
|
match interpreter_config.implementation {
|
||
|
PythonImplementation::CPython => {
|
||
|
let versions = SUPPORTED_VERSIONS_CPYTHON;
|
||
|
--
|
||
|
2.44.0
|
||
|
|