* Package: app-doc/ford-6.1.11 * Repository: guru * Maintainer: torokhov-s-a@yandex.ru * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 test userland_GNU * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox @@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ This information may help you to understand if this is a duplicate or if this bug exists after you pushed a fix; This ebuild was merged at the following commit: https://github.com/gentoo/gentoo/commit/0c70e99a59ed3d82feaa95109b6f824bd7b6056e (Sun Apr 17 20:34:30 UTC 2022) @@@@@ END @@@@@ @@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ This information may help you to understand if this is a duplicate or if this bug exists after you pushed a fix; This ebuild was merged at the following commit: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=320bee2c6e7508f37c72ceaa0f5b315927a0b6e3 (Sun Apr 17 18:07:40 UTC 2022) @@@@@ END @@@@@ @@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ This ebuild was merged (directly or as a dependency) because of the following commit: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8a7feaa178b2060d8e777aaf80fb2ab4d7bfb7e8 @@@@@ END @@@@@ ################## # emerge --info: # ################## Portage 3.0.30 (python 3.10.4-final-0, default/linux/amd64/17.1, gcc-11.2.1, glibc-2.35-r2, 4.19.174-gentoo x86_64) ================================================================= System uname: Linux-4.19.174-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2650_v4_@_2.20GHz-with-glibc2.35 KiB Mem: 264046488 total, 140602032 free KiB Swap: 0 total, 0 free sh bash 5.1_p16 ld GNU ld (Gentoo 2.38 p3) 2.38 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-lang/perl: 5.34.1::gentoo dev-lang/python: 2.7.18_p15::gentoo, 3.8.13::gentoo, 3.9.12::gentoo, 3.10.4::gentoo dev-util/cmake: 3.23.1::gentoo dev-util/meson: 0.61.4-r2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r1::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/gcc: 11.2.1_p20220115::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.17::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes guru location: /opt/guru masters: gentoo priority: 0 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* GPL-3" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" DISTDIR="/var/tmp/portage/app-doc/ford-6.1.11/distdir" EMERGE_DEFAULT_OPTS="--with-bdeps=y -1 -k -b" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=x86-64 -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0" GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ http://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/ http://distfiles.gentoo.org" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" MAKEOPTS="-j42" PKGDIR="/root/tbci/binpkg" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="acl amd64 bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 jumbo-build libglvnd libtirpc multilib native-symlinks ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl test unicode xattr zlib" ABI_X86="64" ELIBC="glibc" KERNEL="linux" PYTHON_TARGETS="python3_8 python3_9 python3_10" USERLAND="GNU" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS ############################## # emerge history (qlop -mv): # ############################## 2022-04-18T11:53:39 >>> dev-libs/fribidi-1.0.11 2022-04-18T11:53:41 >>> media-libs/libjpeg-turbo-2.1.3 2022-04-18T11:53:45 >>> dev-python/markdown-3.3.6 2022-04-18T11:53:49 >>> virtual/jpeg-100-r1 2022-04-18T11:53:54 >>> dev-python/pluggy-1.0.0-r1 2022-04-18T11:53:57 >>> dev-python/markdown-include-0.6.0 2022-04-18T11:54:02 >>> dev-python/pygments-2.11.2 2022-04-18T11:54:06 >>> dev-python/python-markdown-math-0.8 2022-04-18T11:54:13 >>> dev-python/tqdm-4.64.0 2022-04-18T11:54:17 >>> dev-python/toposort-1.7 2022-04-18T11:54:21 >>> dev-python/iniconfig-1.1.1 2022-04-18T11:54:25 >>> dev-python/py-1.11.0-r1 2022-04-18T11:54:29 >>> dev-python/zope-interface-5.4.0-r1 2022-04-18T11:54:34 >>> dev-python/soupsieve-2.3.2 2022-04-18T11:54:39 >>> dev-python/attrs-21.4.0 2022-04-18T11:54:43 >>> dev-python/lxml-4.8.0-r1 2022-04-18T11:54:48 >>> dev-python/pytest-7.1.1 2022-04-18T11:54:53 >>> dev-python/six-1.16.0 2022-04-18T11:54:58 >>> dev-python/webencodings-0.5.1-r1 2022-04-18T11:55:02 >>> dev-python/editables-0.3 2022-04-18T11:55:06 >>> dev-python/html5lib-1.1 2022-04-18T11:55:11 >>> dev-python/pathspec-0.9.0 2022-04-18T11:55:16 >>> dev-lang/nasm-2.15.05 2022-04-18T11:55:20 >>> dev-python/beautifulsoup4-4.11.1 2022-04-18T11:55:24 >>> dev-python/hatchling-0.22.0 2022-04-18T11:55:28 >>> dev-python/cython-0.29.28 2022-04-18T11:55:33 >>> dev-python/pyproject2setuppy-22-r1 2022-04-18T11:55:40 >>> media-libs/gd-2.3.3-r1 2022-04-18T11:55:45 >>> x11-libs/pango-1.50.7 2022-04-18T11:55:54 >>> media-gfx/graphviz-2.50.0 2022-04-18T11:55:59 >>> dev-python/graphviz-0.20 ####################################### # installed packages (qlist -ICvUSS): # ####################################### acct-group/audio-0-r1:0 acct-group/cdrom-0-r1:0 acct-group/dialout-0-r1:0 acct-group/disk-0-r1:0 acct-group/input-0-r1:0 acct-group/kmem-0-r1:0 acct-group/kvm-0-r1:0 acct-group/lp-0-r1:0 acct-group/man-0-r1:0 acct-group/messagebus-0-r1:0 acct-group/polkitd-0-r1:0 acct-group/portage-0:0 acct-group/render-0-r1:0 acct-group/sgx-0:0 acct-group/sshd-0-r1:0 acct-group/tape-0-r1:0 acct-group/tty-0-r1:0 acct-group/video-0-r1:0 acct-user/man-1-r1:0 acct-user/messagebus-0-r1:0 acct-user/polkitd-0-r1:0 acct-user/portage-0:0 acct-user/sshd-0-r1:0 app-admin/eselect-1.4.20:0 -doc -emacs -vim-syntax app-admin/perl-cleaner-2.30:0 app-arch/bzip2-1.0.8-r1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static -static-libs -verify-sig app-arch/gzip-1.12:0 -pic -static -verify-sig app-arch/libarchive-3.6.1:0/13 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -blake2 bzip2 e2fsprogs -expat iconv -lz4 lzma -lzo -nettle -static-libs -verify-sig xattr -zstd app-arch/tar-1.34:0 acl -minimal nls -selinux -verify-sig xattr app-arch/unzip-6.0_p26:0 bzip2 -natspec unicode app-arch/xz-utils-5.2.5-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 extra-filters nls split-usr -static-libs -verify-sig app-arch/zstd-1.5.2:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -lz4 -static-libs threads app-crypt/gnupg-2.3.4-r2:0 bzip2 -doc -ldap nls readline -selinux smartcard ssl -test tofu -tools -tpm -usb -user-socket -verify-sig -wks-server app-crypt/gpgme-1.17.1:1/11.6.15 -common-lisp cxx -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -qt5 -static-libs -verify-sig app-crypt/libb2-0.98.1-r3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -native-cflags openmp -static-libs app-crypt/libmd-1.0.4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 app-crypt/pinentry-1.2.0:0 -caps -efl -emacs -gnome-keyring -gtk ncurses -qt5 app-crypt/rhash-1.4.2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls ssl -static-libs app-editors/nano-6.2:0 -debug -justify -magic -minimal ncurses nls spell split-usr -static unicode app-eselect/eselect-fontconfig-20220403:0 app-eselect/eselect-iptables-20220320:0 app-eselect/eselect-lib-bin-symlink-0.1.1-r1:0 app-eselect/eselect-pinentry-0.7.2:0 app-i18n/man-pages-ja-20180315-r1:0 app-i18n/man-pages-l10n-4.12.1-r2:0 l10n_cs l10n_da l10n_de l10n_el l10n_es l10n_fi l10n_fr l10n_hu l10n_id l10n_it l10n_mk l10n_nb l10n_nl l10n_pl l10n_pt-BR l10n_ro l10n_sr l10n_sv app-i18n/man-pages-ru-5.03.2390.2390.20191017-r1:0 app-i18n/man-pages-zh_CN-1.6.3.6:0 app-misc/c_rehash-1.7-r1:0 app-misc/ca-certificates-20211016.3.77:0 -cacert app-misc/editor-wrapper-4-r1:0 app-misc/mime-types-2.1.53:0 -nginx app-misc/pax-utils-1.3.3:0 -caps -debug -python -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 seccomp app-misc/tmux-3.2a:0 -debug -selinux -utempter -vim-syntax app-portage/eix-0.36.2:0 -debug -doc nls -sqlite app-portage/elt-patches-20211104:0 app-portage/gemato-16.2:0 gpg python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test -tools app-portage/gentoolkit-0.5.1-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test app-portage/portage-utils-0.93.3:0 nls openmp qmanifest qtegrity -static app-shells/bash-5.1_p16:0 -afs -bashlogger -examples -mem-scramble net nls -plugins readline -verify-sig app-shells/push-3.4:0 app-shells/quoter-4.2:0 app-text/ansifilter-2.18:0 -qt5 app-text/build-docbook-catalog-2.2:0 app-text/docbook-xml-dtd-4.5-r2:4.5 app-text/docbook-xml-dtd-4.4-r3:4.4 app-text/docbook-xml-dtd-4.2-r3:4.2 app-text/docbook-xml-dtd-4.1.2-r7:4.1.2 app-text/docbook-xsl-stylesheets-1.79.1-r2:0 -ruby app-text/manpager-1:0 app-text/opensp-1.5.2-r7:0 -doc nls -static-libs -test app-text/po4a-0.66:0 -test -test app-text/sgml-common-0.6.3-r7:0 app-text/xmlto-0.0.28-r8:0 -latex -text dev-db/sqlite-3.38.2:3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc -icu readline -secure-delete -static-libs -tcl -test -tools dev-lang/duktape-2.7.0-r1:0/2.7.0 dev-lang/nasm-2.15.05:0 -doc dev-lang/perl-5.34.1:0/5.34 -berkdb -debug -doc gdbm ithreads -minimal -quadmath dev-lang/python-3.10.4:3.10 -bluetooth -build -examples gdbm -hardened -libedit -lto ncurses -pgo readline sqlite ssl -test -tk -verify-sig -wininst xml dev-lang/python-3.9.12:3.9 -bluetooth -build -examples gdbm -hardened -lto ncurses -pgo readline sqlite ssl -test -tk -verify-sig -wininst xml dev-lang/python-3.8.13:3.8 -bluetooth -build -examples gdbm -hardened ncurses readline sqlite ssl -test -tk -verify-sig -wininst xml dev-lang/python-2.7.18_p15:2.7 -berkdb -bluetooth -build -examples gdbm -hardened ncurses readline sqlite ssl -tk -verify-sig -wininst xml dev-lang/python-exec-2.4.8:2 -native-symlinks python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-lang/python-exec-conf-2.4.6:2 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-lang/tcl-8.6.12:0/8.6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug threads dev-libs/elfutils-0.186:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma nls -static-libs -test -threads utils -valgrind -zstd dev-libs/expat-2.4.8:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -examples -static-libs unicode dev-libs/fribidi-1.0.11:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -test dev-libs/glib-2.72.1:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -dbus -debug elf -fam -gtk-doc mime -selinux -static-libs -sysprof -systemtap -test -utils xattr dev-libs/gmp-6.2.1-r2:0/10.4 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm cxx -doc -pic -static-libs dev-libs/gobject-introspection-1.72.0:0 -doctool -gtk-doc -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 -test dev-libs/gobject-introspection-common-1.72.0:0 dev-libs/isl-0.24-r2:0/23 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs dev-libs/jsoncpp-1.9.5:0/25 -doc -test dev-libs/libassuan-2.5.5:0 dev-libs/libbsd-0.11.6:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -verify-sig dev-libs/libevent-2.1.12:0/2.1-7 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 clock-gettime -debug -malloc-replacement ssl -static-libs -test threads -verbose-debug dev-libs/libffi-3.4.2-r1:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -exec-static-trampoline -pax-kernel -static-libs -test dev-libs/libgcrypt-1.10.1:0/20 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_aes -cpu_flags_arm_neon -cpu_flags_arm_sha1 -cpu_flags_arm_sha2 -cpu_flags_ppc_altivec -cpu_flags_ppc_vsx2 -cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 -cpu_flags_x86_padlock -cpu_flags_x86_sha cpu_flags_x86_sse4_1 -custom-cflags -doc -static-libs -verify-sig dev-libs/libgpg-error-1.45:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -common-lisp nls -static-libs dev-libs/libksba-1.6.0:0 -static-libs dev-libs/libltdl-2.4.7:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs dev-libs/libpcre-8.45-r1:3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 cxx jit -libedit pcre16 pcre32 readline split-usr -static-libs unicode zlib dev-libs/libpcre2-10.40:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 jit -libedit pcre16 pcre32 readline split-usr -static-libs unicode -verify-sig zlib dev-libs/libpipeline-1.5.5:0 -test dev-libs/libtasn1-4.18.0:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -test -valgrind dev-libs/libunistring-1.0:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs dev-libs/libuv-1.44.1:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 dev-libs/libxml2-2.9.13-r1:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -examples -icu -lzma python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 readline -static-libs -test dev-libs/libxslt-1.1.35:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 crypt -debug -examples -static-libs dev-libs/lzo-2.10:2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -examples split-usr -static-libs dev-libs/mpc-1.2.1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs dev-libs/mpfr-4.1.0_p13-r1:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs dev-libs/nettle-3.7.3:0/8-6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm -cpu_flags_arm_neon cpu_flags_x86_aes -cpu_flags_x86_sha -doc gmp -static-libs -test dev-libs/npth-1.6-r1:0 dev-libs/openssl-1.1.1n:0/1.1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 asm cpu_flags_x86_sse2 -rfc3779 -sctp -sslv3 -static-libs -test -tls-compression -tls-heartbeat -vanilla -verify-sig -verify-sig -weak-ssl-ciphers dev-libs/popt-1.18:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static-libs dev-perl/Devel-CheckLib-1.140.0:0 -test dev-perl/Encode-EUCJPASCII-0.30.0-r1:0 -test dev-perl/Encode-HanExtra-0.230.0-r3:0 dev-perl/Encode-Locale-1.50.0-r1:0 -test dev-perl/File-Listing-6.140.0:0 -test dev-perl/HTML-Parser-3.760.0:0 -test dev-perl/HTML-Tagset-3.200.0-r2:0 dev-perl/HTTP-Cookies-6.100.0:0 -test dev-perl/HTTP-Date-6.50.0:0 dev-perl/HTTP-Message-6.330.0:0 -test -test dev-perl/HTTP-Negotiate-6.10.0-r2:0 -test dev-perl/IO-HTML-1.4.0:0 -test dev-perl/IO-Socket-INET6-2.720.0-r2:0 -test dev-perl/IO-Socket-SSL-2.74.0:0 -examples -idn -test dev-perl/libwww-perl-6.600.0-r1:0 ssl -test dev-perl/Locale-gettext-1.70.0-r1:0 -test dev-perl/LWP-MediaTypes-6.40.0:0 -test dev-perl/LWP-Protocol-https-6.100.0:0 -test dev-perl/MIME-Charset-1.12.2-r1:0 l10n_ja l10n_zh -test dev-perl/Module-Build-0.423.100:0 -test dev-perl/Mozilla-CA-20999999-r1:0 -test dev-perl/Net-HTTP-6.210.0:0 -minimal -test dev-perl/Net-SSLeay-1.900.0:0 -examples -examples -minimal -test dev-perl/Pod-Parser-1.630.0-r1:0 -test dev-perl/SGMLSpm-1.1-r2:0 -test dev-perl/Socket6-0.290.0:0 -test dev-perl/TermReadKey-2.380.0:0 -examples -test dev-perl/Text-CharWidth-0.40.0-r2:0 -test dev-perl/Text-WrapI18N-0.60.0-r2:0 -test dev-perl/TimeDate-2.330.0-r1:0 -test dev-perl/Try-Tiny-0.310.0:0 -minimal -test dev-perl/Unicode-LineBreak-2019.1.0:0 dev-perl/URI-5.100.0:0 -test dev-perl/WWW-RobotRules-6.20.0-r2:0 -test dev-perl/XML-Parser-2.460.0-r2:0 dev-perl/YAML-Tiny-1.730.0-r1:0 -minimal -test dev-python/appdirs-1.4.4-r2:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-python/attrs-21.4.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/beautifulsoup4-4.11.1:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/certifi-3021.3.16-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/charset_normalizer-2.0.12:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/cython-0.29.28:0 -doc -emacs python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/editables-0.3:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/flit_core-3.7.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/graphviz-0.20:0 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/hatchling-0.22.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/html5lib-1.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/idna-3.3:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-python/importlib_metadata-4.11.3:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/importlib_resources-5.7.0:0 -doc python_targets_pypy3 python_targets_python3_8 -test dev-python/iniconfig-1.1.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/installer-0.5.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/jaraco-context-4.1.1-r2:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/jaraco-functools-3.5.0-r2:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/jaraco-text-3.7.0-r2:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/jinja-3.1.1:0 -doc -examples python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/lxml-4.8.0-r1:0 -doc -examples python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test threads dev-python/markdown-3.3.6:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/markdown-include-0.6.0:0 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-python/markupsafe-2.1.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/more-itertools-8.12.0-r1:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/nspektr-0.3.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/ordered-set-4.1.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/packaging-21.3-r2:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pathspec-0.9.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pluggy-1.0.0-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/py-1.11.0-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pygments-2.11.2:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pyparsing-3.0.8:0 -examples python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pyproject2setuppy-22-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/pypy3-7.3.9:0/pypy39-pp73 bzip2 gdbm jit ncurses sqlite -test -tk dev-python/pypy3-exe-7.3.9:3.9-7.3.9 bzip2 -cpu_flags_x86_sse2 jit -low-memory ncurses dev-python/PySocks-1.7.1-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-python/pytest-7.1.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/python-markdown-math-0.8:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/requests-2.27.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -socks5 -test dev-python/setuptools-62.1.0:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/setuptools_scm-6.4.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/six-1.16.0:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/soupsieve-2.3.2:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/tomli-2.0.1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/toposort-1.7:0 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/tqdm-4.64.0:0 -examples python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/urllib3-1.26.9:0 -brotli python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/webencodings-0.5.1-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/wheel-0.37.1-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/zipp-3.8.0:0 -doc python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-python/zope-interface-5.4.0-r1:0 python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-util/cmake-3.23.1:0 -doc -emacs ncurses -qt5 -test -test -verify-sig dev-util/desktop-file-utils-0.26-r2:0 -emacs dev-util/glib-utils-2.72.1:0 -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 dev-util/gperf-3.1:0 dev-util/gtk-doc-am-1.33.2:0 dev-util/intltool-0.51.0-r2:0 dev-util/meson-0.61.4-r2:0 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -test dev-util/meson-format-array-0:0 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 dev-util/ninja-1.10.2-r1:0 -doc -emacs -test -vim-syntax dev-util/pkgconf-1.8.0-r1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -test dev-util/re2c-2.2:0 -debug -test dev-vcs/git-2.35.1:0 blksha1 -cgi curl -cvs -doc -emacs -gnome-keyring gpg -highlight iconv -mediawiki -mediawiki-experimental nls pcre -perforce -perl -ppcsha1 -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 -subversion -test threads -tk webdav -xinetd media-fonts/liberation-fonts-2.1.3:0 -X -X -fontforge media-gfx/graphite2-1.3.14_p20210810-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -perl -test media-gfx/graphviz-2.50.0:0 -X cairo -devil -doc -examples -gtk2 -gts -guile -java -java -lasi -lefty nls -pdf -perl -postscript -python -python_single_target_python3_10 -python_single_target_python3_8 python_single_target_python3_9 -qt5 -ruby -svg -tcl -webp media-libs/fontconfig-2.14.0-r1:1.0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -static-libs -test media-libs/freetype-2.12.0:2 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 adobe-cff -brotli bzip2 cleartype-hinting -debug -doc -fontforge harfbuzz -infinality png -static-libs -svg -utils media-libs/gd-2.3.3-r1:2/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -avif cpu_flags_x86_sse fontconfig -heif jpeg png -static-libs -test -tiff truetype -webp -xpm zlib media-libs/harfbuzz-4.2.0:0/4.0.0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 cairo -debug -doc -experimental glib graphite -icu introspection -test truetype media-libs/libjpeg-turbo-2.1.3:0/0.2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cpu_flags_arm_neon -java -java -static-libs media-libs/libpng-1.6.37-r2:0/16 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -apng -cpu_flags_arm_neon cpu_flags_x86_sse -static-libs net-dns/libidn2-2.3.2:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs -verify-sig net-firewall/iptables-1.8.7-r2:0/1.8.3 -conntrack -netlink -nftables -pcap split-usr -static-libs net-libs/gnutls-3.7.3-r1:0/30 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 cxx -dane -doc -examples -guile idn nls openssl -pkcs11 seccomp -sslv2 -sslv3 -static-libs -test -test-full tls-heartbeat -tools -valgrind net-libs/libmnl-1.0.5:0/0.2.0 -examples -verify-sig net-libs/libnsl-2.0.0-r1:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs net-libs/libtirpc-1.3.2:0/3 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 ipv6 -kerberos split-usr -static-libs net-libs/nghttp2-1.47.0:0/1.14 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cxx -debug -hpack-tools -jemalloc -static-libs -test threads -utils -xml net-misc/curl-7.82.0-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -adns -alt-svc -brotli -curl_ssl_gnutls -curl_ssl_mbedtls -curl_ssl_nss curl_ssl_openssl ftp -gnutls -gopher -hsts http2 -idn imap ipv6 -kerberos -ldap -mbedtls -nghttp3 -nss openssl pop3 progress-meter -quiche -rtmp -samba smtp -ssh ssl -sslv3 -static-libs -telnet -test tftp -threads -zstd net-misc/iputils-20211215:0 arping -caps -clockdiff -doc filecaps -gcrypt -idn -nettle nls -rarpd -rdisc ssl -static -test -tracepath net-misc/netifrc-0.7.3:0 net-misc/openssh-9.0_p1:0 -X -X509 -abi_mips_n32 -audit -debug -hpn -kerberos -ldns -libedit -livecd pam pie -sctp -security-key -selinux ssl -static -test -verify-sig -xmss net-misc/rsync-3.2.4:0 acl -examples iconv ipv6 -lz4 ssl -stunnel -system-zlib -verify-sig xattr -xxhash -zstd net-misc/wget-1.21.3:0 -cookie-check -debug -gnutls -idn ipv6 -metalink nls -ntlm pcre ssl -static -test -uuid -verify-sig zlib perl-core/CPAN-2.290.0-r1:0 perl-core/Encode-3.120.0:0 perl-core/File-Temp-0.231.100:0 perl-core/Scalar-List-Utils-1.560.0:0 sec-keys/openpgp-keys-gentoo-release-20220101:0 -test sys-apps/acl-2.3.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls split-usr -static-libs sys-apps/attr-2.5.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug nls split-usr -static-libs sys-apps/baselayout-2.8:0 -build split-usr sys-apps/coreutils-9.1:0 acl -caps -gmp -hostname -kill -multicall nls -selinux split-usr -static -test -vanilla -verify-sig xattr sys-apps/dbus-1.14.0:0 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug -doc elogind -selinux -static-libs -systemd -test -test sys-apps/debianutils-5.7:0 installkernel -static sys-apps/diffutils-3.8:0 nls -static -verify-sig sys-apps/file-5.41:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 bzip2 -lzma -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -seccomp -static-libs zlib sys-apps/findutils-4.9.0:0 nls -selinux -static -test -verify-sig sys-apps/gawk-5.1.1-r2:0 -mpfr nls readline -verify-sig sys-apps/gentoo-functions-0.15:0 sys-apps/grep-3.7:0 nls pcre -static -verify-sig sys-apps/groff-1.22.4:0 -X -examples -uchardet sys-apps/help2man-1.48.5:0 nls sys-apps/install-xattr-0.8:0 sys-apps/iproute2-5.17.0:0 -atm -berkdb -bpf -caps -elf iptables -libbsd -minimal -selinux sys-apps/kbd-2.4.0:0 nls pam -test sys-apps/kmod-29:0 -debug -doc lzma -pkcs7 -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -static-libs tools zlib -zstd sys-apps/less-590:0 pcre unicode sys-apps/man-db-2.10.2-r1:0 manpager nls seccomp -selinux -static-libs zlib sys-apps/man-pages-5.13:0 l10n_de l10n_es l10n_fr l10n_it l10n_ja l10n_nl l10n_pl l10n_pt-BR l10n_ro l10n_ru l10n_zh-CN sys-apps/man-pages-posix-2017a:0 sys-apps/net-tools-2.10:0 arp hostname ipv6 -nis nls -plipconfig -selinux -slattach -static sys-apps/openrc-0.44.10:0 -audit -bash -debug ncurses netifrc -newnet pam -selinux -sysv-utils unicode sys-apps/portage-3.0.30-r2:0 -apidoc -build -doc -gentoo-dev ipc native-extensions python_targets_pypy3 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 rsync-verify -selinux -test xattr sys-apps/sandbox-2.29:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 nnp sys-apps/sed-4.8:0 acl nls -selinux -static -verify-sig sys-apps/shadow-4.11.1:0/4 acl -audit -bcrypt -cracklib nls pam -selinux -skey split-usr -su xattr sys-apps/systemd-tmpfiles-249.9:0 -selinux -test sys-apps/sysvinit-3.03:0 -ibm nls -selinux -static -verify-sig sys-apps/texinfo-6.8:0 nls standalone -static sys-apps/util-linux-2.38:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -build -caps cramfs -cryptsetup -fdformat hardlink -kill logger -magic ncurses nls pam -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 readline -rtas -selinux -slang split-usr -static-libs su suid -systemd -test -tty-helpers -udev unicode -verify-sig sys-apps/which-2.21:0 sys-auth/elogind-246.10-r2:0 acl -audit cgroup-hybrid -debug -doc pam policykit -selinux sys-auth/pambase-20220214:0 -caps -debug elogind -gnome-keyring -homed -minimal -mktemp nullok -pam_krb5 -pam_ssh passwdqc -pwhistory -pwquality -securetty -selinux sha512 -systemd -yescrypt sys-auth/passwdqc-2.0.2-r1:0 sys-auth/polkit-0.120_p20220221:0 duktape -examples -gtk introspection -kde pam -selinux -systemd -test sys-devel/autoconf-2.71-r1:2.71 -emacs sys-devel/autoconf-archive-2022.02.11:0 sys-devel/autoconf-wrapper-20220130:0 sys-devel/automake-1.16.5:1.16 -test sys-devel/automake-wrapper-11:0 sys-devel/binutils-2.38-r1:2.38 -cet -default-gold -doc gold -multitarget nls -pgo plugins -static-libs -test -vanilla sys-devel/binutils-config-5.4.1:0 -native-symlinks sys-devel/bison-3.8.2:0 -examples nls -static -test -verify-sig sys-devel/flex-2.6.4-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 nls -static -test sys-devel/gcc-11.2.1_p20220115:11 -ada -cet -custom-cflags cxx -d -debug -doc -fixed-point fortran -go graphite -hardened -jit -libssp lto multilib nls nptl -objc -objc++ -objc-gc openmp -pch -pgo pie sanitize ssp -systemtap -test -valgrind -vanilla -vtv -zstd sys-devel/gcc-config-2.5-r1:0 cc-wrappers -native-symlinks sys-devel/gettext-0.21-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl -cvs cxx -doc -emacs -git -java -java ncurses nls openmp -static-libs -verify-sig sys-devel/gnuconfig-20210107:0 sys-devel/libtool-2.4.7:2 -vanilla sys-devel/m4-1.4.19:0 -examples nls -verify-sig sys-devel/make-4.3:0 -guile nls -static -verify-sig sys-devel/patch-2.7.6-r4:0 -static -test -verify-sig xattr sys-fs/e2fsprogs-1.46.5:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cron -fuse -lto nls split-usr -static-libs threads tools sys-fs/udev-249.9:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 acl kmod -selinux split-usr -test sys-fs/udev-init-scripts-35:0 sys-kernel/installkernel-gentoo-5:0 -grub sys-kernel/linux-headers-5.17:0 -headers-only sys-libs/binutils-libs-2.38-r1:0/2.38 -64-bit-bfd -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cet -multitarget nls -static-libs sys-libs/gdbm-1.23:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 berkdb nls readline -static-libs -verify-sig sys-libs/glibc-2.35-r2:2.2 -audit -caps -cet clone3 -compile-locales -crypt -custom-cflags -doc -gd -headers-only multiarch multilib -multilib-bootstrap -nscd -profile -selinux ssp static-libs -suid -systemd -systemtap -test -vanilla sys-libs/libcap-2.64:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 pam split-usr -static-libs -tools sys-libs/libseccomp-2.5.3:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -python python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 -static-libs -test sys-libs/libxcrypt-4.4.28:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 compat split-usr -static-libs system -test sys-libs/ncurses-6.3_p20211106:0/6 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -ada cxx -debug -doc -gpm -minimal -profile split-usr -static-libs -test tinfo -trace sys-libs/pam-1.5.2-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -audit -berkdb -debug filecaps -nis -selinux sys-libs/readline-8.1_p2:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 split-usr -static-libs unicode -utils -verify-sig sys-libs/timezone-data-2022a:0 -leaps-timezone nls -zic-slim sys-libs/zlib-1.2.12-r2:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 minizip split-usr -static-libs -verify-sig sys-process/procps-3.3.17-r1:0/8 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 elogind kill -modern-top ncurses nls -selinux split-usr -static-libs -systemd -test unicode sys-process/psmisc-23.4-r1:0 -X ipv6 nls -selinux virtual/acl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs virtual/awk-1:0 virtual/dev-manager-0-r2:0 virtual/editor-0-r3:0 virtual/jpeg-100-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs virtual/libc-1-r1:0 virtual/libcrypt-2:0/2 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 abi_x86_32 abi_x86_64 -abi_x86_x32 -static-libs virtual/libelf-3:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 virtual/libiconv-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 virtual/libintl-0-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 virtual/libudev-232-r5:0/1 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -systemd virtual/man-0-r4:0 virtual/os-headers-0-r2:0 virtual/package-manager-1:0 virtual/pager-0:0 virtual/perl-Carp-1.520.0-r1:0 virtual/perl-Compress-Raw-Bzip2-2.101.0:0 virtual/perl-Compress-Raw-Zlib-2.101.0:0 virtual/perl-CPAN-2.290.0:0 virtual/perl-CPAN-Meta-2.150.10-r5:0 virtual/perl-CPAN-Meta-Requirements-2.140.0-r7:0 virtual/perl-CPAN-Meta-YAML-0.18.0-r7:0 virtual/perl-Data-Dumper-2.179.0:0 virtual/perl-Digest-MD5-2.580.0:0 virtual/perl-Encode-3.120.0:0 virtual/perl-Exporter-5.760.0:0 virtual/perl-ExtUtils-CBuilder-0.280.236:0 virtual/perl-ExtUtils-Install-2.200.0:0 virtual/perl-ExtUtils-MakeMaker-7.620.0:0 virtual/perl-ExtUtils-Manifest-1.730.0:0 virtual/perl-ExtUtils-ParseXS-3.430.0:0 virtual/perl-File-Spec-3.800.0:0 virtual/perl-File-Temp-0.231.100:0 virtual/perl-Getopt-Long-2.520.0:0 virtual/perl-IO-1.460.0:0 virtual/perl-IO-Compress-2.102.0:0 virtual/perl-IO-Socket-IP-0.410.0:0 virtual/perl-JSON-PP-4.60.0:0 virtual/perl-libnet-3.130.0:0 ssl virtual/perl-MIME-Base64-3.160.0:0 virtual/perl-Module-Metadata-1.0.37-r1:0 virtual/perl-parent-0.238.0-r1:0 virtual/perl-Parse-CPAN-Meta-2.150.10-r5:0 virtual/perl-Perl-OSType-1.10.0-r5:0 virtual/perl-podlators-4.140.0-r2:0 virtual/perl-Scalar-List-Utils-1.560.0:0 virtual/perl-Test-Harness-3.430.0:0 virtual/perl-Text-ParseWords-3.300.0-r8:0 virtual/perl-Time-Local-1.300.0:0 virtual/perl-version-0.992.800:0 virtual/perl-XSLoader-0.300.0-r4:0 virtual/pkgconfig-2-r1:0 virtual/service-manager-1:0 virtual/ssh-0:0 -minimal virtual/tmpfiles-0-r1:0 virtual/ttf-fonts-1-r1:0 virtual/udev-217-r3:0 virtual/yacc-0:0 www-client/pybugz-0.13-r1:0 python_targets_python3_8 python_targets_python3_9 x11-base/xcb-proto-1.14.1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 python_targets_python3_10 python_targets_python3_8 python_targets_python3_9 x11-base/xorg-proto-2021.5:0 -test x11-libs/cairo-1.16.0-r5:0 X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -aqua -debug -gles2-only glib -opengl -static-libs svg -utils -valgrind x11-libs/libX11-1.7.5:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc ipv6 -test x11-libs/libXau-1.0.9-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc x11-libs/libxcb-1.14:0/1.12 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc -doc -selinux -test xkb x11-libs/libXdmcp-1.1.3-r1:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc x11-libs/libXext-1.3.4:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -doc x11-libs/libXrender-0.9.10-r2:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 x11-libs/pango-1.50.7:0 -X -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -debug introspection -sysprof x11-libs/pixman-0.40.0:0 -abi_mips_n32 -abi_mips_n64 -abi_mips_o32 -abi_s390_32 -abi_s390_64 -abi_x86_32 abi_x86_64 -abi_x86_x32 -cpu_flags_arm_iwmmxt -cpu_flags_arm_iwmmxt2 -cpu_flags_arm_neon -cpu_flags_ppc_altivec cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 -loongson2f -static-libs x11-libs/xtrans-1.4.0:0 -doc x11-misc/compose-tables-1.7.5:0 x11-misc/shared-mime-info-2.2:0 -test ####################### # build.log # ####################### >>> Unpacking source... >>> Unpacking FORD-6.1.11.tar.gz to /var/tmp/portage/app-doc/ford-6.1.11/work >>> Source unpacked in /var/tmp/portage/app-doc/ford-6.1.11/work >>> Preparing source in /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11 ... * python3_8: running distutils-r1_run_phase distutils-r1_python_compile python3.8 setup.py build -j 42 running build running build_py creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/utils.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/tipue_search.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/sourceform.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/reader.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/pagetree.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/output.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/md_striped_table.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/md_environ.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/intrinsics.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/graphs.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/graphmanager.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/fortran_project.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/fixed2free2.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/_version.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/__main__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/__init__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford running egg_info writing FORD.egg-info/PKG-INFO writing dependency_links to FORD.egg-info/dependency_links.txt writing entry points to FORD.egg-info/entry_points.txt writing requirements to FORD.egg-info/requires.txt writing top-level names to FORD.egg-info/top_level.txt listing git files failed - pretending there aren't any reading manifest file 'FORD.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'FORD.egg-info/SOURCES.txt' copying ford/config.json -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford copying ford/favicon.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/bootstrap.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/bootstrap.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/font-awesome.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/font-awesome.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/local.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css copying ford/css/pygments.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/FontAwesome.otf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/fontawesome-webfont.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/fontawesome-webfont.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/fontawesome-webfont.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/fontawesome-webfont.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js copying ford/js/bootstrap.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js copying ford/js/bootstrap.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js copying ford/js/ie10-viewport-bug-workaround.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js copying ford/js/jquery-2.1.3.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js copying ford/js/svg-pan-zoom.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/MathJax-config copying ford/js/MathJax-config/.gitignore -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/MathJax-config creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/absint_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/base.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/block_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/block_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/file_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/file_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/genint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/index.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/info_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/macros.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/mod_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/mod_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/nongenint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/proc_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/proc_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/prog_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/prog_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/search.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/type_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates copying ford/templates/types_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch copying ford/tipuesearch/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch_set.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img copying ford/tipuesearch/img/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img copying ford/tipuesearch/img/loader.gif -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img copying ford/tipuesearch/img/search.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img warning: build_py: byte-compiling is disabled, skipping. * python3_9: running distutils-r1_run_phase distutils-r1_python_compile python3.9 setup.py build -j 42 running build running build_py creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/utils.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/tipue_search.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/sourceform.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/reader.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/pagetree.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/output.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/md_striped_table.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/md_environ.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/intrinsics.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/graphs.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/graphmanager.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/fortran_project.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/fixed2free2.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/_version.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/__main__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/__init__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford running egg_info writing FORD.egg-info/PKG-INFO writing dependency_links to FORD.egg-info/dependency_links.txt writing entry points to FORD.egg-info/entry_points.txt writing requirements to FORD.egg-info/requires.txt writing top-level names to FORD.egg-info/top_level.txt listing git files failed - pretending there aren't any reading manifest file 'FORD.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'FORD.egg-info/SOURCES.txt' copying ford/config.json -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford copying ford/favicon.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/bootstrap.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/bootstrap.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/font-awesome.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/font-awesome.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/local.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css copying ford/css/pygments.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/css creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/FontAwesome.otf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/fontawesome-webfont.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/fontawesome-webfont.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/fontawesome-webfont.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/fontawesome-webfont.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/fonts creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js copying ford/js/bootstrap.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js copying ford/js/bootstrap.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js copying ford/js/ie10-viewport-bug-workaround.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js copying ford/js/jquery-2.1.3.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js copying ford/js/svg-pan-zoom.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js/MathJax-config copying ford/js/MathJax-config/.gitignore -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/js/MathJax-config creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/absint_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/base.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/block_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/block_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/file_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/file_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/genint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/index.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/info_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/macros.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/mod_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/mod_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/nongenint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/proc_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/proc_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/prog_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/prog_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/search.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/type_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates copying ford/templates/types_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/templates creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch copying ford/tipuesearch/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch_set.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch/img copying ford/tipuesearch/img/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch/img copying ford/tipuesearch/img/loader.gif -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch/img copying ford/tipuesearch/img/search.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_9/lib/ford/tipuesearch/img warning: build_py: byte-compiling is disabled, skipping. * python3_10: running distutils-r1_run_phase distutils-r1_python_compile python3.10 setup.py build -j 42 running build running build_py creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/utils.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/tipue_search.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/sourceform.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/reader.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/pagetree.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/output.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/md_striped_table.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/md_environ.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/intrinsics.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/graphs.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/graphmanager.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/fortran_project.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/fixed2free2.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/_version.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/__main__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/__init__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford running egg_info writing FORD.egg-info/PKG-INFO writing dependency_links to FORD.egg-info/dependency_links.txt writing entry points to FORD.egg-info/entry_points.txt writing requirements to FORD.egg-info/requires.txt writing top-level names to FORD.egg-info/top_level.txt listing git files failed - pretending there aren't any reading manifest file 'FORD.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'FORD.egg-info/SOURCES.txt' copying ford/config.json -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford copying ford/favicon.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/bootstrap.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/bootstrap.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/font-awesome.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/font-awesome.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/local.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css copying ford/css/pygments.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/css creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/FontAwesome.otf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/fontawesome-webfont.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/fontawesome-webfont.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/fontawesome-webfont.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/fontawesome-webfont.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts copying ford/fonts/glyphicons-halflings-regular.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/fonts creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js copying ford/js/bootstrap.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js copying ford/js/bootstrap.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js copying ford/js/ie10-viewport-bug-workaround.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js copying ford/js/jquery-2.1.3.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js copying ford/js/svg-pan-zoom.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js/MathJax-config copying ford/js/MathJax-config/.gitignore -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/js/MathJax-config creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/absint_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/base.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/block_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/block_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/file_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/file_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/genint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/index.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/info_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/macros.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/mod_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/mod_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/nongenint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/proc_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/proc_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/prog_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/prog_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/search.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/type_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates copying ford/templates/types_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/templates creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch copying ford/tipuesearch/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch copying ford/tipuesearch/tipuesearch_set.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch/img copying ford/tipuesearch/img/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch/img copying ford/tipuesearch/img/loader.gif -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch/img copying ford/tipuesearch/img/search.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_10/lib/ford/tipuesearch/img warning: build_py: byte-compiling is disabled, skipping. >>> Source compiled. >>> Test phase: app-doc/ford-6.1.11 * python3_8: running distutils-r1_run_phase python_test python3.8 setup.py install --root=/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test --install-lib=lib --install-scripts=scripts running install running build running build_py copying ford/_version.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford running egg_info writing FORD.egg-info/PKG-INFO writing dependency_links to FORD.egg-info/dependency_links.txt writing entry points to FORD.egg-info/entry_points.txt writing requirements to FORD.egg-info/requires.txt writing top-level names to FORD.egg-info/top_level.txt /usr/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( listing git files failed - pretending there aren't any reading manifest file 'FORD.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'FORD.egg-info/SOURCES.txt' warning: build_py: byte-compiling is disabled, skipping. running install_lib creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/_version.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch/img copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img/search.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch/img copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img/loader.gif -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch/img copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/img/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch/img copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/tipuesearch_set.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/tipuesearch.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/tipuesearch.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/tipuesearch.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipuesearch/.DS_Store -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/tipuesearch creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/types_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/type_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/search.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/prog_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/prog_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/proc_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/proc_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/nongenint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/mod_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/mod_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/macros.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/info_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/index.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/genint_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/file_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/file_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/block_page.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/block_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/base.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/templates/absint_list.html -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/templates creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js/MathJax-config copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/MathJax-config/.gitignore -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js/MathJax-config copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/svg-pan-zoom.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/jquery-2.1.3.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/ie10-viewport-bug-workaround.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/bootstrap.min.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/js/bootstrap.js -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/js creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/glyphicons-halflings-regular.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/glyphicons-halflings-regular.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/glyphicons-halflings-regular.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/glyphicons-halflings-regular.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/fontawesome-webfont.woff -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/fontawesome-webfont.ttf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/fontawesome-webfont.svg -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/fontawesome-webfont.eot -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fonts/FontAwesome.otf -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/fonts creating /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/pygments.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/local.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/font-awesome.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/font-awesome.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/bootstrap.min.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/css/bootstrap.css -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford/css copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/favicon.png -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/config.json -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/__init__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/__main__.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fixed2free2.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/fortran_project.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/graphmanager.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/graphs.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/intrinsics.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/md_environ.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/md_striped_table.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/output.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/pagetree.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/reader.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/sourceform.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/tipue_search.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford copying /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/lib/ford/utils.py -> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/ford warning: install_lib: byte-compiling is disabled, skipping. running install_egg_info Copying FORD.egg-info to /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/lib/FORD-6.1.11-py3.8.egg-info running install_scripts Installing ford script to /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts python3.8 -m pytest -vv -ra -l -Wdefault --color=no -p no:cov -p no:flake8 -p no:flakes -p no:pylint ============================= test session starts ============================== platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0 -- /usr/bin/python3.8 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11 collecting ... collected 123 items test/test_example.py::test_nav_bar ERROR [ 0%] test/test_example.py::test_jumbotron ERROR [ 1%] test/test_example.py::test_developer_info_box ERROR [ 2%] test/test_example.py::test_latex ERROR [ 3%] test/test_example.py::test_source_file_links ERROR [ 4%] test/test_example.py::test_module_links ERROR [ 4%] test/test_example.py::test_procedures_links ERROR [ 5%] test/test_example.py::test_types_links ERROR [ 6%] test/test_initialisation.py::test_quiet_false FAILED [ 7%] test/test_initialisation.py::test_quiet_command_line FAILED [ 8%] test/test_initialisation.py::test_list_input FAILED [ 8%] test/test_initialisation.py::test_path_normalisation FAILED [ 9%] test/test_initialisation.py::test_source_not_subdir_output FAILED [ 10%] test/test_initialisation.py::test_repeated_docmark PASSED [ 11%] test/test_initialisation.py::test_no_preprocessor PASSED [ 12%] test/test_initialisation.py::test_bad_preprocessor PASSED [ 13%] test/test_initialisation.py::test_maybe_ok_preprocessor PASSED [ 13%] test/test_initialisation.py::test_gfortran_preprocessor SKIPPED (Requires gfortran to be installed) [ 14%] test/test_md_environ.py::test_md_environ PASSED [ 15%] test/test_md_inputs.py::test_extra_mods_empty FAILED [ 16%] test/test_md_inputs.py::test_extra_mods_intrinsic FAILED [ 17%] test/test_md_inputs.py::test_default_aliases FAILED [ 17%] test/test_md_inputs.py::test_one_alias FAILED [ 18%] test/test_md_inputs.py::test_multiple_aliases FAILED [ 19%] test/test_md_table.py::test_zebra_table PASSED [ 20%] test/test_md_table.py::test_no_clobber_html_table PASSED [ 21%] test/test_pagetree.py::test_footnotes_on_one_page PASSED [ 21%] test/test_pagetree.py::test_footnotes_on_one_page_parse_failure PASSED [ 22%] test/test_project.py::test_use_without_rename PASSED [ 23%] test/test_project.py::test_use_and_rename PASSED [ 24%] test/test_project.py::test_module_use_only_everything PASSED [ 25%] test/test_project.py::test_module_use_only_everything_change_access PASSED [ 26%] test/test_project.py::test_module_use_everything PASSED [ 26%] test/test_project.py::test_module_use_everything_reexport PASSED [ 27%] test/test_project.py::test_member_in_other_module PASSED [ 28%] test/test_project.py::test_display_derived_types PASSED [ 29%] test/test_project.py::test_display_derived_types_default_private PASSED [ 30%] test/test_project.py::test_display_private_derived_types PASSED [ 30%] test/test_project.py::test_interface_type_name PASSED [ 31%] test/test_project.py::test_imported_interface_type_name PASSED [ 32%] test/test_project.py::test_abstract_interface_type_name PASSED [ 33%] test/test_project.py::test_imported_abstract_interface_type_name PASSED [ 34%] test/test_project.py::test_display_internal_procedures PASSED [ 34%] test/test_project.py::test_exclude_dir PASSED [ 35%] test/test_project.py::test_exclude PASSED [ 36%] test/test_project.py::test_sort[src-expected_order0] PASSED [ 37%] test/test_project.py::test_sort[alpha-expected_order1] PASSED [ 38%] test/test_project.py::test_sort[permission-expected_order2] PASSED [ 39%] test/test_project.py::test_sort[permission-alpha-expected_order3] PASSED [ 39%] test/test_project.py::test_sort[type-expected_order4] PASSED [ 40%] test/test_project.py::test_sort[type-alpha-expected_order5] PASSED [ 41%] test/test_reader.py::test_reader_test_data PASSED [ 42%] test/test_reader.py::test_reader_continuation PASSED [ 43%] test/test_reader.py::test_type PASSED [ 43%] test/test_reader.py::test_unknown_include PASSED [ 44%] test/test_reader.py::test_unterminated_strings PASSED [ 45%] test/test_reader.py::test_multiline_string PASSED [ 46%] test/test_sourceform.py::test_extends PASSED [ 47%] test/test_sourceform.py::test_type_visibility_attributes PASSED [ 47%] test/test_sourceform.py::test_submodule_procedure_contains PASSED [ 48%] test/test_sourceform.py::test_backslash_in_character_string PASSED [ 49%] test/test_sourceform.py::test_sync_images_in_submodule_procedure PASSED [ 50%] test/test_sourceform.py::test_function_and_subroutine_call_on_same_line PASSED [ 51%] test/test_sourceform.py::test_component_access PASSED [ 52%] test/test_sourceform.py::test_format_statement PASSED [ 52%] test/test_sourceform.py::test_enumerator_with_kind PASSED [ 53%] test/test_sourceform.py::test_module_get_used_entities_all PASSED [ 54%] test/test_sourceform.py::test_module_get_used_entities_some PASSED [ 55%] test/test_sourceform.py::test_module_get_used_entities_rename PASSED [ 56%] test/test_sourceform.py::test_module_default_access PASSED [ 56%] test/test_sourceform.py::test_module_public_access PASSED [ 57%] test/test_sourceform.py::test_module_private_access PASSED [ 58%] test/test_sourceform.py::test_module_procedure_case PASSED [ 59%] test/test_sourceform.py::test_parse_type[integer i-expected0] PASSED [ 60%] test/test_sourceform.py::test_parse_type[integer :: i-expected1] PASSED [ 60%] test/test_sourceform.py::test_parse_type[integer ( int32 ) :: i-expected2] PASSED [ 61%] test/test_sourceform.py::test_parse_type[real r-expected3] PASSED [ 62%] test/test_sourceform.py::test_parse_type[real(real64) r-expected4] PASSED [ 63%] test/test_sourceform.py::test_parse_type[REAL( KIND = 8) :: r, x, y-expected5] PASSED [ 64%] test/test_sourceform.py::test_parse_type[REAL( 8 ) :: r, x, y-expected6] PASSED [ 65%] test/test_sourceform.py::test_parse_type[complex*16 znum-expected7] PASSED [ 65%] test/test_sourceform.py::test_parse_type[character(len=*) :: string-expected8] PASSED [ 66%] test/test_sourceform.py::test_parse_type[character(len=:) :: string-expected9] PASSED [ 67%] test/test_sourceform.py::test_parse_type[character(12) :: string-expected10] PASSED [ 68%] test/test_sourceform.py::test_parse_type[character(LEN=12) :: string-expected11] PASSED [ 69%] test/test_sourceform.py::test_parse_type[CHARACTER(KIND=kanji, len =12) :: string-expected12] PASSED [ 69%] test/test_sourceform.py::test_parse_type[CHARACTER( len = 12,KIND=kanji) :: string-expected13] PASSED [ 70%] test/test_sourceform.py::test_parse_type[CHARACTER( kind= kanji) :: string-expected14] PASSED [ 71%] test/test_sourceform.py::test_parse_type[double PRECISION dp-expected15] PASSED [ 72%] test/test_sourceform.py::test_parse_type[DOUBLE complex dc-expected16] PASSED [ 73%] test/test_sourceform.py::test_parse_type[type(something) :: thing-expected17] PASSED [ 73%] test/test_sourceform.py::test_parse_type[class(foo) :: thing-expected18] PASSED [ 74%] test/test_sourceform.py::test_parse_type[procedure(bar) :: thing-expected19] PASSED [ 75%] test/test_sourceform.py::test_line_to_variable[integer foo-expected_variables0] PASSED [ 76%] test/test_sourceform.py::test_line_to_variable[integer :: foo-expected_variables1] PASSED [ 77%] test/test_sourceform.py::test_line_to_variable[real :: foo, bar-expected_variables2] PASSED [ 78%] test/test_sourceform.py::test_line_to_variable[real, allocatable :: foo-expected_variables3] PASSED [ 78%] test/test_sourceform.py::test_line_to_variable[integer, intent ( in out)::zing-expected_variables4] PASSED [ 79%] test/test_sourceform.py::test_line_to_variable[real(real64), optional, intent(in) :: foo, bar-expected_variables5] PASSED [ 80%] test/test_sourceform.py::test_line_to_variable[character ( len = 24 , kind = 4), parameter :: char = '0', far = '1'-expected_variables6] PASSED [ 81%] test/test_sourceform.py::test_line_to_variable[procedure(foo) :: bar-expected_variables7] PASSED [ 82%] test/test_sourceform.py::test_line_to_variable[type(foo) :: bar = 42-expected_variables8] PASSED [ 82%] test/test_sourceform.py::test_line_to_variable[class(foo) :: var1, var2-expected_variables9] PASSED [ 83%] test/test_sourceform.py::test_line_to_variable[class(*) :: polymorphic-expected_variables10] PASSED [ 84%] test/test_sourceform.py::test_markdown_header_bug286 PASSED [ 85%] test/test_sourceform.py::test_markdown_codeblocks_bug286 PASSED [ 86%] test/test_sourceform.py::test_markdown_meta_reset PASSED [ 86%] test/test_sourceform.py::test_multiline_attributes PASSED [ 87%] test/test_sourceform.py::test_markdown_source_meta PASSED [ 88%] test/test_sourceform.py::test_markdown_source_settings PASSED [ 89%] test/test_utils.py::test_sub_macro PASSED [ 90%] test/test_utils.py::test_sub_macro_with_equals PASSED [ 91%] test/test_utils.py::test_register_macro_clash PASSED [ 91%] test/test_utils.py::test_str_to_bool_true[true] PASSED [ 92%] test/test_utils.py::test_str_to_bool_true[True] PASSED [ 93%] test/test_utils.py::test_str_to_bool_true[TRUE] PASSED [ 94%] test/test_utils.py::test_str_to_bool_true[tRuE] PASSED [ 95%] test/test_utils.py::test_str_to_bool_false[false] PASSED [ 95%] test/test_utils.py::test_str_to_bool_false[False] PASSED [ 96%] test/test_utils.py::test_str_to_bool_false[FALSE] PASSED [ 97%] test/test_utils.py::test_str_to_bool_false[fAlSe] PASSED [ 98%] test/test_utils.py::test_str_to_bool_already_bool PASSED [ 99%] test/test_projects/test_external_project.py::test_external_project FAILED [100%] ==================================== ERRORS ==================================== ________________________ ERROR at setup of test_nav_bar ________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = "

Hi, my name is .

\n

This is a project which I wrote. This file will provide the documents. I'm\nwriting the b...magination run wild. As you can tell, I'm more or less just\nfilling in space now. This will be the last sentence.

" directory = '' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='example-project-file.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = None directory = '' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] ext = 'sh #' extdict = {'sh': '#'} first = 'docmark_alt' md = md_base = '' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': 'John Doe', 'author_description': 'I program stuff in Fortran.', 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:45.388825', 'css': None, 'dbg': True, 'display': ['public', 'protected', 'private'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '#', 'email': 'john.doe@example.com', 'encoding': 'utf-8', 'exclude': ['excluded_file.f90'], 'exclude_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src/excluded_directory')], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp'], 'external': [], 'externalize': False, 'extra_filetypes': {'sh': '#'}, 'extra_mods': ['json_module: http://jacobwilliams.github.io/json-fortran/', 'futility: http://cmacmackin.github.io'], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['fpp'], 'github': 'https://github.com/cmacmackin', 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': True, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': 'by-nc', 'linkedin': None, 'lower': False, 'macro': ['HAS_DECREMENT'], 'mathjax_config': None, 'max_frontpage_items': '4', 'media_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/media'), 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '<', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Example Project', 'project_bitbucket': None, 'project_download': None, 'project_github': 'https://github.com/cmacmackin/futility', 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': 'https://github.com', 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src')], 'summary': 'Some Fortran program which I wrote.', 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ('

Hi, my name is .

\n' '

This is a project which I wrote. This file will provide the documents. ' "I'm\n" 'writing the body of the text here. It contains an overall description of ' 'the\n' 'project. It might explain how to go about installing/compiling it. It might\n' 'provide a change-log for the code. [[linalg]] Maybe it will talk about the\n' 'history and/or motivation for this software.

\n' '

@Note\n' 'You can include any notes (or bugs, warnings, or todos) like so.

\n' '

@Bug\n' 'You can have multi-paragraph versions of these too! That means you can\n' 'include

\n' '
    \n' '
  • ordered lists
  • \n' '
  • unordered lists
  • \n' '
  • images
  • \n' '
  • etc.
  • \n' '
\n' "

Isn't that cool?\n" '@endbug

\n' "

@Bug Hey I'm doing it again...

\n" '

This ones ends mid...@endbug ...paragraph.

\n' '

You can have as many paragraphs as you like here and can use headlines, ' 'links,\n' 'images, etc. Basically, you can use anything in Markdown and ' 'Markdown-Extra.\n' 'Furthermore, you can insert LaTeX into your documentation. So, for example,\n' 'you can provide inline math using like or math on its own line\n' 'like or ' ' You can even use ' 'LaTeX environments!\n' 'So you can get numbered equations like this:\n' '\n' "So let your imagination run wild. As you can tell, I'm more or less just\n" 'filling in space now. This will be the last sentence.

') project_file = 'example-project-file.md' second = 'predocmark_alt' sp = ['sh', '#'] srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 12 c2pwrite = 13 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 14 errwrite = 15 executable = None f = <_io.TextIOWrapper name=14 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = 14 errwrite = 15, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 12 c2pwrite = 13 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 16 errpipe_write = 17 errread = 14 errwrite = 15 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {17} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 99 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" shutil.copytree(this_dir / "../example", tmp_path) with pytest.MonkeyPatch.context() as m: os.chdir(tmp_path) m.setattr(sys, "argv", ["ford", "example-project-file.md"]) > ford.run() m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f9551760> this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:26: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='example-project-file.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '' proj_docs = ('---\n' 'project: Example Project\n' 'src_dir: ./src\n' 'output_dir: ./doc\n' 'project_github: https://github.com/cmacmackin/futility\n' 'project_website: https://github.com\n' 'summary: Some Fortran program which I wrote.\n' 'author: John Doe\n' 'author_description: I program stuff in Fortran.\n' 'github: https://github.com/cmacmackin\n' 'email: john.doe@example.com\n' 'fpp_extensions: fpp\n' 'preprocess: true\n' 'macro: HAS_DECREMENT\n' 'predocmark: >\n' 'media_dir: ./media\n' 'docmark_alt: #\n' 'predocmark_alt: <\n' 'display: public\n' ' protected\n' ' private\n' 'source: false\n' 'graph: true\n' 'search: true\n' 'extra_mods: json_module: http://jacobwilliams.github.io/json-fortran/\n' ' futility: http://cmacmackin.github.io\n' 'license: by-nc\n' 'extra_filetypes: sh #\n' 'max_frontpage_items: 4\n' 'exclude: excluded_file.f90\n' 'exclude_dir: src/excluded_directory\n' '---\n' '\n' 'Hi, my name is ${USER}.\n' '\n' "This is a project which I wrote. This file will provide the documents. I'm\n" 'writing the body of the text here. It contains an overall description of ' 'the\n' 'project. It might explain how to go about installing/compiling it. It might\n' 'provide a change-log for the code. [[linalg]] Maybe it will talk about the\n' 'history and/or motivation for this software.\n' '\n' '@Note\n' 'You can include any notes (or bugs, warnings, or todos) like so.\n' '\n' '@Bug\n' 'You can have multi-paragraph versions of these too! That means you can\n' 'include\n' '\n' '- ordered lists\n' '- unordered lists\n' '- images\n' '- etc.\n' '\n' "Isn't that cool?\n" '@endbug\n' '\n' "@Bug Hey I'm doing it again...\n" '\n' 'This ones ends mid...@endbug ...paragraph.\n' '\n' 'You can have as many paragraphs as you like here and can use headlines, ' 'links,\n' 'images, etc. Basically, you can use anything in Markdown and ' 'Markdown-Extra.\n' 'Furthermore, you can insert LaTeX into your documentation. So, for example,\n' 'you can provide inline math using like \\( y = x^2 \\) or math on its own ' 'line\n' 'like \\[ x = \\sqrt{y} \\] or $$ e = mc^2. $$ You can even use LaTeX ' 'environments!\n' 'So you can get numbered equations like this:\n' '\\begin{equation}\n' ' PV = nRT\n' '\\end{equation}\n' "So let your imagination run wild. As you can tell, I'm more or less just\n" 'filling in space now. This will be the last sentence.\n') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='example-project-file.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = None directory = '' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] ext = 'sh #' extdict = {'sh': '#'} first = 'docmark_alt' md = md_base = '' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': 'John Doe', 'author_description': 'I program stuff in Fortran.', 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:45.388825', 'css': None, 'dbg': True, 'display': ['public', 'protected', 'private'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '#', 'email': 'john.doe@example.com', 'encoding': 'utf-8', 'exclude': ['excluded_file.f90'], 'exclude_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src/excluded_directory')], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp'], 'external': [], 'externalize': False, 'extra_filetypes': {'sh': '#'}, 'extra_mods': ['json_module: http://jacobwilliams.github.io/json-fortran/', 'futility: http://cmacmackin.github.io'], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['fpp'], 'github': 'https://github.com/cmacmackin', 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': True, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': 'by-nc', 'linkedin': None, 'lower': False, 'macro': ['HAS_DECREMENT'], 'mathjax_config': None, 'max_frontpage_items': '4', 'media_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/media'), 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '<', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Example Project', 'project_bitbucket': None, 'project_download': None, 'project_github': 'https://github.com/cmacmackin/futility', 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': 'https://github.com', 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src')], 'summary': 'Some Fortran program which I wrote.', 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ('

Hi, my name is .

\n' '

This is a project which I wrote. This file will provide the documents. ' "I'm\n" 'writing the body of the text here. It contains an overall description of ' 'the\n' 'project. It might explain how to go about installing/compiling it. It might\n' 'provide a change-log for the code. [[linalg]] Maybe it will talk about the\n' 'history and/or motivation for this software.

\n' '

@Note\n' 'You can include any notes (or bugs, warnings, or todos) like so.

\n' '

@Bug\n' 'You can have multi-paragraph versions of these too! That means you can\n' 'include

\n' '
    \n' '
  • ordered lists
  • \n' '
  • unordered lists
  • \n' '
  • images
  • \n' '
  • etc.
  • \n' '
\n' "

Isn't that cool?\n" '@endbug

\n' "

@Bug Hey I'm doing it again...

\n" '

This ones ends mid...@endbug ...paragraph.

\n' '

You can have as many paragraphs as you like here and can use headlines, ' 'links,\n' 'images, etc. Basically, you can use anything in Markdown and ' 'Markdown-Extra.\n' 'Furthermore, you can insert LaTeX into your documentation. So, for example,\n' 'you can provide inline math using like or math on its own line\n' 'like or ' ' You can even use ' 'LaTeX environments!\n' 'So you can get numbered equations like this:\n' '\n' "So let your imagination run wild. As you can tell, I'm more or less just\n" 'filling in space now. This will be the last sentence.

') project_file = 'example-project-file.md' second = 'predocmark_alt' sp = ['sh', '#'] srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...rocessor' option in 'example-project-file.md'.\nOtherwise, please set 'preprocess: False' in 'example-project-file.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in 'example-project-file.md'. E Otherwise, please set 'preprocess: False' in 'example-project-file.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'example-project-file.md'.\n" "Otherwise, please set 'preprocess: False' in 'example-project-file.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit _______________________ ERROR at setup of test_jumbotron _______________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError __________________ ERROR at setup of test_developer_info_box ___________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError _________________________ ERROR at setup of test_latex _________________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError ___________________ ERROR at setup of test_source_file_links ___________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError _____________________ ERROR at setup of test_module_links ______________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError ___________________ ERROR at setup of test_procedures_links ____________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError ______________________ ERROR at setup of test_types_links ______________________ tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) @pytest.fixture(scope="module") def example_project(tmp_path_factory): this_dir = pathlib.Path(__file__).parent tmp_path = tmp_path_factory.getbasetemp() / "example" > shutil.copytree(this_dir / "../example", tmp_path) this_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tmp_path_factory = TempPathFactory(_given_basetemp=None, _trace=, _basetemp=PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0')) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_example.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/shutil.py:557: in copytree return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks, copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False itr = src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False /usr/lib/python3.8/shutil.py:458: in _copytree os.makedirs(dst, exist_ok=dirs_exist_ok) copy_function = dirs_exist_ok = False dst = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') entries = [, ] ignore = None ignore_dangling_symlinks = False ignored_names = set() src = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/../example') symlinks = False _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') mode = 511, exist_ok = False def makedirs(name, mode=0o777, exist_ok=False): """makedirs(name [, mode=0o777][, exist_ok=False]) Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except that any intermediate path segment (not just the rightmost) will be created if it does not exist. If the target directory already exists, raise an OSError if exist_ok is False. Otherwise no exception is raised. This is recursive. """ head, tail = path.split(name) if not tail: head, tail = path.split(head) if head and tail and not path.exists(head): try: makedirs(head, exist_ok=exist_ok) except FileExistsError: # Defeats race condition when another thread created the path pass cdir = curdir if isinstance(tail, bytes): cdir = bytes(curdir, 'ASCII') if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists return try: > mkdir(name, mode) E FileExistsError: [Errno 17] File exists: '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example' exist_ok = False head = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0' mode = 511 name = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/example') tail = 'example' /usr/lib/python3.8/os.py:223: FileExistsError =================================== FAILURES =================================== _______________________________ test_quiet_false _______________________________ command_line_args = {}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = False directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.017727', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 11 c2pwrite = 12 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 13 errwrite = 14 executable = None f = <_io.TextIOWrapper name=13 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 11, c2pwrite = 12, errread = 13 errwrite = 14, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 11 c2pwrite = 12 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 15 errpipe_write = 16 errread = 13 errwrite = 14 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {16} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 100 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: def test_quiet_false(): """This checks that bool options like 'quiet' are parsed correctly in input md file""" > data, _, _ = ford.parse_arguments({}, "quiet: false") /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_initialisation.py:10: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command_line_args = {}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: subprocess.run(command, check=True, capture_output=True, text=True) except (subprocess.CalledProcessError, OSError) as ex: > project_file = command_line_args["project_file"].name E KeyError: 'project_file' args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = False directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.017727', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:515: KeyError ___________________________ test_quiet_command_line ____________________________ command_line_args = {'quiet': True}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'quiet': True} default = 2022 directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.120256', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': True, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 11 c2pwrite = 12 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 13 errwrite = 14 executable = None f = <_io.TextIOWrapper name=13 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 11, c2pwrite = 12, errread = 13 errwrite = 14, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 11 c2pwrite = 12 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 15 errpipe_write = 16 errread = 13 errwrite = 14 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {16} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 101 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: def test_quiet_command_line(): """Check that setting --quiet on the command line overrides project file""" > data, _, _ = ford.parse_arguments({"quiet": True}, "quiet: false") /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_initialisation.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command_line_args = {'quiet': True}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: subprocess.run(command, check=True, capture_output=True, text=True) except (subprocess.CalledProcessError, OSError) as ex: > project_file = command_line_args["project_file"].name E KeyError: 'project_file' args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'quiet': True} default = 2022 directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.120256', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': True, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:515: KeyError _______________________________ test_list_input ________________________________ command_line_args = {}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = None directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.222215', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/line1'), PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/line2')], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': 'This\nis\none\nstring', 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 11 c2pwrite = 12 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 13 errwrite = 14 executable = None f = <_io.TextIOWrapper name=13 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 11, c2pwrite = 12, errread = 13 errwrite = 14, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 11 c2pwrite = 12 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 15 errpipe_write = 16 errread = 13 errwrite = 14 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {16} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 102 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: def test_list_input(): """Check that setting a non-list option is turned into a single string""" settings = """\ include: line1 line2 summary: This is one string """ > data, _, _ = ford.parse_arguments({}, dedent(settings)) settings = (' include: line1\n' ' line2\n' ' summary: This\n' ' is\n' ' one\n' ' string\n' ' ') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_initialisation.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command_line_args = {}, proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: subprocess.run(command, check=True, capture_output=True, text=True) except (subprocess.CalledProcessError, OSError) as ex: > project_file = command_line_args["project_file"].name E KeyError: 'project_file' args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = None directory = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.222215', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/line1'), PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/line2')], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src')], 'summary': 'This\nis\none\nstring', 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:515: KeyError ___________________________ test_path_normalisation ____________________________ command_line_args = {}, proj_docs = '', directory = '/prefix/path' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/prefix/path') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = ['./src'] directory = '/prefix/path' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/prefix/path' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/prefix/path'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.344670', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/prefix/path/doc'), 'page_dir': PosixPath('/prefix/path/my_pages'), 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/prefix/path/src1'), PosixPath('/prefix/path/src2')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/prefix/path/src2') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 11 c2pwrite = 12 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 13 errwrite = 14 executable = None f = <_io.TextIOWrapper name=13 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 11, c2pwrite = 12, errread = 13 errwrite = 14, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 11 c2pwrite = 12 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 15 errpipe_write = 16 errread = 13 errwrite = 14 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {16} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 103 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: def test_path_normalisation(): """Check that paths get normalised correctly""" settings = """\ page_dir: my_pages src_dir: src1 src2 """ > data, _, _ = ford.parse_arguments({}, dedent(settings), "/prefix/path") settings = ' page_dir: my_pages\n src_dir: src1\n src2\n ' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_initialisation.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command_line_args = {}, proj_docs = '', directory = '/prefix/path' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: subprocess.run(command, check=True, capture_output=True, text=True) except (subprocess.CalledProcessError, OSError) as ex: > project_file = command_line_args["project_file"].name E KeyError: 'project_file' args_option = None base_dir = PosixPath('/prefix/path') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {} default = 2022 default_type = ['./src'] directory = '/prefix/path' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/prefix/path' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/prefix/path'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.344670', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/prefix/path/doc'), 'page_dir': PosixPath('/prefix/path/my_pages'), 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/prefix/path/src1'), PosixPath('/prefix/path/src2')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/prefix/path/src2') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:515: KeyError ________________________ test_source_not_subdir_output _________________________ command_line_args = {'output_dir': '/3/4', 'src_dir': ['/1/2/3', '4/5']} proj_docs = '', directory = '/prefix' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/prefix') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'output_dir': '/3/4', 'src_dir': ['/1/2/3', '4/5']} default = 2022 directory = '/prefix' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/prefix' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/prefix'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.444253', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/3/4'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/1/2/3'), PosixPath('/prefix/4/5')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/prefix/4/5') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 11 c2pwrite = 12 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 13 errwrite = 14 executable = None f = <_io.TextIOWrapper name=13 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 11, c2pwrite = 12, errread = 13 errwrite = 14, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 11 c2pwrite = 12 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 15 errpipe_write = 16 errread = 13 errwrite = 14 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {16} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 104 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: def test_source_not_subdir_output(): """Check if the src_dir is correctly detected as being a subdirectory of output_dir""" # This should be fine > data, _, _ = ford.parse_arguments( {"src_dir": ["/1/2/3", "4/5"], "output_dir": "/3/4"}, "", "/prefix" ) /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_initialisation.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ command_line_args = {'output_dir': '/3/4', 'src_dir': ['/1/2/3', '4/5']} proj_docs = '', directory = '/prefix' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: subprocess.run(command, check=True, capture_output=True, text=True) except (subprocess.CalledProcessError, OSError) as ex: > project_file = command_line_args["project_file"].name E KeyError: 'project_file' args_option = None base_dir = PosixPath('/prefix') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'output_dir': '/3/4', 'src_dir': ['/1/2/3', '4/5']} default = 2022 directory = '/prefix' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/prefix' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/prefix'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.444253', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/3/4'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': True, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/1/2/3'), PosixPath('/prefix/4/5')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' second = 'predocmark_alt' srcdir = PosixPath('/prefix/4/5') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:515: KeyError ____________________________ test_extra_mods_empty _____________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.584355', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [''], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 12 c2pwrite = 13 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 14 errwrite = 15 executable = None f = <_io.TextIOWrapper name=14 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = 14 errwrite = 15, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 12 c2pwrite = 13 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 16 errpipe_write = 17 errread = 14 errwrite = 15 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {17} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 107 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_fortran_file = . at 0x7f57f91ea550> copy_settings_file = . at 0x7f57f91ea820> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f933f400> restore_macros = None, restore_nameselector = None def test_extra_mods_empty( copy_fortran_file, copy_settings_file, monkeypatch, restore_macros, restore_nameselector, ): """This checks that extra_mods is parsed correctly in input md file""" data = """\ module test end module test """ settings = """\ search: false extra_mods: """ copy_fortran_file(data) md_file = copy_settings_file(settings) > run_ford(monkeypatch, md_file) copy_fortran_file = . at 0x7f57f91ea550> copy_settings_file = . at 0x7f57f91ea820> data = ' module test\n end module test\n ' md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f933f400> restore_macros = None restore_nameselector = None settings = ' search: false\n extra_mods:\n ' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:22: in run_ford ford.run() command = ['ford', '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md'] extra_args = None m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f933fd60> md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f933f400> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' proj_docs = 'search: false\nextra_mods:\n' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.584355', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [''], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...ocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md'. E Otherwise, please set 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md'.\n" "Otherwise, please set 'preprocess: False' in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_empty0/test.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit __________________________ test_extra_mods_intrinsic ___________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = '' directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.700339', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': ['dummy: dummy_module'], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 13 c2pwrite = 14 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 15 errwrite = 16 executable = None f = <_io.TextIOWrapper name=15 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 13, c2pwrite = 14, errread = 15 errwrite = 16, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 13 c2pwrite = 14 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 17 errpipe_write = 18 errread = 15 errwrite = 16 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {18} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 108 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_fortran_file = . at 0x7f57f91ea5e0> copy_settings_file = . at 0x7f57f91ea790> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f92f8160> restore_macros = None, restore_nameselector = None def test_extra_mods_intrinsic( copy_fortran_file, copy_settings_file, monkeypatch, restore_macros, restore_nameselector, ): """This checks that adding extra_mods doesn't change the module variable INTRINSIC_MODS""" data = """\ module test end module test """ settings = """\ search: false extra_mods: dummy: dummy_module """ # Initial value of intrinsic mods old_intrinsic_mods = ford.fortran_project.INTRINSIC_MODS.copy() # set up project data copy_fortran_file(data) md_file = copy_settings_file(settings) > run_ford(monkeypatch, md_file) copy_fortran_file = . at 0x7f57f91ea5e0> copy_settings_file = . at 0x7f57f91ea790> data = ' module test\n end module test\n ' md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f92f8160> old_intrinsic_mods = {'ieee_arithmetic': 'ieee_arithmetic', 'ieee_exceptions': 'ieee_exceptions', 'ieee_features': 'ieee_features', 'iso_c_binding': 'iso_c_binding', 'iso_fortran_env': 'iso_fortran_env', 'mpi': 'mpi', 'mpi_f08': 'mpi_f08', 'omp_lib': 'omp_lib', 'openacc': 'openacc'} restore_macros = None restore_nameselector = None settings = ' search: false\n extra_mods: dummy: dummy_module\n ' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:22: in run_ford ford.run() command = ['ford', '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md'] extra_args = None m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f92f8b80> md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f92f8160> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' proj_docs = 'search: false\nextra_mods: dummy: dummy_module\n' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.700339', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': ['dummy: dummy_module'], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...s: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md'. E Otherwise, please set 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md'.\n" "Otherwise, please set 'preprocess: False' in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extra_mods_intrinsic0/test.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit _____________________________ test_default_aliases _____________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = '

Test: The project media url should be |media|

' directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.814811', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '

Test: The project media url should be |media|

' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 14 c2pwrite = 15 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 16 errwrite = 17 executable = None f = <_io.TextIOWrapper name=16 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 14, c2pwrite = 15, errread = 16 errwrite = 17, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 14 c2pwrite = 15 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 18 errpipe_write = 19 errread = 16 errwrite = 17 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {19} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 109 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_fortran_file = . at 0x7f57f909cf70> copy_settings_file = . at 0x7f57f909cca0> tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f9105700> restore_macros = None, restore_nameselector = None def test_default_aliases( copy_fortran_file, copy_settings_file, tmp_path, monkeypatch, restore_macros, restore_nameselector, ): """Check that aliases specified in project file are replaced correctly""" data = """\ module test !! Test: The project media url (|media|) should work here too end module test """ settings = """\ search: false Test: The project media url should be |media| """ copy_fortran_file(data) md_file = copy_settings_file(settings) > run_ford(monkeypatch, md_file) copy_fortran_file = . at 0x7f57f909cf70> copy_settings_file = . at 0x7f57f909cca0> data = (' module test\n' ' !! Test: The project media url (|media|) should work here too\n' ' end module test\n' ' ') md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f9105700> restore_macros = None restore_nameselector = None settings = ' search: false\n\n Test: The project media url should be |media|\n ' tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:22: in run_ford ford.run() command = ['ford', '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md'] extra_args = None m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f94720d0> md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f9105700> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' proj_docs = 'search: false\n\nTest: The project media url should be |media|\n' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.814811', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '

Test: The project media url should be |media|

' project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...rocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md'. E Otherwise, please set 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md'.\n" "Otherwise, please set 'preprocess: False' in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit ________________________________ test_one_alias ________________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = "

Test: This |foo| should be expanded as 'bar'

\n

Test: This foo should not be.

" directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': ['foo = bar'], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.947830', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ("

Test: This |foo| should be expanded as 'bar'

\n" '

Test: This foo should not be.

