From 388e0390441ca7a8e8a57e71d92e6f963f07af9f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 8 May 2022 02:00:01 +0200 Subject: gnu: isc-dhcp: Update to 4.4.3. * gnu/packages/admin.scm (isc-dhcp): Update to 4.4.3. [source]: Remove upstreamed patch. * gnu/packages/patches/isc-dhcp-gcc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/packages/patches/isc-dhcp-gcc-compat.patch | 72 -------------------------- 1 file changed, 72 deletions(-) delete mode 100644 gnu/packages/patches/isc-dhcp-gcc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/isc-dhcp-gcc-compat.patch b/gnu/packages/patches/isc-dhcp-gcc-compat.patch deleted file mode 100644 index 82cb572d17..0000000000 --- a/gnu/packages/patches/isc-dhcp-gcc-compat.patch +++ /dev/null @@ -1,72 +0,0 @@ -Add minor fixes for compiling with GCC 10. - -Taken from upstream: -https://gitlab.isc.org/isc-projects/dhcp/-/commit/6c7e61578b1b449272dbb40dd8b98d03dad8a57a - -diff --git a/client/dhclient.c b/client/dhclient.c ---- a/client/dhclient.c -+++ b/client/dhclient.c -@@ -83,8 +83,9 @@ static const char message [] = "Internet Systems Consortium DHCP Client"; - static const char url [] = "For info, please visit https://www.isc.org/software/dhcp/"; - #endif /* UNIT_TEST */ - --u_int16_t local_port = 0; --u_int16_t remote_port = 0; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; -+ - #if defined(DHCPv6) && defined(DHCP4o6) - int dhcp4o6_state = -1; /* -1 = stopped, 0 = polling, 1 = started */ - #endif -diff --git a/common/discover.c b/common/discover.c ---- a/common/discover.c -+++ b/common/discover.c -@@ -45,8 +45,8 @@ struct interface_info *fallback_interface = 0; - - int interfaces_invalidated; - int quiet_interface_discovery; --u_int16_t local_port; --u_int16_t remote_port; -+u_int16_t local_port = 0; -+u_int16_t remote_port = 0; - u_int16_t relay_port = 0; - int dhcpv4_over_dhcpv6 = 0; - int (*dhcp_interface_setup_hook) (struct interface_info *, struct iaddr *); -diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c ---- a/relay/dhcrelay.c -+++ b/relay/dhcrelay.c -@@ -95,8 +95,8 @@ enum { forward_and_append, /* Forward and append our own relay option. */ - forward_untouched, /* Forward without changes. */ - discard } agent_relay_mode = forward_and_replace; - --u_int16_t local_port; --u_int16_t remote_port; -+extern u_int16_t local_port; -+extern u_int16_t remote_port; - - /* Relay agent server list. */ - struct server_list { -diff --git a/server/mdb.c b/server/mdb.c ---- a/server/mdb.c -+++ b/server/mdb.c -@@ -67,7 +67,7 @@ static host_id_info_t *host_id_info = NULL; - - int numclasseswritten; - --omapi_object_type_t *dhcp_type_host; -+extern omapi_object_type_t *dhcp_type_host; - - isc_result_t enter_class(cd, dynamicp, commit) - struct class *cd; -diff --git a/server/mdb6.c b/server/mdb6.c ---- a/server/mdb6.c -+++ b/server/mdb6.c -@@ -1945,7 +1945,7 @@ create_prefix6(struct ipv6_pool *pool, struct iasubopt **pref, - } - new_ds.data = new_ds.buffer->data; - memcpy(new_ds.buffer->data, ds.data, ds.len); -- memcpy(new_ds.buffer->data + ds.len, &tmp, sizeof(tmp)); -+ memcpy(&new_ds.buffer->data[0] + ds.len, &tmp, sizeof(tmp)); - data_string_forget(&ds, MDL); - data_string_copy(&ds, &new_ds, MDL); - data_string_forget(&new_ds, MDL); -- cgit v1.2.3 From af375c63945819128375226cb987bc90a9a88743 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Wed, 11 May 2022 23:59:05 -0400 Subject: gnu: racket: Update to 8.5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/racket-gui-tethered-launcher-backport.patch, gnu/packages/patches/racket-enable-scheme-backport.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. * gnu/packages/chez.scm (chez-scheme-for-racket): Update to 9.5.7.6. * gnu/packages/racket.scm (%racket-version): Update to 8.5. (%racket-origin)[patches]: Remove obsolete patches. (racket-vm-common-configure-flags): Correct comment. (racket)[inputs]<2d, datalog, deinprogramm, draw, drracket, expeditor, htdp, pict, plot, quickscript, racklog, rackunit, redex, scribble, typed-racket, string-constants, syntax-color, web-server, xrepl>: Update checksums. : Likewise, and remove obsolete backports. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 2 - gnu/packages/chez.scm | 4 +- .../patches/racket-enable-scheme-backport.patch | 465 --------------------- .../racket-gui-tethered-launcher-backport.patch | 26 -- gnu/packages/racket.scm | 82 ++-- 5 files changed, 32 insertions(+), 547 deletions(-) delete mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch delete mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index ed901a5ba8..d7788796cc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1757,8 +1757,6 @@ dist_patch_DATA = \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ - %D%/packages/patches/racket-enable-scheme-backport.patch \ - %D%/packages/patches/racket-gui-tethered-launcher-backport.patch \ %D%/packages/patches/racket-minimal-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index d47225dbe5..a7f75a731a 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2020 Brendan Tildesley -;;; Copyright © 2021 Philip McGrath +;;; Copyright © 2021, 2022 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -361,7 +361,7 @@ and 32-bit PowerPC architectures.") (package (inherit chez-scheme) (name "chez-scheme-for-racket") - (version "9.5.7.3") + (version "9.5.7.6") ;; The version should match `(scheme-fork-version-number)`. ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. ;; It will always be different than the upstream version! diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch deleted file mode 100644 index 3a5a4a3d82..0000000000 --- a/gnu/packages/patches/racket-enable-scheme-backport.patch +++ /dev/null @@ -1,465 +0,0 @@ -From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001 -From: Matthew Flatt -Date: Sun, 6 Feb 2022 10:36:09 -0700 -Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=` - -(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5) - -(Fixed conflicts by dropping pbchunks and pbarch changes.) ---- - racket/src/ChezScheme/configure | 15 ++++++++++++++- - racket/src/ChezScheme/s/Mf-base | 4 ++-- - racket/src/ChezScheme/s/Mf-cross | 4 +++- - 3 files changed, 19 insertions(+), 4 deletions(-) - -diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure -index 4515ffc105..0098829091 100755 ---- a/racket/src/ChezScheme/configure -+++ b/racket/src/ChezScheme/configure -@@ -45,6 +45,7 @@ threads=yes - nothreads=no - temproot="" - help=no -+forceworkarea=no - gzipmanpages=yes - installowner="" - installgroup="" -@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do - --pb) - pb=yes - ;; -+ --force) -+ forceworkarea=yes -+ ;; - --installprefix=*) - installprefix=`echo $1 | sed -e 's/^--installprefix=//'` - ;; -@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then - echo " --toolprefix= prefix tool (compiler, linker, ...) names" - echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)" - echo " --workarea= build directory ($w)" -+ echo " --force configure even without boot files" - echo " CC= C compiler" - echo " CPPFLAGS= C preprocessor flags" - echo " CFLAGS= C compiler flags" -@@ -721,8 +726,16 @@ case "${flagsmuni}" in - ;; - esac - -+if [ "$w" = "$m" ] ; then -+ configuringin="" -+else -+ configuringin=" in $w" -+fi -+ - if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then -- echo "Configuring for $m" -+ echo "Configuring for $m$configuringin" -+elif [ "$forceworkarea" = yes ] ; then -+ echo "Configuring for $m$configuringin despite missing boot files" - else - if [ "$m" = "" ] ; then - maybem="" -diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base -index cc6178c973..1f4a967998 100644 ---- a/racket/src/ChezScheme/s/Mf-base -+++ b/racket/src/ChezScheme/s/Mf-base -@@ -94,7 +94,7 @@ endif - # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme - # implementation - Scheme = ../bin/$m/scheme${ExeSuffix} --export SCHEMEHEAPDIRS=../boot/%m -+export SCHEMEHEAPDIRS=../boot/$m - export CHEZSCHEMELIBDIRS=. - - # Define the libdirs separator character -@@ -691,4 +691,4 @@ reset-one: - - .PHONY: run - run: -- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS) -+ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS) -diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross -index d796cbb459..397af59a28 100644 ---- a/racket/src/ChezScheme/s/Mf-cross -+++ b/racket/src/ChezScheme/s/Mf-cross -@@ -43,5 +43,7 @@ x$(xm).$(m): - $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch - mv xpatch x$(xm).$(m) - -+ifneq ($(SCHEMEHEAPDIRS),:) - # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed --nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot -+nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot -+endif --- -2.32.0 - - -From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001 -From: Matthew Flatt -Date: Sun, 6 Feb 2022 11:03:30 -0700 -Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable - -When the same Chez Scheme version as used by Racket is already -available, then `--enable-scheme=...` can supply an executable. For -cross builds, `--enable-scheme=...` can still supply a build -directory, instead, as before. - -(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f) ---- - racket/src/ChezScheme/makefiles/Makefile.in | 3 ++ - racket/src/README.txt | 30 +++++++++++--- - racket/src/configure | 8 +++- - racket/src/cs/README.txt | 6 ++- - racket/src/cs/c/Makefile.in | 44 ++++++++++++++++----- - racket/src/cs/c/configure | 24 +++++++++-- - racket/src/cs/c/configure.ac | 21 ++++++++-- - 7 files changed, 112 insertions(+), 24 deletions(-) - -diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in -index c396efc851..3998ef9ccd 100644 ---- a/racket/src/ChezScheme/makefiles/Makefile.in -+++ b/racket/src/ChezScheme/makefiles/Makefile.in -@@ -59,6 +59,9 @@ reset: - %.boot: - (cd $(workarea) && $(MAKE) $*.boot) - -+auto.boot: -+ (cd $(workarea) && $(MAKE) $(defaultm).boot) -+ - # .bootquick to build boot files for - # with o=3 d=0 for the cross compiler, and only after - # building the kernel for the configured machine -diff --git a/racket/src/README.txt b/racket/src/README.txt -index 98647aebce..d77310b4a4 100644 ---- a/racket/src/README.txt -+++ b/racket/src/README.txt -@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of - ======================================================================== - - Cross-compilation requires at least two flags to `configure`: -+`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS) -+`--enable-scheme-SCHEME`. -+ -+More information: - - * `--host=OS`, where OS is something like `i386-gnu-linux` to - indicate the target platform. -@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`: - run `configure` again (with no arguments) in a "local" subdirectory - to create a build for the current platform. - --An additional flag is needed for building Racket CS, unless the flag --`--enable-racket=auto` is used: -- -- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme" -- directory where Chez Scheme is built for the host system. -+ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable -+ executable that runs on the build platform; the executable must be -+ the same version as used in Racket built for the target platform. -+ -+ Supplying `--enable-scheme=DIR` is also supported in cross-build -+ mode, where DIR is a path that has a "ChezScheme" directory where -+ Chez Scheme is built for the host system. -+ -+The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are -+allowed for non-cross builds, too: -+ -+ * For Racket CS, supplying either selects a Racket or Chez Scheme -+ implementation used to create boot files to the build platform. -+ Suppling Chez Scheme is a much more direct path, but when Racket is -+ supplied, its version does not have to match the version being -+ built. -+ -+ * For Racket BC, `--enable-racket=RACKET` selects a Racket for -+ prepare C sources to cooperate with garbage collection. Its version -+ needs to be close to the one being built, and potentially exactly -+ the same version. - - Some less commonly needed `configure` flags are for Racket BC: - -diff --git a/racket/src/configure b/racket/src/configure -index c9f3ba4419..1b53ec7ce2 100755 ---- a/racket/src/configure -+++ b/racket/src/configure -@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb" - use_cs=maybe - use_bc=maybe - supplied_racket=no -+supplied_scheme=no - enable_boothelp= - - # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`, -@@ -34,6 +35,9 @@ for arg in $*; do - --enable-racket=*) - supplied_racket=yes - ;; -+ --enable-scheme=*) -+ supplied_scheme=yes -+ ;; - --help | -h) - echo $0: - echo see --help-bc or --help-cs, since the Racket CS build and the -@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then - fi - - if test "$use_cs" = "yes" ; then -- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then -- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly -+ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then -+ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly - exit 1 - fi - -diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt -index 2ece417b78..8e6fc57b74 100644 ---- a/racket/src/cs/README.txt -+++ b/racket/src/cs/README.txt -@@ -39,6 +39,11 @@ build: - installed in the "../ChezScheme/boot/pb" directory as described by - "../ChezScheme/BUILDING". - -+ Supplying `--enable-scheme=...` is also an option if you alerady -+ have the same version of Chez Scheme built on the current platform. -+ Another build will be created, anyway, but more quickly than -+ without Chez Scheme. -+ - * Racket is needed to generate the files in the "schemified" - directory from the sources in sibling directories like "../io". The - Racket version must be practically the same as the current Racket -@@ -48,7 +53,6 @@ build: - Unlike Chez Scheme boot files, the files generated in "schemified" - are human-readable and -editable Scheme code. That provides a way - out of bootstrapping black holes, even without BC. -- - - - ======================================================================== -diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in -index 54a644a1d9..d73993f0fc 100644 ---- a/racket/src/cs/c/Makefile.in -+++ b/racket/src/cs/c/Makefile.in -@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@ - SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA) - SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme - SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH) --SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot -+SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot -+SCHEME_existing = @MAKE_SCHEME_SCHEME@ -+SCHEME = $(SCHEME@USE_SCHEME_MODE@) - - TARGET_MACH = @TARGET_MACH@ - SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH) -@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../.. - @INCLUDEDEP@ @srcdir@/../../version/version.mak - - cs: -- $(MAKE) scheme@T_CROSS_MODE@ -+ $(MAKE) scheme@MAKE_SCHEME_MODE@ - $(MAKE) racket-so - cd rktio; $(MAKE) - $(MAKE) racketcs -@@ -121,9 +123,13 @@ racket-so: - - RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@ - -+TARGET_MACH_built = $(TARGET_MACH) -+TARGET_MACH_existing = xc-$(TARGET_MACH) -+XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch -+ - CS_PROGS = SCHEME="$(SCHEME)" - CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@ --CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch" -+CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)" - PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot" - - build-racket-so: -@@ -163,6 +169,15 @@ pb-bootquick: - cd $(SCHEME_WORKAREA) && $(MAKE) reset - $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA) - -+scheme-via-scheme: -+ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot -+ $(MAKE) mach-make -+ -+$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot: -+ mkdir -p $(SCHEME_WORKAREA) -+ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force" -+ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all -+ - mach-make: - $(MAKE) config-scheme - cd $(SCHEME_WORKAREA) && $(MAKE) -@@ -182,24 +197,33 @@ config-scheme: - - scheme-cross: - env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt -+ $(MAKE) finish-scheme-cross -+ -+finish-scheme-cross: - $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA) - cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS) - cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t -- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch -+ $(MAKE) $(XPATCH_FILE) -+ -+scheme-cross-via-scheme: -+ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH) -+ $(MAKE) finish-scheme-cross - - # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older --# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files --XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ -- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot -+# than the build- use as Racket for build; or "auto" to create -- --enable-scheme= use as host's build directory for cross -+ --enable-scheme= use as host build for cross - --enable-mach= use Chez Scheme machine type - --enable-target= cross-build for Chez Scheme machine type - --enable-portable prefer portable to host-specific -@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style" - show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib' - - show_explicitly_set "${enable_racket}" "Racket" --show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" -+show_explicitly_set "${enable_scheme}" "Chez Scheme for build" - show_explicitly_set "${enable_mach}" "machine type" - show_explicitly_set "${enable_target}" "cross-build machine type" - show_explicitly_enabled "${enable_portable}" "portable" -@@ -4745,9 +4748,21 @@ esac - - SCHEME_DIR=${srcdir}/../../ChezScheme - MAKE_BUILD_SCHEME=checkout -+USE_SCHEME_MODE="_built" -+MAKE_SCHEME_MODE="${T_CROSS_MODE}" - - if test "${enable_scheme}" != "" ; then -- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ if test -d "${enable_scheme}" ; then -+ # Directory exists, so use it as a build directory -+ echo "Using supplied Scheme path as a build directory" -+ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ else -+ # Directory does not exist, so assume it's an executable -+ echo "Using supplied Scheme path as an executable" -+ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" -+ MAKE_SCHEME_SCHEME="${enable_scheme}" -+ USE_SCHEME_MODE="_existing" -+ fi - fi - - if test "${enable_racket}" != "" ; then -@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags - - - -+ -+ -+ - - - -diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac -index 464ebe1760..aaee88156d 100644 ---- a/racket/src/cs/c/configure.ac -+++ b/racket/src/cs/c/configure.ac -@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev - AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files]) - m4_include(../ac/path_arg.m4) - AC_ARG_ENABLE(racket, [ --enable-racket= use as Racket for build; or "auto" to create]) --AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host's build directory for cross]) -+AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host build for cross]) - AC_ARG_ENABLE(mach, [ --enable-mach= use Chez Scheme machine type ]) - AC_ARG_ENABLE(target, [ --enable-target= cross-build for Chez Scheme machine type ]) - m4_include(../ac/portable_arg.m4) -@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files" - show_explicitly_enabled "${enable_xonx}" "Unix style" - m4_include(../ac/path_show.m4) - show_explicitly_set "${enable_racket}" "Racket" --show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" -+show_explicitly_set "${enable_scheme}" "Chez Scheme for build" - show_explicitly_set "${enable_mach}" "machine type" - show_explicitly_set "${enable_target}" "cross-build machine type" - m4_include(../ac/portable_show.m4) -@@ -504,9 +504,21 @@ esac - - SCHEME_DIR=${srcdir}/../../ChezScheme - MAKE_BUILD_SCHEME=checkout -+USE_SCHEME_MODE="_built" -+MAKE_SCHEME_MODE="${T_CROSS_MODE}" - - if test "${enable_scheme}" != "" ; then -- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ if test -d "${enable_scheme}" ; then -+ # Directory exists, so use it as a build directory -+ echo "Using supplied Scheme path as a build directory" -+ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" -+ else -+ # Directory does not exist, so assume it's an executable -+ echo "Using supplied Scheme path as an executable" -+ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" -+ MAKE_SCHEME_SCHEME="${enable_scheme}" -+ USE_SCHEME_MODE="_existing" -+ fi - fi - - if test "${enable_racket}" != "" ; then -@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH) - AC_SUBST(CROSS_MODE) - AC_SUBST(T_CROSS_MODE) - AC_SUBST(TT_CROSS_MODE) -+AC_SUBST(MAKE_SCHEME_MODE) -+AC_SUBST(MAKE_SCHEME_SCHEME) -+AC_SUBST(USE_SCHEME_MODE) - AC_SUBST(SETUP_BOOT_MODE) - AC_SUBST(OSX) - AC_SUBST(NOT_OSX) --- -2.32.0 - diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch deleted file mode 100644 index 1e018eaa79..0000000000 --- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch +++ /dev/null @@ -1,26 +0,0 @@ -From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001 -From: Matthew Flatt -Date: Mon, 31 Jan 2022 15:31:22 -0700 -Subject: [PATCH] fix creation of tethered launchers - -Related to racket/racket#4133 - -(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) ---- - gui-lib/mred/installer.rkt | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt -index b1691472..9ef06c53 100644 ---- a/gui-lib/mred/installer.rkt -+++ b/gui-lib/mred/installer.rkt -@@ -72,4 +72,5 @@ - (list "-A" (path->string (find-system-path 'addon-dir))))) - - (define (config-flags) -- (list "-G" (path->string (find-config-dir)))) -+ (list "-X" (path->string (find-collects-dir)) -+ "-G" (path->string (find-config-dir)))) --- -2.32.0 - diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 471a11dd48..c6f8ec20ba 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -195,7 +195,7 @@ racket-vm-cs racket-vm-bc)) -(define %racket-version "8.4") ; Remember to update chez-scheme-for-racket! +(define %racket-version "8.5") ; Remember to update chez-scheme-for-racket! (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -205,11 +205,9 @@ (url "https://github.com/racket/racket") (commit %racket-commit))) (sha256 - (base32 "1vpl66gdgc8rnldmn8rmb7ar9l057jqjvgpfn29k57i3c5skr8s6")) + (base32 "0f9zyhdvbh4xsndrqjzl85j5ziz0rmqi676g9s1lw3h3skq2636h")) (file-name (git-file-name "racket" %racket-version)) - (patches (search-patches "racket-minimal-sh-via-rktio.patch" - ;; Remove by Racket 8.5: - "racket-enable-scheme-backport.patch")) + (patches (search-patches "racket-minimal-sh-via-rktio.patch")) (modules '((guix build utils))) (snippet #~(begin @@ -248,8 +246,10 @@ ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" #$(file-append bash-minimal "/bin/sh")) "--disable-strip" - ;; XXX: origtree layout is required by some other packages down the - ;; bootstrap chain. Remove these flags as soon as we can do without them. + ;; Using --enable-origtree lets us distinguish the VM from subsequent + ;; layers and produces a build with the shape expected by tools such as + ;; "distro-build" and "raco-cross". Removing these flags would require + ;; changes, especially to 'configure-layer.rkt' (defined below). "--enable-origtree" ,(string-append "--prefix=" #$output "/opt/racket-vm"))) @@ -589,7 +589,7 @@ DrRacket IDE, are not included.") racket-minimal ;; <-- TODO non-tethered layer (racket-vm-for-system) (simple-racket-origin - "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") + "2d" (base32 "0fb5v6058ls08xw3zbmqyr2ym0psm119gl9ffgmhm9w8rs9i4dq7") '("2d" "2d-doc" "2d-lib")) (simple-racket-origin "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx") @@ -622,22 +622,22 @@ DrRacket IDE, are not included.") "data" (base32 "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55") '("data" "data-doc" "data-enumerate-lib" "data-lib")) (simple-racket-origin - "datalog" (base32 "0n5j5gnqh7g31mvgx19ggl18hirzbvq2r189lbngmnrmbc7b73fp") + "datalog" (base32 "0nf6cy4djpyhfvgpa6yn72apbz9s83gp0qg95pzjd0az4v6qwq1s") '(("datalog" "."))) (simple-racket-origin "db" (base32 "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5") '("db" "db-doc" "db-lib")) (simple-racket-origin - "deinprogramm" (base32 "1is6fapgv6rxfjz47nh6qf3kh7y7sjdinakaxqffi46gf1al8prd") + "deinprogramm" (base32 "0g8flr1qg3bcyhdinqhs4w7dyisaqyailbxrjgd2a7zlqmdyicfr") '("deinprogramm" "deinprogramm-signature")) (simple-racket-origin "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0") '("distributed-places" "distributed-places-doc" "distributed-places-lib")) (simple-racket-origin - "draw" (base32 "1xgjfbh70hqw67z88iqqajg98d04qwbzn6im2wj47rs28jxlm9ly") + "draw" (base32 "1fpk85rs2crd63bxnmwj2pysisd62pxcqaip01si67dv1ri8ff92") '("draw" "draw-doc" "draw-lib")) (simple-racket-origin - "drracket" (base32 "0m3l4an3nq2ycd1h287s1az2v2zprjbzd8if2x7d5r71vaj4i00c") + "drracket" (base32 "0dipnz92c63zxys9z1kl5215rm7arc35g9r8bs8ivp96p75mljnz") '("drracket" "drracket-plugin-lib" "drracket-tool" @@ -657,7 +657,7 @@ DrRacket IDE, are not included.") "errortrace" (base32 "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip") '("errortrace" "errortrace-doc" "errortrace-lib")) (simple-racket-origin - "expeditor" (base32 "07djzxs6307l51mcsk3yr2g4g47ayxa3878g7sf5xhqdr4hd9vxf") + "expeditor" (base32 "0mjfwb4wzwsg5xj3k6cmik0va432n56rp5h7rxx1c2yy3prh1j7q") '("expeditor" "expeditor-doc" "expeditor-lib")) (simple-racket-origin "frtime" (base32 "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5") @@ -670,25 +670,14 @@ DrRacket IDE, are not included.") (simple-racket-origin "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d") '(("games" "."))) - (racket-packages-origin - "gui" (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/racket/gui") - (commit %racket-commit))) - (sha256 (base32 - "1x33jgrx3r32k7hgwr591z3xqv1m2r5nc4km2fnxv0ak2xa0j3gj")) - (patches - ;; remove in Racket 8.5 - ;; see https://github.com/racket/racket/issues/4133 - (search-patches "racket-gui-tethered-launcher-backport.patch")) - (file-name (git-file-name "racket-gui" %racket-version))) + (simple-racket-origin + "gui" (base32 "0r3ck4gxdhnzr1a1fi0f1i7gwfip7akq10qgcxza66pp57hnl0wx") '("gui" "gui-doc" "gui-lib" "tex-table")) (simple-racket-origin "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5") '("gui-pkg-manager-lib")) (simple-racket-origin - "htdp" (base32 "0r4ykybcpr10y2db9rlza9pr0xh58nd7ac389mjcxp8g386hgihl") + "htdp" (base32 "19xqixrqbwdxph17w9jga19008j88harb5wgml4hpqj3x0apx9g3") '("htdp" "htdp-doc" "htdp-lib")) (simple-racket-origin "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x") @@ -756,7 +745,7 @@ DrRacket IDE, are not included.") "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1") '("pconvert-lib")) (simple-racket-origin - "pict" (base32 "0g1iwdr6qh1xb0crhj96830vjjnbds409xbpqn7j5sh0ksy6vr5x") + "pict" (base32 "0v7a3l77swsbh80mnb9rakdwgw7s66ji0mall7qcqfwyg1b4zmlv") '("pict" "pict-doc" "pict-lib")) (simple-racket-origin "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x") @@ -771,7 +760,7 @@ DrRacket IDE, are not included.") "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9") '("planet" "planet-doc" "planet-lib")) (simple-racket-origin - "plot" (base32 "07kq32si34ybcwz8idxxcrzssg8diyrp1nfgkcj0mmvr45321zm7") + "plot" (base32 "04871pspbm0q3bz5896sa3jw2rp9i6jf0b5aivrxfp56vxxd2ybb") '("plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib")) (simple-racket-origin "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg") @@ -786,7 +775,7 @@ DrRacket IDE, are not included.") (url "https://github.com/Metaxal/quickscript") (commit %racket-commit))) (sha256 (base32 - "100g3yqhbjdq06b6l6d72ywsw29awgy8crqg33wj7h12xq07nzcr")) + "00sf5nw09aacd0l4a4cknnffvcs95p596im3blsdvfz5ck6jdwl8")) (file-name (git-file-name "Metaxal-quickscript" %racket-version))) '(("quickscript" "."))) (simple-racket-origin @@ -807,10 +796,10 @@ DrRacket IDE, are not included.") (git-file-name "jeapostrophe-racket-cheat" %racket-version))) '(("racket-cheat" "."))) (simple-racket-origin - "racklog" (base32 "1rgrvwy3kr9b9w5cghsffiv3ly00yfvvzr5xaaw83g1w7yin0mnb") + "racklog" (base32 "0fbq0fpfb3l6h7h772dvkmlzlk2dnq5f8296xx1qxhhwypibqzr9") '(("racklog" "."))) (simple-racket-origin - "rackunit" (base32 "057z31rja6h3nabh5b2xgwfrzmlm6h1cv1qcgf3xfy4g2q5dqn5p") + "rackunit" (base32 "0vfwcddzrgrdv5awjka7m0jzqhqvfc5wlkih83a670y96496a83n") '("rackunit" "rackunit-doc" "rackunit-gui" @@ -826,7 +815,7 @@ DrRacket IDE, are not included.") "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi") '(("realm" "."))) (simple-racket-origin - "redex" (base32 "0vlgxbnbgrlihk1hh5zd6hsc4566ldi4q76f87z5vai54dxkwy2f") + "redex" (base32 "18rn8ddsqh1s7hdlb2cb9wxln63bz0wysjssaf9v92r712xnnv8i") '("redex" "redex-benchmark" "redex-doc" @@ -841,7 +830,7 @@ DrRacket IDE, are not included.") "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x") '(("scheme-lib" "."))) (simple-racket-origin - "scribble" (base32 "0rgvnsykrxkah6s5fw1vyp9lxsb4z9w6hgwk5j6wbwjp2gsfczbm") + "scribble" (base32 "0fbb7xgz95y90247hfc1a19v7ry8m6blvv4y8irdgzhjvik70zb3") '("scribble" "scribble-doc" "scribble-html-lib" @@ -873,35 +862,24 @@ DrRacket IDE, are not included.") "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj") '("snip" "snip-lib")) (simple-racket-origin - "typed-racket" (base32 "1462kj9yswsxbnw71casylzlvhd7cxrml2v9j7rcsnn9hmrqx4vv") + "typed-racket" (base32 "0z6bagp6qiw0i3slhvq035y5hqgq664xw3bdlvdayad0bgbg0mdc") '("source-syntax" "typed-racket" "typed-racket-compatibility" "typed-racket-doc" "typed-racket-lib" "typed-racket-more")) - (racket-packages-origin - "srfi" (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/racket/srfi") - ;; Includes an FSDG fix: return to %racket-commit in 8.5. - ;; See . - (commit "7243029b135741ce08ae30f877e2f49a2a460b22"))) - (sha256 (base32 - "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn")) - ;; Use the relevant version for srfi-doc and srfi-lib, - ;; since we're using a newer commit than the v8.4 tag. - (file-name (git-file-name "racket-srfi" "1.1"))) + (simple-racket-origin + "srfi" (base32 "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn") '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib")) (simple-racket-origin - "string-constants" (base32 "1qizjq4n0hzdgdcjjpr94464gsywpsk2g9mnvwzqr7dcqbrsfvn6") + "string-constants" (base32 "0b1ji31pv6bjb0a2bh9sqp5abvf91gn2rai8r4c4nkar1fzfwfac") '("string-constants" "string-constants-doc" "string-constants-lib")) (simple-racket-origin "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67") '(("swindle" "."))) (simple-racket-origin - "syntax-color" (base32 "1vf2fc3qvx8a1igi7swsg8gaqhx786sa0vqxd18xhbsidfgb5ywp") + "syntax-color" (base32 "17lb2403ymz6sflw4vs3gsh2y7kgsf0gn8sncsxjhi16rpj3a9vm") '("syntax-color" "syntax-color-doc" "syntax-color-lib")) (simple-racket-origin "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia") @@ -910,13 +888,13 @@ DrRacket IDE, are not included.") "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y") '("unix-socket" "unix-socket-doc" "unix-socket-lib")) (simple-racket-origin - "web-server" (base32 "1zgb6jl7zx6258ljs8f3lvryrq5n5zpd71dqzr698m92kw3x2pkn") + "web-server" (base32 "1g4x79ym3mgxv4f3z3z84j12355pf44pjlzlb7f0h6r0i7p0cbjd") '("web-server" "web-server-doc" "web-server-lib")) (simple-racket-origin "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b") '("wxme" "wxme-lib")) (simple-racket-origin - "xrepl" (base32 "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3") + "xrepl" (base32 "19svg0jfs656bld5ikqipz3a5szk5k02zq5fh43209qw527dnfbk") '("xrepl" "xrepl-doc" "xrepl-lib")))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From c29f9f72cdbdf3d3c937b4eb9f5b49cc9cd99594 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 5 Apr 2022 16:53:20 -0400 Subject: gnu: python-mypy: Update to 0.942 and fix search path. * gnu/packages/patches/python-mypy-use-sys-path.patch: New patch. * gnu/local.mk: Register it. * gnu/packages/python-check.scm (python-mypy): Update to 0.942. [source]: Apply patch. --- gnu/local.mk | 1 + .../patches/python-mypy-use-sys-path.patch | 130 +++++++++++++++++++++ gnu/packages/python-check.scm | 15 +-- 3 files changed, 139 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/python-mypy-use-sys-path.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d7788796cc..9c5c6896ba 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1722,6 +1722,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-waitress-fix-tests.patch \ %D%/packages/patches/python-werkzeug-tests.patch \ %D%/packages/patches/python-mypy-12332.patch \ + %D%/packages/patches/python-mypy-use-sys-path.patch \ %D%/packages/patches/qemu-build-info-manual.patch \ %D%/packages/patches/qemu-glibc-2.27.patch \ %D%/packages/patches/qemu-glibc-2.30.patch \ diff --git a/gnu/packages/patches/python-mypy-use-sys-path.patch b/gnu/packages/patches/python-mypy-use-sys-path.patch new file mode 100644 index 0000000000..1b12526456 --- /dev/null +++ b/gnu/packages/patches/python-mypy-use-sys-path.patch @@ -0,0 +1,130 @@ +This patch fixes the annotation files search of mypy on non-FHS distributions. + +Submitted upstream: https://github.com/python/mypy/pull/12530 + +diff --git a/mypy/main.py b/mypy/main.py +index 3d9836587..f9b0cbd39 100644 +--- a/mypy/main.py ++++ b/mypy/main.py +@@ -1033,10 +1033,10 @@ def process_options(args: List[str], + # Set target. + if special_opts.modules + special_opts.packages: + options.build_type = BuildType.MODULE +- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) ++ site_packages = get_site_packages_dirs(options.python_executable) + search_paths = SearchPaths((os.getcwd(),), + tuple(mypy_path() + options.mypy_path), +- tuple(egg_dirs + site_packages), ++ tuple(site_packages), + ()) + targets = [] + # TODO: use the same cache that the BuildManager will +diff --git a/mypy/modulefinder.py b/mypy/modulefinder.py +index 94d2dd34c..337a2d59b 100644 +--- a/mypy/modulefinder.py ++++ b/mypy/modulefinder.py +@@ -629,7 +629,7 @@ def get_prefixes(python_executable: Optional[str]) -> Tuple[str, str]: + + + @functools.lru_cache(maxsize=None) +-def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], List[str]]: ++def get_site_packages_dirs(python_executable: Optional[str]) -> List[str]: + """Find package directories for given python. + + This runs a subprocess call, which generates a list of the egg directories, and the site +@@ -648,51 +648,7 @@ def get_site_packages_dirs(python_executable: Optional[str]) -> Tuple[List[str], + site_packages = ast.literal_eval( + subprocess.check_output([python_executable, pyinfo.__file__, 'getsitepackages'], + stderr=subprocess.PIPE).decode()) +- return expand_site_packages(site_packages) +- +- +-def expand_site_packages(site_packages: List[str]) -> Tuple[List[str], List[str]]: +- """Expands .pth imports in site-packages directories""" +- egg_dirs: List[str] = [] +- for dir in site_packages: +- if not os.path.isdir(dir): +- continue +- pth_filenames = sorted(name for name in os.listdir(dir) if name.endswith(".pth")) +- for pth_filename in pth_filenames: +- egg_dirs.extend(_parse_pth_file(dir, pth_filename)) +- +- return egg_dirs, site_packages +- +- +-def _parse_pth_file(dir: str, pth_filename: str) -> Iterator[str]: +- """ +- Mimics a subset of .pth import hook from Lib/site.py +- See https://github.com/python/cpython/blob/3.5/Lib/site.py#L146-L185 +- """ +- +- pth_file = os.path.join(dir, pth_filename) +- try: +- f = open(pth_file, "r") +- except OSError: +- return +- with f: +- for line in f.readlines(): +- if line.startswith("#"): +- # Skip comment lines +- continue +- if line.startswith(("import ", "import\t")): +- # import statements in .pth files are not supported +- continue +- +- yield _make_abspath(line.rstrip(), dir) +- +- +-def _make_abspath(path: str, root: str) -> str: +- """Take a path and make it absolute relative to root if not already absolute.""" +- if os.path.isabs(path): +- return os.path.normpath(path) +- else: +- return os.path.join(root, os.path.normpath(path)) ++ return site_packages + + + def add_py2_mypypath_entries(mypypath: List[str]) -> List[str]: +@@ -781,7 +737,7 @@ def compute_search_paths(sources: List[BuildSource], + if options.python_version[0] == 2: + mypypath = add_py2_mypypath_entries(mypypath) + +- egg_dirs, site_packages = get_site_packages_dirs(options.python_executable) ++ site_packages = get_site_packages_dirs(options.python_executable) + base_prefix, prefix = get_prefixes(options.python_executable) + is_venv = base_prefix != prefix + for site_dir in site_packages: +@@ -801,7 +757,7 @@ def compute_search_paths(sources: List[BuildSource], + + return SearchPaths(python_path=tuple(reversed(python_path)), + mypy_path=tuple(mypypath), +- package_path=tuple(egg_dirs + site_packages), ++ package_path=tuple(site_packages), + typeshed_path=tuple(lib_path)) + + +diff --git a/mypy/pyinfo.py b/mypy/pyinfo.py +index ab2d3286b..9fb0501a1 100644 +--- a/mypy/pyinfo.py ++++ b/mypy/pyinfo.py +@@ -24,16 +24,11 @@ def getprefixes(): + + def getsitepackages(): + # type: () -> List[str] +- res = [] +- if hasattr(site, 'getsitepackages'): +- res.extend(site.getsitepackages()) + +- if hasattr(site, 'getusersitepackages') and site.ENABLE_USER_SITE: +- res.insert(0, site.getusersitepackages()) +- else: +- from distutils.sysconfig import get_python_lib +- res = [get_python_lib()] +- return res ++ # Simply return sys.path, which has already been expanded ++ # correctly via Python's site.py module, which takes care of .pth, ++ # sitecustomize.py files, etc. ++ return sys.path + + + if __name__ == '__main__': diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 8cf1526242..0a6bf423f0 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2019, 2021, 2022 Ricardo Wurmus ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020, 2021 Efraim Flashner -;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer +;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019, 2021 Hartmut Goebel ;;; Copyright © 2020 Julien Lepiller ;;; Copyright © 2020, 2022 Marius Bakke @@ -1673,7 +1673,7 @@ supported by the MyPy typechecker.") (define-public python-mypy (package (name "python-mypy") - (version "0.931") + (version "0.942") (source (origin ;; Because of https://github.com/python/mypy/issues/9584, the @@ -1690,9 +1690,10 @@ supported by the MyPy typechecker.") (file-name (git-file-name name version)) (sha256 (base32 - "1v83flrdxh8grcp40qw04q4hzjflih9xwib64078vsxv2w36f817")) + "0hxnrqhvskiclwfj2s4gyfclzjas1dvpfxhyng8v7mq38rqps1j5")) (patches - (search-patches "python-mypy-12332.patch")))) + (search-patches "python-mypy-12332.patch" + "python-mypy-use-sys-path.patch")))) (build-system python-build-system) (arguments `(#:phases @@ -1714,10 +1715,10 @@ supported by the MyPy typechecker.") (home-page "http://www.mypy-lang.org/") (synopsis "Static type checker for Python") (description "Mypy is an optional static type checker for Python that aims -to combine the benefits of dynamic (or 'duck') typing and static typing. Mypy combines +to combine the benefits of dynamic typing and static typing. Mypy combines the expressive power and convenience of Python with a powerful type system and -compile-time type checking. Mypy type checks standard Python programs; run them using -any Python VM with basically no runtime overhead.") +compile-time type checking. Mypy type checks standard Python programs; run +them using any Python VM with basically no runtime overhead.") ;; Most of the code is under MIT license; Some files are under Python Software ;; Foundation License version 2: stdlib-samples/*, mypyc/lib-rt/pythonsupport.h and ;; mypyc/lib-rt/getargs.c -- cgit v1.2.3 From 08199a93c8e986841dde05b1c249a01e7e29430a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 11 Apr 2022 01:15:28 -0400 Subject: gnu: Add python-debugpy. * gnu/packages/python-xyz.scm (python-debugpy): New variable. * gnu/packages/patches/python-debugpy-unbundle-pydevd.patch: New file. * gnu/local.mk: Register it. --- gnu/local.mk | 1 + .../patches/python-debugpy-unbundle-pydevd.patch | 254 +++++++++++++++++++++ gnu/packages/python-xyz.scm | 72 ++++++ 3 files changed, 327 insertions(+) create mode 100644 gnu/packages/patches/python-debugpy-unbundle-pydevd.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 9c5c6896ba..06367fac5e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1681,6 +1681,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ + %D%/packages/patches/python-debugpy-unbundle-pydevd.patch \ %D%/packages/patches/python-docopt-pytest6-compat.patch \ %D%/packages/patches/python-execnet-read-only-fix.patch \ %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \ diff --git a/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch b/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch new file mode 100644 index 0000000000..7a6ad54489 --- /dev/null +++ b/gnu/packages/patches/python-debugpy-unbundle-pydevd.patch @@ -0,0 +1,254 @@ +Allow using pydevd as a regular dependency. +Submitted upstream at: https://github.com/microsoft/debugpy/pull/902 + +diff --git a/setup.py b/setup.py +index 5fc40070..3a530a29 100644 +--- a/setup.py ++++ b/setup.py +@@ -11,6 +11,9 @@ import subprocess + import sys + + ++DEBUGPY_BUNDLING_DISABLED = bool(os.getenv('DEBUGPY_BUNDLING_DISABLED')) ++ ++ + sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + import versioneer # noqa + +@@ -18,12 +21,15 @@ del sys.path[0] + + sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "src")) + import debugpy +-import debugpy._vendored ++ ++if not DEBUGPY_BUNDLING_DISABLED: ++ import debugpy._vendored + + del sys.path[0] + + +-PYDEVD_ROOT = debugpy._vendored.project_root("pydevd") ++PYDEVD_ROOT = (None if DEBUGPY_BUNDLING_DISABLED else ++ debugpy._vendored.project_root("pydevd")) + DEBUGBY_ROOT = os.path.dirname(os.path.abspath(debugpy.__file__)) + + +@@ -67,7 +73,7 @@ def iter_vendored_files(): + # relevant setuptools versions. + class ExtModules(list): + def __bool__(self): +- return True ++ return not DEBUGPY_BUNDLING_DISABLED + + + def override_build(cmds): +@@ -133,9 +139,24 @@ with open("DESCRIPTION.md", "r") as fh: + + + if __name__ == "__main__": +- if not os.getenv("SKIP_CYTHON_BUILD"): ++ if not (os.getenv("SKIP_CYTHON_BUILD") or DEBUGPY_BUNDLING_DISABLED): + cython_build() + ++ # Etch bundling status in the source. ++ if debugpy.__bundling_disabled__ != DEBUGPY_BUNDLING_DISABLED: ++ ++ with open(os.path.join(DEBUGBY_ROOT, '__init__.py'), 'r') as f: ++ lines = f.readlines() ++ with open(os.path.join(DEBUGBY_ROOT, '__init__.py'), 'w') as f: ++ edited = [] ++ for line in lines: ++ if line.startswith('__bundling_disabled__'): ++ edited.append( ++ f'__bundling_disabled__ = {DEBUGPY_BUNDLING_DISABLED}\n') ++ else: ++ edited.append(line) ++ f.writelines(edited) ++ + extras = {} + platforms = get_buildplatform() + if platforms is not None: +@@ -145,6 +166,18 @@ if __name__ == "__main__": + override_build(cmds) + override_build_py(cmds) + ++ data = {"debugpy": ["ThirdPartyNotices.txt"]} ++ packages = [ ++ "debugpy", ++ "debugpy.adapter", ++ "debugpy.common", ++ "debugpy.launcher", ++ "debugpy.server", ++ ] ++ if not DEBUGPY_BUNDLING_DISABLED: ++ data.update({"debugpy._vendored": list(iter_vendored_files())}) ++ packages.append("debugpy._vendored") ++ + setuptools.setup( + name="debugpy", + version=versioneer.get_version(), +@@ -173,20 +206,10 @@ if __name__ == "__main__": + "License :: OSI Approved :: MIT License", + ], + package_dir={"": "src"}, +- packages=[ +- "debugpy", +- "debugpy.adapter", +- "debugpy.common", +- "debugpy.launcher", +- "debugpy.server", +- "debugpy._vendored", +- ], +- package_data={ +- "debugpy": ["ThirdPartyNotices.txt"], +- "debugpy._vendored": list(iter_vendored_files()), +- }, ++ packages=packages, ++ package_data=data, + ext_modules=ExtModules(), +- has_ext_modules=lambda: True, ++ has_ext_modules=lambda: not DEBUGPY_BUNDLING_DISABLED, + cmdclass=cmds, + **extras + ) +diff --git a/src/debugpy/__init__.py b/src/debugpy/__init__.py +index baa5a7c5..7b7a29aa 100644 +--- a/src/debugpy/__init__.py ++++ b/src/debugpy/__init__.py +@@ -206,6 +206,8 @@ def trace_this_thread(should_trace): + + __version__ = _version.get_versions()["version"] + ++__bundling_disabled__ = False ++ + # Force absolute path on Python 2. + __file__ = os.path.abspath(__file__) + +diff --git a/src/debugpy/server/__init__.py b/src/debugpy/server/__init__.py +index e6a1ad66..5f29a87a 100644 +--- a/src/debugpy/server/__init__.py ++++ b/src/debugpy/server/__init__.py +@@ -4,6 +4,50 @@ + + from __future__ import absolute_import, division, print_function, unicode_literals + ++from importlib import import_module ++import os ++ + # "force_pydevd" must be imported first to ensure (via side effects) + # that the debugpy-vendored copy of pydevd gets used. +-import debugpy._vendored.force_pydevd # noqa ++import debugpy ++if debugpy.__bundling_disabled__: ++ # Do what force_pydevd.py does, but using the system-provided ++ # pydevd. ++ ++ # XXX: This is copied here so that the whole '_vendored' directory ++ # can be deleted when DEBUGPY_BUNDLING_DISABLED is set. ++ ++ # If debugpy logging is enabled, enable it for pydevd as well ++ if "DEBUGPY_LOG_DIR" in os.environ: ++ os.environ[str("PYDEVD_DEBUG")] = str("True") ++ os.environ[str("PYDEVD_DEBUG_FILE")] = \ ++ os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log") ++ ++ # Work around https://github.com/microsoft/debugpy/issues/346. ++ # Disable pydevd frame-eval optimizations only if unset, to allow opt-in. ++ if "PYDEVD_USE_FRAME_EVAL" not in os.environ: ++ os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO") ++ ++ # Constants must be set before importing any other pydevd module ++ # due to heavy use of "from" in them. ++ pydevd_constants = import_module('_pydevd_bundle.pydevd_constants') ++ # The default pydevd value is 1000. ++ pydevd_constants.MAXIMUM_VARIABLE_REPRESENTATION_SIZE = 2 ** 32 ++ ++ # When pydevd is imported it sets the breakpoint behavior, but it needs to be ++ # overridden because by default pydevd will connect to the remote debugger using ++ # its own custom protocol rather than DAP. ++ import pydevd # noqa ++ import debugpy # noqa ++ ++ def debugpy_breakpointhook(): ++ debugpy.breakpoint() ++ ++ pydevd.install_breakpointhook(debugpy_breakpointhook) ++ ++ # Ensure that pydevd uses JSON protocol ++ from _pydevd_bundle import pydevd_constants ++ from _pydevd_bundle import pydevd_defaults ++ pydevd_defaults.PydevdCustomization.DEFAULT_PROTOCOL = pydevd_constants.HTTP_JSON_PROTOCOL ++else: ++ import debugpy._vendored.force_pydevd # noqa +diff --git a/src/debugpy/server/attach_pid_injected.py b/src/debugpy/server/attach_pid_injected.py +index e6345996..87cfdd53 100644 +--- a/src/debugpy/server/attach_pid_injected.py ++++ b/src/debugpy/server/attach_pid_injected.py +@@ -8,6 +8,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera + + import os + ++import debugpy + + __file__ = os.path.abspath(__file__) + _debugpy_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) +@@ -30,25 +31,29 @@ def attach(setup): + def on_critical(msg): + print(msg, file=sys.stderr) + +- pydevd_attach_to_process_path = os.path.join( +- _debugpy_dir, +- "debugpy", +- "_vendored", +- "pydevd", +- "pydevd_attach_to_process", +- ) +- assert os.path.exists(pydevd_attach_to_process_path) +- sys.path.insert(0, pydevd_attach_to_process_path) +- +- # NOTE: that it's not a part of the pydevd PYTHONPATH +- import attach_script ++ if debugpy.__bundling_disabled__: ++ from pydevd_attach_to_process import attach_script ++ else: ++ pydevd_attach_to_process_path = os.path.join( ++ _debugpy_dir, ++ "debugpy", ++ "_vendored", ++ "pydevd", ++ "pydevd_attach_to_process", ++ ) ++ assert os.path.exists(pydevd_attach_to_process_path) ++ sys.path.insert(0, pydevd_attach_to_process_path) ++ ++ # NOTE: that it's not a part of the pydevd PYTHONPATH ++ import attach_script + + attach_script.fix_main_thread_id( + on_warn=on_warn, on_exception=on_exception, on_critical=on_critical + ) + +- # NOTE: At this point it should be safe to remove this. +- sys.path.remove(pydevd_attach_to_process_path) ++ if not debugpy.__bundling_disabled__: ++ # NOTE: At this point it should be safe to remove this. ++ sys.path.remove(pydevd_attach_to_process_path) + except: + import traceback + +diff --git a/tests/tests/test_vendoring.py b/tests/tests/test_vendoring.py +index dd6c4269..28c03702 100644 +--- a/tests/tests/test_vendoring.py ++++ b/tests/tests/test_vendoring.py +@@ -1,3 +1,8 @@ ++import pytest ++ ++import debugpy ++ ++@pytest.mark.skipif(debugpy.__bundling_disabled__, reason='Bundling disabled') + def test_vendoring(pyfile): + @pyfile + def import_debugpy(): +-- +2.34.0 + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 11c057ad99..0034ed703b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13134,6 +13134,78 @@ libmagic."))) and other @acronym{IDEs, Integrated Development Environments}.") (license license:epl1.0)))) +(define-public python-debugpy + (package + (name "python-debugpy") + (version "1.6.0") + (source + (origin + (method git-fetch) + (uri (git-reference ;no tests in PyPI archive + (url "https://github.com/microsoft/debugpy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + ;; Remove the bundled PyDev-Debugger copy, including its pre-built + ;; attach binary. + (snippet '(delete-file-recursively "src/debugpy/_vendored")) + (patches (search-patches "python-debugpy-unbundle-pydevd.patch")) + (sha256 + (base32 + "1dpfzs3p51648i7f3fz8dw5d0vrj39iwn1jhn0226idc02ybyqih")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-sh-in-tests + (lambda _ + (substitute* "tests/debugpy/test_run.py" + (("#!/bin/sh") + (string-append "#!" (which "sh")))))) + (add-after 'unpack 'fix-version + ;; Versioneer is useless when there is no git metadata. + (lambda _ + (substitute* "setup.py" + (("version=versioneer.get_version\\(),") + (format #f "version=~s," #$version))))) + (add-before 'build 'configure + (lambda _ + ;; This adjusts the behavior of debugpy to load pydevd from + ;; Python site packages. + (setenv "DEBUGPY_BUNDLING_DISABLED" "1"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (invoke "pytest" "-vv" + "-n" (number->string (parallel-job-count)) + "-k" + (string-append + ;; These tests cannot be run in parallel because their + ;; test data would not be copied by xdist and lead to + ;; import errors. (see: + ;; https://github.com/microsoft/debugpy/issues/342 and + ;; https://github.com/microsoft/debugpy/issues/880). + "not test_custom_python_args " + "and not test_autokill "))))))) + (native-inputs + ;; See: https://raw.githubusercontent.com/microsoft/debugpy/ + ;; main/tests/requirements.txt. + (list python-django + python-gevent + python-flask + python-psutil + python-pytest + python-pytest-cov + python-pytest-timeout + python-pytest-xdist + python-requests)) + (propagated-inputs (list python-pydevd)) + (home-page "https://aka.ms/debugpy") + (synopsis "Debug Adapter Protocol Python implementation") + (description "An implementation of the Debug Adapter Protocol for +Python.") + (license license:expat))) + (define-public python-debian (package (name "python-debian") -- cgit v1.2.3 From 2576d9ffc4c5cf84c4c6c1dfee2d2d8655fba4b4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 16 Apr 2022 23:44:01 -0400 Subject: gnu: python-ipython-documentation: Also build info and pdf targets. * gnu/packages/patches/python-ipython-documentation-chars.patch: New file. * gnu/packages/patches/python-ipython-documentation-repro.patch: Likewise. * gnu/local.mk: Register them. * gnu/packages/python-xyz.scm (python-ipython-documentation) [source]: Apply patches. [arguments]: Use gexps. [phases]{sanitize-sources}: New phase. {configure-sphinx-for-xelatex}: Likewise. {install}: Streamline. Also build and install the PDF and info manual. Enable parallel processing. [inputs]: Delete field. [propagated-inputs]: Remove texlive-updmap.cfg input. Add fontconfig, font-gnu-freefont, graphviz, python-docrepr, texlive-polyglossia, texlive-bin and texlive-xindy. --- gnu/local.mk | 2 + .../python-ipython-documentation-chars.patch | 18 +++ .../python-ipython-documentation-repro.patch | 25 ++++ gnu/packages/python-xyz.scm | 145 +++++++++++---------- 4 files changed, 118 insertions(+), 72 deletions(-) create mode 100644 gnu/packages/patches/python-ipython-documentation-chars.patch create mode 100644 gnu/packages/patches/python-ipython-documentation-repro.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 06367fac5e..a5cf82ab28 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1686,6 +1686,8 @@ dist_patch_DATA = \ %D%/packages/patches/python-execnet-read-only-fix.patch \ %D%/packages/patches/python-fixtures-remove-monkeypatch-test.patch \ %D%/packages/patches/python-flask-restful-werkzeug-compat.patch \ + %D%/packages/patches/python-ipython-documentation-chars.patch \ + %D%/packages/patches/python-ipython-documentation-repro.patch \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pdoc3-tests.patch \ %D%/packages/patches/python-peachpy-determinism.patch \ diff --git a/gnu/packages/patches/python-ipython-documentation-chars.patch b/gnu/packages/patches/python-ipython-documentation-chars.patch new file mode 100644 index 0000000000..a52c54f513 --- /dev/null +++ b/gnu/packages/patches/python-ipython-documentation-chars.patch @@ -0,0 +1,18 @@ +Avoid LaTeX errors due to non-printable characters. +Submitted upstream: https://github.com/ipython/ipython/pull/13640 + +diff --git a/IPython/utils/coloransi.py b/IPython/utils/coloransi.py +index e33142180..9300b0108 100644 +--- a/IPython/utils/coloransi.py ++++ b/IPython/utils/coloransi.py +@@ -74,8 +74,8 @@ class TermColors: + class InputTermColors: + """Color escape sequences for input prompts. + +- This class is similar to TermColors, but the escapes are wrapped in \001 +- and \002 so that readline can properly know the length of each line and ++ This class is similar to TermColors, but the escapes are wrapped in \\001 ++ and \\002 so that readline can properly know the length of each line and + can wrap lines accordingly. Use this class for any colored text which + needs to be used in input prompts, such as in calls to raw_input(). + diff --git a/gnu/packages/patches/python-ipython-documentation-repro.patch b/gnu/packages/patches/python-ipython-documentation-repro.patch new file mode 100644 index 0000000000..d6a6e9c3fd --- /dev/null +++ b/gnu/packages/patches/python-ipython-documentation-repro.patch @@ -0,0 +1,25 @@ +Fix non-reproducibilities caused by time-dependent procedures. +Submitted upstream: https://github.com/ipython/ipython/pull/13640 + +diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py +index 18bdfcae9..2c665ac87 100644 +--- a/IPython/sphinxext/ipython_directive.py ++++ b/IPython/sphinxext/ipython_directive.py +@@ -19,7 +19,7 @@ + In [1]: 1+1 + + In [1]: import datetime +- ...: datetime.datetime.now() ++ ...: datetime.date.fromisoformat('2022-02-22') + + It supports IPython construct that plain + Python does not understand (like magics): +@@ -28,7 +28,7 @@ + + In [0]: import time + +- In [0]: %timeit time.sleep(0.05) ++ In [0]: %pdoc time + + This will also support top-level async when using IPython 7.0+ + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 23bf8add15..78e5334bce 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -155,9 +155,11 @@ #:use-module (gnu packages django) #:use-module (gnu packages djvu) #:use-module (gnu packages docker) + #:use-module (gnu packages documentation) #:use-module (gnu packages enchant) #:use-module (gnu packages file) #:use-module (gnu packages fontutils) + #:use-module (gnu packages fonts) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gdb) #:use-module (gnu packages gcc) @@ -9389,79 +9391,78 @@ computing.") (inherit python-ipython) (name "python-ipython-documentation") (version (package-version python-ipython)) + (source + (origin + (inherit (package-source python-ipython)) + (patches (append (search-patches + "python-ipython-documentation-chars.patch" + "python-ipython-documentation-repro.patch") + (origin-patches (package-source python-ipython)))))) (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'build) - (delete 'check) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "out") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html")) - (man1 (string-append data "/man/man1")) - (info (string-append data "/info")) - (examples (string-append doc "/examples")) - (python-arg (string-append "PYTHON=" (which "python")))) - (setenv "LANG" "en_US.utf8") - (with-directory-excursion "docs" - ;; FIXME: pdf fails to build - ;;(system* "make" "pdf" "PAPER=a4") - (system* "make" python-arg "html") - ;; FIXME: the generated texi file contains ^@^@, which trips - ;; up the parser. - ;; (system* "make" python-arg "info") - ) - (copy-recursively "docs/man" man1) - (copy-recursively "examples" examples) - (copy-recursively "docs/build/html" html) - ;; (copy-file "docs/build/latex/ipython.pdf" - ;; (string-append doc "/ipython.pdf")) - (mkdir-p info) - ;; (copy-file "docs/build/texinfo/ipython.info" - ;; (string-append info "/ipython.info")) - (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))))))) - (inputs - (list python-ipython python-ipykernel)) - (native-inputs - `(("python-sphinx" ,python-sphinx) - ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) - ;; FIXME: It's possible that a smaller updmap.cfg would work just as - ;; well. - ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts - texlive-capt-of - texlive-fonts-ec - texlive-generic-iftex - texlive-pdftex - texlive-latex-cmap - texlive-latex-environ - texlive-latex-eqparbox - texlive-etoolbox - texlive-latex-expdlist - texlive-latex-fancyhdr - texlive-latex-fancyvrb - texlive-latex-fncychap - texlive-latex-float - texlive-latex-framed - texlive-latex-geometry - texlive-latex-graphics - texlive-hyperref - texlive-latex-mdwtools - texlive-latex-multirow - texlive-latex-needspace - texlive-oberdiek - texlive-latex-parskip - texlive-latex-preview - texlive-latex-tabulary - texlive-latex-threeparttable - texlive-latex-titlesec - texlive-latex-trimspaces - texlive-latex-ucs - texlive-latex-upquote - texlive-url - texlive-latex-varwidth - texlive-wrapfig))) - ("texinfo" ,texinfo))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-pythonpath + (lambda _ + ;; Ensure this fixed (via the + ;; "python-ipython-documentation-chars.patch" patch) copy of + ;; IPython gets used. + (setenv "PYTHONPATH" (string-append (getcwd))))) + (add-before 'build 'configure-sphinx-for-xelatex + (lambda _ + ;; Use XeLaTeX instead of PDFLaTeX, as it can + ;; cope with the Unicode characters present in the + ;; contributors page, for example. + (substitute* "docs/source/conf.py" + (("project = 'IPython'.*" all) + (string-append all "latex_engine = 'xelatex'\n"))) + ;; XXX: The Sphinx-generated ipython.tex specifies the GNU + ;; FreeFont font to be searched via its extension, which uses + ;; kpathsea instead of fontconfig and fail (see: + ;; https://github.com/sphinx-doc/sphinx/issues/10347). Create a + ;; symlink to GNU FreeFont and add it to the TEXMF tree via + ;; GUIX_TEXMF. + (mkdir-p "texmf-dist/fonts/opentype/public") + (symlink (string-append + #$(this-package-native-input "font-gnu-freefont") + "/share/fonts/opentype") + (string-append + (getcwd) "/" + "texmf-dist/fonts/opentype/public/gnu-freefont")) + (setenv "GUIX_TEXMF" (string-append (getenv "GUIX_TEXMF") ":" + (getcwd) "/texmf-dist")))) + (delete 'build) + (delete 'check) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((data (string-append #$output "/share")) + (doc (string-append data "/doc/" #$name "-" #$version)) + (html (string-append doc "/html")) + (info (string-append data "/info"))) + (invoke "make" "-C" "docs" "info" "html" "pdf" + (string-append "SPHINXOPTS=-j" + (number->string (parallel-job-count)))) + (install-file "COPYING.rst" doc) + (copy-recursively "examples" (string-append doc "/examples")) + ;; Install HTML documentation. + (copy-recursively "docs/build/html" html) + ;; Likewise for the PDF. + (install-file "docs/build/latex/ipython.pdf" doc) + ;; Likewise for the info manual. + (install-file "docs/build/texinfo/ipython.info" info) + (symlink (string-append html "/_images") + (string-append info "/ipython-figures")))))))) + (native-inputs + (list fontconfig ;for XDG_DATA_DIRS to locate fonts + font-gnu-freefont + graphviz + python-docrepr + python-sphinx + python-sphinx-rtd-theme + texinfo + texlive-bin + texlive-polyglossia + texlive-xindy)))) (define-public python-urwid (package -- cgit v1.2.3 From b65a1e4a2144f1e7a1b58444f4bf2695783c0166 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sun, 10 Apr 2022 13:23:43 +0200 Subject: gnu: emacs: Update to 28.1. * gnu/packages/emacs.scm (emacs): Update to 28.1 * gnu/packages/patches/emacs-exec-path.patch: Adjust accordingly. * gnu/packages/patches/emacs-ignore-empty-xim-styles.patch: Delete file. * gnu/local.mk: Remove it here. --- gnu/local.mk | 1 - gnu/packages/emacs.scm | 5 ++--- gnu/packages/patches/emacs-exec-path.patch | 12 +++++------ .../patches/emacs-ignore-empty-xim-styles.patch | 24 ---------------------- 4 files changed, 8 insertions(+), 34 deletions(-) delete mode 100644 gnu/packages/patches/emacs-ignore-empty-xim-styles.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index a5cf82ab28..4ef12fd68e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1030,7 +1030,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-git-email-missing-parens.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ - %D%/packages/patches/emacs-ignore-empty-xim-styles.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index bfb3f9790e..7d791250d2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -79,17 +79,16 @@ (define-public emacs (package (name "emacs") - (version "27.2") + (version "28.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/emacs/emacs-" version ".tar.xz")) (sha256 (base32 - "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl")) + "1qbmmmhnjhn4lvzsnyk7l5ganbi6wzbm38jc1a7hhyh3k78b7c98")) (patches (search-patches "emacs-exec-path.patch" "emacs-fix-scheme-indent-function.patch" - "emacs-ignore-empty-xim-styles.patch" "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet diff --git a/gnu/packages/patches/emacs-exec-path.patch b/gnu/packages/patches/emacs-exec-path.patch index 7303599df1..9a76b0237d 100644 --- a/gnu/packages/patches/emacs-exec-path.patch +++ b/gnu/packages/patches/emacs-exec-path.patch @@ -4,13 +4,13 @@ with things like GCC being referenced. --- a/lisp/loadup.el +++ b/lisp/loadup.el -@@ -481,7 +481,8 @@ lost after dumping"))) +@@ -530,7 +530,8 @@ lost after dumping"))) ((equal dump-mode "dump") "emacs") ((equal dump-mode "bootstrap") "emacs") ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") -- (t (error "unrecognized dump mode %s" dump-mode))))) -+ (t (error "unrecognized dump mode %s" dump-mode)))) +- (t (error "Unrecognized dump mode %s" dump-mode))))) ++ (t (error "Unrecognized dump mode %s" dump-mode)))) + (exec-path nil)) - (message "Dumping under the name %s" output) - (condition-case () - (delete-file output) + (when (and (featurep 'native-compile) + (equal dump-mode "pdump")) + ;; Don't enable this before bootstrap is completed, as the diff --git a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch b/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch deleted file mode 100644 index 398e65bdc8..0000000000 --- a/gnu/packages/patches/emacs-ignore-empty-xim-styles.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix contributed upstream here: -https://debbugs.gnu.org/cgi/bugreport.cgi?bug=42694. - -Index: emacs-26.3/src/xfns.c -=================================================================== ---- emacs-26.3.orig/src/xfns.c -+++ emacs-26.3/src/xfns.c -@@ -2628,6 +2628,8 @@ xic_free_xfontset (struct frame *f) - static XIMStyle - best_xim_style (XIMStyles *xim) - { -+ if (xim == NULL) goto out; -+ - int i, j; - int nr_supported = ARRAYELTS (supported_xim_styles); - -@@ -2636,6 +2638,7 @@ best_xim_style (XIMStyles *xim) - if (supported_xim_styles[i] == xim->supported_styles[j]) - return supported_xim_styles[i]; - -+ out: - /* Return the default style. */ - return XIMPreeditNothing | XIMStatusNothing; - } -- cgit v1.2.3 From de68877a517ba058f67086d444d7265c9c803679 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 14 May 2022 17:06:48 -0700 Subject: gnu: libxmlb: Install xb-tool in bin dir. * gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch: New file. * gnu/packages/xml.scm (libxmlb)[source]: Add patch. * gnu/local.mk (dist_patch_DATA): Add patch. * gnu/packages/diffoscope.scm (diffoscope)[arguments]: Add 'xb-tool-external-tool phase. --- gnu/local.mk | 1 + gnu/packages/diffoscope.scm | 7 ++ .../libxmlb-install-xb-tool-into-bindir.patch | 100 +++++++++++++++++++++ gnu/packages/xml.scm | 4 +- 4 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 4ef12fd68e..d5b60bdba3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1426,6 +1426,7 @@ dist_patch_DATA = \ %D%/packages/patches/libxml2-terminating-newline.patch \ %D%/packages/patches/libxml2-xpath-recursion-limit.patch \ %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch \ + %D%/packages/patches/libxmlb-install-xb-tool-into-bindir.patch \ %D%/packages/patches/libxslt-generated-ids.patch \ %D%/packages/patches/libxt-guix-search-paths.patch \ %D%/packages/patches/lierolibre-check-unaligned-access.patch \ diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm index da4de83373..b4279a3fb5 100644 --- a/gnu/packages/diffoscope.scm +++ b/gnu/packages/diffoscope.scm @@ -111,6 +111,13 @@ (string-append "['" (which "stat") "',")) (("\\['getfacl',") (string-append "['" (which "getfacl") "',"))))) + (add-after 'unpack 'xb-tool-external-tool + ;; Fixed upstream, remove this phase when updating to + ;; diffoscope 213 + (lambda _ + (substitute* "diffoscope/external_tools.py" + ((".debian.: .libxmlb-dev.") + "\"debian\": \"libxmlb-dev\", \"guix\": \"libxmlb\"")))) (add-after 'build 'build-man-page (lambda* (#:key (make-flags '()) #:allow-other-keys) (apply invoke "make" "-C" "doc" make-flags))) diff --git a/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch b/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch new file mode 100644 index 0000000000..97f0f5fbd3 --- /dev/null +++ b/gnu/packages/patches/libxmlb-install-xb-tool-into-bindir.patch @@ -0,0 +1,100 @@ +From f91a9cfcd70178404ac2aafdfa124c9a4efe8866 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Mon, 18 Apr 2022 10:50:42 +0100 +Subject: [PATCH 11/11] Install xb-tool into bindir + +Fixes https://github.com/hughsie/libxmlb/issues/123 +--- + contrib/libxmlb.spec.in | 3 ++- + meson.build | 4 +++- + src/meson.build | 9 ++++++++- + src/xb-tool.1 | 19 +++++++++++++++++++ + 4 files changed, 32 insertions(+), 3 deletions(-) + create mode 100644 src/xb-tool.1 + +diff --git a/contrib/libxmlb.spec.in b/contrib/libxmlb.spec.in +index 6be65d1..24478fe 100644 +--- a/contrib/libxmlb.spec.in ++++ b/contrib/libxmlb.spec.in +@@ -71,7 +71,8 @@ Executable and data files for installed tests. + %files + %doc README.md + %license LICENSE +-%{_libexecdir}/xb-tool ++%{_bindir}/xb-tool ++%{_mandir}/man1/xb-tool.1* + %dir %{_libdir}/girepository-1.0 + %{_libdir}/girepository-1.0/Xmlb-2.0.typelib + %{_libdir}/libxmlb.so.2* +diff --git a/meson.build b/meson.build +index 6870907..53b1324 100644 +--- a/meson.build ++++ b/meson.build +@@ -103,16 +103,18 @@ add_project_link_arguments( + ) + + if host_machine.system() == 'windows' +- libexecdir = get_option('libexecdir') ++ bindir = get_option('bindir') + installed_test_bindir = get_option('libexecdir') + installed_test_datadir = get_option('datadir') + else + prefix = get_option('prefix') + datadir = join_paths(prefix, get_option('datadir')) ++ bindir = join_paths(prefix, get_option('bindir')) + libexecdir = join_paths(prefix, get_option('libexecdir')) + installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name()) + installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name()) + endif ++mandir = join_paths(prefix, get_option('mandir')) + + gio = dependency('gio-2.0', version : '>= 2.45.8') + giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false) +diff --git a/src/meson.build b/src/meson.build +index d7a1401..93fb8ba 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -96,7 +96,14 @@ xb_tool = executable( + libxmlb, + ], + install : true, +- install_dir : libexecdir ++ install_dir : bindir ++) ++configure_file( ++ input : 'xb-tool.1', ++ output : 'xb-tool.1', ++ configuration : conf, ++ install: true, ++ install_dir: join_paths(mandir, 'man1'), + ) + endif + +diff --git a/src/xb-tool.1 b/src/xb-tool.1 +new file mode 100644 +index 0000000..348d1b1 +--- /dev/null ++++ b/src/xb-tool.1 +@@ -0,0 +1,19 @@ ++.\" Report problems in https://github.com/hughsie/libxmlb ++.TH man 1 "18 April 2022" @PACKAGE_VERSION@ "xb-tool man page" ++.SH NAME ++xb-tool \- standalone XMLb utility ++.SH SYNOPSIS ++xb-tool [CMD] ++.SH DESCRIPTION ++This tool allows creating, dumping and querying binary XML blobs. ++.PP ++Additionally \fBxb-tool\fR can be used to profile specfic tokenized queries. ++.SH OPTIONS ++The xb-tool command takes various options depending on the action. ++Run \fBxb-tool --help\fR for the full list. ++.SH EXIT STATUS ++Commands that successfully execute will return "0", otherwise "1". ++.SH BUGS ++No known bugs. ++.SH AUTHOR ++Richard Hughes (richard@hughsie.com) +-- +2.35.1 + diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index a0d8d20102..11b0a4ef54 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -99,7 +99,9 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0znz2y1ig2kvlda44a3kxa8x7f222nbg50rjz6nlngzka0ccsgxx")))) + (base32 "0znz2y1ig2kvlda44a3kxa8x7f222nbg50rjz6nlngzka0ccsgxx")) + ;; Drop xb-tool patch after libxmlb 0.3.8, merged upstream + (patches (search-patches "libxmlb-install-xb-tool-into-bindir.patch")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t)) -- cgit v1.2.3 From 22d6e36005322cd641bc1107f3f04945e03478d5 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sun, 15 May 2022 03:05:28 +0200 Subject: gnu: emacs-yasnippet: Fix build. * gnu/packages/patches/emacs-yasnippet-fix-tests.patch: New file. * gnu/packages/emacs-xyz.scm (emacs-yasnippet): Use it here. * gnu/local.mk (dist_patch_DATA): Register it here. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 4 +- .../patches/emacs-yasnippet-fix-tests.patch | 95 ++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index d5b60bdba3..cfb499915a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1038,6 +1038,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ + %D%/packages/patches/emacs-yasnippet-fix-tests.patch \ %D%/packages/patches/enjarify-setup-py.patch \ %D%/packages/patches/enlightenment-fix-setuid-path.patch \ %D%/packages/patches/eog-update-libportal-usage.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 787f6fc43e..8a319fc0ff 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -13490,7 +13490,9 @@ the Emacs Tempo library. You may also write your templates in Lisp.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv")))) + (base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv")) + (patches + (search-patches "emacs-yasnippet-fix-tests.patch")))) (build-system emacs-build-system) (arguments `(#:tests? #t diff --git a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch new file mode 100644 index 0000000000..475352d8db --- /dev/null +++ b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch @@ -0,0 +1,95 @@ +From 904a058fcf4e1f4985e03f8551eec282ca12ccb5 Mon Sep 17 00:00:00 2001 +From: Philipp Stephani +Date: Mon, 6 Dec 2021 18:50:10 +0100 +Subject: [PATCH] Unbreak unit tests under Emacs 28. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- Emacs 28 has a new mode ‘lisp-data-mode’ for Lisp data. +- A test that was temporarily broken passes again. +- The default for ‘org-adapt-indentation’ has changed. +--- + yasnippet-tests.el | 41 ++++++++++++++++++++++++++--------------- + 1 file changed, 26 insertions(+), 15 deletions(-) + +diff --git a/yasnippet-tests.el b/yasnippet-tests.el +index b8a7980f..9fadf00c 100644 +--- a/yasnippet-tests.el ++++ b/yasnippet-tests.el +@@ -1,6 +1,6 @@ + ;;; yasnippet-tests.el --- some yasnippet tests -*- lexical-binding: t -*- + +-;; Copyright (C) 2012-2015, 2017-2018 Free Software Foundation, Inc. ++;; Copyright (C) 2012-2015, 2017-2018, 2021 Free Software Foundation, Inc. + + ;; Author: João Távora + ;; Keywords: emulations, convenience +@@ -556,16 +556,19 @@ XXXXX ------------------------")))) + (yas-mock-insert "foo bar") + (ert-simulate-command '(yas-next-field)) + (goto-char (point-min)) +- (let ((expected (with-temp-buffer +- (insert (format (concat "* Test foo bar\n" +- " " org-property-format "\n" +- " " org-property-format "\n" +- " " org-property-format) +- ":PROPERTIES:" "" +- ":ID:" "foo bar-after" +- ":END:" "")) +- (delete-trailing-whitespace) +- (buffer-string)))) ++ ;; The default value of `org-adapt-indentation' changed between Org-mode 9.4 ++ ;; and 9.5, so force a specific value. ++ (let* ((org-adapt-indentation nil) ++ (expected (with-temp-buffer ++ (insert (format (concat "* Test foo bar\n" ++ org-property-format "\n" ++ org-property-format "\n" ++ org-property-format) ++ ":PROPERTIES:" "" ++ ":ID:" "foo bar-after" ++ ":END:" "")) ++ (delete-trailing-whitespace) ++ (buffer-string)))) + ;; Some org-mode versions leave trailing whitespace, some don't. + (delete-trailing-whitespace) + (should (equal expected (buffer-string)))))) +@@ -1390,7 +1393,9 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \ + ,@(if (fboundp 'prog-mode) + '(prog-mode)) + emacs-lisp-mode +- lisp-interaction-mode)) ++ lisp-interaction-mode ++ ;; `lisp-data-mode' doesn't exist prior to Emacs 28. ++ ,@(and (fboundp 'lisp-data-mode) '(lisp-data-mode)))) + (observed (yas--modes-to-activate))) + (should (equal major-mode (car observed))) + (should (equal (sort expected #'string<) (sort observed #'string<)))))))) +@@ -1418,7 +1423,11 @@ hello ${1:$(when (stringp yas-text) (funcall func yas-text))} foo${1:$$(concat \ + '(prog-mode)) + emacs-lisp-mode + and-also-this-one +- lisp-interaction-mode)) ++ lisp-interaction-mode ++ ;; `lisp-data-mode' doesn't exist prior to ++ ;; Emacs 28. ++ ,@(and (fboundp 'lisp-data-mode) ++ '(lisp-data-mode)))) + (observed (yas--modes-to-activate))) + (should (equal expected-first + (cl-subseq observed 0 (length expected-first)))) +@@ -1691,9 +1700,11 @@ TODO: be meaner" + "Test expansion of snippets in org source blocks." + ;; org 9+ no longer runs fontification for text-mode, so our hacks + ;; don't work. Note that old ert doesn't have skipping, so we have +- ;; to expect failure instead. ++ ;; to expect failure instead. Starting with Org-mode 9.5 this seems ++ ;; to work again. + :expected-result (if (and (fboundp 'org-in-src-block-p) +- (version< (org-version) "9")) ++ (or (version< (org-version) "9") ++ (version<= "9.5" (org-version)))) + :passed :failed) + (let ((text-mode-hook #'yas-minor-mode)) + (do-yas-org-native-tab-in-source-block "text"))) -- cgit v1.2.3