* [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir
@ 2024-08-25 15:33 Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: require <setuptools-72 for det setup.py Michał Górny
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Michał Górny @ 2024-08-25 15:33 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Closes: https://bugs.gentoo.org/937642
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 0f9dc8d14d5e..39705c5c3c84 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
local strays=()
local p
mapfile -d $'\0' -t strays < <(
+ # jar for jpype, https://bugs.gentoo.org/937642
find "${sitedir}" -maxdepth 1 -type f '!' '(' \
-name '*.egg-info' -o \
+ -name '*.jar' -o \
-name '*.pth' -o \
-name '*.py' -o \
-name '*.pyi' -o \
--
2.46.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: require <setuptools-72 for det setup.py
2024-08-25 15:33 [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Michał Górny
@ 2024-08-25 15:33 ` Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 3/4] distutils-r1.eclass: Print pytest version as well (if used) Michał Górny
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-08-25 15:33 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 39705c5c3c84..56fccd03f49e 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -623,6 +623,7 @@ distutils_enable_tests() {
fi
;;
setup.py)
+ test_pkgs+=' <dev-python/setuptools-72'
;;
unittest)
# unittest-or-fail is needed in py<3.12
--
2.46.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-dev] [PATCH 3/4] distutils-r1.eclass: Print pytest version as well (if used)
2024-08-25 15:33 [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: require <setuptools-72 for det setup.py Michał Górny
@ 2024-08-25 15:33 ` Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 4/4] distutils-r1.eclass: Print sphinx + plugins version " Michał Górny
2024-08-25 15:36 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Eli Schwartz
3 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-08-25 15:33 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 56fccd03f49e..02c988dc0cc4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -919,6 +919,27 @@ _distutils-r1_print_package_versions() {
esac
fi
+ case ${_DISTUTILS_TEST_RUNNER} in
+ import-check)
+ packages+=(
+ dev-python/pytest
+ dev-python/pytest-import-check
+ )
+ ;;
+ pytest)
+ packages+=(
+ dev-python/pytest
+ dev-python/pytest-asyncio
+ )
+ if [[ -n ${EPYTEST_TIMEOUT} ]]; then
+ packages+=( dev-python/pytest-timeout )
+ fi
+ if [[ ${EPYTEST_XDIST} ]]; then
+ packages+=( dev-python/pytest-xdist )
+ fi
+ ;;
+ esac
+
local pkg
einfo "Build system packages:"
for pkg in "${packages[@]}"; do
--
2.46.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-dev] [PATCH 4/4] distutils-r1.eclass: Print sphinx + plugins version (if used)
2024-08-25 15:33 [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: require <setuptools-72 for det setup.py Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 3/4] distutils-r1.eclass: Print pytest version as well (if used) Michał Górny
@ 2024-08-25 15:33 ` Michał Górny
2024-08-25 15:36 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Eli Schwartz
3 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-08-25 15:33 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
eclass/distutils-r1.eclass | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 02c988dc0cc4..fd7365374314 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -940,6 +940,13 @@ _distutils-r1_print_package_versions() {
;;
esac
+ if [[ ${_DISTUTILS_SPHINX_SUBDIR} ]]; then
+ packages+=(
+ dev-python/sphinx
+ "${_DISTUTILS_SPHINX_PLUGINS[@]}"
+ )
+ fi
+
local pkg
einfo "Build system packages:"
for pkg in "${packages[@]}"; do
--
2.46.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir
2024-08-25 15:33 [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Michał Górny
` (2 preceding siblings ...)
2024-08-25 15:33 ` [gentoo-dev] [PATCH 4/4] distutils-r1.eclass: Print sphinx + plugins version " Michał Górny
@ 2024-08-25 15:36 ` Eli Schwartz
[not found] ` <40f857bed27ba9359a495c52266a39404fe276e640af634c0bc0e284aaf23f3c@mu.id>
2024-09-03 7:24 ` Michał Górny
3 siblings, 2 replies; 7+ messages in thread
From: Eli Schwartz @ 2024-08-25 15:36 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1: Type: text/plain, Size: 1156 bytes --]
On 8/25/24 11:33 AM, Michał Górny wrote:
> Closes: https://bugs.gentoo.org/937642
> Signed-off-by: Michał Górny <mgorny@gentoo.org>
> ---
> eclass/distutils-r1.eclass | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> index 0f9dc8d14d5e..39705c5c3c84 100644
> --- a/eclass/distutils-r1.eclass
> +++ b/eclass/distutils-r1.eclass
> @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
> local strays=()
> local p
> mapfile -d $'\0' -t strays < <(
> + # jar for jpype, https://bugs.gentoo.org/937642
> find "${sitedir}" -maxdepth 1 -type f '!' '(' \
> -name '*.egg-info' -o \
> + -name '*.jar' -o \
> -name '*.pth' -o \
> -name '*.py' -o \
> -name '*.pyi' -o \
Copying my comment from the bug report:
I don't think it makes sense to add a special exception for jar files.
If we think that packages may be legitimately storing *data* files at
the top level, we should either relax the check in general, or allow
adding a suppression variable for packages to suppress this check.
--
Eli Schwartz
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir
[not found] ` <40f857bed27ba9359a495c52266a39404fe276e640af634c0bc0e284aaf23f3c@mu.id>
@ 2024-08-25 16:06 ` Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2024-08-25 16:06 UTC (permalink / raw
To: Eli Schwartz; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]
Sam James <sam@gentoo.org> writes:
> Eli Schwartz <eschwartz@gentoo.org> writes:
>
>> On 8/25/24 11:33 AM, Michał Górny wrote:
>>> Closes: https://bugs.gentoo.org/937642
>>> Signed-off-by: Michał Górny <mgorny@gentoo.org>
>>> ---
>>> eclass/distutils-r1.eclass | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
>>> index 0f9dc8d14d5e..39705c5c3c84 100644
>>> --- a/eclass/distutils-r1.eclass
>>> +++ b/eclass/distutils-r1.eclass
>>> @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
>>> local strays=()
>>> local p
>>> mapfile -d $'\0' -t strays < <(
>>> + # jar for jpype, https://bugs.gentoo.org/937642
>>> find "${sitedir}" -maxdepth 1 -type f '!' '(' \
>>> -name '*.egg-info' -o \
>>> + -name '*.jar' -o \
>>> -name '*.pth' -o \
>>> -name '*.py' -o \
>>> -name '*.pyi' -o \
>>
>>
>> Copying my comment from the bug report:
>>
>> I don't think it makes sense to add a special exception for jar files.
>> If we think that packages may be legitimately storing *data* files at
>> the top level, we should either relax the check in general, or allow
>> adding a suppression variable for packages to suppress this check.
>
> Unfortunately, I think I agree -- we should probably blacklist, not whitelist.
Or maybe we keep it as-is but with an opt-out var, with documentation
saying not to use it without strong justification.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 377 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir
2024-08-25 15:36 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Eli Schwartz
[not found] ` <40f857bed27ba9359a495c52266a39404fe276e640af634c0bc0e284aaf23f3c@mu.id>
@ 2024-09-03 7:24 ` Michał Górny
1 sibling, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-09-03 7:24 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
On Sun, 2024-08-25 at 11:36 -0400, Eli Schwartz wrote:
> On 8/25/24 11:33 AM, Michał Górny wrote:
> > Closes: https://bugs.gentoo.org/937642
> > Signed-off-by: Michał Górny <mgorny@gentoo.org>
> > ---
> > eclass/distutils-r1.eclass | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> > index 0f9dc8d14d5e..39705c5c3c84 100644
> > --- a/eclass/distutils-r1.eclass
> > +++ b/eclass/distutils-r1.eclass
> > @@ -2109,8 +2109,10 @@ _distutils-r1_post_python_install() {
> > local strays=()
> > local p
> > mapfile -d $'\0' -t strays < <(
> > + # jar for jpype, https://bugs.gentoo.org/937642
> > find "${sitedir}" -maxdepth 1 -type f '!' '(' \
> > -name '*.egg-info' -o \
> > + -name '*.jar' -o \
> > -name '*.pth' -o \
> > -name '*.py' -o \
> > -name '*.pyi' -o \
>
>
> Copying my comment from the bug report:
>
> I don't think it makes sense to add a special exception for jar files.
> If we think that packages may be legitimately storing *data* files at
> the top level, we should either relax the check in general, or allow
> adding a suppression variable for packages to suppress this check.
>
If you don't like JPype's design decisions, take it up to them. This is
not my fight.
This is the simplest solution to the problem at hand. The check is
primarily supposed to detect obvious violations, such as common Poetry
use screwups that install random documentation and package configuration
files (LICENSE, README, pyproject.toml...) there. I don't see a point
in adding a lot of complexity for theoretical purity.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-03 7:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-25 15:33 [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 2/4] distutils-r1.eclass: require <setuptools-72 for det setup.py Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 3/4] distutils-r1.eclass: Print pytest version as well (if used) Michał Górny
2024-08-25 15:33 ` [gentoo-dev] [PATCH 4/4] distutils-r1.eclass: Print sphinx + plugins version " Michał Górny
2024-08-25 15:36 ` [gentoo-dev] [PATCH 1/4] distutils-r1.eclass: Allow .jar files in sitedir Eli Schwartz
[not found] ` <40f857bed27ba9359a495c52266a39404fe276e640af634c0bc0e284aaf23f3c@mu.id>
2024-08-25 16:06 ` Sam James
2024-09-03 7:24 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox