[gentoo-dev] Last rites: app-emacs/ruby-mode

2023-08-16 Thread Hans de Graaff
# Hans de Graaff  (2023-08-17)
# The ruby project no longer maintains the elisp ruby-mode with the
last
# changed upstream 5 years ago. ruby-mode is also included in Emacs
# itself, and this version is still maintained.
# Masked for removal on 2023-09-17.
app-emacs/ruby-mode


signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH v3] python-utils-r1.eclass: Fix PYTHON_SITEDIR/INCLUDEDIR for cross-prefix

2023-08-16 Thread James Le Cuirot
We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
host's Python. This breaks down when the build host's prefix differs
from the target host's prefix, so chop off the former and prepend the
latter.

This assumes that each Python implementation is always installed using
the same scheme. Meson already makes this assumption, and gpep517 makes
a similar assumption to determine Python's stdlib location.

We could improve on this and determine these locations using SYSROOT's
sysconfigdata file, like gpep517 does, but this seems needlessly
complex. We would need to take this approach for PYTHON_LIBPATH and
PYTHON_CONFIG, but these are only used by handful of packages.

${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.

Signed-off-by: James Le Cuirot 
---

Note that gpep517 also needs the same treatment, but I'll handle that
later. This at least allows Portage itself to be installed.

 eclass/python-utils-r1.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 2fffd6d56bf5..f9c6d161d3f3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -351,6 +351,7 @@ _python_export() {

print(sysconfig.get_path("purelib"))
EOF
)
+   
PYTHON_SITEDIR=${EPREFIX}${PYTHON_SITEDIR#"${BROOT-${EPREFIX}}"}
export PYTHON_SITEDIR
debug-print "${FUNCNAME}: PYTHON_SITEDIR = 
${PYTHON_SITEDIR}"
;;
@@ -362,6 +363,7 @@ _python_export() {

print(sysconfig.get_path("platinclude"))
EOF
)
+   
PYTHON_INCLUDEDIR=${ESYSROOT}${PYTHON_INCLUDEDIR#"${BROOT-${EPREFIX}}"}
export PYTHON_INCLUDEDIR
debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = 
${PYTHON_INCLUDEDIR}"

--
2.41.0



Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: Fix PYTHON_SITEDIR/INCLUDEDIR for cross-prefix

2023-08-16 Thread James Le Cuirot
On Wed, 2023-08-16 at 12:47 +0200, Michał Górny wrote:
> On Wed, 2023-08-16 at 07:39 +0100, James Le Cuirot wrote:
> > We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
> > host's Python. This breaks down when the build host's prefix differs
> > from the target host's prefix, so chop off the former and prepend the
> > latter.
> > 
> > This assumes that each Python implementation is always installed using
> > the same scheme. Meson already makes this assumption, and gpep517 makes
> > a similar assumption to determine Python's stdlib location.
> > 
> > We could improve on this and determine these locations using SYSROOT's
> > sysconfigdata file, like gpep517 does, but this seems needlessly
> > complex. We would need to take this approach for PYTHON_LIBPATH and
> > PYTHON_CONFIG, but these are only used by handful of packages.
> > 
> > ${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
> > reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.
> > 
> > Signed-off-by: James Le Cuirot 
> > ---
> > 
> > Note that gpep517 also needs the same treatment, but I'll handle that
> > later. This at least allows Portage itself to be installed.
> > 
> >  eclass/python-utils-r1.eclass | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> > index 2fffd6d56bf5..abfb74832f30 100644
> > --- a/eclass/python-utils-r1.eclass
> > +++ b/eclass/python-utils-r1.eclass
> > @@ -351,6 +351,7 @@ _python_export() {
> > 
> > print(sysconfig.get_path("purelib"))
> > EOF
> > )
> > +   
> > PYTHON_SITEDIR="${EPREFIX}${PYTHON_SITEDIR#${BROOT-${EPREFIX}}}"
> > export PYTHON_SITEDIR
> > debug-print "${FUNCNAME}: PYTHON_SITEDIR = 
> > ${PYTHON_SITEDIR}"
> > ;;
> > @@ -362,6 +363,7 @@ _python_export() {
> > 
> > print(sysconfig.get_path("platinclude"))
> > EOF
> > )
> > +   
> > PYTHON_INCLUDEDIR="${ESYSROOT}${PYTHON_INCLUDEDIR#${BROOT-${EPREFIX}}}"
> > export PYTHON_INCLUDEDIR
> > debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = 
> > ${PYTHON_INCLUDEDIR}"
> > 
> > 
> 
> You don't seem to have changed that, actually.

Ah! Sorry, I shouldn't make changes in a rush before starting the day job.
ionen said globbing, when this is technically pattern matching, so I got
confused and thought quoting the whole thing would fix it. Actually globbing
doesn't even occur when assigning variables.


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] [PATCH v2] python-utils-r1.eclass: Fix PYTHON_SITEDIR/INCLUDEDIR for cross-prefix

2023-08-16 Thread Michał Górny
On Wed, 2023-08-16 at 07:39 +0100, James Le Cuirot wrote:
> We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
> host's Python. This breaks down when the build host's prefix differs
> from the target host's prefix, so chop off the former and prepend the
> latter.
> 
> This assumes that each Python implementation is always installed using
> the same scheme. Meson already makes this assumption, and gpep517 makes
> a similar assumption to determine Python's stdlib location.
> 
> We could improve on this and determine these locations using SYSROOT's
> sysconfigdata file, like gpep517 does, but this seems needlessly
> complex. We would need to take this approach for PYTHON_LIBPATH and
> PYTHON_CONFIG, but these are only used by handful of packages.
> 
> ${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
> reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.
> 
> Signed-off-by: James Le Cuirot 
> ---
> 
> Note that gpep517 also needs the same treatment, but I'll handle that
> later. This at least allows Portage itself to be installed.
> 
>  eclass/python-utils-r1.eclass | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> index 2fffd6d56bf5..abfb74832f30 100644
> --- a/eclass/python-utils-r1.eclass
> +++ b/eclass/python-utils-r1.eclass
> @@ -351,6 +351,7 @@ _python_export() {
>   
> print(sysconfig.get_path("purelib"))
>   EOF
>   )
> + 
> PYTHON_SITEDIR="${EPREFIX}${PYTHON_SITEDIR#${BROOT-${EPREFIX}}}"
>   export PYTHON_SITEDIR
>   debug-print "${FUNCNAME}: PYTHON_SITEDIR = 
> ${PYTHON_SITEDIR}"
>   ;;
> @@ -362,6 +363,7 @@ _python_export() {
>   
> print(sysconfig.get_path("platinclude"))
>   EOF
>   )
> + 
> PYTHON_INCLUDEDIR="${ESYSROOT}${PYTHON_INCLUDEDIR#${BROOT-${EPREFIX}}}"
>   export PYTHON_INCLUDEDIR
>   debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = 
> ${PYTHON_INCLUDEDIR}"
> 
> 

You don't seem to have changed that, actually.

-- 
Best regards,
Michał Górny




[gentoo-dev] [PATCH v2] python-utils-r1.eclass: Fix PYTHON_SITEDIR/INCLUDEDIR for cross-prefix

2023-08-16 Thread James Le Cuirot
We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
host's Python. This breaks down when the build host's prefix differs
from the target host's prefix, so chop off the former and prepend the
latter.

This assumes that each Python implementation is always installed using
the same scheme. Meson already makes this assumption, and gpep517 makes
a similar assumption to determine Python's stdlib location.

We could improve on this and determine these locations using SYSROOT's
sysconfigdata file, like gpep517 does, but this seems needlessly
complex. We would need to take this approach for PYTHON_LIBPATH and
PYTHON_CONFIG, but these are only used by handful of packages.

${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.

Signed-off-by: James Le Cuirot 
---

Note that gpep517 also needs the same treatment, but I'll handle that
later. This at least allows Portage itself to be installed.

 eclass/python-utils-r1.eclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 2fffd6d56bf5..abfb74832f30 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -351,6 +351,7 @@ _python_export() {

print(sysconfig.get_path("purelib"))
EOF
)
+   
PYTHON_SITEDIR="${EPREFIX}${PYTHON_SITEDIR#${BROOT-${EPREFIX}}}"
export PYTHON_SITEDIR
debug-print "${FUNCNAME}: PYTHON_SITEDIR = 
${PYTHON_SITEDIR}"
;;
@@ -362,6 +363,7 @@ _python_export() {

print(sysconfig.get_path("platinclude"))
EOF
)
+   
PYTHON_INCLUDEDIR="${ESYSROOT}${PYTHON_INCLUDEDIR#${BROOT-${EPREFIX}}}"
export PYTHON_INCLUDEDIR
debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = 
${PYTHON_INCLUDEDIR}"

--
2.41.0



Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: Fix PYTHON_SITEDIR/INCLUDEDIR for cross-prefix

2023-08-16 Thread James Le Cuirot
On Tue, 2023-08-15 at 18:25 -0400, Ionen Wolkens wrote:
> On Tue, Aug 15, 2023 at 11:02:54PM +0100, James Le Cuirot wrote:
> > We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
> > host's Python. This breaks down when the build host's prefix differs
> > from the target host's prefix, so chop off the former and prepend the
> > latter.
> > 
> > This assumes that each Python implementation is always installed using
> > the same scheme. Meson already makes this assumption, and gpep517 makes
> > a similar assumption to determine Python's stdlib location.
> > 
> > We could improve on this and determine these locations using SYSROOT's
> > sysconfigdata file, like gpep517 does, but this seems needlessly
> > complex. We would need to take this approach for PYTHON_LIBPATH and
> > PYTHON_CONFIG, but these are only used by handful of packages.
> > 
> > ${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
> > reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.
> > 
> > Signed-off-by: James Le Cuirot 
> > ---
> > 
> > Note that gpep517 also needs the same treatment, but I'll handle that
> > later. This at least allows Portage itself to be installed.
> > 
> >  eclass/python-utils-r1.eclass | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> > index 2fffd6d56bf5..68b28c0ed806 100644
> > --- a/eclass/python-utils-r1.eclass
> > +++ b/eclass/python-utils-r1.eclass
> > @@ -351,6 +351,7 @@ _python_export() {
> > 
> > print(sysconfig.get_path("purelib"))
> > EOF
> > )
> > +   
> > PYTHON_SITEDIR=${EPREFIX}${PYTHON_SITEDIR#${BROOT-${EPREFIX}}}
> 
> For a minor nitpick, should use quotes for the substitution, aka:
> 
> PYTHON_SITEDIR=${EPREFIX}${PYTHON_SITEDIR#"${BROOT-${EPREFIX}}"}
> 
> Or else if BROOT/EPREFIX somehow had glob characters in them, they will
> actually be globbing.
> 
> > export PYTHON_SITEDIR
> > debug-print "${FUNCNAME}: PYTHON_SITEDIR = 
> > ${PYTHON_SITEDIR}"
> > ;;
> > @@ -362,6 +363,7 @@ _python_export() {
> > 
> > print(sysconfig.get_path("platinclude"))
> > EOF
> > )
> > +   
> > PYTHON_INCLUDEDIR=${ESYSROOT}${PYTHON_INCLUDEDIR#${BROOT-${EPREFIX}}}
> 
> Same here.
> 
> > export PYTHON_INCLUDEDIR
> > debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = 
> > ${PYTHON_INCLUDEDIR}"
> > 
> > --
> > 2.41.0
> > 

Oops, not like me to miss that. Thanks!


signature.asc
Description: This is a digitally signed message part