Compare commits

...

No commits in common. "c8-beta" and "7de8cc28e27cad7edd5bd0570dafa16cf639e147" have entirely different histories.

8 changed files with 97 additions and 7 deletions

7
.gitignore vendored
View File

@ -1 +1,6 @@
SOURCES/setuptools-68.2.2.tar.gz
/setuptools-*.tar.gz
/setuptools-*.zip
/setuptools-*/
/pkg_resources-tests-data-*.tar.gz
/results_python-setuptools/
*.rpm

View File

@ -1 +0,0 @@
b0c9b16863c57d70adc22651906eea7eaee09803 SOURCES/setuptools-68.2.2.tar.gz

View File

@ -0,0 +1,41 @@
From 58f33f0aef5b137287e6f425b922a03123735a77 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 20 Sep 2023 17:18:47 +0200
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
index 606cce9..0af1631 100644
--- 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
@@ -40,8 +41,13 @@ class install(orig.install):
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
- """,
- 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.
--
2.41.0

8
gating.yaml Normal file
View File

@ -0,0 +1,8 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,14 @@
# let's not report duplicate __init__s
addFilter(r'W: files-duplicate .+__init__\.py ')
# setuptools and pkg_resources have duplicated vendored libraries
# we might want to de-duplicate this somehow in the future, but not yet
# regex a bit complex to allow arbitrary order
addFilter(r'W: files-duplicate .+/(setuptools/_vendor/.+ .+/pkg_resources|pkg_resources/_vendor/.+ .+/setuptools)/_vendor/')
# When duplicate files are found, this errors is produced
# as long as we filter out the warnings, we need to filter the error as well
addFilter(r'E: files-duplicated-waste')
# no %doc in the wheel packages
addFilter(r'python-setuptools-wheel.noarch: (E|W): no-documentation')

View File

@ -3,11 +3,6 @@
%global srcname setuptools
# Workaround for https://issues.redhat.com/browse/CS-1907
# By defining the %%{__bootstrap} value,
# we prevent misconfigured Koji putting a literal %%{__bootstrap} in %%dist.
%{!?__bootstrap:%global __bootstrap %{nil}}
# used when bootstrapping new Python versions
%bcond_with bootstrap
@ -43,6 +38,10 @@ License: MIT and ASL 2.0 and (BSD or ASL 2.0) and Python
URL: https://pypi.python.org/pypi/%{srcname}
Source0: %{pypi_source %{srcname} %{version}}
# The `setup.py install` deprecation notice might be confusing for RPM packagers
# adjust it, but only when $RPM_BUILD_ROOT is set
Patch: Adjust-the-setup.py-install-deprecation-message.patch
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (setuptools-68.2.2.tar.gz) = ed3138a39e8ae47d695e71835024d66d63b8de51aa336bd8524de81a5036aa26cf587caca5d6b46c833f77a6e9c8c1ae6b64e8310f712bd9c4e760196778b2ca

23
tests/tests.yml Normal file
View File

@ -0,0 +1,23 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/tests/python.git"
dest: "python"
tests:
- smoke312:
dir: python/smoke
run: VERSION=3.12 ./venv.sh
- smoke312_virtualenv:
dir: python/smoke
run: VERSION=3.12 METHOD=virtualenv ./venv.sh
required_packages:
- 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm'
- 'https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm'
- gcc
- virtualenv
- python3.12-devel
- python3-tox