2024-03-18 21:20:10 +00:00
|
|
|
From cd3eb82521ecb89efc85a319f77cd74583e91b48 Mon Sep 17 00:00:00 2001
|
2023-09-21 07:09:17 +00:00
|
|
|
From: Lumir Balhar <lbalhar@redhat.com>
|
|
|
|
Date: Wed, 20 Sep 2023 17:18:47 +0200
|
2023-05-05 15:55:25 +00:00
|
|
|
Subject: [PATCH] Adjust the setup.py install deprecation message and URL
|
|
|
|
|
|
|
|
But only when building RPM packages.
|
|
|
|
---
|
|
|
|
setuptools/command/install.py | 10 ++++++++--
|
|
|
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/setuptools/command/install.py b/setuptools/command/install.py
|
2024-03-18 21:20:10 +00:00
|
|
|
index 56c1155..ab51004 100644
|
2023-05-05 15:55:25 +00:00
|
|
|
--- a/setuptools/command/install.py
|
|
|
|
+++ b/setuptools/command/install.py
|
|
|
|
@@ -1,6 +1,7 @@
|
|
|
|
from distutils.errors import DistutilsArgError
|
|
|
|
import inspect
|
|
|
|
import glob
|
|
|
|
+import os
|
|
|
|
import platform
|
|
|
|
import distutils.command.install as orig
|
2024-03-18 21:20:10 +00:00
|
|
|
from typing import cast
|
|
|
|
@@ -42,8 +43,13 @@ class install(orig.install):
|
2023-05-05 15:55:25 +00:00
|
|
|
Please avoid running ``setup.py`` directly.
|
2023-09-21 07:09:17 +00:00
|
|
|
Instead, use pypa/build, pypa/installer or other
|
|
|
|
standards-based tools.
|
2023-05-05 15:55:25 +00:00
|
|
|
- """,
|
|
|
|
- see_url="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html",
|
|
|
|
+ """
|
|
|
|
+ + ("""
|
|
|
|
+ Follow the current Python packaging guidelines when building
|
|
|
|
+ Python RPM packages.
|
|
|
|
+ """ if "RPM_BUILD_ROOT" in os.environ else ""),
|
|
|
|
+ see_url=("https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html" +
|
|
|
|
+ ("\nand https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/" if "RPM_BUILD_ROOT" in os.environ else "")),
|
|
|
|
# TODO: Document how to bootstrap setuptools without install
|
|
|
|
# (e.g. by unziping the wheel file)
|
|
|
|
# and then add a due_date to this warning.
|
|
|
|
--
|
2024-03-18 21:20:10 +00:00
|
|
|
2.43.2
|
2023-05-05 15:55:25 +00:00
|
|
|
|