') project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 12 c2pwrite = 14 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 15 errwrite = 16 executable = None f = <_io.TextIOWrapper name=15 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 14, errread = 15 errwrite = 16, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 12 c2pwrite = 14 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 17 errpipe_write = 18 errread = 15 errwrite = 16 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {18} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 110 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_fortran_file = . at 0x7f57f937fdc0> copy_settings_file = . at 0x7f57f937f040> tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91cdeb0> restore_macros = None, restore_nameselector = None def test_one_alias( copy_fortran_file, copy_settings_file, tmp_path, monkeypatch, restore_macros, restore_nameselector, ): """Check that aliases specified in project file are replaced correctly""" data = """\ module test !! Title !! !! Test: This foo should not be exanded !! !! Test: But this |foo| should be 'bar' end module test """ settings = """\ search: false alias: foo = bar Test: This |foo| should be expanded as 'bar' Test: This foo should not be. """ copy_fortran_file(data) md_file = copy_settings_file(settings) > run_ford(monkeypatch, md_file) copy_fortran_file = . at 0x7f57f937fdc0> copy_settings_file = . at 0x7f57f937f040> data = (' module test\n' ' !! Title\n' ' !!\n' ' !! Test: This foo should not be exanded\n' ' !!\n' " !! Test: But this |foo| should be 'bar'\n" ' end module test\n' ' ') md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91cdeb0> restore_macros = None restore_nameselector = None settings = (' search: false\n' ' alias: foo = bar\n' '\n' " Test: This |foo| should be expanded as 'bar'\n" '\n' ' Test: This foo should not be.\n' ' ') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:22: in run_ford ford.run() command = ['ford', '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md'] extra_args = None m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f9323e80> md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91cdeb0> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' proj_docs = ('search: false\n' 'alias: foo = bar\n' '\n' "Test: This |foo| should be expanded as 'bar'\n" '\n' 'Test: This foo should not be.\n') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': ['foo = bar'], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:46.947830', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ("

Test: This |foo| should be expanded as 'bar'

\n" '

Test: This foo should not be.

') project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err... 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md'. E Otherwise, please set 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md'.\n" "Otherwise, please set 'preprocess: False' in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit ____________________________ test_multiple_aliases _____________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = "

Test: This |foo| should be expanded as 'bar', while |zing| should be 'quaff'

\n

Test: This foo and zing should not be.

" directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': ['foo = bar', 'zing = quaff'], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:47.062829', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ("

Test: This |foo| should be expanded as 'bar', while |zing| should be " "'quaff'

\n" '

Test: This foo and zing should not be.

') project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 14 c2pwrite = 15 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 16 errwrite = 17 executable = None f = <_io.TextIOWrapper name=16 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 14, c2pwrite = 15, errread = 16 errwrite = 17, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 14 c2pwrite = 15 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 18 errpipe_write = 19 errread = 16 errwrite = 17 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {19} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 111 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_fortran_file = . at 0x7f57f937fee0> copy_settings_file = . at 0x7f57f9376670> tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91e16a0> restore_macros = None, restore_nameselector = None def test_multiple_aliases( copy_fortran_file, copy_settings_file, tmp_path, monkeypatch, restore_macros, restore_nameselector, ): """Check that aliases specified in project file are replaced correctly""" data = """\ module test !! Title !! !! Test: This foo and zing should not be exanded !! !! Test: But this |foo| should be 'bar', and this |zing| 'quaff' end module test """ settings = """\ search: false alias: foo = bar zing = quaff Test: This |foo| should be expanded as 'bar', while |zing| should be 'quaff' Test: This foo and zing should not be. """ copy_fortran_file(data) md_file = copy_settings_file(settings) > run_ford(monkeypatch, md_file) copy_fortran_file = . at 0x7f57f937fee0> copy_settings_file = . at 0x7f57f9376670> data = (' module test\n' ' !! Title\n' ' !!\n' ' !! Test: This foo and zing should not be exanded\n' ' !!\n' " !! Test: But this |foo| should be 'bar', and this |zing| 'quaff'\n" ' end module test\n' ' ') md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91e16a0> restore_macros = None restore_nameselector = None settings = (' search: false\n' ' alias: foo = bar\n' ' zing = quaff\n' '\n' " Test: This |foo| should be expanded as 'bar', while |zing| should be " "'quaff'\n" '\n' ' Test: This foo and zing should not be.\n' ' ') tmp_path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_md_inputs.py:22: in run_ford ford.run() command = ['ford', '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md'] extra_args = None m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91e1b80> md_file = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f91e16a0> /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' proj_docs = ('search: false\n' 'alias: foo = bar\n' ' zing = quaff\n' '\n' "Test: This |foo| should be expanded as 'bar', while |zing| should be " "'quaff'\n" '\n' 'Test: This foo and zing should not be.\n') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': ['foo = bar', 'zing = quaff'], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:47.062829', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': False, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'Fortran Program', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = ("

Test: This |foo| should be expanded as 'bar', while |zing| should be " "'quaff'

\n" '

Test: This foo and zing should not be.

') project_file = '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...ocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md'. E Otherwise, please set 'preprocess: False' in '/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md'.\n" "Otherwise, please set 'preprocess: False' in " "'/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit ____________________________ test_external_project _____________________________ command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, ...} proj_docs = '', directory = '' def parse_arguments( command_line_args: dict, proj_docs: str, directory: Union[os.PathLike, str] = os.getcwd(), ): """Consolidates arguments from the command line and from the project file, and then normalises them how the rest of the code expects """ try: import multiprocessing ncpus = "{0}".format(multiprocessing.cpu_count()) except (ImportError, NotImplementedError): ncpus = "0" DEFAULT_SETTINGS["parallel"] = ncpus # Set up Markdown reader md_ext = [ "markdown.extensions.meta", "markdown.extensions.codehilite", "markdown.extensions.extra", "mdx_math", EnvironExtension(), ] md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={} ) md.convert(proj_docs) # Remake the Markdown object with settings parsed from the project_file if "md_base_dir" in md.Meta: md_base = md.Meta["md_base_dir"][0] else: md_base = directory md_ext.append("markdown_include.include") if "md_extensions" in md.Meta: md_ext.extend(md.Meta["md_extensions"]) md = markdown.Markdown( extensions=md_ext, output_format="html5", extension_configs={"markdown_include.include": {"base_path": md_base}}, ) # Re-read the project file proj_docs = md.reset().convert(proj_docs) proj_data = md.Meta # Get the default options, and any over-rides, straightened out for option, default in DEFAULT_SETTINGS.items(): args_option = command_line_args.get(option, None) if args_option is not None: proj_data[option] = args_option elif option in proj_data: # Think if there is a safe way to evaluate any expressions found in this list default_type = DEFAULT_SETTINGS.get(option, None) if isinstance(default_type, bool): proj_data[option] = convert_to_bool(option, proj_data[option]) elif not isinstance(default_type, list): # If it's not supposed to be a list, then it's # probably supposed to be a single big block of text, # like a description proj_data[option] = "\n".join(proj_data[option]) else: proj_data[option] = default # Evaluate paths relative to project file location base_dir = pathlib.Path(directory).absolute() proj_data["base_dir"] = base_dir for var in [ "page_dir", "output_dir", "graph_dir", "media_dir", "css", "mathjax_config", "src_dir", "exclude_dir", "include", ]: if proj_data[var] is None: continue if isinstance(proj_data[var], list): proj_data[var] = [ ford.utils.normalise_path(base_dir, p) for p in proj_data[var] ] else: proj_data[var] = ford.utils.normalise_path(base_dir, proj_data[var]) if proj_data["favicon"].strip() != DEFAULT_SETTINGS["favicon"]: proj_data["favicon"] = ford.utils.normalise_path(base_dir, proj_data["favicon"]) proj_data["display"] = [item.lower() for item in proj_data["display"]] proj_data["creation_date"] = datetime.now().strftime(proj_data["creation_date"]) proj_data["relative"] = proj_data["project_url"] == "" proj_data["extensions"] += [ ext for ext in proj_data["fpp_extensions"] if ext not in proj_data["extensions"] ] # Parse file extensions and comment characters for extra filetypes extdict = {} for ext in proj_data["extra_filetypes"]: sp = ext.split() if len(sp) < 2: continue if len(sp) == 2: extdict[sp[0]] = sp[1] # (comment_char) only else: extdict[sp[0]] = (sp[1], sp[2]) # (comment_char and lexer_str) proj_data["extra_filetypes"] = extdict # Make sure no src_dir is contained within output_dir for srcdir in proj_data["src_dir"]: # In Python 3.9+ we can use pathlib.Path.is_relative_to if proj_data["output_dir"] in (srcdir, *srcdir.parents): raise ValueError( f"Source directory {srcdir} is a subdirectory of output directory {proj_data['output_dir']}." ) # Check that none of the docmarks are the same docmarks = ["docmark", "predocmark", "docmark_alt", "predocmark_alt"] for first, second in itertools.combinations(docmarks, 2): if proj_data[first] == proj_data[second] != "": raise ValueError( f"{first} ('{proj_data[first]}') and {second} ('{proj_data[second]}') are the same" ) # Add gitter sidecar if specified in metadata if proj_data["gitter_sidecar"] is not None: proj_docs += """ """.format( proj_data["gitter_sidecar"].strip() ) # Handle preprocessor: if proj_data["preprocess"]: proj_data["preprocessor"] = proj_data["preprocessor"].split() command = proj_data["preprocessor"] + [os.devnull] # Check whether preprocessor works (reading nothing from stdin) try: > subprocess.run(command, check=True, capture_output=True, text=True) args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='doc.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:47.887730', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': True, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'external-project-1', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = 'doc.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/src') var = 'include' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = True, timeout = None, check = True popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) kwargs = {'stderr': -1, 'stdout': -1, 'text': True} def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE > with Popen(*popenargs, **kwargs) as process: capture_output = True check = True input = None kwargs = {'stderr': -1, 'stdout': -1, 'text': True} popenargs = (['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'],) timeout = None /usr/lib/python3.8/subprocess.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1, executable = None, stdin = None, stdout = -1, stderr = -1 preexec_fn = None, close_fds = True, shell = False, cwd = None, env = None universal_newlines = None, startupinfo = None, creationflags = 0 restore_signals = True, start_new_session = False, pass_fds = () def __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None): """Create new Popen instance.""" _cleanup() # Held while anything is calling waitpid before returncode has been # updated to prevent clobbering returncode if wait() or poll() are # called from multiple threads at once. After acquiring the lock, # code must re-check self.returncode to see if another thread just # finished a waitpid() call. self._waitpid_lock = threading.Lock() self._input = None self._communication_started = False if bufsize is None: bufsize = -1 # Restore default if not isinstance(bufsize, int): raise TypeError("bufsize must be an integer") if _mswindows: if preexec_fn is not None: raise ValueError("preexec_fn is not supported on Windows " "platforms") else: # POSIX if pass_fds and not close_fds: warnings.warn("pass_fds overriding close_fds.", RuntimeWarning) close_fds = True if startupinfo is not None: raise ValueError("startupinfo is only supported on Windows " "platforms") if creationflags != 0: raise ValueError("creationflags is only supported on Windows " "platforms") self.args = args self.stdin = None self.stdout = None self.stderr = None self.pid = None self.returncode = None self.encoding = encoding self.errors = errors # Validate the combinations of text and universal_newlines if (text is not None and universal_newlines is not None and bool(universal_newlines) != bool(text)): raise SubprocessError('Cannot disambiguate when both text ' 'and universal_newlines are supplied but ' 'different. Pass one or the other.') # Input and output objects. The general principle is like # this: # # Parent Child # ------ ----- # p2cwrite ---stdin---> p2cread # c2pread <--stdout--- c2pwrite # errread <--stderr--- errwrite # # On POSIX, the child objects are file descriptors. On # Windows, these are Windows file handles. The parent objects # are file descriptors on both platforms. The parent objects # are -1 when not using PIPEs. The child objects are -1 # when not redirecting. (p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) = self._get_handles(stdin, stdout, stderr) # We wrap OS handles *before* launching the child, otherwise a # quickly terminating child could make our fds unwrappable # (see #8458). if _mswindows: if p2cwrite != -1: p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0) if c2pread != -1: c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0) if errread != -1: errread = msvcrt.open_osfhandle(errread.Detach(), 0) self.text_mode = encoding or errors or text or universal_newlines # How long to resume waiting on a child after the first ^C. # There is no right value for this. The purpose is to be polite # yet remain good for interactive users trying to exit a tool. self._sigint_wait_secs = 0.25 # 1/xkcd221.getRandomNumber() self._closed_child_pipe_fds = False if self.text_mode: if bufsize == 1: line_buffering = True # Use the default buffer size for the underlying binary streams # since they don't support line buffering. bufsize = -1 else: line_buffering = False try: if p2cwrite != -1: self.stdin = io.open(p2cwrite, 'wb', bufsize) if self.text_mode: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, line_buffering=line_buffering, encoding=encoding, errors=errors) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if self.text_mode: self.stdout = io.TextIOWrapper(self.stdout, encoding=encoding, errors=errors) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if self.text_mode: self.stderr = io.TextIOWrapper(self.stderr, encoding=encoding, errors=errors) > self._execute_child(args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] bufsize = -1 c2pread = 12 c2pwrite = 13 close_fds = True creationflags = 0 cwd = None encoding = None env = None errors = None errread = 14 errwrite = 15 executable = None f = <_io.TextIOWrapper name=14 encoding='UTF-8'> line_buffering = False p2cread = -1 p2cwrite = -1 pass_fds = () preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None stderr = -1 stdin = None stdout = -1 text = True universal_newlines = None /usr/lib/python3.8/subprocess.py:858: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] executable = b'cpp', preexec_fn = None, close_fds = True, pass_fds = () cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = 14 errwrite = 15, restore_signals = True, start_new_session = False def _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session): """Execute program (POSIX version)""" if isinstance(args, (str, bytes)): args = [args] elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') args = [args] else: args = list(args) if shell: # On Android the default shell is at '/system/bin/sh'. unix_shell = ('/system/bin/sh' if hasattr(sys, 'getandroidapilevel') else '/bin/sh') args = [unix_shell, "-c"] + args if executable: args[0] = executable if executable is None: executable = args[0] sys.audit("subprocess.Popen", executable, args, cwd, env) if (_USE_POSIX_SPAWN and os.path.dirname(executable) and preexec_fn is None and not close_fds and not pass_fds and cwd is None and (p2cread == -1 or p2cread > 2) and (c2pwrite == -1 or c2pwrite > 2) and (errwrite == -1 or errwrite > 2) and not start_new_session): self._posix_spawn(args, executable, env, restore_signals, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) return orig_executable = executable # For transferring possible exec failure from child to parent. # Data format: "exception name:hex errno:description" # Pickle is not used; it is complex and involves memory allocation. errpipe_read, errpipe_write = os.pipe() # errpipe_write must not be in the standard io 0, 1, or 2 fd range. low_fds_to_close = [] while errpipe_write < 3: low_fds_to_close.append(errpipe_write) errpipe_write = os.dup(errpipe_write) for low_fd in low_fds_to_close: os.close(low_fd) try: try: # We must avoid complex work that could involve # malloc or free in the child process to avoid # potential deadlocks, thus we do all this here. # and pass it to fork_exec() if env is not None: env_list = [] for k, v in env.items(): k = os.fsencode(k) if b'=' in k: raise ValueError("illegal environment variable name") env_list.append(k + b'=' + os.fsencode(v)) else: env_list = None # Use execv instead of execve. executable = os.fsencode(executable) if os.path.dirname(executable): executable_list = (executable,) else: # This matches the behavior of os._execvpe(). executable_list = tuple( os.path.join(os.fsencode(dir), executable) for dir in os.get_exec_path(env)) fds_to_keep = set(pass_fds) fds_to_keep.add(errpipe_write) self.pid = _posixsubprocess.fork_exec( args, executable_list, close_fds, tuple(sorted(map(int, fds_to_keep))), cwd, env_list, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, errpipe_read, errpipe_write, restore_signals, start_new_session, preexec_fn) self._child_created = True finally: # be sure the FD is closed no matter what os.close(errpipe_write) self._close_pipe_fds(p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) # Wait for exec to fail or succeed; possibly raising an # exception (limited in size) errpipe_data = bytearray() while True: part = os.read(errpipe_read, 50000) errpipe_data += part if not part or len(errpipe_data) > 50000: break finally: # be sure the FD is closed no matter what os.close(errpipe_read) if errpipe_data: try: pid, sts = os.waitpid(self.pid, 0) if pid == self.pid: self._handle_exitstatus(sts) else: self.returncode = sys.maxsize except ChildProcessError: pass try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) # The encoding here should match the encoding # written in by the subprocess implementations # like _posixsubprocess err_msg = err_msg.decode() except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = 'Bad exception data from child: {!r}'.format( bytes(errpipe_data)) child_exception_type = getattr( builtins, exception_name.decode('ascii'), SubprocessError) if issubclass(child_exception_type, OSError) and hex_errno: errno_num = int(hex_errno, 16) child_exec_never_called = (err_msg == "noexec") if child_exec_never_called: err_msg = "" # The error must be from chdir(cwd). err_filename = cwd else: err_filename = orig_executable if errno_num != 0: err_msg = os.strerror(errno_num) > raise child_exception_type(errno_num, err_msg, err_filename) E FileNotFoundError: [Errno 2] No such file or directory: 'cpp' args = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] c2pread = 12 c2pwrite = 13 child_exception_type = child_exec_never_called = False close_fds = True creationflags = 0 cwd = None env = None env_list = None err_filename = 'cpp' err_msg = 'No such file or directory' errno_num = 2 errpipe_data = bytearray(b'OSError:2:') errpipe_read = 16 errpipe_write = 17 errread = 14 errwrite = 15 exception_name = bytearray(b'OSError') executable = b'cpp' executable_list = (b'/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11-python3_8/test/scripts' b'/cpp', b'/var/tmp/portage/app-doc/ford-6.1.11/temp/python3.8/bin/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/xattr/cpp', b'/usr/lib/portage/python3.10/ebuild-helpers/cpp', b'/usr/local/sbin/cpp', b'/usr/local/bin/cpp', b'/usr/sbin/cpp', b'/usr/bin/cpp', b'/sbin/cpp', b'/bin/cpp', b'/opt/bin/cpp') fds_to_keep = {17} hex_errno = bytearray(b'2') low_fds_to_close = [] orig_executable = 'cpp' p2cread = -1 p2cwrite = -1 part = b'' pass_fds = () pid = 112 preexec_fn = None restore_signals = True self = shell = False start_new_session = False startupinfo = None sts = 65280 /usr/lib/python3.8/subprocess.py:1704: FileNotFoundError During handling of the above exception, another exception occurred: copy_project_files = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f84dc5e0> restore_macros = None def test_external_project(copy_project_files, monkeypatch, restore_macros): """Check that we can build external projects and get the links correct This is a rough-and-ready test that runs FORD via subprocess, and so won't work unless FORD has been installed. It also relies on access to the internet and an external URL out of our control. """ path = copy_project_files external_project = path / "external_project" top_level_project = path / "top_level_project" # Run FORD in the two projects # First project has "externalize: True" and will generate JSON dump with monkeypatch.context() as m: os.chdir(external_project) m.setattr(sys, "argv", ["ford", "doc.md"]) > ford.run() copy_project_files = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project') external_project = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project') m = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f87b9ee0> monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f57f84dc5e0> path = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project') restore_macros = None top_level_project = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/top_level_project') /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_projects/test_external_project.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:633: in run proj_data, proj_docs, md = initialize() /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:236: in initialize return parse_arguments(vars(args), proj_docs, directory) args = Namespace(css=None, dbg=None, exclude=None, exclude_dir=None, extensions=None, external=None, externalize=None, force=None, include=None, macro=None, output_dir=None, page_dir=None, project_file=<_io.TextIOWrapper name='doc.md' mode='r' encoding='UTF-8'>, quiet=None, revision=None, search=None, src_dir=None, warn=None) directory = '' proj_docs = 'project: external-project-1\nsearch: false\nexternalize: true\n' /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/__init__.py:516: in parse_arguments exit( args_option = None base_dir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project') command = ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__', '/dev/null'] command_line_args = {'css': None, 'dbg': None, 'exclude': None, 'exclude_dir': None, 'extensions': None, 'external': None, 'externalize': None, 'force': None, 'include': None, 'macro': None, 'output_dir': None, 'page_dir': None, 'project_file': <_io.TextIOWrapper name='doc.md' mode='r' encoding='UTF-8'>, 'quiet': None, 'revision': None, 'search': None, 'src_dir': None, 'warn': None} default = 2022 default_type = True directory = '' docmarks = ['docmark', 'predocmark', 'docmark_alt', 'predocmark_alt'] extdict = {} first = 'docmark_alt' md = md_base = '' md_ext = ['markdown.extensions.meta', 'markdown.extensions.codehilite', 'markdown.extensions.extra', 'mdx_math', , 'markdown_include.include'] multiprocessing = ncpus = '48' option = 'year' proj_data = {'alias': [], 'author': None, 'author_description': None, 'author_pic': None, 'base_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project'), 'bitbucket': None, 'coloured_edges': False, 'copy_subdir': [], 'creation_date': '2022-04-18T11:56:47.887730', 'css': None, 'dbg': True, 'display': ['public', 'protected'], 'doc_license': '', 'docmark': '!', 'docmark_alt': '*', 'email': None, 'encoding': 'utf-8', 'exclude': [], 'exclude_dir': [], 'extensions': ['f90', 'f95', 'f03', 'f08', 'f15', 'fpp', 'F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'external': [], 'externalize': True, 'extra_filetypes': {}, 'extra_mods': [], 'extra_vartypes': [], 'facebook': None, 'favicon': 'default-icon', 'fixed_extensions': ['f', 'for', 'F', 'FOR'], 'fixed_length_limit': True, 'force': False, 'fpp_extensions': ['F90', 'F95', 'F03', 'F08', 'F15', 'F', 'FOR'], 'github': None, 'gitlab': None, 'gitter_sidecar': None, 'google_plus': None, 'graph': False, 'graph_dir': None, 'graph_maxdepth': '10000', 'graph_maxnodes': '1000000000', 'hide_undoc': False, 'incl_src': True, 'include': [], 'license': '', 'linkedin': None, 'lower': False, 'macro': [], 'mathjax_config': None, 'max_frontpage_items': 10, 'media_dir': None, 'output_dir': PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/doc'), 'page_dir': None, 'parallel': '48', 'predocmark': '>', 'predocmark_alt': '|', 'preprocess': True, 'preprocessor': ['cpp', '-traditional-cpp', '-E', '-D__GFORTRAN__'], 'print_creation_date': False, 'privacy_policy_url': None, 'proc_internals': False, 'project': 'external-project-1', 'project_bitbucket': None, 'project_download': None, 'project_github': None, 'project_gitlab': None, 'project_sourceforge': None, 'project_url': '', 'project_website': None, 'quiet': False, 'relative': True, 'revision': None, 'search': False, 'sort': 'src', 'source': False, 'src_dir': [PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/src')], 'summary': None, 'terms_of_service_url': None, 'twitter': None, 'version': None, 'warn': False, 'website': None, 'year': 2022} proj_docs = '' project_file = 'doc.md' second = 'predocmark_alt' srcdir = PosixPath('/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_external_project0/external_project/external_project/src') var = 'include' _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Use exit() or Ctrl-D (i.e. EOF) to exit code = "Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error:\n [Err...rocess files, please fix the 'preprocessor' option in 'doc.md'.\nOtherwise, please set 'preprocess: False' in 'doc.md'" def __call__(self, code=None): # Shells like IDLE catch the SystemExit, but listen when their # stdin wrapper is closed. try: sys.stdin.close() except: pass > raise SystemExit(code) E SystemExit: Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ /dev/null`) failed with error: E [Errno 2] No such file or directory: 'cpp' E E If you need to preprocess files, please fix the 'preprocessor' option in 'doc.md'. E Otherwise, please set 'preprocess: False' in 'doc.md' code = ('Error: Testing preprocessor command (`cpp -traditional-cpp -E -D__GFORTRAN__ ' '/dev/null`) failed with error:\n' " [Errno 2] No such file or directory: 'cpp'\n" '\n' "If you need to preprocess files, please fix the 'preprocessor' option in " "'doc.md'.\n" "Otherwise, please set 'preprocess: False' in 'doc.md'") self = Use exit() or Ctrl-D (i.e. EOF) to exit /usr/lib/python3.8/_sitebuiltins.py:26: SystemExit =============================== warnings summary =============================== test/test_example.py: 1 warning test/test_initialisation.py: 9 warnings test/test_md_inputs.py: 5 warnings test/test_projects/test_external_project.py: 1 warning /usr/lib/python3.8/site-packages/markdown/core.py:125: DeprecationWarning: The 'md_globals' parameter of 'markdown_include.include.MarkdownInclude.extendMarkdown' is deprecated. ext._extendMarkdown(self) test/test_project.py::test_use_without_rename /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_use_without_rename0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_use_and_rename /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_use_and_rename0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_module_use_only_everything /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_use_only_everythin0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_module_use_only_everything_change_access /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_use_only_everythin1/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_module_use_everything /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_use_everything0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_module_use_everything_reexport /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_use_everything_ree0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_member_in_other_module /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_member_in_other_module0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_display_derived_types /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_display_derived_types0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_display_derived_types_default_private /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_display_derived_types_def0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_display_private_derived_types /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_display_private_derived_t0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_interface_type_name /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_interface_type_name0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_imported_interface_type_name /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_imported_interface_type_n0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_abstract_interface_type_name /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_abstract_interface_type_n0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_imported_abstract_interface_type_name /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_imported_abstract_interfa0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_display_internal_procedures /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_display_internal_procedur0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_exclude_dir /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_exclude_dir0/src/include.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_exclude /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_exclude0/src/include.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[src-expected_order0] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_src_expected_order0_0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[alpha-expected_order1] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_alpha_expected_order0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[permission-expected_order2] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_permission_expected_0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[permission-alpha-expected_order3] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_permission_alpha_exp0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[type-expected_order4] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_type_expected_order40/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_project.py::test_sort[type-alpha-expected_order5] /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/ford/fortran_project.py:100: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sort_type_alpha_expected_0/src/test.f90' mode='r' encoding='utf-8'> ford.sourceform.FortranSourceFile( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_reader.py::test_reader_continuation /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_reader.py:67: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_reader_continuation0/src/test.f90' mode='r' encoding='utf-8'> lines = list(reader.FortranReader(filename, docmark="!")) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_reader.py::test_type /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_reader.py:97: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_type0/src/test.f90' mode='r' encoding='utf-8'> lines = list(reader.FortranReader(filename, docmark="!")) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_reader.py::test_unknown_include /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_reader.py:118: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_unknown_include0/src/test.f90' mode='r' encoding='utf-8'> lines = list(reader.FortranReader(filename, docmark="!")) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_reader.py::test_multiline_string /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_reader.py:160: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiline_string0/src/test.f90' mode='r' encoding='utf-8'> lines = list( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_extends /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_extends0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_type_visibility_attributes /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_type_visibility_attribute0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_submodule_procedure_contains /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_submodule_procedure_conta0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_backslash_in_character_string /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_backslash_in_character_st0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_sync_images_in_submodule_procedure /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_sync_images_in_submodule_0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_function_and_subroutine_call_on_same_line /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_function_and_subroutine_c0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_component_access /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_component_access0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_format_statement /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_format_statement0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_enumerator_with_kind /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_enumerator_with_kind0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_module_default_access /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_default_access0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_module_public_access /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_public_access0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_module_private_access /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_private_access0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_module_procedure_case /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_module_procedure_case0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_header_bug286 /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_markdown_header_bug2860/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_codeblocks_bug286 /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_markdown_codeblocks_bug280/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_codeblocks_bug286 /usr/lib/python3.8/site-packages/pygments/lexers/graphics.py:222: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_default_aliases0/test.md' mode='r' encoding='UTF-8'> (words(( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_codeblocks_bug286 /usr/lib/python3.8/site-packages/pygments/lexers/graphics.py:222: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_one_alias0/test.md' mode='r' encoding='UTF-8'> (words(( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_codeblocks_bug286 /usr/lib/python3.8/site-packages/pygments/lexers/graphics.py:222: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiple_aliases0/test.md' mode='r' encoding='UTF-8'> (words(( Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_meta_reset /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_markdown_meta_reset0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_multiline_attributes /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_multiline_attributes0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_source_meta /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_markdown_source_meta0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. test/test_sourceform.py::test_markdown_source_settings /var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11/test/test_sourceform.py:24: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/tmp/portage/app-doc/ford-6.1.11/temp/pytest-of-portage/pytest-0/test_markdown_source_settings0/src/test.f90' mode='r' encoding='utf-8'> return FortranSourceFile(str(filename), settings) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ SKIPPED [1] test/test_initialisation.py:134: Requires gfortran to be installed ERROR test/test_example.py::test_nav_bar - SystemExit: Error: Testing preproc... ERROR test/test_example.py::test_jumbotron - FileExistsError: [Errno 17] File... ERROR test/test_example.py::test_developer_info_box - FileExistsError: [Errno... ERROR test/test_example.py::test_latex - FileExistsError: [Errno 17] File exi... ERROR test/test_example.py::test_source_file_links - FileExistsError: [Errno ... ERROR test/test_example.py::test_module_links - FileExistsError: [Errno 17] F... ERROR test/test_example.py::test_procedures_links - FileExistsError: [Errno 1... ERROR test/test_example.py::test_types_links - FileExistsError: [Errno 17] Fi... FAILED test/test_initialisation.py::test_quiet_false - KeyError: 'project_file' FAILED test/test_initialisation.py::test_quiet_command_line - KeyError: 'proj... FAILED test/test_initialisation.py::test_list_input - KeyError: 'project_file' FAILED test/test_initialisation.py::test_path_normalisation - KeyError: 'proj... FAILED test/test_initialisation.py::test_source_not_subdir_output - KeyError:... FAILED test/test_md_inputs.py::test_extra_mods_empty - SystemExit: Error: Tes... FAILED test/test_md_inputs.py::test_extra_mods_intrinsic - SystemExit: Error:... FAILED test/test_md_inputs.py::test_default_aliases - SystemExit: Error: Test... FAILED test/test_md_inputs.py::test_one_alias - SystemExit: Error: Testing pr... FAILED test/test_md_inputs.py::test_multiple_aliases - SystemExit: Error: Tes... FAILED test/test_projects/test_external_project.py::test_external_project - S... ======= 11 failed, 103 passed, 1 skipped, 65 warnings, 8 errors in 3.05s ======= * ERROR: app-doc/ford-6.1.11::guru failed (test phase): * pytest failed with python3.8 * * Call stack: * ebuild.sh, line 127: Called src_test * environment, line 3294: Called distutils-r1_src_test * environment, line 1562: Called _distutils-r1_run_foreach_impl 'python_test' * environment, line 650: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' * environment, line 2970: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2493: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' * environment, line 2491: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' * environment, line 983: Called distutils-r1_run_phase 'python_test' * environment, line 1486: Called python_test * environment, line 3261: Called distutils-r1_python_test * environment, line 1437: Called epytest * environment, line 2004: Called die * The specific snippet of code: * "${@}" || die -n "pytest failed with ${EPYTHON}"; * * If you need support, post the output of `emerge --info '=app-doc/ford-6.1.11::guru'`, * the complete build log and the output of `emerge -pqv '=app-doc/ford-6.1.11::guru'`. * The complete build log is located at '/var/log/emerge-log/build/app-doc/ford-6.1.11:20220418-095631.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-doc/ford-6.1.11/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-doc/ford-6.1.11/temp/environment'. * Working directory: '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11' * S: '/var/tmp/portage/app-doc/ford-6.1.11/work/FORD-6.1.11'