From 169d7bccc02da43f8574d030502cfcf9308f505f Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Fri, 5 Jan 2024 11:33:25 -0600 Subject: subtree updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit meta-raspberrypi: fde68b24f0..4c033eb074: Harunobu Kurokawa (1): rpi-cmdline, rpi-u-boot-src: Support USB boot meta-arm: 0b61cc659a..4d22f982bc: Debbie Martin (2): arm-systemready: Add parted dependency and inherit testimage ci: Add Arm SystemReady firmware and IR ACS builds Harsimran Singh Tungal (3): arm-bsp/documentation: corstone1000: fix the steps in the user guide and instructions corstone1000:arm-bsp/optee: Update optee to v4.0 corstone1000:arm-bsp/tftf: Fix tftf tests on mps3 Jon Mason (5): arm/trusted-firmware-a: move patch file to bbappend arm/trusted-firmware-a: update to 2.10 arm/hafnium: update to v2.10 CI: rename meta-secure-core directory arm/edk2: update to 202311 Ross Burton (1): CI: switch back to master poky: 028b6f6226..4675bbb757: Adrian Freihofer (4): cmake-qemu.bbclass: make it more usable oe-selftest: add a cpp-example recipe oeqa/core/decorator: add skip if not qemu-usermode oe-selftest: add tests for C and C++ build tools Alassane Yattara (22): bitbake: toaster/test: bug-fix on tests/browser/test_all_builds_page bitbake: toaster/test: from test_no_builds_message.py wait for the empty state div to appear bitbake: toaster/test: delay driver action until elements to appear bitbake: toaster/tests: Ensure to kill toaster process create for tests functional bitbake: toaster/tests: Added functional/utils, contains useful methods using by functional tests bitbake: toaster/tests: Refactorize tests/functional bitbake: toaster/tests: Bug fixes, functional tests dependent on each other bitbake: toaster/tests: Fixes warnings in autobuilder bitbake: toaster/tests: bug-fix tests writing files into /tmp on the autobuilders bitbake: toaster/test: fix Copyright bitbake: toaster/tests: logging warning in console, trying to kill unavailable Runbuilds process bitbake: toaster/tests: Removed all time.sleep occurrence bitbake: toaster/tests: Bug-Fix testcase functional/test_project_page_tab_config.py bitbake: toaster/tests: bug-fix element click intercepted in browser/test_layerdetails_page.py bitbake: toaster/tests: Update tests/functional/functional_helpers test_functional_basic bitbake: toaster/tests: Fixes functional tests warning on autobuilder bitbake: toaster/tests: Bug-fix test_functional_basic, delay driver actions bitbake: toaster/tests: bug-fix An element matching "#projectstable" should be visible bitbake: toaster/tests: bug-fix An element matching "#lastest_builds" should be on the page bitbake: toaster/tests: Skip to show more then 100 item in ToasterTable bitbake: toaster/tests: Bug-fix "#project-created-notification" should be visible bitbake: toaster/toastergui: Bug-fix verify given layer path only if import/add local layer Alex Bennée (1): qemurunner: more cleanups for output blocking Alex Kiernan (17): cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATH cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common rust: cargo: Convert single-valued variables to weak defaults cargo: Add CARGO_LOCK_PATH for path to Cargo.lock rust: Upgrade 1.70.0 -> 1.71.0 rust: Upgrade 1.71.0 -> 1.71.1 sstate-cache-management: Rewrite in python devtool: selftest: Fix test_devtool_modify_git_crates_subpath inequality devtool: selftest: Fix test_devtool_modify_git_crates_subpath bbappend check meta-selftest: hello-rs: Simple rust test recipe devtool: selftest: Swap to hello-rs for crates testing zvariant: Drop recipe rust: Upgrade 1.71.1 -> 1.72.0 rust: Upgrade 1.72.0 -> 1.72.1 rust: Upgrade 1.72.1 -> 1.73.0 rust: Upgrade 1.73.0 -> 1.74.0 rust: Upgrade 1.74.0 -> 1.74.1 Alexander Kanavin (21): selftest/sstatetest: print output from bitbake with actual newlines, not \n selftest/sstatetests: do not delete custom $TMPDIRs under build-st when testing printdiff sstatesig/find_siginfo: special-case gcc-source when looking in sstate caches oeqa/selftest/sstatetests: re-work CDN tests, add local cache tests gobject-introspection: depend on setuptools to obtain distutils module libcap-ng-python: depend on setuptools to obtain distutils copy dnf: remove obsolete python3-gpg dependency (provided by gpgme) gpgme: disable python support (until upstream fixes 3.12 compatibility) python3-setuptools-rust: remove distutils dependency python3-babel: replace distutils with setuptools, as supported by upstream python3-pip: remove distutils depedency glib-2.0: replace distutils dependency with setuptools python3-pytest-runner: remove distutils dependency python3-numpy: distutils is no longer required bitbake: bitbake/codeparser.py: address ast module deprecations in py 3.12 glibc-y2038-tests: do not run tests using 32 bit time APIs bitbake: bitbake/runqueue: add debugging for find_siginfo() calls bitbake: bitbake-diffsigs/runqueue: adapt to reworked find_siginfo() bitbake: bitbake/runqueue: prioritize local stamps over sstate signatures in printdiff sstatesig/find_siginfo: unify a disjointed API lib/sstatesig/find_siginfo: raise an error instead of returning None when obtaining mtime Alexander Lussier-Cullen (6): bitbake: toaster: fix pytest build test execution and test discovery bitbake: toaster: Add verbose printout for missing chrome(driver) dependencies bitbake: bitbake: toaster: add functional testing toaster error details bitbake: toaster/tests: Exit tests on chromedriver creation failure bitbake: toaster/tests: fix functional tests setup and teardown bitbake: toaster/tests: fix chrome argument syntax and wait for driver exit Alexandre Belloni (1): oeqa/selftest/recipetool: stop looking for md5sum Anuj Mittal (9): sqlite3: upgrade 3.44.0 -> 3.44.2 base-passwd: upgrade 3.6.2 -> 3.6.3 bluez5: upgrade 5.70 -> 5.71 glib-2.0: upgrade 2.78.1 -> 2.78.3 glib-networking: upgrade 2.76.1 -> 2.78.0 puzzles: upgrade to latest revision stress-ng: upgrade 0.17.01 -> 0.17.03 libusb1: fix upstream version check enchant2: upgrade 2.6.2 -> 2.6.4 Archana Polampalli (1): bluez5: fix CVE-2023-45866 Bruce Ashfield (31): linux-yocto/6.5: cfg: split runtime and symbol debug linux-yocto/6.5: update to v6.5.11 linux-yocto/6.1: update to v6.1.62 linux-yocto-dev: bump to v6.7 linux-yocto/6.5: update to v6.5.12 linux-yocto/6.5: update to v6.5.13 linux-yocto/6.1: update to v6.1.65 linux-yocto/6.1: drop removed IMA option linux-yocto/6.5: drop removed IMA option linux-yocto-rt/6.1: update to -rt18 linux-yocto/6.1: update to v6.1.66 linux-yocto/6.1: update to v6.1.67 linux-yocto/6.5: fix AB-INT: QEMU kernel panic: No irq handler for vector linux-yocto/6.1: update to v6.1.68 oeqa/runtime/parselogs: add qemux86 ACPI ignore for kernel v6.6+ linux-libc-headers: update to v6.6-lts linux-yocto: introduce 6.6 reference kernel linux-yocto/6.6: fix AB-INT: QEMU kernel panic: No irq handler for vector linux-yocto-rt/6.6: fix CVE exclusion include linux-yocto/6.6: update CVE exclusions linux-yocto/6.6: update to v6.6.8 linux-yocto/6.1: update to v6.1.69 linux-yocto/6.5: drop 6.5 recipes linux-yocto-rt/6.6: correct meta data branch linux-yocto/6.6: update to v6.6.9 linux-yocto/6.6: update CVE exclusions linux-yocto/6.1: update to v6.1.70 linux-yocto/6.1: update CVE exclusions linux-yocto/6.6: ARM fix configuration audit warning linux-yocto/6.6: arm: jitter entropy backport poky/poky-tiny: make 6.6 the default kernel Changqing Li (1): man-pages: remove conflict pages Chen Qi (1): devtool: use straight print in check-upgrade-status output Clay Chang (1): devtool: deploy: provide max_process to strip_execs Daniel Ammann (1): base: Unpack .7z files with p7zip Deepthi Hemraj (1): autoconf: Add missing perl modules to RDEPENDS Dhairya Nagodra (2): cve-update-nvd2-native: faster requests with API keys cve-update-nvd2-native: increase the delay between subsequent request failures Eilís 'pidge' Ní Fhlannagáin (3): useradd: Fix issues with useradd dependencies useradd: Add testcase for bugzilla issue (currently disabled) usergrouptests.py: Add test for switching between static-ids Enrico Scholz (1): tcp-wrappers: drop libnsl2 build dependency Etienne Cordonnier (2): gdb/systemd: enable minidebuginfo support conditionally manuals: document minidebuginfo Fabio Estevam (3): libdrm: Upgrade to 2.4.119 kmscube: Upgrade to latest revision bmap-tools: Upgrade to 3.7 Hongxu Jia (2): socat: 1.7.4.4 -> 1.8.0.0 man-db: 2.11.2 -> 2.12.0 Jason Andryuk (3): linux-firmware: Package iwlwifi .pnvm files linux-firmware: Change bnx2 packaging linux-firmware: Create bnx2x subpackage Jeremy A. Puhlman (1): create-spdx-2.2: combine spdx can try to write before dir creation Jermain Horsman (2): lib/bblayers/makesetup.py: Remove unused imports lib/bblayers/buildconf.py: Remove unused imports/variables Jose Quaresma (2): go: update 1.20.10 -> 1.20.11 go: update 1.20.11 -> 1.20.12 Joshua Watt (11): bitbake: bitbake-hashserv: Add description of permissions bitbake.conf: Add runtimedir rpcbind: Specify state directory under /run libinput: Add packageconfig for tests ipk: Switch to using zstd compression lib/oe/path.py: Add relsymlink() lib/packagedata.py: Fix broken symlinks for providers with a '/' bitbake: contrib/vim: Syntax improvements classes-global/sstate: Fix variable typo lib/packagedata.py: Add API to iterate over rprovides classes-global/insane: Look up all runtime providers for file-rdeps Julien Stephan (19): recipetool: create_buildsys_python.py: initialize metadata recipetool: create: add trailing newlines recipetool: create: add new optional process_url callback for plugins recipetool: create_buildsys_python: add pypi support oeqa/selftest/recipetool: remove spaces on empty lines oeqa/selftest/recipetool/devtool: add test for pypi class recipetool: appendsrcfile(s): add dry-run mode recipeutils: bbappend_recipe: fix undefined variable recipeutils: bbappend_recipe: fix docstring recipeutils: bbappend_recipe: add a way to specify the name of the file to add recipeutils: bbappend_recipe: remove old srcuri entry if parameters are different recipetool: appendsrcfile(s): use params instead of extraline recipeutils: bbappend_recipe: allow to patch the recipe itself recipetool: appendsrcfile(s): add a mode to update the recipe itself oeqa/selftest/recipetool: appendsrfile: add test for machine oeqa/selftest/recipetool: appendsrc: add test for update mode oeqa/selftest/recipetool: add back checksum checks on pypi tests oeqa/selftest/recipetool: remove left over from development oeqa/selftest/recipetool: fix metadata corruption on meta layer Kevin Hao (2): beaglebone-yocto: Remove the redundant kernel-devicetree beaglebone-yocto: Remove the obsolete variables for uImage Khem Raj (13): tiff: Backport fixes for CVE-2023-6277 kmod: Fix build with latest musl elfutils: Use own basename API implementation util-linux: Fix build with latest musl sysvinit: Include libgen.h for basename API attr: Fix build with latest musl opkg: Use own version of portable basename function util-linux: Delete md-raid tests gdb: Update to gdb 14.1 release systemd: Fix build with latest musl qemu: Fix build with latest musl qemu: Add packageconfig knob to enable pipewire support weston: Include libgen.h for basename Lee Chee Yang (5): migration-guides: reword fix in release-notes-4.3.1 migration-guides: add release notes for 4.0.15 perlcross: update to 1.5.2 perl: 5.38.0 -> 5.38.2 curl: update to 8.5.0 Lucas Stach (1): mesa: upgrade 23.2.1 -> 23.3.1 Ludovic Jozeau (1): image-live.bbclass: LIVE_ROOTFS_TYPE support compression Lukas Funke (1): selftest: wic: add test for zerorize option of empty plugin Malte Schmidt (1): wic: extend empty plugin with options to write zeros to partiton Markus Volk (3): gtk4: upgrade 4.12.3 -> 4.12.4 libadwaita: update 1.4.0 -> 1.4.2 appstream: Upgrade 0.16.3 -> 1.0.0 Marlon Rodriguez Garcia (5): bitbake: toaster/tests: Update build test bitbake: toaster: Added new feature to import eventlogs from command line into toaster using replay functionality bitbake: toaster: remove test and update setup to avoid rebuilding image bitbake: toaster: Commandline build import table improvements bitbake: toaster: Added validation to stop import if there is a build in progress Marta Rybczynska (1): bitbake: toastergui: verify that an existing layer path is given Massimiliano Minella (1): zstd: fix LICENSE statement Michael Opdenacker (8): test-manual: text and formatting fixes test-manual: resource updates test-manual: use working example test-manual: add links to python unittest test-manual: explicit or fix file paths test-manual: add or improve hyperlinks dev-manual: runtime-testing: fix test module name poky.conf: update SANITY_TESTED_DISTROS to match autobuilder Mikko Rapeli (1): runqemu: match .rootfs. in addition to -image- for rootfs Ming Liu (1): grub: fs/fat: Don't error when mtime is 0 Mingli Yu (2): python3-license-expression: Fix the ptest failure ptest-packagelists.inc: Add python3-license-expression Pavel Zhukov (2): bitbake: utils: Do not create directories with ${ in the name oeqa/selftest/bbtests: Add test for unexpanded variables in the dirname Peter Kjellerstedt (11): oeqa/selftest/devtool: Correct git clone of local repository oeqa/selftest/devtool: Avoid global Git hooks when amending a patch oeqa/selftest/devtool: Make test_devtool_load_plugin more resilient oeqa/selftest/recipetool: Make test_recipetool_load_plugin more resilient lib/oe/recipeutils: Avoid wrapping any SRC_URI[sha*sum] variables recipetool: create: Improve identification of licenses recipetool: create: Only include the expected SRC_URI checksums devtool: upgrade: Update all existing checksums for the SRC_URI devtool: modify: Make --no-extract work again devtool: modify: Handle recipes with a menuconfig task correctly dev-manual: Discourage the use of SRC_URI[md5sum] Peter Marko (1): dtc: preserve version also from shallow git clones Philip Balister (1): sanity.bbclass: Check for additional native perl modules. Renat Khalikov (1): python3-maturin: Add missing space appending to CFLAGS Richard Purdie (41): bitbake: runqueue: Improve inter setscene task dependency handling bitbake: bb/toaster: Fix assertEquals deprecation warnings bitbake: toaster: Fix assertRegexpMatches deprecation warnings bitbake: toastermain/settings: Avoid python filehandle closure warnings bitbake: toastergui: Fix regex markup issues bitbake: bitbake: Move to version 2.6.1 to mark runqueue changes bitbake: toaster-eventreplay: Remove ordering assumptions sanity.conf: Require bitbake 2.6.1 for recent runqueue change sstate: Remove unneeded code from setscene_depvalid() related to useradd oeqa/runtime/systemd: Ensure test runs only on systemd images bitbake: toaster: Update to use qemux86-64 machine by default bitbake: toaster/tests/builds: Add BB_HASHSERVE passthrough pseudo: Update to pull in syncfs probe fix useradd: Fix useradd do_populate_sysroot dependency bug sstate: Fix dir ownership issues in SSTATE_DIR oeqa/sstatetests: Disable gcc source printdiff test for now build-appliance-image: Update to master head revision bitbake: utils: Fix mkdir with PosixPath bitbake: runqueue: Remove tie between rqexe and starts_worker build-appliance-image: Update to master head revision testimage: Exclude wtmp from target-dumper commands qemurunner: Improve stdout logging handling qemurunner: Improve handling of serial port output blocking oeqa/selftest/overlayfs: Don't overwrite DISTRO_FEATURES testimage: Drop target_dumper and most of monitor_dumper oeqa/selftest/overlayfs: Fix whitespace qemu: Clean up DEPENDS qemu: Ensure pip and the python venv aren't used for meson curl: Disable two intermittently failing tests linux/cve-exclusion6.1: Update to latest kernel point release lib/prservice: Improve lock handling robustness oeqa/selftest/prservice: Improve test robustness scripts: Drop shell sstate-cache-management oeqa/selftest/sstatetests: Update sstate management script tests to python script curl: Disable test 1091 due to intermittent failures bitbake: lib/bb: Add workaround for libgcc issues with python 3.8 and 3.9 bitbake: bitbake: Post release version bump to 2.7.0 bitbake: siggen: Ensure version of siggen is verified bitbake: bitbake: Version bump for find_siginfo chanages sstatesig: Add version information for find_sigingfo sanity: Require bitbake 2.7.1 Robert Berger (1): uninative-tarball.xz - reproducibility fix Robert Yang (5): gettext: Upgrade 0.22.3 -> 0.22.4 nfs-utils: Upgrade 2.6.3 -> 2.6.4 archiver.bbclass: Improve work-shared checking nfs-utils: Update Upstream-Status archiver.bbclass: Drop tarfile module to improve performance Ross Burton (23): avahi: update URL for new project location oeqa/runtime/parselogs: load ignores from disk oeqa/runtime/parselogs: migrate ignores meta-yocto-bsp/oeqa/parselogs: add BSP-specific ignores linux-yocto: update CVE exclusions genericx86: remove redundant assignments images: remove redundant IMAGE_BASENAME assignments insane: ensure more paths have the workdir removed tcl: skip timing-dependent tests in run-ptest qemurunner: remove unused import go: set vendor in CVE_PRODUCT runqemu: add qmp socket support linux-yocto: update CVE exclusions tcl: skip async and event tests in run-ptest images: add core-image-initramfs-boot machine/arch-armv9: remove crc and sve tunes, they are mandatory python3: re-enable profile guided optimisation openssl: mark assembler sections as call targets for PAC/BTI support on aarch64 nativesdk: ensure features don't get backfilled nativesdk: don't unset MACHINE_FEATURES, let machine-sdk/ set it conf/machine-sdk: declare qemu-usermode SDK_MACHINE_FEATURE libseccomp: remove redundant PV assignment oeqa/parselogs-ignores-qemuarmv5: add comments and organise Saul Wold (1): package.py: OEHasPackage: Add MLPREFIX to packagename Shubham Kulkarni (1): tzdata: Upgrade to 2023d Simone Weiß (2): manuals: brief-yoctoprojectqs: align variable order with default local.conf patchtest: Add test for deprecated CVE_CHECK_IGNORE Soumya Sambu (1): ncurses: Fix - tty is hung after reset Sundeep KOKKONDA (1): rust: rustdoc reproducibility issue fix - disable PGO Tim Orling (12): python3-bcrypt: upgrade 4.0.1 -> 4.1.1 python3-pygments: upgrade 2.16.1 -> 2.17.2 recipetool: pypi: do not clobber SRC_URI checksums python3-setuptools-rust: BBCLASSEXTEND + nativesdk python3-maturin: add v1.4.0 python3-maturin: bzip2-sys reproduciblility classes-recipe: add python_maturin.bbclass recipetool: add python_maturin support oe-selfest: add maturn runtime (testimage) test oeqa: add simple 'maturin' SDK (testsdk) test case oeqa: add "maturin develop" SDK test case oeqa: add runtime 'maturin develop' test case Tom Rini (1): inetutils: Update to the 2.5 release Trevor Gamblin (1): scripts/runqemu: fix regex escape sequences Victor Kamensky (5): systemtap: upgrade 4.9 -> 5.0 systemtap: do not install uprobes and uprobes sources systemtap-uprobes: removed as obsolete systemtap: explicit handling debuginfod library dependency systemtap: fix libdebuginfod auto detection logic Vijay Anusuri (1): avahi: backport CVE-2023-1981 & CVE's follow-up patches Viswanath Kraleti (2): image-uefi.conf: Add EFI_UKI_PATH variable systemd-boot: Add recipe to compile native Wang Mingyu (38): kbd: upgrade 2.6.3 -> 2.6.4 libatomic-ops: upgrade 7.8.0 -> 7.8.2 libnl: upgrade 3.8.0 -> 3.9.0 libseccomp: upgrade 2.5.4 -> 2.5.5 libva-utils: upgrade 2.20.0 -> 2.20.1 dnf: upgrade 4.18.1 -> 4.18.2 gpgme: upgrade 1.23.1 -> 1.23.2 kea: upgrade 2.4.0 -> 2.4.1 opkg-utils: upgrade 0.6.2 -> 0.6.3 repo: upgrade 2.39 -> 2.40 sysstat: upgrade 12.7.4 -> 12.7.5 p11-kit: upgrade 0.25.2 -> 0.25.3 python3-babel: upgrade 2.13.1 -> 2.14.0 python3-dbusmock: upgrade 0.29.1 -> 0.30.0 python3-hatchling: upgrade 1.18.0 -> 1.20.0 python3-hypothesis: upgrade 6.90.0 -> 6.92.1 python3-importlib-metadata: upgrade 6.8.0 -> 7.0.0 python3-license-expression: upgrade 30.1.1 -> 30.2.0 python3-pathspec: upgrade 0.11.2 -> 0.12.1 python3-pip: upgrade 23.3.1 -> 23.3.2 python3-psutil: upgrade 5.9.6 -> 5.9.7 python3-pytest-runner: upgrade 6.0.0 -> 6.0.1 python3-trove-classifiers: upgrade 2023.11.22 -> 2023.11.29 python3-typing-extensions: upgrade 4.8.0 -> 4.9.0 python3-wcwidth: upgrade 0.2.11 -> 0.2.12 ttyrun: upgrade 2.29.0 -> 2.30.0 xwayland: upgrade 23.2.2 -> 23.2.3 diffoscope: upgrade 252 -> 253 iputils: upgrade 20221126 -> 20231222 gstreamer1.0: upgrade 1.22.7 -> 1.22.8 dhcpcd: upgrade 10.0.5 -> 10.0.6 fontconfig: upgrade 2.14.2 -> 2.15.0 python3-setuptools: upgrade 69.0.2 -> 69.0.3 python3-dbusmock: upgrade 0.30.0 -> 0.30.1 python3-hatchling: upgrade 1.20.0 -> 1.21.0 python3-importlib-metadata: upgrade 7.0.0 -> 7.0.1 python3-lxml: upgrade 4.9.3 -> 4.9.4 aspell: upgrade 0.60.8 -> 0.60.8.1 Yash Shinde (1): rust: Disable rust oe-selftest Yi Zhao (3): json-glib: upgrade 1.6.6 -> 1.8.0 psplash: upgrade to latest revision debianutils: upgrade 5.14 -> 5.15 Yoann Congal (2): lib/oe/patch: handle creating patches for CRLF sources strace: Disable bluetooth support by default Zang Ruochen (2): ell: upgrade 0.60 -> 0.61 musl: add typedefs for Elf64_Relr and Elf32_Relr Zoltan Boszormenyi (1): update_gtk_icon_cache: Fix for GTK4-only builds venkata pyla (1): wic: use E2FSPROGS_FAKE_TIME and hash_seed to generate reproducible ext4 images meta-openembedded: 5ad7203f68..7d8115d550: Alex Kiernan (7): mdns: Fix HOMEPAGE URL mbedtls: Upgrade 3.5.0 -> 3.5.1 c-ares: Upgrade 1.22.1 -> 1.24.0 mdns: Upgrade 2200.40.37.0.1 -> 2200.60.25.0.4 c-ares: Move to tarballs, add ptest and static support thin-provisioning-tools: Upgrade 1.0.4 -> 1.0.9 bearssl: Upgrade to latest Alexander Kanavin (29): python3-pyinotify: remove as unmaintained python3-supervisor: do not rely on smtpd module python3-meld3: do not rely on smtpd module python3-m2crypto: do not rely on smtpd module python3-uinput: remove as unmaintained python3-mcrypto: rely on setuptools for distutils copy python3-joblib: do not rely in distutils python3-web3: remove distutils dependency python3-cppy: remove unused distutils dependency python3-pyroute2: remove unused distutils dependency python3-eventlet: backport a patch to remove distutils dependency python3-unoconv: rely on setuptools to obtain distutils copy python3-astroid: remove unneeded distutils dependency python3-django: remove unneeded distutils dependency python3-pillow: remove unneeded distutils dependency python3-grpcio: update 1.56.2 -> 1.59.3 gstd: correctly delete files in do_install libplist: fix python 3.12 compatibility libcamera: skip until upstream resolves python 3.12 compatibility nodejs: backport (partially) python 3.12 support nodejs: backport (partially) python 3.12 support polkit: remove long obsolete 0.119 version mozjs-115: split the way-too-long PYTHONPATH line polkit: update mozjs dependency 102 -> 115 mozjs-115: backport py 3.12 compatibility mozjs-102: remove the recipe gthumb: update 3.12.2 -> 3.12.4 flatpak: do not rely on executables from the host bolt: package systemd units Archana Polampalli (1): cjson: upgrade 1.7.16 -> 1.7.17 Bruce Ashfield (1): zfs: update to 2.2.2 Changqing Li (2): postgresql: upgrade 15.4 -> 15.5 redis: upgrade 6.2.13 -> 6.2.14 Derek Straka (70): python3-greenlet: update to version 3.0.2 python3-ujson: update to version 5.9.0 python3-termcolor: update to version 2.4.0 python3-cmake: update to version 3.28.0 python3-pint: upgrade to 0.23 python3-gnupg: update to 0.5.2 python3-pyzmq: update to 25.1.2 python3-tox: update to version 4.11.4 python3-olefile: update to version 0.47 python3-distlib: update to version 0.3.8 python3-colorlog: update to version 6.8.0 python3-pymongo: update version to 4.6.1 python3-bandit: update to version 1.7.6 python3-gmqtt: update to version 0.6.13 python3-portion: update to version 2.4.2 python3-prompt-toolkit: update to version 3.0.43 python3-asyncinotify: update to version 4.0.4 python3-bitstring: update to version 4.1.4 python3-ipython: update to version 8.18.1 nginx: update versions for both the stable branch and mainline python3-portalocker: update to version 2.8.2 python3-astroid: update to version 3.0.2 python3-alembic: update to version 1.13.1 python3-pymisp: update to verion 2.4.182 python3-ninja: update to version 1.11.1.1 python3-coverage: update to version 7.3.4 python3-pdm: update to version 2.11.1 python3-paramiko: update to version 3.4.0 python3-zeroconf: update to version 0.131.0 python3-wtforms: update to version 3.1.1 python3-isort: update to version 5.13.2 python3-protobuf: update to version 4.25.1 python3-lazy-object-proxy: update to version 1.10.0 python3-cantools: update to version 39.4.0 python3-sentry-sdk: update to version 1.39.1 python3-xmlschema: update to version 2.5.1 python3-apiflask: update to version 2.1.0 python3-rapidjson: update to version 1.14 python3-bitarray: update to version 2.9.0 python3-pyfanotify: update to version 0.2.2 python3-eventlet: update to version 0.34.1 python3-flask-wtf: update to version 1.2.1 python3-grpcio: update to version 1.60.0 python3-grpcio-tools: update to version 1.60.0 python3-cmake: update to version 3.28.1 python3-flask-sqlalchemy: fix upstream uri check python3-wtforms: fix upstream uri and version check gyp: update to the latest commit python3-ipython-genutils: fix upstream uri and version check python3-flask: fix upstream uri and version check python3-wpa-supplicant: fix upstream uri and version check python3-uswid: update to version 0.4.7 python3-flask-wtf: fix upstream uri and version check python3-gspread: update to version 5.12.3 python3-pytest-html: update to version 4.1.1 python3-setuptools-scm-git-archive: remove obsolete package python3-pyroute2: update to version 0.7.10 python3-constantly: update to version 23.10.4 python3-mypy: update to version 1.8.0 python3-flask-jwt-extended: update to version 4.6.0 python3-greenlet: update to version 3.0.3 python3-web3: update to version 6.13.0 python3-parse: update to version 1.20.0 python3-kmod: add comment about update to version 0.9.2 python3-engineio: update to version 4.8.1 python3-sqlalchemy: update to version 2.0.24 python3-pdm-backend: update to version 2.1.8 python3-cantools: update to version 39.4.1 python3-argh: update to version 0.30.5 python3-dominate: update to version 2.9.1 Dmitry Baryshkov (2): android-tools: remove two Debianisms networkmanager: drop libnewt dependency Frederic Martinsons (3): crash: factorize recipe with inc file to prepare cross-canadian version crash: add cross canadian version crash: update to 8.0.4 Jan Vermaete (1): netdata: added Python as rdepends Jean-Marc BOUCHE (1): terminus-font: build compressed archives with -n Jose Quaresma (1): ostree: Upgrade 2023.7 -> 2023.8 Joshua Watt (1): redis: Create state directory in systemd service Jörg Sommer (1): i2cdev: New recipe with i2c tools Kai Kang (1): lvm2: 2.03.16 -> 2.03.22 Khem Raj (3): Revert "nodejs: backport (partially) python 3.12 support" Revert "libcamera: skip until upstream resolves python 3.12 compatibility" libcamera: Fix build with python 3.12 Leon Anavi (11): sip: Upgrade 6.7.12 -> 6.8.0 python3-expandvars: add recipe python3-frozenlist: upgrade 1.4.0 -> 1.4.1 python3-yarl: upgrade 1.9.2 -> 1.9.4 python3-coverage: upgrade 7.3.2 -> 7.3.3 python3-cycler: upgrade 0.11.0 -> 0.12.1 python3-aiohue: upgrade 4.6.2 -> 4.7.0 python3-sdbus: upgrade 0.11.0 -> 0.11.1 python3-zeroconf: upgrade 0.128.4 -> 0.130.0 python3-dominate: upgrade 2.8.0 -> 2.9.0 python3-rlp: upgrade 3.0.0 -> 4.0.0 Marek Vasut (1): faad2: Upgrade 2.10.0 -> 2.11.1 Markus Volk (3): wireplumber: update 0.4.15 -> 0.4.17 tracker: dont inherit gsettings gnome-software: update 45.1 -> 45.2 Martin Jansa (4): monocypher: pass LIBDIR to fix installed-vs-shipped QA issue with multilib rygel: fix build with gtk+3 PACKAGECONFIG disabled rygel: add x11 to DISTRO_FEATURES driverctl: fix installed-vs-shipped Meenali Gupta (1): nginx: upgrade 1.25.2 -> 1.25.3 Mingli Yu (2): mariadb: Upgrade to 10.11.6 tk: Remove buildpath issue Nathan BRIENT (1): cyaml: new recipe Niko Mauno (1): pkcs11-provider: Add recipe Ny Antra Ranaivoarison (1): python3-click-spinner: backport patch that fixes deprecated methods Patrick Wicki (1): poco: upgrade 1.12.4 -> 1.12.5p2 Petr Chernikov (1): abseil-cpp: remove -Dcmake_cxx_standard=14 flag from extra_oecmake Robert Yang (1): minifi-cpp: Fix do_configure error builder aarch64 Ross Burton (13): Remove unused SRC_DISTRIBUTE_LICENSES gspell: inherit gtk-doc gspell: update DEPENDS, switch iso-codes for icu librest: remove spurious build dependencies librest: inherit gtk-doc keybinder: use autotools-brokensep instead of setting B keybinder: disable gtk-doc documentation gtksourceview3: remove obsolete DEPENDS libgsf: remove obsolete DEPENDS evolution-data-server: remove obsolete intltool DEPENDS php: remove lemon-native build dependency lemon: upgrade to 3.44.2 renderdoc: no need to depend on vim-native Samuli Piippo (1): jasper: enable opengl only wih x11 Theodore A. Roth (1): python3-flask-sqlalchemy: upgrade 2.5.1 -> 3.1.1 Thomas Perrot (2): networkmanager: add missing modemmanager rdepends networkmanager: fix some missing pkgconfig Tim Orling (8): python3-pydantic-core: add v2.14.5 python3-annotated-types: add v0.6.0 python3-pydantic: fix RDEPENDS python3-dirty-equals: add v0.7.1 python3-pydantic-core: enable ptest python3-cloudpickle: add v3.0.0 python3-pydantic: enable ptest python3-yappi: upgrade 1.4.0 -> 1.6.0; fix ptests Wang Mingyu (61): python3-alembic: upgrade 1.12.1 -> 1.13.0 python3-ansi2html: upgrade 1.8.0 -> 1.9.1 python3-argcomplete: upgrade 3.1.6 -> 3.2.1 python3-dbus-fast: upgrade 2.15.0 -> 2.21.0 python3-django: upgrade 4.2.7 -> 5.0 python3-flask-restx: upgrade 1.2.0 -> 1.3.0 python3-google-api-core: upgrade 2.14.0 -> 2.15.0 python3-google-api-python-client: upgrade 2.108.0 -> 2.111.0 python3-googleapis-common-protos: upgrade 1.61.0 -> 1.62.0 python3-google-auth: upgrade 2.23.4 -> 2.25.2 python3-imageio: upgrade 2.33.0 -> 2.33.1 python3-isort: upgrade 5.12.0 -> 5.13.1 python3-path: upgrade 16.7.1 -> 16.9.0 python3-platformdirs: upgrade 4.0.0 -> 4.1.0 python3-pytest-asyncio: upgrade 0.22.0 -> 0.23.2 python3-sentry-sdk: upgrade 1.37.1 -> 1.39.0 python3-bitarray: upgrade 2.8.3 -> 2.8.5 python3-eth-keyfile: upgrade 0.6.1 -> 0.7.0 python3-eth-rlp: upgrade 0.3.0 -> 1.0.0 python3-fastnumbers: upgrade 5.0.1 -> 5.1.0 python3-pylint: upgrade 3.0.2 -> 3.0.3 python3-tornado: upgrade 6.3.3 -> 6.4 python3-traitlets: upgrade 5.13.0 -> 5.14.0 python3-types-setuptools: upgrade 68.2.0.2 -> 69.0.0.0 python3-virtualenv: upgrade 20.24.7 -> 20.25.0 python3-web3: upgrade 6.11.3 -> 6.12.0 python3-websocket-client: upgrade 1.6.4 -> 1.7.0 python3-zeroconf: upgrade 0.127.0 -> 0.128.4 ctags: upgrade 6.0.20231126.0 -> 6.0.20231210.0 gensio: upgrade 2.8.0 -> 2.8.2 hwdata: upgrade 0.376 -> 0.377 lvgl: upgrade 8.3.10 -> 8.3.11 gjs: upgrade 1.78.0 -> 1.78.1 ifenslave: upgrade 2.13 -> 2.14 libei: upgrade 1.1.0 -> 1.2.0 pkcs11-helper: upgrade 1.29.0 -> 1.30.0 strongswan: upgrade 5.9.12 -> 5.9.13 webkitgtk3: upgrade 2.42.2 -> 2.42.3 sip: upgrade 6.8.0 -> 6.8.1 paho-mqtt-cpp: upgrade 1.3.1 -> 1.3.2 dbus-cxx: upgrade 2.4.0 -> 2.5.0 exiftool: upgrade 12.70 -> 12.71 uftp: upgrade 5.0.2 -> 5.0.3 ctags: upgrade 6.0.20231210.0 -> 6.0.20231224.0 jasper: Fix install conflict when enable multilib. jq: upgrade 1.7 -> 1.7.1 libmbim: upgrade 1.31.1 -> 1.31.2 libqmi: upgrade 1.34.0 -> 1.35.1 opencl-headers: upgrade 2023.04.17 -> 2023.12.14 valijson: upgrade 1.0.1 -> 1.0.2 python3-apispec: upgrade 6.3.0 -> 6.3.1 python3-asyncinotify: upgrade 4.0.4 -> 4.0.5 python3-bitarray: upgrade 2.9.0 -> 2.9.1 python3-cassandra-driver: upgrade 3.28.0 -> 3.29.0 python3-ipython: upgrade 8.18.1 -> 8.19.0 python3-pydantic: upgrade 2.5.2 -> 2.5.3 python3-regex: upgrade 2023.10.3 -> 2023.12.25 opencl-icd-loader: upgrade 2023.04.17 -> 2023.12.14 python3-distro: upgrade 1.8.0 -> 1.9.0 zchunk: upgrade 1.3.2 -> 1.4.0 python3-eventlet: upgrade 0.34.1 -> 0.34.2 William Lyu (1): networkmanager: Improved SUMMARY and added DESCRIPTION Xiangyu Chen (1): layer.conf: add libbpf to NON_MULTILIB_RECIPES Yi Zhao (2): open-vm-tools: upgrade 12.1.5 -> 12.3.5 samba: upgrade 4.18.8 -> 4.18.9 Zoltán Böszörményi (2): mutter: Make gnome-desktop and libcanberra dependencies optional zenity: Upgrade to 4.0.0 alperak (29): jasper: upgrade 2.0.33 -> 4.1.1 xcursorgen: upgrade 1.0.7 -> 1.0.8 xstdcmap: upgrade 1.0.4 -> 1.0.5 xlsclients: upgrade 1.1.4 -> 1.1.5 xlsatoms: upgrade 1.1.3 -> 1.1.4 xkbevd: upgrade 1.1.4 -> 1.1.5 xgamma: upgrade 1.0.6 -> 1.0.7 sessreg: upgrade 1.1.2 -> 1.1.3 xbitmaps: upgrade 1.1.2 -> 1.1.3 xcursor-themes: add recipe xorg-docs: add recipe xorg-sgml-doctools: update summary depends and inc file xf86-video-ati: upgrade 19.1.0 -> 22.0.0 xf86-input-void: upgrade 1.4.1 -> 1.4.2 libxaw: upgrade 1.0.14 -> 1.0.15 xf86-video-mga: upgrade 2.0.0 -> 2.0.1 snappy: upgrade 1.1.9 -> 1.1.10 xsetroot: upgrade 1.1.2 -> 1.1.3 libbytesize: Removed unnecessary setting of B libmxml: use autotools-brokensep instead of setting B libsombok3: use autotools-brokensep instead of setting B pgpool2: use autotools-brokensep instead of setting B qpdf: upgrade 11.6.3 -> 11.6.4 cpprest: upgrade 2.10.18 -> 2.10.19 avro-c: upgrade 1.11.2 -> 1.11.3 dool: upgrade 1.1.0 -> 1.3.1 driverctl: upgrade 0.111 -> 0.115 hstr: upgrade 2.5.0 -> 3.1.0 libharu: upgrade 2.3.0 -> 2.4.4 meta-security: 070a1e82cc..b2e1511338: Armin Kuster (6): libgssglue: update to 0.8 python3-privacyidea: Update to 3.9.1 lynis: Update SRC_URI to improve updater layers: Move READMEs to markdown format arpwatch: adjust CONFIGURE params to allow to build again. python3-pyinotify: fail2ban needs this module Dawid Dabrowski (1): libhoth recipe update Erik Schilling (2): dm-verity-img.bbclass: use bc-native dm-verity-img.bbclass: remove IMAGE_NAME_SUFFIX Mikko Rapeli (2): tpm2-tss: support native builds dm-verity-img.bbclass: add DM_VERITY_DEPLOY_DIR Change-Id: I94d7f1ee5ff2da4555c05fbf63a1293ec8f249c2 Signed-off-by: Patrick Williams --- .../0001-Fix-for-Python-3.10-compatibility.patch | 36 - .../meta-python/recipes-devtools/gyp/gyp_git.bb | 3 +- .../recipes-devtools/python/python-django.inc | 1 - .../python/python3-aiohue_4.6.2.bb | 16 - .../python/python3-aiohue_4.7.0.bb | 16 + .../python/python3-alembic_1.12.1.bb | 19 - .../python/python3-alembic_1.13.1.bb | 19 + .../python/python3-annotated-types_0.6.0.bb | 14 + .../python/python3-ansi2html_1.8.0.bb | 20 - .../python/python3-ansi2html_1.9.1.bb | 19 + .../python/python3-apiflask_2.0.2.bb | 18 - .../python/python3-apiflask_2.1.0.bb | 18 + .../python/python3-apispec_6.3.0.bb | 10 - .../python/python3-apispec_6.3.1.bb | 10 + .../python/python3-argcomplete_3.1.6.bb | 18 - .../python/python3-argcomplete_3.2.1.bb | 18 + .../recipes-devtools/python/python3-argh_0.30.4.bb | 27 - .../recipes-devtools/python/python3-argh_0.30.5.bb | 27 + .../python/python3-astroid_3.0.1.bb | 38 - .../python/python3-astroid_3.0.2.bb | 37 + .../python/python3-asyncinotify_4.0.2.bb | 15 - .../python/python3-asyncinotify_4.0.5.bb | 15 + .../python/python3-bandit_1.7.5.bb | 19 - .../python/python3-bandit_1.7.6.bb | 19 + .../python/python3-bitarray_2.8.3.bb | 11 - .../python/python3-bitarray_2.9.1.bb | 11 + .../python/python3-bitstring_4.1.3.bb | 19 - .../python/python3-bitstring_4.1.4.bb | 19 + .../python/python3-cantools_39.3.0.bb | 22 - .../python/python3-cantools_39.4.1.bb | 24 + .../python/python3-cassandra-driver_3.28.0.bb | 28 - .../python/python3-cassandra-driver_3.29.0.bb | 28 + .../0001-Update-Versioneer-to-0.22.patch | 2489 +++++++++++++ .../python/python3-click-spinner_0.1.10.bb | 1 + .../python/python3-cloudpickle_3.0.0.bb | 18 + .../python/python3-cmake_3.27.7.bb | 37 - .../python/python3-cmake_3.28.1.bb | 37 + .../python/python3-colorlog_6.7.0.bb | 12 - .../python/python3-colorlog_6.8.0.bb | 12 + .../python/python3-constantly_15.1.0.bb | 11 - .../python/python3-constantly_23.10.4.bb | 12 + .../python/python3-coverage_7.3.2.bb | 20 - .../python/python3-coverage_7.3.4.bb | 20 + .../recipes-devtools/python/python3-cppy_1.2.1.bb | 2 +- .../python/python3-cycler_0.11.0.bb | 15 - .../python/python3-cycler_0.12.1.bb | 15 + .../python/python3-dbus-fast_2.15.0.bb | 15 - .../python/python3-dbus-fast_2.21.0.bb | 15 + .../python/python3-dirty-equals_0.7.1.bb | 21 + .../python/python3-distlib_0.3.7.bb | 12 - .../python/python3-distlib_0.3.8.bb | 12 + .../python/python3-distro_1.8.0.bb | 19 - .../python/python3-distro_1.9.0.bb | 19 + .../python/python3-django_4.2.7.bb | 9 - .../recipes-devtools/python/python3-django_5.0.bb | 9 + .../python/python3-dominate/fix-ptests.patch | 20 - .../python/python3-dominate_2.8.0.bb | 26 - .../python/python3-dominate_2.9.1.bb | 25 + .../python/python3-engineio_4.8.0.bb | 20 - .../python/python3-engineio_4.8.1.bb | 20 + .../python/python3-eth-keyfile_0.6.1.bb | 15 - .../python/python3-eth-keyfile_0.7.0.bb | 15 + .../python/python3-eth-rlp_0.3.0.bb | 15 - .../python/python3-eth-rlp_1.0.0.bb | 15 + .../python/python3-eventlet_0.33.3.bb | 16 - .../python/python3-eventlet_0.34.2.bb | 15 + .../python/python3-expandvars_0.12.0.bb | 10 + .../python/python3-fastnumbers_5.0.1.bb | 10 - .../python/python3-fastnumbers_5.1.0.bb | 10 + .../python/python3-flask-jwt-extended_4.5.3.bb | 16 - .../python/python3-flask-jwt-extended_4.6.0.bb | 16 + .../python/python3-flask-restx_1.2.0.bb | 13 - .../python/python3-flask-restx_1.3.0.bb | 13 + .../python/python3-flask-sqlalchemy_2.5.1.bb | 11 - .../python/python3-flask-sqlalchemy_3.1.1.bb | 13 + .../python/python3-flask-wtf_1.1.1.bb | 16 - .../python/python3-flask-wtf_1.2.1.bb | 18 + .../recipes-devtools/python/python3-flask_2.3.3.bb | 3 + .../python/python3-frozenlist_1.4.0.bb | 11 - .../python/python3-frozenlist_1.4.1.bb | 15 + .../python/python3-gmqtt_0.6.12.bb | 19 - .../python/python3-gmqtt_0.6.13.bb | 19 + .../recipes-devtools/python/python3-gnupg_0.5.1.bb | 14 - .../recipes-devtools/python/python3-gnupg_0.5.2.bb | 14 + .../python/python3-google-api-core_2.14.0.bb | 25 - .../python/python3-google-api-core_2.15.0.bb | 25 + .../python3-google-api-python-client_2.108.0.bb | 20 - .../python3-google-api-python-client_2.111.0.bb | 20 + .../python/python3-google-auth_2.23.4.bb | 26 - .../python/python3-google-auth_2.25.2.bb | 26 + .../python3-googleapis-common-protos_1.61.0.bb | 13 - .../python3-googleapis-common-protos_1.62.0.bb | 13 + .../python/python3-greenlet_3.0.1.bb | 9 - .../python/python3-greenlet_3.0.3.bb | 9 + .../0001-direct_mmap-Use-off_t-on-linux.patch | 37 - ...otobuf-Disable-musttail-attribute-on-mips.patch | 10 +- ...up.py-Do-not-mix-C-and-C-compiler-options.patch | 25 +- .../python/python3-grpcio-tools_1.56.0.bb | 20 - .../python/python3-grpcio-tools_1.60.0.bb | 19 + .../0001-Include-missing-cstdint-header.patch | 6 +- .../0001-direct_mmap-Use-off_t-on-linux.patch | 42 - ...up.py-Do-not-mix-C-and-C-compiler-options.patch | 73 - ...ib-Include-unistd.h-for-open-close-C-APIs.patch | 6 +- .../python/python3-grpcio/abseil-ppc-fixes.patch | 63 +- .../python/python3-grpcio/mips_bigendian.patch | 17 - .../python3-grpcio/ppc-boringssl-support.patch | 17 - .../python/python3-grpcio_1.56.2.bb | 52 - .../python/python3-grpcio_1.60.0.bb | 48 + .../python/python3-imageio_2.33.0.bb | 12 - .../python/python3-imageio_2.33.1.bb | 12 + .../python/python3-ipython-genutils_0.2.0.bb | 3 + .../python/python3-ipython_8.18.0.bb | 28 - .../python/python3-ipython_8.19.0.bb | 28 + .../python/python3-isort_5.12.0.bb | 22 - .../python/python3-isort_5.13.2.bb | 22 + .../python/python3-joblib_1.3.2.bb | 1 - .../recipes-devtools/python/python3-kmod_0.9.1.bb | 1 + .../python/python3-lazy-object-proxy_1.10.0.bb | 11 + .../python/python3-lazy-object-proxy_1.9.0.bb | 11 - .../python/python3-m2crypto_0.40.1.bb | 3 +- .../recipes-devtools/python/python3-meld3_2.0.1.bb | 1 - .../recipes-devtools/python/python3-mypy_1.7.1.bb | 23 - .../recipes-devtools/python/python3-mypy_1.8.0.bb | 23 + .../python/python3-ninja/no-scikit-build.patch | 8 +- .../python/python3-ninja_1.11.1.1.bb | 27 + .../python/python3-ninja_1.11.1.bb | 25 - .../python/python3-olefile_0.46.bb | 17 - .../python/python3-olefile_0.47.bb | 17 + .../python/python3-paramiko_3.3.1.bb | 20 - .../python/python3-paramiko_3.4.0.bb | 20 + .../python/python3-parse_1.19.1.bb | 31 - .../python/python3-parse_1.20.0.bb | 26 + .../recipes-devtools/python/python3-path_16.7.1.bb | 34 - .../recipes-devtools/python/python3-path_16.9.0.bb | 34 + .../python/python3-pdm-backend_2.1.7.bb | 13 - .../python/python3-pdm-backend_2.1.8.bb | 13 + .../recipes-devtools/python/python3-pdm_2.10.4.bb | 15 - .../recipes-devtools/python/python3-pdm_2.11.1.bb | 15 + .../python/python3-pillow_10.1.0.bb | 1 - .../recipes-devtools/python/python3-pint_0.22.bb | 35 - .../recipes-devtools/python/python3-pint_0.23.bb | 35 + .../python/python3-platformdirs_4.0.0.bb | 31 - .../python/python3-platformdirs_4.1.0.bb | 31 + .../python/python3-portion_2.4.1.bb | 16 - .../python/python3-portion_2.4.2.bb | 16 + .../python/python3-prompt-toolkit_3.0.41.bb | 25 - .../python/python3-prompt-toolkit_3.0.43.bb | 25 + ....c-Cast-uintptr_t-types-to-upb_MessageDef.patch | 57 - .../python/python3-protobuf_4.24.4.bb | 39 - .../python/python3-protobuf_4.25.1.bb | 38 + .../python/python3-pydantic-core-crates.inc | 166 + .../python/python3-pydantic-core/run-ptest | 3 + .../python/python3-pydantic-core_2.14.5.bb | 40 + .../python/python3-pydantic/run-ptest | 3 + .../python/python3-pydantic_2.5.2.bb | 23 - .../python/python3-pydantic_2.5.3.bb | 53 + ...efine-FNM_EXTMATCH-if-not-already-defined.patch | 16 +- .../python/python3-pyfanotify_0.2.1.bb | 17 - .../python/python3-pyfanotify_0.2.2.bb | 17 + .../python/python3-pyinotify_0.9.6.bb | 19 - .../python/python3-pylint_3.0.2.bb | 51 - .../python/python3-pylint_3.0.3.bb | 51 + .../python/python3-pymisp_2.4.179.bb | 26 - .../python/python3-pymisp_2.4.182.bb | 24 + .../python/python3-pymongo_4.6.0.bb | 30 - .../python/python3-pymongo_4.6.1.bb | 30 + .../python/python3-pyroute2_0.7.10.bb | 40 + .../python/python3-pyroute2_0.7.9.bb | 41 - .../python/python3-pytest-asyncio_0.22.0.bb | 16 - .../python/python3-pytest-asyncio_0.23.2.bb | 16 + .../python/python3-pytest-html_3.2.0.bb | 19 - .../python/python3-pytest-html_4.1.1.bb | 21 + .../python/python3-pyzmq_25.1.1.bb | 55 - .../python/python3-pyzmq_25.1.2.bb | 55 + .../python/python3-rapidjson_1.13.bb | 41 - .../python/python3-rapidjson_1.14.bb | 40 + .../python/python3-regex_2023.10.3.bb | 14 - .../python/python3-regex_2023.12.25.bb | 14 + .../0001-setup-don-t-use-setuptools-markdown.patch | 37 - .../recipes-devtools/python/python3-rlp_3.0.0.bb | 14 - .../recipes-devtools/python/python3-rlp_4.0.0.bb | 16 + .../python/python3-sdbus_0.11.0.bb | 11 - .../python/python3-sdbus_0.11.1.bb | 17 + .../python/python3-sentry-sdk_1.37.1.bb | 22 - .../python/python3-sentry-sdk_1.39.1.bb | 22 + .../python3-setuptools-scm-git-archive_1.1.bb | 16 - .../python/python3-sqlalchemy_2.0.23.bb | 25 - .../python/python3-sqlalchemy_2.0.24.bb | 25 + .../python/python3-supervisor_4.2.5.bb | 1 - .../python/python3-termcolor_2.3.0.bb | 16 - .../python/python3-termcolor_2.4.0.bb | 16 + .../python/python3-tornado_6.3.3.bb | 39 - .../recipes-devtools/python/python3-tornado_6.4.bb | 39 + .../recipes-devtools/python/python3-tox_4.11.3.bb | 34 - .../recipes-devtools/python/python3-tox_4.11.4.bb | 34 + .../python/python3-traitlets_5.13.0.bb | 13 - .../python/python3-traitlets_5.14.0.bb | 13 + .../python/python3-types-setuptools_68.2.0.2.bb | 10 - .../python/python3-types-setuptools_69.0.0.0.bb | 10 + ...4bit-time_t-default-on-32bit-architecture.patch | 43 - ...setup-use-setuptools-instead-of-distutils.patch | 30 - .../python/python3-uinput_0.11.2.bb | 20 - .../recipes-devtools/python/python3-ujson_5.8.0.bb | 34 - .../recipes-devtools/python/python3-ujson_5.9.0.bb | 34 + .../python/python3-unoconv_0.9.0.bb | 2 +- .../recipes-devtools/python/python3-uswid_0.4.7.bb | 19 + .../recipes-devtools/python/python3-uswid_git.bb | 21 - .../python/python3-virtualenv_20.24.7.bb | 22 - .../python/python3-virtualenv_20.25.0.bb | 22 + .../recipes-devtools/python/python3-web3_6.11.3.bb | 22 - .../recipes-devtools/python/python3-web3_6.13.0.bb | 21 + .../python/python3-websocket-client_1.6.4.bb | 17 - .../python/python3-websocket-client_1.7.0.bb | 17 + .../python/python3-wpa-supplicant_0.2.bb | 2 + .../python/python3-wtforms_3.0.1.bb | 23 - .../python/python3-wtforms_3.1.1.bb | 24 + .../python/python3-xmlschema_2.3.1.bb | 20 - .../python/python3-xmlschema_2.5.1.bb | 20 + .../0001-Fix-imports-for-ptests.patch | 3895 -------------------- ...unctionality-convert-line-endings-to-Unix.patch | 3845 +++++++++++++++++++ ...ix-import-of-tests.utils-to-enable-pytest.patch | 101 + .../python3-yappi/0002-add-3.11-to-the-setup.patch | 26 - .../python/python3-yappi/run-ptest | 2 +- .../recipes-devtools/python/python3-yappi_1.4.0.bb | 36 - .../recipes-devtools/python/python3-yappi_1.6.0.bb | 37 + .../recipes-devtools/python/python3-yarl_1.9.2.bb | 27 - .../recipes-devtools/python/python3-yarl_1.9.4.bb | 32 + .../python/python3-zeroconf_0.127.0.bb | 14 - .../python/python3-zeroconf_0.131.0.bb | 14 + .../python3-gspread/python3-gspread_5.10.0.bb | 13 - .../python3-gspread/python3-gspread_5.12.3.bb | 12 + 231 files changed, 8792 insertions(+), 6421 deletions(-) delete mode 100644 meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.6.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.12.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.0.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.1.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.1.6.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.2.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.4.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.5.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.5.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.5.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.6.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.8.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.9.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.3.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.28.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.29.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner/0001-Update-Versioneer-to-0.22.patch create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.27.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.7.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.8.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_15.1.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_23.10.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.11.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.12.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.8.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.9.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.6.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.7.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_0.3.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_1.0.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.34.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-expandvars_0.12.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.0.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.1.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.5.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.6.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.2.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.3.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.5.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_3.1.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.1.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.2.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.12.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.13.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.14.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.15.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.108.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.111.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.23.4.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.25.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.61.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.62.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.60.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.56.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.60.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.19.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.12.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.13.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.46.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.47.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.3.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.19.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.7.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.9.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.11.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.22.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.0.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.1.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.41.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic/run-ptest delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.3.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.3.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.182.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.22.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.23.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_3.2.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_4.1.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.13.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.10.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.12.25.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-rlp/0001-setup-don-t-use-setuptools-markdown.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_3.0.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.39.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm-git-archive_1.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.23.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.24.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.3.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.4.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.3.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.13.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.14.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-setup-use-setuptools-instead-of-distutils.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-uinput_0.11.2.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.8.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_git.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.11.3.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.13.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.6.4.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.7.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.0.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.1.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.1.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.5.1.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.2.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.127.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.131.0.bb delete mode 100644 meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.10.0.bb create mode 100644 meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.12.3.bb (limited to 'meta-openembedded/meta-python/recipes-devtools') diff --git a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch deleted file mode 100644 index d1ac2c6b42..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp/0001-Fix-for-Python-3.10-compatibility.patch +++ /dev/null @@ -1,36 +0,0 @@ -From bfe579283e5fcab60172818bfe4e6e1d40c2bed0 Mon Sep 17 00:00:00 2001 -From: Kurt Kiefer -Date: Mon, 18 Oct 2021 11:21:14 -0700 -Subject: [PATCH] Fix for Python 3.10 compatibility - -The collections.abc module replaces collections for Python 3.10 - -Signed-off-by: Kurt Kiefer ---- -Upstream-Status: Pending - - pylib/gyp/common.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py -index b268d229..4f9cb0ec 100644 ---- a/pylib/gyp/common.py -+++ b/pylib/gyp/common.py -@@ -4,7 +4,7 @@ - - from __future__ import with_statement - --import collections -+import collections.abc - import errno - import filecmp - import os.path -@@ -494,7 +494,7 @@ def uniquer(seq, idfun=None): - - - # Based on http://code.activestate.com/recipes/576694/. --class OrderedSet(collections.MutableSet): -+class OrderedSet(collections.abc.MutableSet): - def __init__(self, iterable=None): - self.end = end = [] - end += [None, end, end] # sentinel node for doubly linked list diff --git a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb index 38906de759..0f94a4476d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb +++ b/meta-openembedded/meta-python/recipes-devtools/gyp/gyp_git.bb @@ -5,9 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ab828cb8ce4c62ee82945a11247b6bbd" SECTION = "devel" SRC_URI = "git://chromium.googlesource.com/external/gyp;protocol=https;branch=master \ - file://0001-Fix-for-Python-3.10-compatibility.patch \ " -SRCREV = "caa60026e223fc501e8b337fd5086ece4028b1c6" +SRCREV = "a03d7413becefc8d55c8aa3df58b55b9bd0e9052" S = "${WORKDIR}/git" PV = "0.1+git${SRCPV}" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc b/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc index e030ff4087..11d5e63018 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc +++ b/meta-openembedded/meta-python/recipes-devtools/python/python-django.inc @@ -28,7 +28,6 @@ RDEPENDS:${PN} += "\ ${PYTHON_PN}-threading \ ${PYTHON_PN}-unixadmin \ ${PYTHON_PN}-xml \ - ${PYTHON_PN}-distutils \ " CVE_PRODUCT = "django" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.6.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.6.2.bb deleted file mode 100644 index b9256ca204..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.6.2.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Asynchronous library to control Philips Hue" -HOMEPAGE = "https://pypi.org/project/aiohue/" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dab31a1d28183826937f4b152143a33f" - -SRC_URI[sha256sum] = "069af6bb0a7d34d566538af57cc10fb691ee04f844204e4f67d95a57f0b91a46" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-aiohttp \ - ${PYTHON_PN}-asyncio-throttle \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-awesomeversion \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.0.bb new file mode 100644 index 0000000000..84aace451d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-aiohue_4.7.0.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Asynchronous library to control Philips Hue" +HOMEPAGE = "https://pypi.org/project/aiohue/" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dab31a1d28183826937f4b152143a33f" + +SRC_URI[sha256sum] = "3ca727b463e55bbe7c69b67f5503ffcd7d213c9644c4e458e3556ee6ea33855b" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-aiohttp \ + ${PYTHON_PN}-asyncio-throttle \ + ${PYTHON_PN}-profile \ + ${PYTHON_PN}-awesomeversion \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.12.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.12.1.bb deleted file mode 100644 index 107546dbfe..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.12.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "A database migration tool for SQLAlchemy" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e3023b042cb6002cb398344b51c67093" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "bca5877e9678b454706347bc10b97cb7d67f300320fa5c3a94423e8266e2823f" - -PYPI_PACKAGE = "alembic" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-dateutil \ - ${PYTHON_PN}-editor \ - ${PYTHON_PN}-mako \ - ${PYTHON_PN}-sqlalchemy \ - ${PYTHON_PN}-misc \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb new file mode 100644 index 0000000000..2a9ac2c5d2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-alembic_1.13.1.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "A database migration tool for SQLAlchemy" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3023b042cb6002cb398344b51c67093" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "4932c8558bf68f2ee92b9bbcb8218671c627064d5b08939437af6d77dc05e595" + +PYPI_PACKAGE = "alembic" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-dateutil \ + ${PYTHON_PN}-editor \ + ${PYTHON_PN}-mako \ + ${PYTHON_PN}-sqlalchemy \ + ${PYTHON_PN}-misc \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb new file mode 100644 index 0000000000..79cbb66bc0 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-annotated-types_0.6.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Reusable constraint types to use with typing.Annotated" +DESCRIPTION = "" +HOMEPAGE = "" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c6afb13fdc220497ee5cded1e717ed67" + +SRC_URI[sha256sum] = "563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d" + +S = "${WORKDIR}/annotated_types-${PV}" +PYPI_PACKAGE = "annotated_types" + +inherit pypi python_hatchling + +RDEPENDS:${PN} = "python3-typing-extensions" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.8.0.bb deleted file mode 100644 index 8dcd7b0d5d..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.8.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRPTION = "ansi2html - Convert text with ANSI color codes to HTML or to LaTeX" -HOMEPAGE = "https://github.com/ralphbean/ansi2html" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3000208d539ec061b899bce1d9ce9404" -LICENSE = "GPL-3.0-only" - -PYPI_PACKAGE = "ansi2html" - -SRC_URI[sha256sum] = "38b82a298482a1fa2613f0f9c9beb3db72a8f832eeac58eb2e47bf32cd37f6d5" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - ${PYTHON_PN}-setuptools-scm-native \ - ${PYTHON_PN}-setuptools-scm-git-archive-native \ -" - -RDEPENDS:${PN} = " \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-compression \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb new file mode 100644 index 0000000000..e419fdcf18 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ansi2html_1.9.1.bb @@ -0,0 +1,19 @@ +DESCRPTION = "ansi2html - Convert text with ANSI color codes to HTML or to LaTeX" +HOMEPAGE = "https://github.com/ralphbean/ansi2html" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3000208d539ec061b899bce1d9ce9404" +LICENSE = "GPL-3.0-only" + +PYPI_PACKAGE = "ansi2html" + +SRC_URI[sha256sum] = "5c6837a13ecc1903aab7a545353312049dfedfe5105362ad3a8d9d207871ec71" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + ${PYTHON_PN}-setuptools-scm-native \ +" + +RDEPENDS:${PN} = " \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-compression \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.0.2.bb deleted file mode 100644 index 88afdda717..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.0.2.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects." -HOMEPAGE = "https://github.com/apiflask/apiflask" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5f89d1b0dec37448d4f4163dc3c40e64" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "APIFlask" - -SRC_URI[sha256sum] = "c1ab81640a1ab252888e2cc7ae556272a169b449c582abae309a8fe295f9337d" - -RDEPENDS:${PN} += "\ - python3-flask \ - python3-flask-marshmallow \ - python3-webargs \ - python3-flask-httpauth \ - python3-apispec \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.1.0.bb new file mode 100644 index 0000000000..5bffa22918 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-apiflask_2.1.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects." +HOMEPAGE = "https://github.com/apiflask/apiflask" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5f89d1b0dec37448d4f4163dc3c40e64" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "APIFlask" + +SRC_URI[sha256sum] = "e7616d902d446eb9e1c67d1d8a34691b437f9da4fe7a3b4d49c91ba88c85ee2a" + +RDEPENDS:${PN} += "\ + python3-flask \ + python3-flask-marshmallow \ + python3-webargs \ + python3-flask-httpauth \ + python3-apispec \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.0.bb deleted file mode 100644 index fcdcd7a809..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)." -HOMEPAGE = "https://github.com/marshmallow-code/apispec" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=824d596e050c0d5e3361efb438425945" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "6cb08d92ce73ff0b3bf46cb2ea5c00d57289b0f279fb0256a3df468182ba5344" - -RDEPENDS:${PN} += "python3-packaging" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.1.bb new file mode 100644 index 0000000000..6b9f704a68 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-apispec_6.3.1.bb @@ -0,0 +1,10 @@ +SUMMARY = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)." +HOMEPAGE = "https://github.com/marshmallow-code/apispec" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=824d596e050c0d5e3361efb438425945" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "b38e4479916d43f2b1e88ce15fc2fae93adf2e8d55cb59ec74ac66a827941483" + +RDEPENDS:${PN} += "python3-packaging" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.1.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.1.6.bb deleted file mode 100644 index 28dd9f90c5..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.1.6.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Argcomplete provides easy, extensible command line tab completion of arguments for your Python script." -HOMEPAGE = "https://github.com/kislyuk/argcomplete" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=2ee41112a44fe7014dce33e26468ba93" - -SRC_URI[sha256sum] = "3b1f07d133332547a53c79437527c00be48cca3807b1d4ca5cab1b26313386a6" - -PYPI_PACKAGE = "argcomplete" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-io \ -" - -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.2.1.bb new file mode 100644 index 0000000000..e6b9af084c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-argcomplete_3.2.1.bb @@ -0,0 +1,18 @@ +SUMMARY = "Argcomplete provides easy, extensible command line tab completion of arguments for your Python script." +HOMEPAGE = "https://github.com/kislyuk/argcomplete" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI[sha256sum] = "437f67fb9b058da5a090df505ef9be0297c4883993f3f56cb186ff087778cfb4" + +PYPI_PACKAGE = "argcomplete" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-io \ +" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.4.bb deleted file mode 100644 index 82cfa3b8ef..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.4.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "An unobtrusive argparse wrapper with natural syntax" -DESCRIPTION = "Building a command-line interface? Found yourself uttering \ -'argh!' while struggling with the API of argparse? Don't like the complexity \ -but need the power? \ -\ -Everything should be made as simple as possible, but no simpler. \ -\ -—Albert Einstein (probably) \ -\ -Argh is a smart wrapper for argparse. Argparse is a very powerful \ -tool; Argh just makes it easy to use." - -LICENSE = "LGPL-3.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \ - file://README.rst;beginline=261;endline=275;md5=39ec83a704aed9f33618c5d04e478a08 \ - " - -SRC_URI[sha256sum] = "9fca8e69c4dad4f8d2a7bdfbdd80b0754462b53510a03e1b5cf2b43a87e6e960" - -inherit pypi python_flit_core - -RDEPENDS:${PN} += " \ - python3-argcomplete \ - python3-logging \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.5.bb new file mode 100644 index 0000000000..78e6149649 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-argh_0.30.5.bb @@ -0,0 +1,27 @@ +SUMMARY = "An unobtrusive argparse wrapper with natural syntax" +DESCRIPTION = "Building a command-line interface? Found yourself uttering \ +'argh!' while struggling with the API of argparse? Don't like the complexity \ +but need the power? \ +\ +Everything should be made as simple as possible, but no simpler. \ +\ +—Albert Einstein (probably) \ +\ +Argh is a smart wrapper for argparse. Argparse is a very powerful \ +tool; Argh just makes it easy to use." + +LICENSE = "LGPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=3000208d539ec061b899bce1d9ce9404 \ + file://README.rst;beginline=261;endline=275;md5=39ec83a704aed9f33618c5d04e478a08 \ + " + +SRC_URI[sha256sum] = "b37dfd617a09d19a4a7bcaed0e060b288bc7ac8dfdc0facf886a49a25ff33728" + +inherit pypi python_flit_core + +RDEPENDS:${PN} += " \ + python3-argcomplete \ + python3-logging \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.1.bb deleted file mode 100644 index db3ef43920..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.1.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "An abstract syntax tree for Python with inference support." -HOMEPAGE = "https://pypi.python.org/pypi/astroid" -SECTION = "devel/python" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1" - -SRC_URI[sha256sum] = "86b0bb7d7da0be1a7c4aedb7974e391b32d4ed89e33de6ed6902b4b15c97577e" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "\ - ${PYTHON_PN}-pytest-runner-native \ - ${PYTHON_PN}-wheel-native \ -" - -PACKAGES =+ "${PN}-tests" - -FILES:${PN}-tests += " \ - ${PYTHON_SITEPACKAGES_DIR}/astroid/test* \ - ${PYTHON_SITEPACKAGES_DIR}/astroid/__pycache__/test* \ -" - -RDEPENDS:${PN}:class-target += "\ - ${PYTHON_PN}-distutils \ - ${PYTHON_PN}-lazy-object-proxy \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-wrapt \ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-typing-extensions \ -" - -RDEPENDS:${PN}-tests:class-target += "\ - ${PYTHON_PN}-unittest \ - ${PYTHON_PN}-xml \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.2.bb new file mode 100644 index 0000000000..23501ce000 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-astroid_3.0.2.bb @@ -0,0 +1,37 @@ +SUMMARY = "An abstract syntax tree for Python with inference support." +HOMEPAGE = "https://pypi.python.org/pypi/astroid" +SECTION = "devel/python" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a70cf540abf41acb644ac3b621b2fad1" + +SRC_URI[sha256sum] = "4a61cf0a59097c7bb52689b0fd63717cd2a8a14dc9f1eee97b82d814881c8c91" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "\ + ${PYTHON_PN}-pytest-runner-native \ + ${PYTHON_PN}-wheel-native \ +" + +PACKAGES =+ "${PN}-tests" + +FILES:${PN}-tests += " \ + ${PYTHON_SITEPACKAGES_DIR}/astroid/test* \ + ${PYTHON_SITEPACKAGES_DIR}/astroid/__pycache__/test* \ +" + +RDEPENDS:${PN}:class-target += "\ + ${PYTHON_PN}-lazy-object-proxy \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-wrapt \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-typing-extensions \ +" + +RDEPENDS:${PN}-tests:class-target += "\ + ${PYTHON_PN}-unittest \ + ${PYTHON_PN}-xml \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.2.bb deleted file mode 100644 index 08dc77bd17..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.2.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features" -HOMEPAGE = "https://gitlab.com/Taywee/asyncinotify" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec941a1cd6616454970d03cb9c9e8f8" - -SRC_URI[sha256sum] = "bcac19425b1b418bbbc4d31193ea3c39e24343cd7ddff2074ae7b599f1a04829" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-core \ - python3-ctypes \ - python3-io \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.5.bb new file mode 100644 index 0000000000..a7820c5ab2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-asyncinotify_4.0.5.bb @@ -0,0 +1,15 @@ +SUMMARY = "A simple optionally-async python inotify library, focused on simplicity of use and operation, and leveraging modern Python features" +HOMEPAGE = "https://gitlab.com/Taywee/asyncinotify" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f75d2927d3c1ed2414ef72048f5ad640" + +SRC_URI[sha256sum] = "95840eec6804797f9e8ee6d65a9d2a1159e77c5395a468dcfa4f44338ed1f8b6" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-core \ + python3-ctypes \ + python3-io \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.5.bb deleted file mode 100644 index ede7f92e8d..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.5.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Security oriented static analyser for python code." -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" - -SRC_URI[sha256sum] = "bdfc739baa03b880c2d15d0431b31c658ffc348e907fe197e54e0389dd59e11e" - -DEPENDS = "python3-pbr-native python3-git python3-pbr python3-pyyaml python3-six python3-stevedore" - -inherit setuptools3 pypi - -RDEPENDS:${PN} += "\ - python3-git \ - python3-modules \ - python3-pbr \ - python3-pyyaml \ - python3-rich \ - python3-six \ - python3-stevedore \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.6.bb new file mode 100644 index 0000000000..3cf927e103 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bandit_1.7.6.bb @@ -0,0 +1,19 @@ +SUMMARY = "Security oriented static analyser for python code." +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" + +SRC_URI[sha256sum] = "72ce7bc9741374d96fb2f1c9a8960829885f1243ffde743de70a19cee353e8f3" + +DEPENDS = "python3-pbr-native python3-git python3-pbr python3-pyyaml python3-six python3-stevedore" + +inherit setuptools3 pypi + +RDEPENDS:${PN} += "\ + python3-git \ + python3-modules \ + python3-pbr \ + python3-pyyaml \ + python3-rich \ + python3-six \ + python3-stevedore \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.8.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.8.3.bb deleted file mode 100644 index acacdab6de..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.8.3.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "efficient arrays of booleans -- C extension" -DESCRIPTION = "A high-level Python efficient arrays of booleans -- C extension" -HOMEPAGE = "https://github.com/ilanschnell/bitarray" -LICENSE = "PSF-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=2ad702cdcd49e8d2ac01d7e7d0810d2d" - -SRC_URI[sha256sum] = "e15587b2bdf18d32eb3ba25f5f5a51bedd0dc06b3112a4c53dab5e7753bc6588" - -inherit setuptools3 pypi - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.9.1.bb new file mode 100644 index 0000000000..0d7107a0f2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitarray_2.9.1.bb @@ -0,0 +1,11 @@ +SUMMARY = "efficient arrays of booleans -- C extension" +DESCRIPTION = "A high-level Python efficient arrays of booleans -- C extension" +HOMEPAGE = "https://github.com/ilanschnell/bitarray" +LICENSE = "PSF-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=2ad702cdcd49e8d2ac01d7e7d0810d2d" + +SRC_URI[sha256sum] = "912efbeed6d8b155c8e8c37464f79d75b1de58936c0f29ffb599ce95af5563f2" + +inherit setuptools3 pypi + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb deleted file mode 100644 index 8831d84cb1..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.3.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Simple construction, analysis and modification of binary data." -HOMEPAGE = "https://github.com/scott-griffiths/bitstring" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" - -SRC_URI[sha256sum] = "1b47c84644a961ba8503db2bba8a5965ab53e81474becdf0a18383b5b5f3f795" - -PYPI_PACKAGE = "bitstring" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-mmap \ - ${PYTHON_PN}-numbers \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb new file mode 100644 index 0000000000..6fc2cf4809 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-bitstring_4.1.4.bb @@ -0,0 +1,19 @@ +SUMMARY = "Simple construction, analysis and modification of binary data." +HOMEPAGE = "https://github.com/scott-griffiths/bitstring" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=661f450e2c0aef39b4b15597333444a7" + +SRC_URI[sha256sum] = "94f3f1c45383ebe8fd4a359424ffeb75c2f290760ae8fcac421b44f89ac85213" + +PYPI_PACKAGE = "bitstring" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-mmap \ + ${PYTHON_PN}-numbers \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.3.0.bb deleted file mode 100644 index 0b590d258b..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.3.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -DESCRIPTION = "CAN BUS tools in Python 3." -HOMEPAGE = "https://github.com/eerimoq/cantools" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" - -SRC_URI[sha256sum] = "2c3d081922591bc1611c9f1ff52d6c8af1d03314f8c724cc114d856cc555cc28" - -PYPI_PACKAGE = "cantools" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-can \ - ${PYTHON_PN}-bitstruct \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-textparser \ - ${PYTHON_PN}-typing-extensions \ - ${PYTHON_PN}-diskcache \ - ${PYTHON_PN}-asyncio \ -" - -CLEANBROKEN = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.1.bb new file mode 100644 index 0000000000..e26405dd7f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cantools_39.4.1.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "CAN BUS tools in Python 3." +HOMEPAGE = "https://github.com/eerimoq/cantools" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d9aa4ec07de78abae21c490c9ffe61bd" + +SRC_URI[sha256sum] = "98c4d007a6d9803c6433c743c0240e73de930530f8255e1e21d2e20e8991a30b" + +PYPI_PACKAGE = "cantools" + +inherit pypi python_poetry_core + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-can \ + ${PYTHON_PN}-bitstruct \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-textparser \ + ${PYTHON_PN}-typing-extensions \ + ${PYTHON_PN}-diskcache \ + ${PYTHON_PN}-asyncio \ +" + +CLEANBROKEN = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.28.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.28.0.bb deleted file mode 100644 index 468aa247e8..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.28.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "DataStax Python Driver for Apache Cassandra" -DESCRIPTION = "A modern, feature-rich and highly-tunable Python client \ -library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using \ -exclusively Cassandra's binary protocol and Cassandra Query Language v3." -HOMEPAGE = "https://github.com/datastax/python-driver" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" -SRCNAME = "cassandra-driver" - -SRC_URI[sha256sum] = "64ff130d19f994b80997c14343a8306be52a0e7ab92520a534eed944c88d70df" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-cython \ - ${PYTHON_PN}-geomet \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-six \ - libevent \ -" - -DEPENDS += "\ - ${PYTHON_PN}-cython \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.29.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.29.0.bb new file mode 100644 index 0000000000..8ec87fa26a --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cassandra-driver_3.29.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "DataStax Python Driver for Apache Cassandra" +DESCRIPTION = "A modern, feature-rich and highly-tunable Python client \ +library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using \ +exclusively Cassandra's binary protocol and Cassandra Query Language v3." +HOMEPAGE = "https://github.com/datastax/python-driver" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93" +SRCNAME = "cassandra-driver" + +SRC_URI[sha256sum] = "0a34f9534356e5fd33af8cdda109d5e945b6335cb50399b267c46368c4e93c98" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-cython \ + ${PYTHON_PN}-geomet \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-misc \ + ${PYTHON_PN}-multiprocessing \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-six \ + libevent \ +" + +DEPENDS += "\ + ${PYTHON_PN}-cython \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner/0001-Update-Versioneer-to-0.22.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner/0001-Update-Versioneer-to-0.22.patch new file mode 100644 index 0000000000..4edb5da9ef --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner/0001-Update-Versioneer-to-0.22.patch @@ -0,0 +1,2489 @@ +From 739f9da6bf0d2d9f0de624aee2ec71c65f62c275 Mon Sep 17 00:00:00 2001 +From: Hugo van Kemenade +Date: Tue, 10 May 2022 18:17:50 +0300 +Subject: [PATCH] Update Versioneer to 0.22 + +Upstream-Status: Backport [https://github.com/click-contrib/click-spinner/commit/5622ab0a0b4296dc8f10863f268ed98dccf4b642] + +Signed-off-by: Ny Antra Ranaivoarison +--- + click_spinner/__init__.py | 5 +- + click_spinner/_version.py | 665 +++++++++++++++++++++- + versioneer.py | 1128 ++++++++++++++++++++++++------------- + 3 files changed, 1400 insertions(+), 398 deletions(-) + +diff --git a/click_spinner/__init__.py b/click_spinner/__init__.py +index aeec089..8e9f4f9 100644 +--- a/click_spinner/__init__.py ++++ b/click_spinner/__init__.py +@@ -77,6 +77,5 @@ def spinner(beep=False, disable=False, force=False, stream=sys.stdout): + return Spinner(beep, disable, force, stream) + + +-from ._version import get_versions +-__version__ = get_versions()['version'] +-del get_versions ++from . import _version ++__version__ = _version.get_versions()['version'] +diff --git a/click_spinner/_version.py b/click_spinner/_version.py +index 5ae340e..d44565d 100644 +--- a/click_spinner/_version.py ++++ b/click_spinner/_version.py +@@ -1,21 +1,658 @@ + +-# This file was generated by 'versioneer.py' (0.16) from +-# revision-control system data, or from the parent directory name of an +-# unpacked source archive. Distribution tarballs contain a pre-generated copy +-# of this file. ++# This file helps to compute a version number in source trees obtained from ++# git-archive tarball (such as those provided by githubs download-from-tag ++# feature). Distribution tarballs (built by setup.py sdist) and build ++# directories (produced by setup.py build) will contain a much shorter file ++# that just contains the computed version number. + +-import json ++# This file is released into the public domain. Generated by ++# versioneer-0.22 (https://github.com/python-versioneer/python-versioneer) ++ ++"""Git implementation of _version.py.""" ++ ++import errno ++import os ++import re ++import subprocess + import sys ++from typing import Callable, Dict ++import functools ++ ++ ++def get_keywords(): ++ """Get the keywords needed to look up the version information.""" ++ # these strings will be replaced by git during git-archive. ++ # setup.py/versioneer.py will grep for the variable names, so they must ++ # each be defined on a line of their own. _version.py will just call ++ # get_keywords(). ++ git_refnames = "$Format:%d$" ++ git_full = "$Format:%H$" ++ git_date = "$Format:%ci$" ++ keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} ++ return keywords ++ ++ ++class VersioneerConfig: ++ """Container for Versioneer configuration parameters.""" ++ ++ ++def get_config(): ++ """Create, populate and return the VersioneerConfig() object.""" ++ # these strings are filled in when 'setup.py versioneer' creates ++ # _version.py ++ cfg = VersioneerConfig() ++ cfg.VCS = "git" ++ cfg.style = "pep440" ++ cfg.tag_prefix = "v" ++ cfg.parentdir_prefix = "click-spinner-" ++ cfg.versionfile_source = "click_spinner/_version.py" ++ cfg.verbose = False ++ return cfg ++ ++ ++class NotThisMethod(Exception): ++ """Exception raised if a method is not valid for the current scenario.""" ++ ++ ++LONG_VERSION_PY: Dict[str, str] = {} ++HANDLERS: Dict[str, Dict[str, Callable]] = {} ++ ++ ++def register_vcs_handler(vcs, method): # decorator ++ """Create decorator to mark a method as the handler of a VCS.""" ++ def decorate(f): ++ """Store f in HANDLERS[vcs][method].""" ++ if vcs not in HANDLERS: ++ HANDLERS[vcs] = {} ++ HANDLERS[vcs][method] = f ++ return f ++ return decorate ++ ++ ++def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, ++ env=None): ++ """Call the given command(s).""" ++ assert isinstance(commands, list) ++ process = None ++ ++ popen_kwargs = {} ++ if sys.platform == "win32": ++ # This hides the console window if pythonw.exe is used ++ startupinfo = subprocess.STARTUPINFO() ++ startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW ++ popen_kwargs["startupinfo"] = startupinfo ++ ++ for command in commands: ++ try: ++ dispcmd = str([command] + args) ++ # remember shell=False, so use git.cmd on windows, not just git ++ process = subprocess.Popen([command] + args, cwd=cwd, env=env, ++ stdout=subprocess.PIPE, ++ stderr=(subprocess.PIPE if hide_stderr ++ else None), **popen_kwargs) ++ break ++ except OSError: ++ e = sys.exc_info()[1] ++ if e.errno == errno.ENOENT: ++ continue ++ if verbose: ++ print("unable to run %s" % dispcmd) ++ print(e) ++ return None, None ++ else: ++ if verbose: ++ print("unable to find command, tried %s" % (commands,)) ++ return None, None ++ stdout = process.communicate()[0].strip().decode() ++ if process.returncode != 0: ++ if verbose: ++ print("unable to run %s (error)" % dispcmd) ++ print("stdout was %s" % stdout) ++ return None, process.returncode ++ return stdout, process.returncode ++ ++ ++def versions_from_parentdir(parentdir_prefix, root, verbose): ++ """Try to determine the version from the parent directory name. ++ ++ Source tarballs conventionally unpack into a directory that includes both ++ the project name and a version string. We will also support searching up ++ two directory levels for an appropriately named parent directory ++ """ ++ rootdirs = [] ++ ++ for _ in range(3): ++ dirname = os.path.basename(root) ++ if dirname.startswith(parentdir_prefix): ++ return {"version": dirname[len(parentdir_prefix):], ++ "full-revisionid": None, ++ "dirty": False, "error": None, "date": None} ++ rootdirs.append(root) ++ root = os.path.dirname(root) # up a level ++ ++ if verbose: ++ print("Tried directories %s but none started with prefix %s" % ++ (str(rootdirs), parentdir_prefix)) ++ raise NotThisMethod("rootdir doesn't start with parentdir_prefix") ++ ++ ++@register_vcs_handler("git", "get_keywords") ++def git_get_keywords(versionfile_abs): ++ """Extract version information from the given file.""" ++ # the code embedded in _version.py can just fetch the value of these ++ # keywords. When used from setup.py, we don't want to import _version.py, ++ # so we do it with a regexp instead. This function is not used from ++ # _version.py. ++ keywords = {} ++ try: ++ with open(versionfile_abs, "r") as fobj: ++ for line in fobj: ++ if line.strip().startswith("git_refnames ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["refnames"] = mo.group(1) ++ if line.strip().startswith("git_full ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["full"] = mo.group(1) ++ if line.strip().startswith("git_date ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["date"] = mo.group(1) ++ except OSError: ++ pass ++ return keywords ++ ++ ++@register_vcs_handler("git", "keywords") ++def git_versions_from_keywords(keywords, tag_prefix, verbose): ++ """Get version information from git keywords.""" ++ if "refnames" not in keywords: ++ raise NotThisMethod("Short version file found") ++ date = keywords.get("date") ++ if date is not None: ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ ++ # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant ++ # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 ++ # -like" string, which we must then edit to make compliant), because ++ # it's been around since git-1.5.3, and it's too difficult to ++ # discover which version we're using, or to work around using an ++ # older one. ++ date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) ++ refnames = keywords["refnames"].strip() ++ if refnames.startswith("$Format"): ++ if verbose: ++ print("keywords are unexpanded, not using") ++ raise NotThisMethod("unexpanded keywords, not a git-archive tarball") ++ refs = {r.strip() for r in refnames.strip("()").split(",")} ++ # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of ++ # just "foo-1.0". If we see a "tag: " prefix, prefer those. ++ TAG = "tag: " ++ tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} ++ if not tags: ++ # Either we're using git < 1.8.3, or there really are no tags. We use ++ # a heuristic: assume all version tags have a digit. The old git %d ++ # expansion behaves like git log --decorate=short and strips out the ++ # refs/heads/ and refs/tags/ prefixes that would let us distinguish ++ # between branches and tags. By ignoring refnames without digits, we ++ # filter out many common branch names like "release" and ++ # "stabilization", as well as "HEAD" and "master". ++ tags = {r for r in refs if re.search(r'\d', r)} ++ if verbose: ++ print("discarding '%s', no digits" % ",".join(refs - tags)) ++ if verbose: ++ print("likely tags: %s" % ",".join(sorted(tags))) ++ for ref in sorted(tags): ++ # sorting will prefer e.g. "2.0" over "2.0rc1" ++ if ref.startswith(tag_prefix): ++ r = ref[len(tag_prefix):] ++ # Filter out refs that exactly match prefix or that don't start ++ # with a number once the prefix is stripped (mostly a concern ++ # when prefix is '') ++ if not re.match(r'\d', r): ++ continue ++ if verbose: ++ print("picking %s" % r) ++ return {"version": r, ++ "full-revisionid": keywords["full"].strip(), ++ "dirty": False, "error": None, ++ "date": date} ++ # no suitable tags, so version is "0+unknown", but full hex is still there ++ if verbose: ++ print("no suitable tags, using unknown + full revision id") ++ return {"version": "0+unknown", ++ "full-revisionid": keywords["full"].strip(), ++ "dirty": False, "error": "no suitable tags", "date": None} ++ ++ ++@register_vcs_handler("git", "pieces_from_vcs") ++def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): ++ """Get version from 'git describe' in the root of the source tree. ++ ++ This only gets called if the git-archive 'subst' keywords were *not* ++ expanded, and _version.py hasn't already been rewritten with a short ++ version string, meaning we're inside a checked out source tree. ++ """ ++ GITS = ["git"] ++ if sys.platform == "win32": ++ GITS = ["git.cmd", "git.exe"] ++ ++ # GIT_DIR can interfere with correct operation of Versioneer. ++ # It may be intended to be passed to the Versioneer-versioned project, ++ # but that should not change where we get our version from. ++ env = os.environ.copy() ++ env.pop("GIT_DIR", None) ++ runner = functools.partial(runner, env=env) ++ ++ _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, ++ hide_stderr=True) ++ if rc != 0: ++ if verbose: ++ print("Directory %s not under git control" % root) ++ raise NotThisMethod("'git rev-parse --git-dir' returned error") ++ ++ MATCH_ARGS = ["--match", "%s*" % tag_prefix] if tag_prefix else [] ++ ++ # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] ++ # if there isn't one, this yields HEX[-dirty] (no NUM) ++ describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", ++ "--always", "--long", *MATCH_ARGS], ++ cwd=root) ++ # --long was added in git-1.5.5 ++ if describe_out is None: ++ raise NotThisMethod("'git describe' failed") ++ describe_out = describe_out.strip() ++ full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) ++ if full_out is None: ++ raise NotThisMethod("'git rev-parse' failed") ++ full_out = full_out.strip() ++ ++ pieces = {} ++ pieces["long"] = full_out ++ pieces["short"] = full_out[:7] # maybe improved later ++ pieces["error"] = None ++ ++ branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], ++ cwd=root) ++ # --abbrev-ref was added in git-1.6.3 ++ if rc != 0 or branch_name is None: ++ raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") ++ branch_name = branch_name.strip() ++ ++ if branch_name == "HEAD": ++ # If we aren't exactly on a branch, pick a branch which represents ++ # the current commit. If all else fails, we are on a branchless ++ # commit. ++ branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) ++ # --contains was added in git-1.5.4 ++ if rc != 0 or branches is None: ++ raise NotThisMethod("'git branch --contains' returned error") ++ branches = branches.split("\n") ++ ++ # Remove the first line if we're running detached ++ if "(" in branches[0]: ++ branches.pop(0) ++ ++ # Strip off the leading "* " from the list of branches. ++ branches = [branch[2:] for branch in branches] ++ if "master" in branches: ++ branch_name = "master" ++ elif not branches: ++ branch_name = None ++ else: ++ # Pick the first branch that is returned. Good or bad. ++ branch_name = branches[0] ++ ++ pieces["branch"] = branch_name ++ ++ # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] ++ # TAG might have hyphens. ++ git_describe = describe_out ++ ++ # look for -dirty suffix ++ dirty = git_describe.endswith("-dirty") ++ pieces["dirty"] = dirty ++ if dirty: ++ git_describe = git_describe[:git_describe.rindex("-dirty")] ++ ++ # now we have TAG-NUM-gHEX or HEX ++ ++ if "-" in git_describe: ++ # TAG-NUM-gHEX ++ mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) ++ if not mo: ++ # unparsable. Maybe git-describe is misbehaving? ++ pieces["error"] = ("unable to parse git-describe output: '%s'" ++ % describe_out) ++ return pieces ++ ++ # tag ++ full_tag = mo.group(1) ++ if not full_tag.startswith(tag_prefix): ++ if verbose: ++ fmt = "tag '%s' doesn't start with prefix '%s'" ++ print(fmt % (full_tag, tag_prefix)) ++ pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" ++ % (full_tag, tag_prefix)) ++ return pieces ++ pieces["closest-tag"] = full_tag[len(tag_prefix):] ++ ++ # distance: number of commits since tag ++ pieces["distance"] = int(mo.group(2)) ++ ++ # commit: short hex revision ID ++ pieces["short"] = mo.group(3) ++ ++ else: ++ # HEX: no tags ++ pieces["closest-tag"] = None ++ count_out, rc = runner(GITS, ["rev-list", "HEAD", "--count"], cwd=root) ++ pieces["distance"] = int(count_out) # total number of commits + +-version_json = ''' +-{ +- "dirty": false, +- "error": null, +- "full-revisionid": "7cadb31e3e257c64a47a67255547f0a746e1a465", +- "version": "0.1.10" +-} +-''' # END VERSION_JSON ++ # commit date: see ISO-8601 comment in git_versions_from_keywords() ++ date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) ++ ++ return pieces ++ ++ ++def plus_or_dot(pieces): ++ """Return a + if we don't already have one, else return a .""" ++ if "+" in pieces.get("closest-tag", ""): ++ return "." ++ return "+" ++ ++ ++def render_pep440(pieces): ++ """Build up version string, with post-release "local version identifier". ++ ++ Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you ++ get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty ++ ++ Exceptions: ++ 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += plus_or_dot(pieces) ++ rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0+untagged.%d.g%s" % (pieces["distance"], ++ pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ ++def render_pep440_branch(pieces): ++ """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. Note that .dev0 sorts backwards ++ (a feature branch will appear "older" than the master branch). ++ ++ Exceptions: ++ 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0" ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+untagged.%d.g%s" % (pieces["distance"], ++ pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ ++def pep440_split_post(ver): ++ """Split pep440 version string at the post-release segment. ++ ++ Returns the release segments before the post-release and the ++ post-release version number (or -1 if no post-release segment is present). ++ """ ++ vc = str.split(ver, ".post") ++ return vc[0], int(vc[1] or 0) if len(vc) == 2 else None ++ ++ ++def render_pep440_pre(pieces): ++ """TAG[.postN.devDISTANCE] -- No -dirty. ++ ++ Exceptions: ++ 1: no tags. 0.post0.devDISTANCE ++ """ ++ if pieces["closest-tag"]: ++ if pieces["distance"]: ++ # update the post release segment ++ tag_version, post_version = pep440_split_post(pieces["closest-tag"]) ++ rendered = tag_version ++ if post_version is not None: ++ rendered += ".post%d.dev%d" % (post_version+1, pieces["distance"]) ++ else: ++ rendered += ".post0.dev%d" % (pieces["distance"]) ++ else: ++ # no commits, use the tag as the version ++ rendered = pieces["closest-tag"] ++ else: ++ # exception #1 ++ rendered = "0.post0.dev%d" % pieces["distance"] ++ return rendered ++ ++ ++def render_pep440_post(pieces): ++ """TAG[.postDISTANCE[.dev0]+gHEX] . ++ ++ The ".dev0" means dirty. Note that .dev0 sorts backwards ++ (a dirty tree will appear "older" than the corresponding clean one), ++ but you shouldn't be releasing software with -dirty anyways. ++ ++ Exceptions: ++ 1: no tags. 0.postDISTANCE[.dev0] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += ".post%d" % pieces["distance"] ++ if pieces["dirty"]: ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "g%s" % pieces["short"] ++ else: ++ # exception #1 ++ rendered = "0.post%d" % pieces["distance"] ++ if pieces["dirty"]: ++ rendered += ".dev0" ++ rendered += "+g%s" % pieces["short"] ++ return rendered ++ ++ ++def render_pep440_post_branch(pieces): ++ """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. ++ ++ Exceptions: ++ 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += ".post%d" % pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "g%s" % pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0.post%d" % pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+g%s" % pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ ++def render_pep440_old(pieces): ++ """TAG[.postDISTANCE[.dev0]] . ++ ++ The ".dev0" means dirty. ++ ++ Exceptions: ++ 1: no tags. 0.postDISTANCE[.dev0] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += ".post%d" % pieces["distance"] ++ if pieces["dirty"]: ++ rendered += ".dev0" ++ else: ++ # exception #1 ++ rendered = "0.post%d" % pieces["distance"] ++ if pieces["dirty"]: ++ rendered += ".dev0" ++ return rendered ++ ++ ++def render_git_describe(pieces): ++ """TAG[-DISTANCE-gHEX][-dirty]. ++ ++ Like 'git describe --tags --dirty --always'. ++ ++ Exceptions: ++ 1: no tags. HEX[-dirty] (note: no 'g' prefix) ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"]: ++ rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) ++ else: ++ # exception #1 ++ rendered = pieces["short"] ++ if pieces["dirty"]: ++ rendered += "-dirty" ++ return rendered ++ ++ ++def render_git_describe_long(pieces): ++ """TAG-DISTANCE-gHEX[-dirty]. ++ ++ Like 'git describe --tags --dirty --always -long'. ++ The distance/hash is unconditional. ++ ++ Exceptions: ++ 1: no tags. HEX[-dirty] (note: no 'g' prefix) ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) ++ else: ++ # exception #1 ++ rendered = pieces["short"] ++ if pieces["dirty"]: ++ rendered += "-dirty" ++ return rendered ++ ++ ++def render(pieces, style): ++ """Render the given version pieces into the requested style.""" ++ if pieces["error"]: ++ return {"version": "unknown", ++ "full-revisionid": pieces.get("long"), ++ "dirty": None, ++ "error": pieces["error"], ++ "date": None} ++ ++ if not style or style == "default": ++ style = "pep440" # the default ++ ++ if style == "pep440": ++ rendered = render_pep440(pieces) ++ elif style == "pep440-branch": ++ rendered = render_pep440_branch(pieces) ++ elif style == "pep440-pre": ++ rendered = render_pep440_pre(pieces) ++ elif style == "pep440-post": ++ rendered = render_pep440_post(pieces) ++ elif style == "pep440-post-branch": ++ rendered = render_pep440_post_branch(pieces) ++ elif style == "pep440-old": ++ rendered = render_pep440_old(pieces) ++ elif style == "git-describe": ++ rendered = render_git_describe(pieces) ++ elif style == "git-describe-long": ++ rendered = render_git_describe_long(pieces) ++ else: ++ raise ValueError("unknown style '%s'" % style) ++ ++ return {"version": rendered, "full-revisionid": pieces["long"], ++ "dirty": pieces["dirty"], "error": None, ++ "date": pieces.get("date")} + + + def get_versions(): +- return json.loads(version_json) ++ """Get version information or return default if unable to do so.""" ++ # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have ++ # __file__, we can work backwards from there to the root. Some ++ # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which ++ # case we can only use expanded keywords. ++ ++ cfg = get_config() ++ verbose = cfg.verbose ++ ++ try: ++ return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, ++ verbose) ++ except NotThisMethod: ++ pass ++ ++ try: ++ root = os.path.realpath(__file__) ++ # versionfile_source is the relative path from the top of the source ++ # tree (where the .git directory might live) to this file. Invert ++ # this to find the root from __file__. ++ for _ in cfg.versionfile_source.split('/'): ++ root = os.path.dirname(root) ++ except NameError: ++ return {"version": "0+unknown", "full-revisionid": None, ++ "dirty": None, ++ "error": "unable to find root of source tree", ++ "date": None} ++ ++ try: ++ pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) ++ return render(pieces, cfg.style) ++ except NotThisMethod: ++ pass ++ ++ try: ++ if cfg.parentdir_prefix: ++ return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) ++ except NotThisMethod: ++ pass ++ ++ return {"version": "0+unknown", "full-revisionid": None, ++ "dirty": None, ++ "error": "unable to compute version", "date": None} +diff --git a/versioneer.py b/versioneer.py +index 7ed2a21..a142bf5 100644 +--- a/versioneer.py ++++ b/versioneer.py +@@ -1,5 +1,5 @@ + +-# Version: 0.16 ++# Version: 0.22 + + """The Versioneer - like a rocketeer, but for versions. + +@@ -7,18 +7,14 @@ The Versioneer + ============== + + * like a rocketeer, but for versions! +-* https://github.com/warner/python-versioneer ++* https://github.com/python-versioneer/python-versioneer + * Brian Warner + * License: Public Domain +-* Compatible With: python2.6, 2.7, 3.3, 3.4, 3.5, and pypy +-* [![Latest Version] +-(https://pypip.in/version/versioneer/badge.svg?style=flat) +-](https://pypi.python.org/pypi/versioneer/) +-* [![Build Status] +-(https://travis-ci.org/warner/python-versioneer.png?branch=master) +-](https://travis-ci.org/warner/python-versioneer) +- +-This is a tool for managing a recorded version number in distutils-based ++* Compatible with: Python 3.6, 3.7, 3.8, 3.9, 3.10 and pypy3 ++* [![Latest Version][pypi-image]][pypi-url] ++* [![Build Status][travis-image]][travis-url] ++ ++This is a tool for managing a recorded version number in distutils/setuptools-based + python projects. The goal is to remove the tedious and error-prone "update + the embedded version string" step from your release process. Making a new + release should be as easy as recording a new tag in your version-control +@@ -27,9 +23,10 @@ system, and maybe making new tarballs. + + ## Quick Install + +-* `pip install versioneer` to somewhere to your $PATH +-* add a `[versioneer]` section to your setup.cfg (see below) ++* `pip install versioneer` to somewhere in your $PATH ++* add a `[versioneer]` section to your setup.cfg (see [Install](INSTALL.md)) + * run `versioneer install` in your source tree, commit the results ++* Verify version information with `python setup.py version` + + ## Version Identifiers + +@@ -61,7 +58,7 @@ version 1.3). Many VCS systems can report a description that captures this, + for example `git describe --tags --dirty --always` reports things like + "0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the + 0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has +-uncommitted changes. ++uncommitted changes). + + The version identifier is used for multiple purposes: + +@@ -88,127 +85,7 @@ the generated version data. + + ## Installation + +-First, decide on values for the following configuration variables: +- +-* `VCS`: the version control system you use. Currently accepts "git". +- +-* `style`: the style of version string to be produced. See "Styles" below for +- details. Defaults to "pep440", which looks like +- `TAG[+DISTANCE.gSHORTHASH[.dirty]]`. +- +-* `versionfile_source`: +- +- A project-relative pathname into which the generated version strings should +- be written. This is usually a `_version.py` next to your project's main +- `__init__.py` file, so it can be imported at runtime. If your project uses +- `src/myproject/__init__.py`, this should be `src/myproject/_version.py`. +- This file should be checked in to your VCS as usual: the copy created below +- by `setup.py setup_versioneer` will include code that parses expanded VCS +- keywords in generated tarballs. The 'build' and 'sdist' commands will +- replace it with a copy that has just the calculated version string. +- +- This must be set even if your project does not have any modules (and will +- therefore never import `_version.py`), since "setup.py sdist" -based trees +- still need somewhere to record the pre-calculated version strings. Anywhere +- in the source tree should do. If there is a `__init__.py` next to your +- `_version.py`, the `setup.py setup_versioneer` command (described below) +- will append some `__version__`-setting assignments, if they aren't already +- present. +- +-* `versionfile_build`: +- +- Like `versionfile_source`, but relative to the build directory instead of +- the source directory. These will differ when your setup.py uses +- 'package_dir='. If you have `package_dir={'myproject': 'src/myproject'}`, +- then you will probably have `versionfile_build='myproject/_version.py'` and +- `versionfile_source='src/myproject/_version.py'`. +- +- If this is set to None, then `setup.py build` will not attempt to rewrite +- any `_version.py` in the built tree. If your project does not have any +- libraries (e.g. if it only builds a script), then you should use +- `versionfile_build = None`. To actually use the computed version string, +- your `setup.py` will need to override `distutils.command.build_scripts` +- with a subclass that explicitly inserts a copy of +- `versioneer.get_version()` into your script file. See +- `test/demoapp-script-only/setup.py` for an example. +- +-* `tag_prefix`: +- +- a string, like 'PROJECTNAME-', which appears at the start of all VCS tags. +- If your tags look like 'myproject-1.2.0', then you should use +- tag_prefix='myproject-'. If you use unprefixed tags like '1.2.0', this +- should be an empty string, using either `tag_prefix=` or `tag_prefix=''`. +- +-* `parentdir_prefix`: +- +- a optional string, frequently the same as tag_prefix, which appears at the +- start of all unpacked tarball filenames. If your tarball unpacks into +- 'myproject-1.2.0', this should be 'myproject-'. To disable this feature, +- just omit the field from your `setup.cfg`. +- +-This tool provides one script, named `versioneer`. That script has one mode, +-"install", which writes a copy of `versioneer.py` into the current directory +-and runs `versioneer.py setup` to finish the installation. +- +-To versioneer-enable your project: +- +-* 1: Modify your `setup.cfg`, adding a section named `[versioneer]` and +- populating it with the configuration values you decided earlier (note that +- the option names are not case-sensitive): +- +- ```` +- [versioneer] +- VCS = git +- style = pep440 +- versionfile_source = src/myproject/_version.py +- versionfile_build = myproject/_version.py +- tag_prefix = +- parentdir_prefix = myproject- +- ```` +- +-* 2: Run `versioneer install`. This will do the following: +- +- * copy `versioneer.py` into the top of your source tree +- * create `_version.py` in the right place (`versionfile_source`) +- * modify your `__init__.py` (if one exists next to `_version.py`) to define +- `__version__` (by calling a function from `_version.py`) +- * modify your `MANIFEST.in` to include both `versioneer.py` and the +- generated `_version.py` in sdist tarballs +- +- `versioneer install` will complain about any problems it finds with your +- `setup.py` or `setup.cfg`. Run it multiple times until you have fixed all +- the problems. +- +-* 3: add a `import versioneer` to your setup.py, and add the following +- arguments to the setup() call: +- +- version=versioneer.get_version(), +- cmdclass=versioneer.get_cmdclass(), +- +-* 4: commit these changes to your VCS. To make sure you won't forget, +- `versioneer install` will mark everything it touched for addition using +- `git add`. Don't forget to add `setup.py` and `setup.cfg` too. +- +-## Post-Installation Usage +- +-Once established, all uses of your tree from a VCS checkout should get the +-current version string. All generated tarballs should include an embedded +-version string (so users who unpack them will not need a VCS tool installed). +- +-If you distribute your project through PyPI, then the release process should +-boil down to two steps: +- +-* 1: git tag 1.0 +-* 2: python setup.py register sdist upload +- +-If you distribute it through github (i.e. users use github to generate +-tarballs with `git archive`), the process is: +- +-* 1: git tag 1.0 +-* 2: git push; git push --tags +- +-Versioneer will report "0+untagged.NUMCOMMITS.gHASH" until your tree has at +-least one tag in its history. ++See [INSTALL.md](./INSTALL.md) for detailed installation instructions. + + ## Version-String Flavors + +@@ -229,6 +106,10 @@ information: + * `['full-revisionid']`: detailed revision identifier. For Git, this is the + full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". + ++* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the ++ commit date in ISO 8601 format. This will be None if the date is not ++ available. ++ + * `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that + this is only accurate if run in a VCS checkout, otherwise it is likely to + be False or None +@@ -267,8 +148,8 @@ that this commit is two revisions ("+2") beyond the "0.11" tag. For released + software (exactly equal to a known tag), the identifier will only contain the + stripped tag, e.g. "0.11". + +-Other styles are available. See details.md in the Versioneer source tree for +-descriptions. ++Other styles are available. See [details.md](details.md) in the Versioneer ++source tree for descriptions. + + ## Debugging + +@@ -278,51 +159,83 @@ version`, which will run the version-lookup code in a verbose mode, and will + display the full contents of `get_versions()` (including the `error` string, + which may help identify what went wrong). + +-## Updating Versioneer ++## Known Limitations + +-To upgrade your project to a new release of Versioneer, do the following: ++Some situations are known to cause problems for Versioneer. This details the ++most significant ones. More can be found on Github ++[issues page](https://github.com/python-versioneer/python-versioneer/issues). + +-* install the new Versioneer (`pip install -U versioneer` or equivalent) +-* edit `setup.cfg`, if necessary, to include any new configuration settings +- indicated by the release notes +-* re-run `versioneer install` in your source tree, to replace +- `SRC/_version.py` +-* commit any changed files ++### Subprojects ++ ++Versioneer has limited support for source trees in which `setup.py` is not in ++the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are ++two common reasons why `setup.py` might not be in the root: ++ ++* Source trees which contain multiple subprojects, such as ++ [Buildbot](https://github.com/buildbot/buildbot), which contains both ++ "master" and "slave" subprojects, each with their own `setup.py`, ++ `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI ++ distributions (and upload multiple independently-installable tarballs). ++* Source trees whose main purpose is to contain a C library, but which also ++ provide bindings to Python (and perhaps other languages) in subdirectories. ++ ++Versioneer will look for `.git` in parent directories, and most operations ++should get the right version string. However `pip` and `setuptools` have bugs ++and implementation details which frequently cause `pip install .` from a ++subproject directory to fail to find a correct version string (so it usually ++defaults to `0+unknown`). + +-### Upgrading to 0.16 ++`pip install --editable .` should work correctly. `setup.py install` might ++work too. + +-Nothing special. ++Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in ++some later version. + +-### Upgrading to 0.15 ++[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking ++this issue. The discussion in ++[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the ++issue from the Versioneer side in more detail. ++[pip PR#3176](https://github.com/pypa/pip/pull/3176) and ++[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve ++pip to let Versioneer work correctly. + +-Starting with this version, Versioneer is configured with a `[versioneer]` +-section in your `setup.cfg` file. Earlier versions required the `setup.py` to +-set attributes on the `versioneer` module immediately after import. The new +-version will refuse to run (raising an exception during import) until you +-have provided the necessary `setup.cfg` section. ++Versioneer-0.16 and earlier only looked for a `.git` directory next to the ++`setup.cfg`, so subprojects were completely unsupported with those releases. + +-In addition, the Versioneer package provides an executable named +-`versioneer`, and the installation process is driven by running `versioneer +-install`. In 0.14 and earlier, the executable was named +-`versioneer-installer` and was run without an argument. ++### Editable installs with setuptools <= 18.5 + +-### Upgrading to 0.14 ++`setup.py develop` and `pip install --editable .` allow you to install a ++project into a virtualenv once, then continue editing the source code (and ++test) without re-installing after every change. + +-0.14 changes the format of the version string. 0.13 and earlier used +-hyphen-separated strings like "0.11-2-g1076c97-dirty". 0.14 and beyond use a +-plus-separated "local version" section strings, with dot-separated +-components, like "0.11+2.g1076c97". PEP440-strict tools did not like the old +-format, but should be ok with the new one. ++"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a ++convenient way to specify executable scripts that should be installed along ++with the python package. + +-### Upgrading from 0.11 to 0.12 ++These both work as expected when using modern setuptools. When using ++setuptools-18.5 or earlier, however, certain operations will cause ++`pkg_resources.DistributionNotFound` errors when running the entrypoint ++script, which must be resolved by re-installing the package. This happens ++when the install happens with one version, then the egg_info data is ++regenerated while a different version is checked out. Many setup.py commands ++cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into ++a different virtualenv), so this can be surprising. + +-Nothing special. ++[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes ++this one, but upgrading to a newer version of setuptools should probably ++resolve it. + +-### Upgrading from 0.10 to 0.11 + +-You must add a `versioneer.VCS = "git"` to your `setup.py` before re-running +-`setup.py setup_versioneer`. This will enable the use of additional +-version-control systems (SVN, etc) in the future. ++## Updating Versioneer ++ ++To upgrade your project to a new release of Versioneer, do the following: ++ ++* install the new Versioneer (`pip install -U versioneer` or equivalent) ++* edit `setup.cfg`, if necessary, to include any new configuration settings ++ indicated by the release notes. See [UPGRADING](./UPGRADING.md) for details. ++* re-run `versioneer install` in your source tree, to replace ++ `SRC/_version.py` ++* commit any changed files + + ## Future Directions + +@@ -337,6 +250,14 @@ installation by editing setup.py . Alternatively, it might go the other + direction and include code from all supported VCS systems, reducing the + number of intermediate scripts. + ++## Similar projects ++ ++* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time ++ dependency ++* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of ++ versioneer ++* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools ++ plugin + + ## License + +@@ -346,19 +267,28 @@ Specifically, both are released under the Creative Commons "Public Domain + Dedication" license (CC0-1.0), as described in + https://creativecommons.org/publicdomain/zero/1.0/ . + ++[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg ++[pypi-url]: https://pypi.python.org/pypi/versioneer/ ++[travis-image]: ++https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg ++[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer ++ + """ ++# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring ++# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements ++# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error ++# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with ++# pylint:disable=attribute-defined-outside-init,too-many-arguments + +-from __future__ import print_function +-try: +- import configparser +-except ImportError: +- import ConfigParser as configparser ++import configparser + import errno + import json + import os + import re + import subprocess + import sys ++from typing import Callable, Dict ++import functools + + + class VersioneerConfig: +@@ -393,10 +323,12 @@ def get_root(): + # module-import table will cache the first one. So we can't use + # os.path.dirname(__file__), as that will find whichever + # versioneer.py was first imported, even in later projects. +- me = os.path.realpath(os.path.abspath(__file__)) +- if os.path.splitext(me)[0] != os.path.splitext(versioneer_py)[0]: ++ my_path = os.path.realpath(os.path.abspath(__file__)) ++ me_dir = os.path.normcase(os.path.splitext(my_path)[0]) ++ vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) ++ if me_dir != vsr_dir: + print("Warning: build in %s is using versioneer.py from %s" +- % (os.path.dirname(me), versioneer_py)) ++ % (os.path.dirname(my_path), versioneer_py)) + except NameError: + pass + return root +@@ -404,85 +336,94 @@ def get_root(): + + def get_config_from_root(root): + """Read the project setup.cfg file to determine Versioneer config.""" +- # This might raise EnvironmentError (if setup.cfg is missing), or ++ # This might raise OSError (if setup.cfg is missing), or + # configparser.NoSectionError (if it lacks a [versioneer] section), or + # configparser.NoOptionError (if it lacks "VCS="). See the docstring at + # the top of versioneer.py for instructions on writing your setup.cfg . + setup_cfg = os.path.join(root, "setup.cfg") +- parser = configparser.SafeConfigParser() +- with open(setup_cfg, "r") as f: +- parser.readfp(f) ++ parser = configparser.ConfigParser() ++ with open(setup_cfg, "r") as cfg_file: ++ parser.read_file(cfg_file) + VCS = parser.get("versioneer", "VCS") # mandatory + +- def get(parser, name): +- if parser.has_option("versioneer", name): +- return parser.get("versioneer", name) +- return None ++ # Dict-like interface for non-mandatory entries ++ section = parser["versioneer"] ++ + cfg = VersioneerConfig() + cfg.VCS = VCS +- cfg.style = get(parser, "style") or "" +- cfg.versionfile_source = get(parser, "versionfile_source") +- cfg.versionfile_build = get(parser, "versionfile_build") +- cfg.tag_prefix = get(parser, "tag_prefix") ++ cfg.style = section.get("style", "") ++ cfg.versionfile_source = section.get("versionfile_source") ++ cfg.versionfile_build = section.get("versionfile_build") ++ cfg.tag_prefix = section.get("tag_prefix") + if cfg.tag_prefix in ("''", '""'): + cfg.tag_prefix = "" +- cfg.parentdir_prefix = get(parser, "parentdir_prefix") +- cfg.verbose = get(parser, "verbose") ++ cfg.parentdir_prefix = section.get("parentdir_prefix") ++ cfg.verbose = section.get("verbose") + return cfg + + + class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + ++ + # these dictionaries contain VCS-specific tools +-LONG_VERSION_PY = {} +-HANDLERS = {} ++LONG_VERSION_PY: Dict[str, str] = {} ++HANDLERS: Dict[str, Dict[str, Callable]] = {} + + + def register_vcs_handler(vcs, method): # decorator +- """Decorator to mark a method as the handler for a particular VCS.""" ++ """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f): + """Store f in HANDLERS[vcs][method].""" +- if vcs not in HANDLERS: +- HANDLERS[vcs] = {} +- HANDLERS[vcs][method] = f ++ HANDLERS.setdefault(vcs, {})[method] = f + return f + return decorate + + +-def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False): ++def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, ++ env=None): + """Call the given command(s).""" + assert isinstance(commands, list) +- p = None +- for c in commands: ++ process = None ++ ++ popen_kwargs = {} ++ if sys.platform == "win32": ++ # This hides the console window if pythonw.exe is used ++ startupinfo = subprocess.STARTUPINFO() ++ startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW ++ popen_kwargs["startupinfo"] = startupinfo ++ ++ for command in commands: + try: +- dispcmd = str([c] + args) ++ dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git +- p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE, +- stderr=(subprocess.PIPE if hide_stderr +- else None)) ++ process = subprocess.Popen([command] + args, cwd=cwd, env=env, ++ stdout=subprocess.PIPE, ++ stderr=(subprocess.PIPE if hide_stderr ++ else None), **popen_kwargs) + break +- except EnvironmentError: ++ except OSError: + e = sys.exc_info()[1] + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %s" % dispcmd) + print(e) +- return None ++ return None, None + else: + if verbose: + print("unable to find command, tried %s" % (commands,)) +- return None +- stdout = p.communicate()[0].strip() +- if sys.version_info[0] >= 3: +- stdout = stdout.decode() +- if p.returncode != 0: ++ return None, None ++ stdout = process.communicate()[0].strip().decode() ++ if process.returncode != 0: + if verbose: + print("unable to run %s (error)" % dispcmd) +- return None +- return stdout +-LONG_VERSION_PY['git'] = ''' ++ print("stdout was %s" % stdout) ++ return None, process.returncode ++ return stdout, process.returncode ++ ++ ++LONG_VERSION_PY['git'] = r''' + # This file helps to compute a version number in source trees obtained from + # git-archive tarball (such as those provided by githubs download-from-tag + # feature). Distribution tarballs (built by setup.py sdist) and build +@@ -490,7 +431,7 @@ LONG_VERSION_PY['git'] = ''' + # that just contains the computed version number. + + # This file is released into the public domain. Generated by +-# versioneer-0.16 (https://github.com/warner/python-versioneer) ++# versioneer-0.22 (https://github.com/python-versioneer/python-versioneer) + + """Git implementation of _version.py.""" + +@@ -499,6 +440,8 @@ import os + import re + import subprocess + import sys ++from typing import Callable, Dict ++import functools + + + def get_keywords(): +@@ -509,7 +452,8 @@ def get_keywords(): + # get_keywords(). + git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" + git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" +- keywords = {"refnames": git_refnames, "full": git_full} ++ git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" ++ keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} + return keywords + + +@@ -535,12 +479,12 @@ class NotThisMethod(Exception): + """Exception raised if a method is not valid for the current scenario.""" + + +-LONG_VERSION_PY = {} +-HANDLERS = {} ++LONG_VERSION_PY: Dict[str, str] = {} ++HANDLERS: Dict[str, Dict[str, Callable]] = {} + + + def register_vcs_handler(vcs, method): # decorator +- """Decorator to mark a method as the handler for a particular VCS.""" ++ """Create decorator to mark a method as the handler of a VCS.""" + def decorate(f): + """Store f in HANDLERS[vcs][method].""" + if vcs not in HANDLERS: +@@ -550,55 +494,71 @@ def register_vcs_handler(vcs, method): # decorator + return decorate + + +-def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False): ++def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, ++ env=None): + """Call the given command(s).""" + assert isinstance(commands, list) +- p = None +- for c in commands: ++ process = None ++ ++ popen_kwargs = {} ++ if sys.platform == "win32": ++ # This hides the console window if pythonw.exe is used ++ startupinfo = subprocess.STARTUPINFO() ++ startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW ++ popen_kwargs["startupinfo"] = startupinfo ++ ++ for command in commands: + try: +- dispcmd = str([c] + args) ++ dispcmd = str([command] + args) + # remember shell=False, so use git.cmd on windows, not just git +- p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE, +- stderr=(subprocess.PIPE if hide_stderr +- else None)) ++ process = subprocess.Popen([command] + args, cwd=cwd, env=env, ++ stdout=subprocess.PIPE, ++ stderr=(subprocess.PIPE if hide_stderr ++ else None), **popen_kwargs) + break +- except EnvironmentError: ++ except OSError: + e = sys.exc_info()[1] + if e.errno == errno.ENOENT: + continue + if verbose: + print("unable to run %%s" %% dispcmd) + print(e) +- return None ++ return None, None + else: + if verbose: + print("unable to find command, tried %%s" %% (commands,)) +- return None +- stdout = p.communicate()[0].strip() +- if sys.version_info[0] >= 3: +- stdout = stdout.decode() +- if p.returncode != 0: ++ return None, None ++ stdout = process.communicate()[0].strip().decode() ++ if process.returncode != 0: + if verbose: + print("unable to run %%s (error)" %% dispcmd) +- return None +- return stdout ++ print("stdout was %%s" %% stdout) ++ return None, process.returncode ++ return stdout, process.returncode + + + def versions_from_parentdir(parentdir_prefix, root, verbose): + """Try to determine the version from the parent directory name. + +- Source tarballs conventionally unpack into a directory that includes +- both the project name and a version string. ++ Source tarballs conventionally unpack into a directory that includes both ++ the project name and a version string. We will also support searching up ++ two directory levels for an appropriately named parent directory + """ +- dirname = os.path.basename(root) +- if not dirname.startswith(parentdir_prefix): +- if verbose: +- print("guessing rootdir is '%%s', but '%%s' doesn't start with " +- "prefix '%%s'" %% (root, dirname, parentdir_prefix)) +- raise NotThisMethod("rootdir doesn't start with parentdir_prefix") +- return {"version": dirname[len(parentdir_prefix):], +- "full-revisionid": None, +- "dirty": False, "error": None} ++ rootdirs = [] ++ ++ for _ in range(3): ++ dirname = os.path.basename(root) ++ if dirname.startswith(parentdir_prefix): ++ return {"version": dirname[len(parentdir_prefix):], ++ "full-revisionid": None, ++ "dirty": False, "error": None, "date": None} ++ rootdirs.append(root) ++ root = os.path.dirname(root) # up a level ++ ++ if verbose: ++ print("Tried directories %%s but none started with prefix %%s" %% ++ (str(rootdirs), parentdir_prefix)) ++ raise NotThisMethod("rootdir doesn't start with parentdir_prefix") + + + @register_vcs_handler("git", "get_keywords") +@@ -610,18 +570,21 @@ def git_get_keywords(versionfile_abs): + # _version.py. + keywords = {} + try: +- f = open(versionfile_abs, "r") +- for line in f.readlines(): +- if line.strip().startswith("git_refnames ="): +- mo = re.search(r'=\s*"(.*)"', line) +- if mo: +- keywords["refnames"] = mo.group(1) +- if line.strip().startswith("git_full ="): +- mo = re.search(r'=\s*"(.*)"', line) +- if mo: +- keywords["full"] = mo.group(1) +- f.close() +- except EnvironmentError: ++ with open(versionfile_abs, "r") as fobj: ++ for line in fobj: ++ if line.strip().startswith("git_refnames ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["refnames"] = mo.group(1) ++ if line.strip().startswith("git_full ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["full"] = mo.group(1) ++ if line.strip().startswith("git_date ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["date"] = mo.group(1) ++ except OSError: + pass + return keywords + +@@ -629,18 +592,31 @@ def git_get_keywords(versionfile_abs): + @register_vcs_handler("git", "keywords") + def git_versions_from_keywords(keywords, tag_prefix, verbose): + """Get version information from git keywords.""" +- if not keywords: +- raise NotThisMethod("no keywords at all, weird") ++ if "refnames" not in keywords: ++ raise NotThisMethod("Short version file found") ++ date = keywords.get("date") ++ if date is not None: ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ ++ # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant ++ # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 ++ # -like" string, which we must then edit to make compliant), because ++ # it's been around since git-1.5.3, and it's too difficult to ++ # discover which version we're using, or to work around using an ++ # older one. ++ date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") +- refs = set([r.strip() for r in refnames.strip("()").split(",")]) ++ refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " +- tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)]) ++ tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %%d +@@ -649,56 +625,72 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". +- tags = set([r for r in refs if re.search(r'\d', r)]) ++ tags = {r for r in refs if re.search(r'\d', r)} + if verbose: +- print("discarding '%%s', no digits" %% ",".join(refs-tags)) ++ print("discarding '%%s', no digits" %% ",".join(refs - tags)) + if verbose: + print("likely tags: %%s" %% ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] ++ # Filter out refs that exactly match prefix or that don't start ++ # with a number once the prefix is stripped (mostly a concern ++ # when prefix is '') ++ if not re.match(r'\d', r): ++ continue + if verbose: + print("picking %%s" %% r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), +- "dirty": False, "error": None +- } ++ "dirty": False, "error": None, ++ "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), +- "dirty": False, "error": "no suitable tags"} ++ "dirty": False, "error": "no suitable tags", "date": None} + + + @register_vcs_handler("git", "pieces_from_vcs") +-def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): ++def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ +- if not os.path.exists(os.path.join(root, ".git")): +- if verbose: +- print("no .git in %%s" %% root) +- raise NotThisMethod("no .git directory") +- + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] ++ ++ # GIT_DIR can interfere with correct operation of Versioneer. ++ # It may be intended to be passed to the Versioneer-versioned project, ++ # but that should not change where we get our version from. ++ env = os.environ.copy() ++ env.pop("GIT_DIR", None) ++ runner = functools.partial(runner, env=env) ++ ++ _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, ++ hide_stderr=True) ++ if rc != 0: ++ if verbose: ++ print("Directory %%s not under git control" %% root) ++ raise NotThisMethod("'git rev-parse --git-dir' returned error") ++ ++ MATCH_ARGS = ["--match", "%%s*" %% tag_prefix] if tag_prefix else [] ++ + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) +- describe_out = run_command(GITS, ["describe", "--tags", "--dirty", +- "--always", "--long", +- "--match", "%%s*" %% tag_prefix], +- cwd=root) ++ describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", ++ "--always", "--long", *MATCH_ARGS], ++ cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() +- full_out = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) ++ full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() +@@ -708,6 +700,39 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + ++ branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], ++ cwd=root) ++ # --abbrev-ref was added in git-1.6.3 ++ if rc != 0 or branch_name is None: ++ raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") ++ branch_name = branch_name.strip() ++ ++ if branch_name == "HEAD": ++ # If we aren't exactly on a branch, pick a branch which represents ++ # the current commit. If all else fails, we are on a branchless ++ # commit. ++ branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) ++ # --contains was added in git-1.5.4 ++ if rc != 0 or branches is None: ++ raise NotThisMethod("'git branch --contains' returned error") ++ branches = branches.split("\n") ++ ++ # Remove the first line if we're running detached ++ if "(" in branches[0]: ++ branches.pop(0) ++ ++ # Strip off the leading "* " from the list of branches. ++ branches = [branch[2:] for branch in branches] ++ if "master" in branches: ++ branch_name = "master" ++ elif not branches: ++ branch_name = None ++ else: ++ # Pick the first branch that is returned. Good or bad. ++ branch_name = branches[0] ++ ++ pieces["branch"] = branch_name ++ + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out +@@ -724,7 +749,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: +- # unparseable. Maybe git-describe is misbehaving? ++ # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%%s'" + %% describe_out) + return pieces +@@ -749,10 +774,16 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + else: + # HEX: no tags + pieces["closest-tag"] = None +- count_out = run_command(GITS, ["rev-list", "HEAD", "--count"], +- cwd=root) ++ count_out, rc = runner(GITS, ["rev-list", "HEAD", "--count"], cwd=root) + pieces["distance"] = int(count_out) # total number of commits + ++ # commit date: see ISO-8601 comment in git_versions_from_keywords() ++ date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) ++ + return pieces + + +@@ -788,19 +819,67 @@ def render_pep440(pieces): + return rendered + + +-def render_pep440_pre(pieces): +- """TAG[.post.devDISTANCE] -- No -dirty. ++def render_pep440_branch(pieces): ++ """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. Note that .dev0 sorts backwards ++ (a feature branch will appear "older" than the master branch). + + Exceptions: +- 1: no tags. 0.post.devDISTANCE ++ 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0" ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], ++ pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ ++def pep440_split_post(ver): ++ """Split pep440 version string at the post-release segment. ++ ++ Returns the release segments before the post-release and the ++ post-release version number (or -1 if no post-release segment is present). ++ """ ++ vc = str.split(ver, ".post") ++ return vc[0], int(vc[1] or 0) if len(vc) == 2 else None ++ ++ ++def render_pep440_pre(pieces): ++ """TAG[.postN.devDISTANCE] -- No -dirty. ++ ++ Exceptions: ++ 1: no tags. 0.post0.devDISTANCE ++ """ ++ if pieces["closest-tag"]: + if pieces["distance"]: +- rendered += ".post.dev%%d" %% pieces["distance"] ++ # update the post release segment ++ tag_version, post_version = pep440_split_post(pieces["closest-tag"]) ++ rendered = tag_version ++ if post_version is not None: ++ rendered += ".post%%d.dev%%d" %% (post_version+1, pieces["distance"]) ++ else: ++ rendered += ".post0.dev%%d" %% (pieces["distance"]) ++ else: ++ # no commits, use the tag as the version ++ rendered = pieces["closest-tag"] + else: + # exception #1 +- rendered = "0.post.dev%%d" %% pieces["distance"] ++ rendered = "0.post0.dev%%d" %% pieces["distance"] + return rendered + + +@@ -831,12 +910,41 @@ def render_pep440_post(pieces): + return rendered + + ++def render_pep440_post_branch(pieces): ++ """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. ++ ++ Exceptions: ++ 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += ".post%%d" %% pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "g%%s" %% pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0.post%%d" %% pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+g%%s" %% pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ + def render_pep440_old(pieces): + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + +- Eexceptions: ++ Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: +@@ -899,17 +1007,22 @@ def render(pieces, style): + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, +- "error": pieces["error"]} ++ "error": pieces["error"], ++ "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) ++ elif style == "pep440-branch": ++ rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) ++ elif style == "pep440-post-branch": ++ rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": +@@ -920,7 +1033,8 @@ def render(pieces, style): + raise ValueError("unknown style '%%s'" %% style) + + return {"version": rendered, "full-revisionid": pieces["long"], +- "dirty": pieces["dirty"], "error": None} ++ "dirty": pieces["dirty"], "error": None, ++ "date": pieces.get("date")} + + + def get_versions(): +@@ -944,12 +1058,13 @@ def get_versions(): + # versionfile_source is the relative path from the top of the source + # tree (where the .git directory might live) to this file. Invert + # this to find the root from __file__. +- for i in cfg.versionfile_source.split('/'): ++ for _ in cfg.versionfile_source.split('/'): + root = os.path.dirname(root) + except NameError: + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, +- "error": "unable to find root of source tree"} ++ "error": "unable to find root of source tree", ++ "date": None} + + try: + pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) +@@ -965,7 +1080,7 @@ def get_versions(): + + return {"version": "0+unknown", "full-revisionid": None, + "dirty": None, +- "error": "unable to compute version"} ++ "error": "unable to compute version", "date": None} + ''' + + +@@ -978,18 +1093,21 @@ def git_get_keywords(versionfile_abs): + # _version.py. + keywords = {} + try: +- f = open(versionfile_abs, "r") +- for line in f.readlines(): +- if line.strip().startswith("git_refnames ="): +- mo = re.search(r'=\s*"(.*)"', line) +- if mo: +- keywords["refnames"] = mo.group(1) +- if line.strip().startswith("git_full ="): +- mo = re.search(r'=\s*"(.*)"', line) +- if mo: +- keywords["full"] = mo.group(1) +- f.close() +- except EnvironmentError: ++ with open(versionfile_abs, "r") as fobj: ++ for line in fobj: ++ if line.strip().startswith("git_refnames ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["refnames"] = mo.group(1) ++ if line.strip().startswith("git_full ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["full"] = mo.group(1) ++ if line.strip().startswith("git_date ="): ++ mo = re.search(r'=\s*"(.*)"', line) ++ if mo: ++ keywords["date"] = mo.group(1) ++ except OSError: + pass + return keywords + +@@ -997,18 +1115,31 @@ def git_get_keywords(versionfile_abs): + @register_vcs_handler("git", "keywords") + def git_versions_from_keywords(keywords, tag_prefix, verbose): + """Get version information from git keywords.""" +- if not keywords: +- raise NotThisMethod("no keywords at all, weird") ++ if "refnames" not in keywords: ++ raise NotThisMethod("Short version file found") ++ date = keywords.get("date") ++ if date is not None: ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ ++ # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant ++ # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 ++ # -like" string, which we must then edit to make compliant), because ++ # it's been around since git-1.5.3, and it's too difficult to ++ # discover which version we're using, or to work around using an ++ # older one. ++ date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) + refnames = keywords["refnames"].strip() + if refnames.startswith("$Format"): + if verbose: + print("keywords are unexpanded, not using") + raise NotThisMethod("unexpanded keywords, not a git-archive tarball") +- refs = set([r.strip() for r in refnames.strip("()").split(",")]) ++ refs = {r.strip() for r in refnames.strip("()").split(",")} + # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of + # just "foo-1.0". If we see a "tag: " prefix, prefer those. + TAG = "tag: " +- tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)]) ++ tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} + if not tags: + # Either we're using git < 1.8.3, or there really are no tags. We use + # a heuristic: assume all version tags have a digit. The old git %d +@@ -1017,56 +1148,72 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose): + # between branches and tags. By ignoring refnames without digits, we + # filter out many common branch names like "release" and + # "stabilization", as well as "HEAD" and "master". +- tags = set([r for r in refs if re.search(r'\d', r)]) ++ tags = {r for r in refs if re.search(r'\d', r)} + if verbose: +- print("discarding '%s', no digits" % ",".join(refs-tags)) ++ print("discarding '%s', no digits" % ",".join(refs - tags)) + if verbose: + print("likely tags: %s" % ",".join(sorted(tags))) + for ref in sorted(tags): + # sorting will prefer e.g. "2.0" over "2.0rc1" + if ref.startswith(tag_prefix): + r = ref[len(tag_prefix):] ++ # Filter out refs that exactly match prefix or that don't start ++ # with a number once the prefix is stripped (mostly a concern ++ # when prefix is '') ++ if not re.match(r'\d', r): ++ continue + if verbose: + print("picking %s" % r) + return {"version": r, + "full-revisionid": keywords["full"].strip(), +- "dirty": False, "error": None +- } ++ "dirty": False, "error": None, ++ "date": date} + # no suitable tags, so version is "0+unknown", but full hex is still there + if verbose: + print("no suitable tags, using unknown + full revision id") + return {"version": "0+unknown", + "full-revisionid": keywords["full"].strip(), +- "dirty": False, "error": "no suitable tags"} ++ "dirty": False, "error": "no suitable tags", "date": None} + + + @register_vcs_handler("git", "pieces_from_vcs") +-def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): ++def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command): + """Get version from 'git describe' in the root of the source tree. + + This only gets called if the git-archive 'subst' keywords were *not* + expanded, and _version.py hasn't already been rewritten with a short + version string, meaning we're inside a checked out source tree. + """ +- if not os.path.exists(os.path.join(root, ".git")): +- if verbose: +- print("no .git in %s" % root) +- raise NotThisMethod("no .git directory") +- + GITS = ["git"] + if sys.platform == "win32": + GITS = ["git.cmd", "git.exe"] ++ ++ # GIT_DIR can interfere with correct operation of Versioneer. ++ # It may be intended to be passed to the Versioneer-versioned project, ++ # but that should not change where we get our version from. ++ env = os.environ.copy() ++ env.pop("GIT_DIR", None) ++ runner = functools.partial(runner, env=env) ++ ++ _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, ++ hide_stderr=True) ++ if rc != 0: ++ if verbose: ++ print("Directory %s not under git control" % root) ++ raise NotThisMethod("'git rev-parse --git-dir' returned error") ++ ++ MATCH_ARGS = ["--match", "%s*" % tag_prefix] if tag_prefix else [] ++ + # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] + # if there isn't one, this yields HEX[-dirty] (no NUM) +- describe_out = run_command(GITS, ["describe", "--tags", "--dirty", +- "--always", "--long", +- "--match", "%s*" % tag_prefix], +- cwd=root) ++ describe_out, rc = runner(GITS, ["describe", "--tags", "--dirty", ++ "--always", "--long", *MATCH_ARGS], ++ cwd=root) + # --long was added in git-1.5.5 + if describe_out is None: + raise NotThisMethod("'git describe' failed") + describe_out = describe_out.strip() +- full_out = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) ++ full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) + if full_out is None: + raise NotThisMethod("'git rev-parse' failed") + full_out = full_out.strip() +@@ -1076,6 +1223,39 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + pieces["short"] = full_out[:7] # maybe improved later + pieces["error"] = None + ++ branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], ++ cwd=root) ++ # --abbrev-ref was added in git-1.6.3 ++ if rc != 0 or branch_name is None: ++ raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") ++ branch_name = branch_name.strip() ++ ++ if branch_name == "HEAD": ++ # If we aren't exactly on a branch, pick a branch which represents ++ # the current commit. If all else fails, we are on a branchless ++ # commit. ++ branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) ++ # --contains was added in git-1.5.4 ++ if rc != 0 or branches is None: ++ raise NotThisMethod("'git branch --contains' returned error") ++ branches = branches.split("\n") ++ ++ # Remove the first line if we're running detached ++ if "(" in branches[0]: ++ branches.pop(0) ++ ++ # Strip off the leading "* " from the list of branches. ++ branches = [branch[2:] for branch in branches] ++ if "master" in branches: ++ branch_name = "master" ++ elif not branches: ++ branch_name = None ++ else: ++ # Pick the first branch that is returned. Good or bad. ++ branch_name = branches[0] ++ ++ pieces["branch"] = branch_name ++ + # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] + # TAG might have hyphens. + git_describe = describe_out +@@ -1092,7 +1272,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + # TAG-NUM-gHEX + mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) + if not mo: +- # unparseable. Maybe git-describe is misbehaving? ++ # unparsable. Maybe git-describe is misbehaving? + pieces["error"] = ("unable to parse git-describe output: '%s'" + % describe_out) + return pieces +@@ -1117,10 +1297,16 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): + else: + # HEX: no tags + pieces["closest-tag"] = None +- count_out = run_command(GITS, ["rev-list", "HEAD", "--count"], +- cwd=root) ++ count_out, rc = runner(GITS, ["rev-list", "HEAD", "--count"], cwd=root) + pieces["distance"] = int(count_out) # total number of commits + ++ # commit date: see ISO-8601 comment in git_versions_from_keywords() ++ date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() ++ # Use only the last line. Previous lines may contain GPG signature ++ # information. ++ date = date.splitlines()[-1] ++ pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) ++ + return pieces + + +@@ -1128,7 +1314,7 @@ def do_vcs_install(manifest_in, versionfile_source, ipy): + """Git-specific installation logic for Versioneer. + + For Git, this means creating/changing .gitattributes to mark _version.py +- for export-time keyword substitution. ++ for export-subst keyword substitution. + """ + GITS = ["git"] + if sys.platform == "win32": +@@ -1137,27 +1323,26 @@ def do_vcs_install(manifest_in, versionfile_source, ipy): + if ipy: + files.append(ipy) + try: +- me = __file__ +- if me.endswith(".pyc") or me.endswith(".pyo"): +- me = os.path.splitext(me)[0] + ".py" +- versioneer_file = os.path.relpath(me) ++ my_path = __file__ ++ if my_path.endswith(".pyc") or my_path.endswith(".pyo"): ++ my_path = os.path.splitext(my_path)[0] + ".py" ++ versioneer_file = os.path.relpath(my_path) + except NameError: + versioneer_file = "versioneer.py" + files.append(versioneer_file) + present = False + try: +- f = open(".gitattributes", "r") +- for line in f.readlines(): +- if line.strip().startswith(versionfile_source): +- if "export-subst" in line.strip().split()[1:]: +- present = True +- f.close() +- except EnvironmentError: ++ with open(".gitattributes", "r") as fobj: ++ for line in fobj: ++ if line.strip().startswith(versionfile_source): ++ if "export-subst" in line.strip().split()[1:]: ++ present = True ++ break ++ except OSError: + pass + if not present: +- f = open(".gitattributes", "a+") +- f.write("%s export-subst\n" % versionfile_source) +- f.close() ++ with open(".gitattributes", "a+") as fobj: ++ fobj.write(f"{versionfile_source} export-subst\n") + files.append(".gitattributes") + run_command(GITS, ["add", "--"] + files) + +@@ -1165,27 +1350,34 @@ def do_vcs_install(manifest_in, versionfile_source, ipy): + def versions_from_parentdir(parentdir_prefix, root, verbose): + """Try to determine the version from the parent directory name. + +- Source tarballs conventionally unpack into a directory that includes +- both the project name and a version string. ++ Source tarballs conventionally unpack into a directory that includes both ++ the project name and a version string. We will also support searching up ++ two directory levels for an appropriately named parent directory + """ +- dirname = os.path.basename(root) +- if not dirname.startswith(parentdir_prefix): +- if verbose: +- print("guessing rootdir is '%s', but '%s' doesn't start with " +- "prefix '%s'" % (root, dirname, parentdir_prefix)) +- raise NotThisMethod("rootdir doesn't start with parentdir_prefix") +- return {"version": dirname[len(parentdir_prefix):], +- "full-revisionid": None, +- "dirty": False, "error": None} ++ rootdirs = [] ++ ++ for _ in range(3): ++ dirname = os.path.basename(root) ++ if dirname.startswith(parentdir_prefix): ++ return {"version": dirname[len(parentdir_prefix):], ++ "full-revisionid": None, ++ "dirty": False, "error": None, "date": None} ++ rootdirs.append(root) ++ root = os.path.dirname(root) # up a level ++ ++ if verbose: ++ print("Tried directories %s but none started with prefix %s" % ++ (str(rootdirs), parentdir_prefix)) ++ raise NotThisMethod("rootdir doesn't start with parentdir_prefix") ++ + + SHORT_VERSION_PY = """ +-# This file was generated by 'versioneer.py' (0.16) from ++# This file was generated by 'versioneer.py' (0.22) from + # revision-control system data, or from the parent directory name of an + # unpacked source archive. Distribution tarballs contain a pre-generated copy + # of this file. + + import json +-import sys + + version_json = ''' + %s +@@ -1202,10 +1394,13 @@ def versions_from_file(filename): + try: + with open(filename) as f: + contents = f.read() +- except EnvironmentError: ++ except OSError: + raise NotThisMethod("unable to read _version.py") + mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", + contents, re.M | re.S) ++ if not mo: ++ mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", ++ contents, re.M | re.S) + if not mo: + raise NotThisMethod("no version_json in _version.py") + return json.loads(mo.group(1)) +@@ -1254,19 +1449,67 @@ def render_pep440(pieces): + return rendered + + +-def render_pep440_pre(pieces): +- """TAG[.post.devDISTANCE] -- No -dirty. ++def render_pep440_branch(pieces): ++ """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. Note that .dev0 sorts backwards ++ (a feature branch will appear "older" than the master branch). + + Exceptions: +- 1: no tags. 0.post.devDISTANCE ++ 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] + """ + if pieces["closest-tag"]: + rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0" ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+untagged.%d.g%s" % (pieces["distance"], ++ pieces["short"]) ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ ++def pep440_split_post(ver): ++ """Split pep440 version string at the post-release segment. ++ ++ Returns the release segments before the post-release and the ++ post-release version number (or -1 if no post-release segment is present). ++ """ ++ vc = str.split(ver, ".post") ++ return vc[0], int(vc[1] or 0) if len(vc) == 2 else None ++ ++ ++def render_pep440_pre(pieces): ++ """TAG[.postN.devDISTANCE] -- No -dirty. ++ ++ Exceptions: ++ 1: no tags. 0.post0.devDISTANCE ++ """ ++ if pieces["closest-tag"]: + if pieces["distance"]: +- rendered += ".post.dev%d" % pieces["distance"] ++ # update the post release segment ++ tag_version, post_version = pep440_split_post(pieces["closest-tag"]) ++ rendered = tag_version ++ if post_version is not None: ++ rendered += ".post%d.dev%d" % (post_version+1, pieces["distance"]) ++ else: ++ rendered += ".post0.dev%d" % (pieces["distance"]) ++ else: ++ # no commits, use the tag as the version ++ rendered = pieces["closest-tag"] + else: + # exception #1 +- rendered = "0.post.dev%d" % pieces["distance"] ++ rendered = "0.post0.dev%d" % pieces["distance"] + return rendered + + +@@ -1297,12 +1540,41 @@ def render_pep440_post(pieces): + return rendered + + ++def render_pep440_post_branch(pieces): ++ """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . ++ ++ The ".dev0" means not master branch. ++ ++ Exceptions: ++ 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] ++ """ ++ if pieces["closest-tag"]: ++ rendered = pieces["closest-tag"] ++ if pieces["distance"] or pieces["dirty"]: ++ rendered += ".post%d" % pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += plus_or_dot(pieces) ++ rendered += "g%s" % pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ else: ++ # exception #1 ++ rendered = "0.post%d" % pieces["distance"] ++ if pieces["branch"] != "master": ++ rendered += ".dev0" ++ rendered += "+g%s" % pieces["short"] ++ if pieces["dirty"]: ++ rendered += ".dirty" ++ return rendered ++ ++ + def render_pep440_old(pieces): + """TAG[.postDISTANCE[.dev0]] . + + The ".dev0" means dirty. + +- Eexceptions: ++ Exceptions: + 1: no tags. 0.postDISTANCE[.dev0] + """ + if pieces["closest-tag"]: +@@ -1365,17 +1637,22 @@ def render(pieces, style): + return {"version": "unknown", + "full-revisionid": pieces.get("long"), + "dirty": None, +- "error": pieces["error"]} ++ "error": pieces["error"], ++ "date": None} + + if not style or style == "default": + style = "pep440" # the default + + if style == "pep440": + rendered = render_pep440(pieces) ++ elif style == "pep440-branch": ++ rendered = render_pep440_branch(pieces) + elif style == "pep440-pre": + rendered = render_pep440_pre(pieces) + elif style == "pep440-post": + rendered = render_pep440_post(pieces) ++ elif style == "pep440-post-branch": ++ rendered = render_pep440_post_branch(pieces) + elif style == "pep440-old": + rendered = render_pep440_old(pieces) + elif style == "git-describe": +@@ -1386,7 +1663,8 @@ def render(pieces, style): + raise ValueError("unknown style '%s'" % style) + + return {"version": rendered, "full-revisionid": pieces["long"], +- "dirty": pieces["dirty"], "error": None} ++ "dirty": pieces["dirty"], "error": None, ++ "date": pieces.get("date")} + + + class VersioneerBadRootError(Exception): +@@ -1465,7 +1743,8 @@ def get_versions(verbose=False): + print("unable to compute version") + + return {"version": "0+unknown", "full-revisionid": None, +- "dirty": None, "error": "unable to compute version"} ++ "dirty": None, "error": "unable to compute version", ++ "date": None} + + + def get_version(): +@@ -1473,8 +1752,12 @@ def get_version(): + return get_versions()["version"] + + +-def get_cmdclass(): +- """Get the custom setuptools/distutils subclasses used by Versioneer.""" ++def get_cmdclass(cmdclass=None): ++ """Get the custom setuptools/distutils subclasses used by Versioneer. ++ ++ If the package uses a different cmdclass (e.g. one from numpy), it ++ should be provide as an argument. ++ """ + if "versioneer" in sys.modules: + del sys.modules["versioneer"] + # this fixes the "python setup.py develop" case (also 'install' and +@@ -1488,12 +1771,15 @@ def get_cmdclass(): + # parent is protected against the child's "import versioneer". By + # removing ourselves from sys.modules here, before the child build + # happens, we protect the child from the parent's versioneer too. +- # Also see https://github.com/warner/python-versioneer/issues/52 ++ # Also see https://github.com/python-versioneer/python-versioneer/issues/52 + +- cmds = {} ++ cmds = {} if cmdclass is None else cmdclass.copy() + + # we add "version" to both distutils and setuptools +- from distutils.core import Command ++ try: ++ from setuptools import Command ++ except ImportError: ++ from distutils.core import Command + + class cmd_version(Command): + description = "report generated version string" +@@ -1511,6 +1797,7 @@ def get_cmdclass(): + print("Version: %s" % vers["version"]) + print(" full-revisionid: %s" % vers.get("full-revisionid")) + print(" dirty: %s" % vers.get("dirty")) ++ print(" date: %s" % vers.get("date")) + if vers["error"]: + print(" error: %s" % vers["error"]) + cmds["version"] = cmd_version +@@ -1524,9 +1811,16 @@ def get_cmdclass(): + # setuptools/bdist_egg -> distutils/install_lib -> build_py + # setuptools/install -> bdist_egg ->.. + # setuptools/develop -> ? ++ # pip install: ++ # copies source tree to a tempdir before running egg_info/etc ++ # if .git isn't copied too, 'git describe' will fail ++ # then does setup.py bdist_wheel, or sometimes setup.py install ++ # setup.py egg_info -> ? + + # we override different "build_py" commands for both environments +- if "setuptools" in sys.modules: ++ if 'build_py' in cmds: ++ _build_py = cmds['build_py'] ++ elif "setuptools" in sys.modules: + from setuptools.command.build_py import build_py as _build_py + else: + from distutils.command.build_py import build_py as _build_py +@@ -1546,8 +1840,41 @@ def get_cmdclass(): + write_to_version_file(target_versionfile, versions) + cmds["build_py"] = cmd_build_py + ++ if 'build_ext' in cmds: ++ _build_ext = cmds['build_ext'] ++ elif "setuptools" in sys.modules: ++ from setuptools.command.build_ext import build_ext as _build_ext ++ else: ++ from distutils.command.build_ext import build_ext as _build_ext ++ ++ class cmd_build_ext(_build_ext): ++ def run(self): ++ root = get_root() ++ cfg = get_config_from_root(root) ++ versions = get_versions() ++ _build_ext.run(self) ++ if self.inplace: ++ # build_ext --inplace will only build extensions in ++ # build/lib<..> dir with no _version.py to write to. ++ # As in place builds will already have a _version.py ++ # in the module dir, we do not need to write one. ++ return ++ # now locate _version.py in the new build/ directory and replace ++ # it with an updated value ++ target_versionfile = os.path.join(self.build_lib, ++ cfg.versionfile_build) ++ print("UPDATING %s" % target_versionfile) ++ write_to_version_file(target_versionfile, versions) ++ cmds["build_ext"] = cmd_build_ext ++ + if "cx_Freeze" in sys.modules: # cx_freeze enabled? + from cx_Freeze.dist import build_exe as _build_exe ++ # nczeczulin reports that py2exe won't like the pep440-style string ++ # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. ++ # setup(console=[{ ++ # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION ++ # "product_version": versioneer.get_version(), ++ # ... + + class cmd_build_exe(_build_exe): + def run(self): +@@ -1572,8 +1899,35 @@ def get_cmdclass(): + cmds["build_exe"] = cmd_build_exe + del cmds["build_py"] + ++ if 'py2exe' in sys.modules: # py2exe enabled? ++ from py2exe.distutils_buildexe import py2exe as _py2exe ++ ++ class cmd_py2exe(_py2exe): ++ def run(self): ++ root = get_root() ++ cfg = get_config_from_root(root) ++ versions = get_versions() ++ target_versionfile = cfg.versionfile_source ++ print("UPDATING %s" % target_versionfile) ++ write_to_version_file(target_versionfile, versions) ++ ++ _py2exe.run(self) ++ os.unlink(target_versionfile) ++ with open(cfg.versionfile_source, "w") as f: ++ LONG = LONG_VERSION_PY[cfg.VCS] ++ f.write(LONG % ++ {"DOLLAR": "$", ++ "STYLE": cfg.style, ++ "TAG_PREFIX": cfg.tag_prefix, ++ "PARENTDIR_PREFIX": cfg.parentdir_prefix, ++ "VERSIONFILE_SOURCE": cfg.versionfile_source, ++ }) ++ cmds["py2exe"] = cmd_py2exe ++ + # we override different "sdist" commands for both environments +- if "setuptools" in sys.modules: ++ if 'sdist' in cmds: ++ _sdist = cmds['sdist'] ++ elif "setuptools" in sys.modules: + from setuptools.command.sdist import sdist as _sdist + else: + from distutils.command.sdist import sdist as _sdist +@@ -1640,21 +1994,26 @@ SAMPLE_CONFIG = """ + + """ + +-INIT_PY_SNIPPET = """ ++OLD_SNIPPET = """ + from ._version import get_versions + __version__ = get_versions()['version'] + del get_versions + """ + ++INIT_PY_SNIPPET = """ ++from . import {0} ++__version__ = {0}.get_versions()['version'] ++""" ++ + + def do_setup(): +- """Main VCS-independent setup function for installing Versioneer.""" ++ """Do main VCS-independent setup function for installing Versioneer.""" + root = get_root() + try: + cfg = get_config_from_root(root) +- except (EnvironmentError, configparser.NoSectionError, ++ except (OSError, configparser.NoSectionError, + configparser.NoOptionError) as e: +- if isinstance(e, (EnvironmentError, configparser.NoSectionError)): ++ if isinstance(e, (OSError, configparser.NoSectionError)): + print("Adding sample versioneer config to setup.cfg", + file=sys.stderr) + with open(os.path.join(root, "setup.cfg"), "a") as f: +@@ -1678,12 +2037,18 @@ def do_setup(): + try: + with open(ipy, "r") as f: + old = f.read() +- except EnvironmentError: ++ except OSError: + old = "" +- if INIT_PY_SNIPPET not in old: ++ module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] ++ snippet = INIT_PY_SNIPPET.format(module) ++ if OLD_SNIPPET in old: ++ print(" replacing boilerplate in %s" % ipy) ++ with open(ipy, "w") as f: ++ f.write(old.replace(OLD_SNIPPET, snippet)) ++ elif snippet not in old: + print(" appending to %s" % ipy) + with open(ipy, "a") as f: +- f.write(INIT_PY_SNIPPET) ++ f.write(snippet) + else: + print(" %s unmodified" % ipy) + else: +@@ -1702,7 +2067,7 @@ def do_setup(): + if line.startswith("include "): + for include in line.split()[1:]: + simple_includes.add(include) +- except EnvironmentError: ++ except OSError: + pass + # That doesn't cover everything MANIFEST.in can do + # (http://docs.python.org/2/distutils/sourcedist.html#commands), so +@@ -1723,7 +2088,7 @@ def do_setup(): + print(" versionfile_source already in MANIFEST.in") + + # Make VCS-specific changes. For git, this means creating/changing +- # .gitattributes to mark _version.py for export-time keyword ++ # .gitattributes to mark _version.py for export-subst keyword + # substitution. + do_vcs_install(manifest_in, cfg.versionfile_source, ipy) + return 0 +@@ -1765,6 +2130,7 @@ def scan_setup_py(): + errors += 1 + return errors + ++ + if __name__ == "__main__": + cmd = sys.argv[1] + if cmd == "setup": diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner_0.1.10.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner_0.1.10.bb index bd1136fd77..b3e1328c75 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner_0.1.10.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-click-spinner_0.1.10.bb @@ -3,6 +3,7 @@ HOMEPAGE = "https://github.com/click-contrib/click-spinner" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=8227180126797a0148f94f483f3e1489" +SRC_URI += "file://0001-Update-Versioneer-to-0.22.patch" SRC_URI[md5sum] = "ab68ed404401421819c81cc6c0677a87" SRC_URI[sha256sum] = "87eacf9d7298973a25d7615ef57d4782aebf913a532bba4b28a37e366e975daf" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb new file mode 100644 index 0000000000..25c379590f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cloudpickle_3.0.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Pickler class to extend the standard pickle.Pickler functionality" +DESCRIPTION = "cloudpickle makes it possible to serialize Python constructs \ +not supported by the default pickle module from the Python standard library.\ +\ +cloudpickle is especially useful for cluster computing where Python code is \ +shipped over the network to execute on remote hosts, possibly close to the \ +data." +HOMEPAGE = "https://github.com/cloudpipe/cloudpickle" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE.cloudpickle;md5=b4d59aa5e2cc777722aac17841237931" + +inherit pypi python_flit_core + +SRC_URI += "https://raw.githubusercontent.com/cloudpipe/cloudpickle/v${PV}/LICENSE;downloadfilename=LICENSE.cloudpickle;name=license" + +SRC_URI[sha256sum] = "996d9a482c6fb4f33c1a35335cf8afd065d2a56e973270364840712d9131a882" +SRC_URI[license.sha256sum] = "3029ea34173e9fdc233ad315dc6b100bd1ea71f529b1c1af97664a272fdc55f5" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.27.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.27.7.bb deleted file mode 100644 index b613fd3a19..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.27.7.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" -LICENSE = "BSD-3-Clause & Apache-2.0" -LIC_FILES_CHKSUM = " \ - file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ - file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ -" - -DEPENDS = "ninja-native cmake-native python3-scikit-build-native" - -PYPI_PACKAGE = "cmake" -PYPI_ARCHIVE_NAME_PREFIX = "pypi-" - -inherit pypi python_setuptools_build_meta -SRC_URI[sha256sum] = "9f4a7c7be2a25de5901f045618f41b833ea6c0f647115201d38e4fdf7e2815bc" - -SRC_URI += " \ - file://CMakeLists.txt \ - file://run-cmake-from-path.patch \ -" - -addtask do_patchbuild after do_patch before do_configure - -do_patchbuild () { - rm -f ${S}/CMakeLists.txt - cp ${WORKDIR}/CMakeLists.txt ${S}/ -} - -do_install:append () { - rm -rf ${D}${bindir} -} - -RDEPENDS:${PN} = " \ - cmake \ - python3-scikit-build \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.1.bb new file mode 100644 index 0000000000..a6a7b6c4fc --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cmake_3.28.1.bb @@ -0,0 +1,37 @@ +SUMMARY = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = " \ + file://LICENSE_BSD_3;md5=9134cb61aebbdd79dd826ccb9ae6afcd \ + file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5 \ +" + +DEPENDS = "ninja-native cmake-native python3-scikit-build-native" + +PYPI_PACKAGE = "cmake" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "0d4051d101d151d8387156c463aa45c8cd0e164f870e0ac0c8c91d3ff08528e1" + +SRC_URI += " \ + file://CMakeLists.txt \ + file://run-cmake-from-path.patch \ +" + +addtask do_patchbuild after do_patch before do_configure + +do_patchbuild () { + rm -f ${S}/CMakeLists.txt + cp ${WORKDIR}/CMakeLists.txt ${S}/ +} + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = " \ + cmake \ + python3-scikit-build \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.7.0.bb deleted file mode 100644 index 69f4be17c4..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.7.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -DESCRIPTION = "A colored formatter for the python logging module" -HOMEPAGE = "https://github.com/borntyping/python-colorlog" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5c3c6ebdec7792ae12df8d1c0a46b26a" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "colorlog" - -SRC_URI[sha256sum] = "bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5" - -RDEPENDS:${PN} += "python3-logging" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.8.0.bb new file mode 100644 index 0000000000..6aefef6d13 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-colorlog_6.8.0.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "A colored formatter for the python logging module" +HOMEPAGE = "https://github.com/borntyping/python-colorlog" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5c3c6ebdec7792ae12df8d1c0a46b26a" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "colorlog" + +SRC_URI[sha256sum] = "fbb6fdf9d5685f2517f388fb29bb27d54e8654dd31f58bc2a3b217e967a95ca6" + +RDEPENDS:${PN} += "python3-logging" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_15.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_15.1.0.bb deleted file mode 100644 index 7f9b0326fa..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_15.1.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "Symbolic constants in Python" -HOMEPAGE = "https://github.com/twisted/constantly" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e393e4ddd223e3a74982efa784f89fd7" - -SRC_URI[md5sum] = "f0762f083d83039758e53f8cf0086eef" -SRC_URI[sha256sum] = "586372eb92059873e29eba4f9dec8381541b4d3834660707faf8ba59146dfc35" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "${PYTHON_PN}-json" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_23.10.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_23.10.4.bb new file mode 100644 index 0000000000..cb6ca0a82d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-constantly_23.10.4.bb @@ -0,0 +1,12 @@ +DESCRIPTION = "Symbolic constants in Python" +HOMEPAGE = "https://github.com/twisted/constantly" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e393e4ddd223e3a74982efa784f89fd7" + +SRC_URI[sha256sum] = "aa92b70a33e2ac0bb33cd745eb61776594dc48764b06c35e0efd050b7f1c7cbd" + +inherit pypi python_poetry_core + +DEPENDS += "${PYTHON_PN}-versioneer-native" + +RDEPENDS:${PN} += "${PYTHON_PN}-json" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.2.bb deleted file mode 100644 index 12496b03d4..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.2.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Code coverage measurement for Python" -HOMEPAGE = "https://coverage.readthedocs.io" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" - -SRC_URI[sha256sum] = "be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-io \ - python3-json \ - python3-multiprocessing \ - python3-pprint \ - python3-shell \ - python3-sqlite3 \ - python3-tomllib \ - python3-xml \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.4.bb new file mode 100644 index 0000000000..42bc9fc8ed --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-coverage_7.3.4.bb @@ -0,0 +1,20 @@ +SUMMARY = "Code coverage measurement for Python" +HOMEPAGE = "https://coverage.readthedocs.io" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ee41112a44fe7014dce33e26468ba93" + +SRC_URI[sha256sum] = "020d56d2da5bc22a0e00a5b0d54597ee91ad72446fa4cf1b97c35022f6b6dbf0" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-io \ + python3-json \ + python3-multiprocessing \ + python3-pprint \ + python3-shell \ + python3-sqlite3 \ + python3-tomllib \ + python3-xml \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cppy_1.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cppy_1.2.1.bb index 270f74963d..7817401fa4 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cppy_1.2.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cppy_1.2.1.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0bfb3e39b13587f0028f17baf0e42371" SRC_URI[sha256sum] = "83b43bf17b1085ac15c5debdb42154f138b928234b21447358981f69d0d6fe1b" -RDEPENDS:${PN} += "python3-setuptools python3-distutils" +RDEPENDS:${PN} += "python3-setuptools" inherit pypi python_setuptools_build_meta diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.11.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.11.0.bb deleted file mode 100644 index 59492e8bfa..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.11.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "Composable style cycles" -HOMEPAGE = "http://github.com/matplotlib/cycler" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=7713fe42cd766b15c710e19392bfa811" - -SRC_URI[sha256sum] = "9c87405839a19696e837b3b818fed3f5f69f16f1eec1a1ad77e043dcea9c772f" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-core \ - python3-six \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.12.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.12.1.bb new file mode 100644 index 0000000000..574083b61f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-cycler_0.12.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "Composable style cycles" +HOMEPAGE = "http://github.com/matplotlib/cycler" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7713fe42cd766b15c710e19392bfa811" + +SRC_URI[sha256sum] = "88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += "\ + python3-core \ + python3-six \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb deleted file mode 100644 index b3cb377ec2..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.15.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A faster version of dbus-next originally from the great DBus next library." -HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" - -SRC_URI[sha256sum] = "c98c7dfc3c589d6a5ded3427addfef1f9199525422f976e10d70a5c10558f5bf" - -PYPI_PACKAGE = "dbus_fast" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-core (>=3.7) \ - python3-async-timeout \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.0.bb new file mode 100644 index 0000000000..5698ae99f4 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dbus-fast_2.21.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "A faster version of dbus-next originally from the great DBus next library." +HOMEPAGE = "https://github.com/bluetooth-devices/dbus-fast" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=729e372b5ea0168438e4fd4a00a04947" + +SRC_URI[sha256sum] = "f582f6f16791ced6067dab325fae444edf7ce0704315b90c2a473090636a6fe0" + +PYPI_PACKAGE = "dbus_fast" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-core (>=3.7) \ + python3-async-timeout \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb new file mode 100644 index 0000000000..ea9303b17e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dirty-equals_0.7.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "Doing dirty (but extremely useful) things with equals." +DESCRIPTION = "dirty-equals is a python library that (mis)uses the \ +__eq__ method to make python code (generally unit tests) more \ +declarative and therefore easier to read and write.\ +\ +dirty-equals can be used in whatever context you like, but it comes \ +into its own when writing unit tests for applications where you're \ +commonly checking the response to API calls and the contents of a database." +HOMEPAGE = "https://github.com/samuelcolvin/dirty-equals" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" + +SRC_URI[sha256sum] = "a580513f3285e93656a770a04e428f8bfc513848877bf278282dbfbb907fdbb4" + +S = "${WORKDIR}/dirty_equals-${PV}" + +inherit pypi python_hatchling + +PYPI_PACKAGE = "dirty_equals" + +RDEPENDS:${PN} += "python3-pytz" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.7.bb deleted file mode 100644 index 1d9d53e274..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.7.bb +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "A library which implements low-level functions that relate to packaging and distribution of Python software." -HOMEPAGE = "https://github.com/pypa/distlib" -LICENSE = "PSF-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f6a11430d5cd6e2cd3832ee94f22ddfc" - -SRC_URI[sha256sum] = "9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_setuptools_build_meta diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.8.bb new file mode 100644 index 0000000000..41a66479cc --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-distlib_0.3.8.bb @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "A library which implements low-level functions that relate to packaging and distribution of Python software." +HOMEPAGE = "https://github.com/pypa/distlib" +LICENSE = "PSF-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f6a11430d5cd6e2cd3832ee94f22ddfc" + +SRC_URI[sha256sum] = "1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_setuptools_build_meta diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.8.0.bb deleted file mode 100644 index f7616e4730..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.8.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Distro is an OS platform information API" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" - -PYPI_PACKAGE = "distro" - -SRC_URI[sha256sum] = "02e111d1dc6a50abb8eed6bf31c3e48ed8b0830d1ea2a1b78c61765c2513fdd8" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-shell \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.9.0.bb new file mode 100644 index 0000000000..a342432a6b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-distro_1.9.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "Distro is an OS platform information API" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" + +PYPI_PACKAGE = "distro" + +SRC_URI[sha256sum] = "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-shell \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.7.bb deleted file mode 100644 index 100db9bd71..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_4.2.7.bb +++ /dev/null @@ -1,9 +0,0 @@ -require python-django.inc -inherit setuptools3 - -SRC_URI[sha256sum] = "8e0f1c2c2786b5c0e39fe1afce24c926040fad47c8ea8ad30aaf1188df29fc41" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-sqlparse \ - ${PYTHON_PN}-asgiref \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.bb new file mode 100644 index 0000000000..bad4245233 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-django_5.0.bb @@ -0,0 +1,9 @@ +require python-django.inc +inherit setuptools3 + +SRC_URI[sha256sum] = "7d29e14dfbc19cb6a95a4bd669edbde11f5d4c6a71fdaa42c2d40b6846e807f7" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-sqlparse \ + ${PYTHON_PN}-asgiref \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch deleted file mode 100644 index 81211d4498..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate/fix-ptests.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fixes test failures on musl - -Fixes errors -ptestresult.python3-dominate.tests/test_dom_tag.py::test___get_thread_context - -Upstream-Status: Pending -Signed-off-by: Khem Raj - -diff --git a/tests/test_dom_tag.py b/tests/test_dom_tag.py -index 43ffecb..1126e54 100644 ---- a/tests/test_dom_tag.py -+++ b/tests/test_dom_tag.py -@@ -18,6 +18,7 @@ def test___get_thread_context(monkeypatch): - monkeypatch.setattr(sut, 'threading', threading) - - assert sut._get_thread_context() in [ -+ 1692341442, # Python >= 3.9, 32-bit - -6805948436281256182, # Python >= 3.9 - 3713141171098444831, # Python < 3.9 - ] diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb deleted file mode 100644 index 6b0489e4fd..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.8.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -SUMMARY = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API." -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b52f2d57d10c4f7ee67a7eb9615d5d24" - -SRC_URI[sha256sum] = "4c90c3befaf88e612b71f4b39af7bcbef8977acfa855cec957225a8fbf504007" - -inherit pypi setuptools3 ptest - -SRC_URI += " \ - file://run-ptest \ - file://fix-ptests.patch \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-threading \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.9.1.bb new file mode 100644 index 0000000000..3bd9d87547 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-dominate_2.9.1.bb @@ -0,0 +1,25 @@ +SUMMARY = "Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API." +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b52f2d57d10c4f7ee67a7eb9615d5d24" + +SRC_URI[sha256sum] = "558284687d9b8aae1904e3d6051ad132dd4a8c0cf551b37ea4e7e42a31d19dc4" + +inherit pypi ptest python_setuptools_build_meta + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-threading \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.0.bb deleted file mode 100644 index 1cc79f1a9b..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Engine.IO server" -HOMEPAGE = "https://github.com/miguelgrinberg/python-engineio/" -SECTION = "devel/python" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=42d0a9e728978f0eeb759c3be91536b8" - -inherit pypi python_setuptools_build_meta - -PYPI_PACKAGE = "python-engineio" - -RDEPENDS:${PN} += " \ - python3-netclient \ - python3-json \ - python3-logging \ - python3-compression \ - python3-asyncio \ -" - -SRC_URI[sha256sum] = "2a32585d8fecd0118264fe0c39788670456ca9aa466d7c026d995cfff68af164" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.1.bb new file mode 100644 index 0000000000..f88a3acf1e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-engineio_4.8.1.bb @@ -0,0 +1,20 @@ +SUMMARY = "Engine.IO server" +HOMEPAGE = "https://github.com/miguelgrinberg/python-engineio/" +SECTION = "devel/python" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=42d0a9e728978f0eeb759c3be91536b8" + +inherit pypi python_setuptools_build_meta + +PYPI_PACKAGE = "python-engineio" + +RDEPENDS:${PN} += " \ + python3-netclient \ + python3-json \ + python3-logging \ + python3-compression \ + python3-asyncio \ +" + +SRC_URI[sha256sum] = "fadc39c66348f96476d8dc2d7aaee7ea0a39d96e333217f5321300677b980121" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.6.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.6.1.bb deleted file mode 100644 index 55ab1a78da..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.6.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A library for handling the encrypted keyfiles used to store ethereum private keys." -HOMEPAGE = "https://github.com/ethereum/eth-keyfile" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2beaef1b1764f4d6b46084c885b4bcad" - -SRC_URI[sha256sum] = "471be6e5386fce7b22556b3d4bde5558dbce46d2674f00848027cb0a20abdc8c" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-eth-keys \ - python3-pycryptodome \ - python3-setuptools \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.7.0.bb new file mode 100644 index 0000000000..2afc288bce --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-keyfile_0.7.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "A library for handling the encrypted keyfiles used to store ethereum private keys." +HOMEPAGE = "https://github.com/ethereum/eth-keyfile" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6749008d847c14b9718949c2e24d5c0a" + +SRC_URI[sha256sum] = "6bdb8110c3a50439deb68a04c93c9d5ddd5402353bfae1bf4cfca1d6dff14fcf" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-eth-keys \ + python3-pycryptodome \ + python3-setuptools \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_0.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_0.3.0.bb deleted file mode 100644 index d19a657557..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_0.3.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "RLP definitions for common Ethereum objects in Python" -HOMEPAGE = "https://github.com/ethereum/eth-rlp" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=287820ad3553117aa2f92bf84c219324" - -SRC_URI[sha256sum] = "f3263b548df718855d9a8dbd754473f383c0efc82914b0b849572ce3e06e71a6" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = " \ - python3-eth-utils \ - python3-hexbytes \ - python3-rlp \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_1.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_1.0.0.bb new file mode 100644 index 0000000000..5cd0d0544e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-eth-rlp_1.0.0.bb @@ -0,0 +1,15 @@ +SUMMARY = "RLP definitions for common Ethereum objects in Python" +HOMEPAGE = "https://github.com/ethereum/eth-rlp" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d7bdfe69b1ffbde073ca6e96f5c53f7" + +SRC_URI[sha256sum] = "a988d713a36452e7c6da71186798343f687eaf3aeb7f99266750dd9e1f754c7b" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = " \ + python3-eth-utils \ + python3-hexbytes \ + python3-rlp \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb deleted file mode 100644 index c1256661b4..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.33.3.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Highly concurrent networking library" -HOMEPAGE = "http://pypi.python.org/pypi/eventlet" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" - -SRC_URI[sha256sum] = "722803e7eadff295347539da363d68ae155b8b26ae6a634474d0a920be73cfda" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-dnspython \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-distutils \ - ${PYTHON_PN}-greenlet \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.34.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.34.2.bb new file mode 100644 index 0000000000..86524da42b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-eventlet_0.34.2.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Highly concurrent networking library" +HOMEPAGE = "http://pypi.python.org/pypi/eventlet" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=56472ad6de4caf50e05332a34b66e778" + +SRC_URI[sha256sum] = "2115c7c6742e6893bf1347f82915572f8895c911cb5abaad4d3596a7daa847cc" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-dnspython \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-greenlet \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-expandvars_0.12.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-expandvars_0.12.0.bb new file mode 100644 index 0000000000..6183c310ed --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-expandvars_0.12.0.bb @@ -0,0 +1,10 @@ +SUMMARY = "Expand system variables Unix style" +HOMEPAGE = "https://github.com/sayanarijit/expandvars" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8b2e744064bd184728ac09dbfb52aaf4" + +SRC_URI[sha256sum] = "7d1adfa55728cf4b5d812ece3d087703faea953e0c0a1a78415de9df5024d844" + +inherit pypi python_hatchling python_setuptools_build_meta + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.0.1.bb deleted file mode 100644 index 7494c45f06..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.0.1.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Super-fast and clean conversions to numbers." -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=58db8ac9e152dd9b700f4d39ff40a31a" - -PYPI_PACKAGE = "fastnumbers" - -SRC_URI[sha256sum] = "9e4fd92cdf263a8e0865af19c40ae9df45a9bc0eb5e22fefea871140e7e0262f" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.1.0.bb new file mode 100644 index 0000000000..01aa8b3b44 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-fastnumbers_5.1.0.bb @@ -0,0 +1,10 @@ +SUMMARY = "Super-fast and clean conversions to numbers." +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d32431d1b650010945da4e078011c8fa" + +PYPI_PACKAGE = "fastnumbers" + +SRC_URI[sha256sum] = "e092d33f8b95c3171a2fb34e579efe0c54b0290dd7f96ffaa2762437601d90a7" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.5.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.5.3.bb deleted file mode 100644 index d5438f11a8..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.5.3.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "Extended JWT integration with Flask" -HOMEPAGE = "https://github.com/vimalloc/flask-jwt-extended" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9166295d7c482b9440bbb2b5c0fa43ac" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "Flask-JWT-Extended" - -SRC_URI[sha256sum] = "061ef3d25ed5743babe4964ab38f36d870e6d2fd8a126bab5d77ddef8a01932b" - -RDEPENDS:${PN} += "\ - python3-werkzeug \ - python3-flask \ - python3-pyjwt \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.6.0.bb new file mode 100644 index 0000000000..cc07c92f47 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-jwt-extended_4.6.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "Extended JWT integration with Flask" +HOMEPAGE = "https://github.com/vimalloc/flask-jwt-extended" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=9166295d7c482b9440bbb2b5c0fa43ac" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "Flask-JWT-Extended" + +SRC_URI[sha256sum] = "9215d05a9413d3855764bcd67035e75819d23af2fafb6b55197eb5a3313fdfb2" + +RDEPENDS:${PN} += "\ + python3-werkzeug \ + python3-flask \ + python3-pyjwt \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.2.0.bb deleted file mode 100644 index 573c2dbff3..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.2.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "Fully featured framework for fast, easy and documented API development with Flask" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c96dd911c6d9e32868b6bc667a38a3e2" - -SRC_URI[sha256sum] = "9a5338b108c57fbed1d24d5d53fe98442b2be7ffa2ff3291305af7a613ce6fc0" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-aniso8601 \ - python3-jsonschema \ - python3-pytz \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.3.0.bb new file mode 100644 index 0000000000..9c2a1e9a8b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-restx_1.3.0.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Fully featured framework for fast, easy and documented API development with Flask" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c96dd911c6d9e32868b6bc667a38a3e2" + +SRC_URI[sha256sum] = "4f3d3fa7b6191fcc715b18c201a12cd875176f92ba4acc61626ccfd571ee1728" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-aniso8601 \ + python3-jsonschema \ + python3-pytz \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.5.1.bb deleted file mode 100644 index 3aa6303da7..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_2.5.1.bb +++ /dev/null @@ -1,11 +0,0 @@ -DESCRIPTION = "Adds SQLAlchemy support to your Flask application." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" - -SRC_URI[sha256sum] = "2bda44b43e7cacb15d4e05ff3cc1f8bc97936cc464623424102bfc2c35e95912" - -PYPI_PACKAGE = "Flask-SQLAlchemy" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "${PYTHON_PN}-sqlalchemy ${PYTHON_PN}-flask" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_3.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_3.1.1.bb new file mode 100644 index 0000000000..56f63bf036 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-sqlalchemy_3.1.1.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Adds SQLAlchemy support to your Flask application." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" + +SRC_URI[sha256sum] = "e4b68bb881802dda1a7d878b2fc84c06d1ee57fb40b874d3dc97dabfa36b8312" + +PYPI_PACKAGE = "flask_sqlalchemy" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask-SQLAlchemy" +UPSTREAM_CHECK_REGEX = "/Flask-SQLAlchemy/(?P(\d+[\.\-_]*)+)" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} = "${PYTHON_PN}-sqlalchemy ${PYTHON_PN}-flask" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.1.1.bb deleted file mode 100644 index ec47fcac2c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.1.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Simple integration of Flask and WTForms." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=d98d089889e14b227732d45dac3aacc4" - -SRC_URI[sha256sum] = "41c4244e9ae626d63bed42ae4785b90667b885b1535d5a4095e1f63060d12aa9" - -PYPI_PACKAGE = "Flask-WTF" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-flask \ - ${PYTHON_PN}-itsdangerous \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-wtforms \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.2.1.bb new file mode 100644 index 0000000000..973bb570b8 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask-wtf_1.2.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Simple integration of Flask and WTForms." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=d98d089889e14b227732d45dac3aacc4" + +SRC_URI[sha256sum] = "8bb269eb9bb46b87e7c8233d7e7debdf1f8b74bf90cc1789988c29b37a97b695" + +PYPI_PACKAGE = "flask_wtf" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask-WTF" +UPSTREAM_CHECK_REGEX = "/Flask-WTF/(?P(\d+[\.\-_]*)+)" + +inherit pypi python_hatchling + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-flask \ + ${PYTHON_PN}-itsdangerous \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-wtforms \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.3.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.3.3.bb index c8c8d870ac..99a61f136d 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.3.3.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-flask_2.3.3.bb @@ -8,6 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" SRC_URI[sha256sum] = "09c347a92aa7ff4a8e7f3206795f30d826654baf38b873d0744cd571ca609efc" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/Flask" +UPSTREAM_CHECK_REGEX = "/Flask/(?P(\d+[\.\-_]*)+)" + inherit pypi python_setuptools_build_meta CLEANBROKEN = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.0.bb deleted file mode 100644 index 340b0e3845..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "A list-like structure which implements collections.abc.MutableSequence, and which can be made immutable." -HOMEPAGE = "https://github.com/aio-libs/frozenlist" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=cf056e8e7a0a5477451af18b7b5aa98c" - -SRC_URI[sha256sum] = "09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251" - -inherit pypi python_setuptools_build_meta - -BBCLASSEXTEND = "native nativesdk" - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.1.bb new file mode 100644 index 0000000000..1ce5c84527 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-frozenlist_1.4.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "A list-like structure which implements collections.abc.MutableSequence, and which can be made immutable." +HOMEPAGE = "https://github.com/aio-libs/frozenlist" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=cf056e8e7a0a5477451af18b7b5aa98c" + +SRC_URI[sha256sum] = "c037a86e8513059a2613aaba4d817bb90b9d9b6b69aace3ce9c877e8c8ed402b" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + ${PYTHON_PN}-expandvars-native \ + ${PYTHON_PN}-cython-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.12.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.12.bb deleted file mode 100644 index c06e94e7a3..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.12.bb +++ /dev/null @@ -1,19 +0,0 @@ -SUMMARY = "Client for MQTT protocol" -HOMEPAGE = "https://github.com/wialon/gmqtt" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=903f1792621a3b35ee546da75d139177" - -SRC_URI[sha256sum] = "7df03792343089ae62dc7cd6f8be356861c4fc68768cefa22f3d8de5e7e5be48" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - python3-asyncio \ - python3-core \ - python3-datetime \ - python3-json \ - python3-logging \ - python3-netclient \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.13.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.13.bb new file mode 100644 index 0000000000..101bfb9aa4 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-gmqtt_0.6.13.bb @@ -0,0 +1,19 @@ +SUMMARY = "Client for MQTT protocol" +HOMEPAGE = "https://github.com/wialon/gmqtt" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=903f1792621a3b35ee546da75d139177" + +SRC_URI[sha256sum] = "b4623d3e32ba266e96c04b0871bb057d05414371c1d279550648b390e6ba7577" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-asyncio \ + python3-core \ + python3-datetime \ + python3-json \ + python3-logging \ + python3-netclient \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.1.bb deleted file mode 100644 index 7510625dbd..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.1.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "A wrapper for the Gnu Privacy Guard (GPG or GnuPG)" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5dabe659eadd6d97325b1582e41cfc11" - -PYPI_PACKAGE = "python-gnupg" -SRC_URI[sha256sum] = "5674bad4e93876c0b0d3197e314d7f942d39018bf31e2b833f6788a6813c3fb8" - -inherit pypi python_setuptools_build_meta - -RDEPENDS:${PN} += " \ - gnupg-gpg \ - python3-logging \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.2.bb new file mode 100644 index 0000000000..b69e2c465e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-gnupg_0.5.2.bb @@ -0,0 +1,14 @@ +SUMMARY = "A wrapper for the Gnu Privacy Guard (GPG or GnuPG)" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5dabe659eadd6d97325b1582e41cfc11" + +PYPI_PACKAGE = "python-gnupg" +SRC_URI[sha256sum] = "01d8013931c9fa3f45824bbea7054c03d6e11f258a72e7e086e168dbcb91854c" + +inherit pypi python_setuptools_build_meta + +RDEPENDS:${PN} += " \ + gnupg-gpg \ + python3-logging \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.14.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.14.0.bb deleted file mode 100644 index b620e553ec..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.14.0.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Google API client core library" -HOMEPAGE = "https://github.com/googleapis/python-api-core" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "5368a4502b793d9bbf812a5912e13e4e69f9bd87f6efb508460c43f5bbd1ce41" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-asyncio \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-math \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-googleapis-common-protos \ - ${PYTHON_PN}-google-auth \ - ${PYTHON_PN}-grpcio \ - ${PYTHON_PN}-protobuf \ - ${PYTHON_PN}-pytz \ - ${PYTHON_PN}-requests \ - ${PYTHON_PN}-six \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.15.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.15.0.bb new file mode 100644 index 0000000000..7ce2ad7add --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-core_2.15.0.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Google API client core library" +HOMEPAGE = "https://github.com/googleapis/python-api-core" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "abc978a72658f14a2df1e5e12532effe40f94f868f6e23d95133bd6abcca35ca" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-math \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-googleapis-common-protos \ + ${PYTHON_PN}-google-auth \ + ${PYTHON_PN}-grpcio \ + ${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-pytz \ + ${PYTHON_PN}-requests \ + ${PYTHON_PN}-six \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.108.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.108.0.bb deleted file mode 100644 index f8ccc9a68c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.108.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "The Google API Client for Python is a client library for accessing the Plus, \ -Moderator, and many other Google APIs." -HOMEPAGE = "https://github.com/googleapis/google-api-python-client" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI[sha256sum] = "6396efca83185fb205c0abdbc1c2ee57b40475578c6af37f6d0e30a639aade99" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-httplib2 \ - ${PYTHON_PN}-uritemplate \ - ${PYTHON_PN}-google-api-core \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.111.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.111.0.bb new file mode 100644 index 0000000000..89613516e6 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-api-python-client_2.111.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "The Google API Client for Python is a client library for accessing the Plus, \ +Moderator, and many other Google APIs." +HOMEPAGE = "https://github.com/googleapis/google-api-python-client" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "3a45a53c031478d1c82c7162dd25c9a965247bca6bd438af0838a9d9b8219405" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-httplib2 \ + ${PYTHON_PN}-uritemplate \ + ${PYTHON_PN}-google-api-core \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.23.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.23.4.bb deleted file mode 100644 index c7bf2857a7..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.23.4.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Google Authentication Library" -HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "79905d6b1652187def79d491d6e23d0cbb3a21d3c7ba0dbaa9c8a01906b13ff3" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-asyncio \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-numbers \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-aiohttp \ - ${PYTHON_PN}-cachetools \ - ${PYTHON_PN}-pyasn1-modules \ - ${PYTHON_PN}-rsa \ - ${PYTHON_PN}-six \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.25.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.25.2.bb new file mode 100644 index 0000000000..2f527611e4 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-google-auth_2.25.2.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Google Authentication Library" +HOMEPAGE = "https://github.com/googleapis/google-auth-library-python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "42f707937feb4f5e5a39e6c4f343a17300a459aaf03141457ba505812841cc40" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-io \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-aiohttp \ + ${PYTHON_PN}-cachetools \ + ${PYTHON_PN}-pyasn1-modules \ + ${PYTHON_PN}-rsa \ + ${PYTHON_PN}-six \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.61.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.61.0.bb deleted file mode 100644 index 171bc67b78..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.61.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "Common protobufs used in Google APIs" -HOMEPAGE = "https://github.com/googleapis/python-api-common-protos" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-grpcio \ - ${PYTHON_PN}-protobuf \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.62.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.62.0.bb new file mode 100644 index 0000000000..1536ba5e0d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-googleapis-common-protos_1.62.0.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Common protobufs used in Google APIs" +HOMEPAGE = "https://github.com/googleapis/python-api-common-protos" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "83f0ece9f94e5672cced82f592d2a5edf527a96ed1794f0bab36d5735c996277" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-grpcio \ + ${PYTHON_PN}-protobuf \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.1.bb deleted file mode 100644 index 523c2b6b23..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.1.bb +++ /dev/null @@ -1,9 +0,0 @@ -SUMMARY = "Python lightweight in-process concurrent programming" -HOMEPAGE = "https://greenlet.readthedocs.io/en/latest/" -LICENSE = "MIT & PSF-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ - file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" - -SRC_URI[sha256sum] = "816bd9488a94cba78d93e1abb58000e8266fa9cc2aa9ccdd6eb0696acb24005b" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb new file mode 100644 index 0000000000..abd6c49caf --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-greenlet_3.0.3.bb @@ -0,0 +1,9 @@ +SUMMARY = "Python lightweight in-process concurrent programming" +HOMEPAGE = "https://greenlet.readthedocs.io/en/latest/" +LICENSE = "MIT & PSF-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e95668d68e4329085c7ab3535e6a7aee \ + file://LICENSE.PSF;md5=c106931d9429eda0492617f037b8f69a" + +SRC_URI[sha256sum] = "43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch deleted file mode 100644 index 9b3e5d4a5f..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 28 Dec 2022 18:24:21 -0800 -Subject: [PATCH] direct_mmap: Use off_t on linux - -off64_t is not provided without defining _LARGEFILE64_SOURCE on musl -this define is not defined automatically like glibc where it gets -defined when _GNU_SOURCE is defined. Using off_t makes it portable -across musl/glibc and for using 64bit off_t on glibc 32bit systems --D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS - -Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] -Signed-off-by: Khem Raj ---- - absl/base/internal/direct_mmap.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -+++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h -@@ -72,7 +72,7 @@ namespace base_internal { - // Platform specific logic extracted from - // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h - inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, -- off64_t offset) noexcept { -+ off_t offset) noexcept { - #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ - defined(__m68k__) || defined(__sh__) || \ - (defined(__hppa__) && !defined(__LP64__)) || \ -@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, siz - #else - return reinterpret_cast( - syscall(SYS_mmap2, start, length, prot, flags, fd, -- static_cast(offset / pagesize))); -+ offset / pagesize)); - #endif - #elif defined(__s390x__) - // On s390x, mmap() arguments are passed in memory. diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch index 8c70b2b6a6..67505d0ce1 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-protobuf-Disable-musttail-attribute-on-mips.patch @@ -14,11 +14,11 @@ Signed-off-by: Wang Mingyu --- a/third_party/protobuf/src/google/protobuf/port_def.inc +++ b/third_party/protobuf/src/google/protobuf/port_def.inc -@@ -338,6 +338,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125 +@@ -298,6 +298,7 @@ #error PROTOBUF_TAILCALL was previously defined #endif - #if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \ -+ !defined(__mips__) && \ + #if ABSL_HAVE_CPP_ATTRIBUTE(clang::musttail) && !defined(__arm__) && \ ++ !defined(__mips__) && \ !defined(_ARCH_PPC) && !defined(__wasm__) && \ - !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) && \ - !(defined(__NDK_MAJOR__) && __NDK_MAJOR <= 24) + !(defined(_MSC_VER) && defined(_M_IX86)) && !defined(__i386__) + // Compilation fails on ARM32: b/195943306 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch index 4aa11bd57a..07276c17f6 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch @@ -30,29 +30,30 @@ diff --git a/setup.py b/setup.py index cc53e79..be3bc78 100644 --- a/setup.py +++ b/setup.py -@@ -87,8 +87,11 @@ def check_linker_need_libatomic(): - """Test if linker on system needs libatomic.""" - code_test = (b'#include \n' + - b'int main() { return std::atomic{}; }') -- cxx = os.environ.get('CXX', 'c++') -- cpp_test = subprocess.Popen([cxx, '-x', 'c++', '-std=c++14', '-'], +@@ -88,9 +88,11 @@ + b"#include \n" + + b"int main() { return std::atomic{}; }" + ) +- cxx = os.environ.get("CXX", "c++") +- cpp_test = subprocess.Popen( +- [cxx, "-x", "c++", "-std=c++14", "-"], + cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' + if not cxx_args: + cxx_args = "-g" + + cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) -@@ -98,7 +101,7 @@ def check_linker_need_libatomic(): + stdin=PIPE, + stdout=PIPE, + stderr=PIPE, +@@ -101,7 +103,7 @@ # Double-check to see if -latomic actually can solve the problem. # https://github.com/grpc/grpc/issues/22491 cpp_test = subprocess.Popen( -- [cxx, '-x', 'c++', '-std=c++14', '-', '-latomic'], +- [cxx, "-x", "c++", "-std=c++14", "-", "-latomic"], + [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], stdin=PIPE, stdout=PIPE, - stderr=PIPE) + stderr=PIPE, -- 2.25.1 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb deleted file mode 100644 index 8fbe1fa91f..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Google gRPC tools" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515" - -inherit pypi setuptools3 - -DEPENDS += "${PYTHON_PN}-grpcio" - -SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ - file://0001-protobuf-Disable-musttail-attribute-on-mips.patch \ - file://0001-direct_mmap-Use-off_t-on-linux.patch \ - " -SRC_URI[sha256sum] = "39f5877cea514b3da9f2683dfb3ffb45ef47b05f4ff39c287d7d61c5057f48b8" - -RDEPENDS:${PN} = "${PYTHON_PN}-grpcio" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.60.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.60.0.bb new file mode 100644 index 0000000000..8e5c7d48fc --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio-tools_1.60.0.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Google gRPC tools" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=7145f7cdd263359b62d342a02f005515" + +inherit pypi setuptools3 + +DEPENDS += "${PYTHON_PN}-grpcio" + +SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ + file://0001-protobuf-Disable-musttail-attribute-on-mips.patch \ + " +SRC_URI[sha256sum] = "ed30499340228d733ff69fcf4a66590ed7921f94eb5a2bf692258b1280b9dac7" + +RDEPENDS:${PN} = "${PYTHON_PN}-grpcio" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch index f970cf3c3c..5cd94dee9c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-Include-missing-cstdint-header.patch @@ -1,4 +1,4 @@ -From 752e30eebe5b91c323bafcbea8d450dd5683701a Mon Sep 17 00:00:00 2001 +From 252aa78526287fe033c5656cd166e551fa5daa88 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 30 Jan 2023 10:31:10 -0800 Subject: [PATCH] Include missing header @@ -11,6 +11,7 @@ int32_t. Upstream-Status: Submitted [https://code-review.googlesource.com/c/re2/+/60970] Signed-off-by: Khem Raj + --- third_party/re2/util/pcre.h | 1 + 1 file changed, 1 insertion(+) @@ -27,6 +28,3 @@ index 896b0bd..271a005 100644 #ifdef USEPCRE #include --- -2.39.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch deleted file mode 100644 index 49df528d7e..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 28 Dec 2022 18:24:21 -0800 -Subject: [PATCH] direct_mmap: Use off_t on linux - -off64_t is not provided without defining _LARGEFILE64_SOURCE on musl -this define is not defined automatically like glibc where it gets -defined when _GNU_SOURCE is defined. Using off_t makes it portable -across musl/glibc and for using 64bit off_t on glibc 32bit systems --D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS - -Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] -Signed-off-by: Khem Raj ---- - absl/base/internal/direct_mmap.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h -index 815b8d23..fdf88f0b 100644 ---- a/absl/base/internal/direct_mmap.h -+++ b/absl/base/internal/direct_mmap.h -@@ -72,7 +72,7 @@ namespace base_internal { - // Platform specific logic extracted from - // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h - inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, -- off64_t offset) noexcept { -+ off_t offset) noexcept { - #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ - defined(__m68k__) || defined(__sh__) || \ - (defined(__hppa__) && !defined(__LP64__)) || \ -@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, - #else - return reinterpret_cast( - syscall(SYS_mmap2, start, length, prot, flags, fd, -- static_cast(offset / pagesize))); -+ offset / pagesize)); - #endif - #elif defined(__s390x__) - // On s390x, mmap() arguments are passed in memory. --- -2.39.0 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch deleted file mode 100644 index 13911ddcf3..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch +++ /dev/null @@ -1,73 +0,0 @@ -From de10fbc2386dcac3ab810c49b6977b2ee01bf426 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 17 Feb 2021 13:30:23 -0800 -Subject: [PATCH] setup.py: Do not mix C and C++ compiler options - -EXTRA_ENV_COMPILE_ARGS is used both with CC and CXX -so using -std=c++11 or -std=gnu99 together will cause -build time errors espcially with clang - -Keep '-std=c++11' to fix native build error -with old gcc (such as gcc 5.4.0 on ubuntu 16.04), for clang -we will remove them through GRPC_PYTHON_CFLAGS at do_compile -in bb recipe. - -While export CC="gcc ", cc_args is None, it will -cause subprocess.Popen always return 1. On centos 8, if you don't -install package libatomic, there will be a native build error -`cannot find /usr/lib64/libatomic.so.1.2.0'. - -Add no harm '-g' to cc_args if cc_args is empty. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Khem Raj -Signed-off-by: Hongxu Jia -Signed-off-by: Wang Mingyu ---- - setup.py | 11 +++++++---- - src/python/grpcio/commands.py | 5 ++++- - 2 files changed, 11 insertions(+), 5 deletions(-) - ---- a/setup.py -+++ b/setup.py -@@ -206,8 +206,11 @@ def check_linker_need_libatomic(): - """Test if linker on system needs libatomic.""" - code_test = (b'#include \n' + - b'int main() { return std::atomic{}; }') -- cxx = shlex.split(os.environ.get('CXX', 'c++')) -- cpp_test = subprocess.Popen(cxx + ['-x', 'c++', '-std=c++14', '-'], -+ cxx, cxx_args = os.environ.get('CXX').split(' ', 1) or 'c++' -+ if not cxx_args: -+ cxx_args = "-g" -+ -+ cpp_test = subprocess.Popen([cxx, cxx_args, '-x', 'c++', '-std=c++14', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) -@@ -216,8 +219,8 @@ def check_linker_need_libatomic(): - return False - # Double-check to see if -latomic actually can solve the problem. - # https://github.com/grpc/grpc/issues/22491 -- cpp_test = subprocess.Popen(cxx + -- ['-x', 'c++', '-std=c++14', '-', '-latomic'], -+ cpp_test = subprocess.Popen( -+ [cxx, cxx_args, '-x', 'c++', '-std=c++14', '-', '-latomic'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) ---- a/src/python/grpcio/commands.py -+++ b/src/python/grpcio/commands.py -@@ -228,8 +228,10 @@ class BuildExt(build_ext.build_ext): - """ - try: - # TODO(lidiz) Remove the generated a.out for success tests. -- cc = os.environ.get('CC', 'cc') -- cc_test = subprocess.Popen([cc, '-x', 'c', '-std=c++14', '-'], -+ cc_test, cc_args = os.environ.get('CC').split(' ', 1) or 'gcc' -+ if not cc_args: -+ cc_args = "-g" -+ cc_test = subprocess.Popen([cc_test, cc_args, '-x', 'c', '-std=c++14', '-'], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch index 918c6c8601..a5e767029e 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch @@ -1,4 +1,4 @@ -From 4432b9a296c9c287dfe281b4d464dfd03e4eb721 Mon Sep 17 00:00:00 2001 +From 6ede7d01b18a4d9eeaccd25f5c1ab9985cb65307 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 12 Feb 2023 21:25:04 -0800 Subject: [PATCH] zlib: Include unistd.h for open/close C APIs @@ -6,6 +6,7 @@ Subject: [PATCH] zlib: Include unistd.h for open/close C APIs Upstream-Status: Pending Signed-off-by: Khem Raj + --- third_party/zlib/gzguts.h | 1 + 1 file changed, 1 insertion(+) @@ -22,6 +23,3 @@ index 57faf37..3c700c2 100644 #include "zlib.h" #ifdef STDC # include --- -2.39.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch index 4100cf63f7..4bb60b6e2c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/abseil-ppc-fixes.patch @@ -1,4 +1,7 @@ -An all-in-one patch that fixes several issues: +From 9cec6297effa9fab6f0c71e342046daceecd7d4d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 13 Mar 2021 10:26:25 -0800 +Subject: [PATCH] An all-in-one patch that fixes several issues: 1) UnscaledCycleClock not fully implemented for ppc*-musl (disabled on musl) 2) powerpc stacktrace implementation only works on glibc (disabled on musl) @@ -7,19 +10,21 @@ An all-in-one patch that fixes several issues: Sourced from void linux +Upstream-Status: Pending Signed-off-by: Khem Raj Signed-off-by: Xu Huan ---- -Upstream-Status: Pending - absl/base/internal/unscaledcycleclock.cc | 4 ++-- - absl/base/internal/unscaledcycleclock.h | 3 ++- - absl/debugging/internal/examine_stack.cc | 8 +++++++- - absl/debugging/internal/stacktrace_config.h | 2 +- +--- + .../abseil-cpp/absl/base/internal/unscaledcycleclock.cc | 4 ++-- + .../absl/base/internal/unscaledcycleclock_config.h | 3 ++- + .../abseil-cpp/absl/debugging/internal/examine_stack.cc | 8 +++++++- + .../absl/debugging/internal/stacktrace_config.h | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) ---- a/absl/base/internal/unscaledcycleclock.cc -+++ b/absl/base/internal/unscaledcycleclock.cc +diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +index b1c396c..d62bfd6 100644 +--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc ++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc @@ -20,7 +20,7 @@ #include #endif @@ -38,8 +43,24 @@ Upstream-Status: Pending int64_t UnscaledCycleClock::Now() { #ifdef __GLIBC__ ---- a/absl/debugging/internal/examine_stack.cc -+++ b/absl/debugging/internal/examine_stack.cc +diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +index 24b324a..5e232c1 100644 +--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h ++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +@@ -21,7 +21,8 @@ + + // The following platforms have an implementation of a hardware counter. + #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ +- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ ++ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ ++ defined(__riscv) || \ + defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 + #else +diff --git a/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc b/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +index 5786322..72c7c46 100644 +--- a/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc ++++ b/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc @@ -33,6 +33,10 @@ #include #include @@ -51,7 +72,7 @@ Upstream-Status: Pending #include "absl/base/attributes.h" #include "absl/base/internal/raw_logging.h" #include "absl/base/macros.h" -@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) +@@ -174,8 +178,10 @@ void* GetProgramCounter(void* const vuc) { return reinterpret_cast(context->uc_mcontext.pc); #elif defined(__powerpc64__) return reinterpret_cast(context->uc_mcontext.gp_regs[32]); @@ -63,8 +84,10 @@ Upstream-Status: Pending #elif defined(__riscv) return reinterpret_cast(context->uc_mcontext.__gregs[REG_PC]); #elif defined(__s390__) && !defined(__s390x__) ---- a/absl/debugging/internal/stacktrace_config.h -+++ b/absl/debugging/internal/stacktrace_config.h +diff --git a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +index 3929b1b..23d5e50 100644 +--- a/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h ++++ b/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h @@ -60,7 +60,7 @@ #elif defined(__i386__) || defined(__x86_64__) #define ABSL_STACKTRACE_INL_HEADER \ @@ -74,15 +97,3 @@ Upstream-Status: Pending #define ABSL_STACKTRACE_INL_HEADER \ "absl/debugging/internal/stacktrace_powerpc-inl.inc" #elif defined(__aarch64__) ---- a/absl/base/internal/unscaledcycleclock_config.h -+++ b/absl/base/internal/unscaledcycleclock_config.h -@@ -21,7 +21,8 @@ - - // The following platforms have an implementation of a hardware counter. - #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ -- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ -+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ -+ defined(__riscv) || \ - defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) - #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 - #else diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch deleted file mode 100644 index 088ce33fc5..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Pending - ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -102,10 +102,10 @@ extern "C" { - #elif (defined(__PPC__) || defined(__powerpc__)) - #define OPENSSL_32_BIT - #define OPENSSL_PPC --#elif defined(__MIPSEL__) && !defined(__LP64__) -+#elif defined(__mips__) && !defined(__LP64__) - #define OPENSSL_32_BIT - #define OPENSSL_MIPS --#elif defined(__MIPSEL__) && defined(__LP64__) -+#elif defined(__mips__) && defined(__LP64__) - #define OPENSSL_64_BIT - #define OPENSSL_MIPS64 - #elif defined(__riscv) && __SIZEOF_POINTER__ == 8 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch deleted file mode 100644 index 5dacc689fc..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio/ppc-boringssl-support.patch +++ /dev/null @@ -1,17 +0,0 @@ -Let boringSSL compile on ppc32 bit - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -96,6 +96,9 @@ extern "C" { - #elif defined(__ARMEL__) || defined(_M_ARM) - #define OPENSSL_32_BIT - #define OPENSSL_ARM -+#elif (defined(__PPC__) || defined(__powerpc__)) -+#define OPENSSL_32_BIT -+#define OPENSSL_PPC - #elif defined(__MIPSEL__) && !defined(__LP64__) - #define OPENSSL_32_BIT - #define OPENSSL_MIPS diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.56.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.56.2.bb deleted file mode 100644 index c34391dd67..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.56.2.bb +++ /dev/null @@ -1,52 +0,0 @@ -DESCRIPTION = "Google gRPC" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" -LICENSE = "Apache-2.0 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" - -DEPENDS += "${PYTHON_PN}-protobuf" - -SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" -SRC_URI:append:class-target = " file://ppc-boringssl-support.patch \ - file://mips_bigendian.patch \ - file://0001-Include-missing-cstdint-header.patch \ - file://abseil-ppc-fixes.patch;patchdir=third_party/abseil-cpp \ - file://0001-direct_mmap-Use-off_t-on-linux.patch;patchdir=third_party/abseil-cpp \ - file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ -" -SRC_URI[sha256sum] = "0ff789ae7d8ddd76d2ac02e7d13bfef6fc4928ac01e1dcaa182be51b6bcc0aaa" - -RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-six \ -" - -inherit setuptools3 -inherit pypi - -CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" - -export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" - -BORING_SSL_PLATFORM:arm = "linux-arm" -BORING_SSL_PLATFORM:x86-64 = "linux-x86_64" -BORING_SSL_PLATFORM:aarch64 = "linux-aarch64" -BORING_SSL_PLATFORM ?= "unsupported" -export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" -export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = "${BORING_SSL_PLATFORM}" - -BORING_SSL:arm = "1" -BORING_SSL:x86-64 = "1" -BORING_SSL:aarch64 = "1" -BORING_SSL ?= "0" -export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" - -GRPC_CFLAGS ?= "" -GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" -export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" - -CLEANBROKEN = "1" - -BBCLASSEXTEND = "native nativesdk" - -CCACHE_DISABLE = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.60.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.60.0.bb new file mode 100644 index 0000000000..77b4198e31 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-grpcio_1.60.0.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "Google gRPC" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" +LICENSE = "Apache-2.0 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906" + +DEPENDS += "${PYTHON_PN}-protobuf" + +SRC_URI += "file://0001-Include-missing-cstdint-header.patch \ + file://abseil-ppc-fixes.patch \ + file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ + " +SRC_URI[sha256sum] = "2199165a1affb666aa24adf0c97436686d0a61bc5fc113c037701fb7c7fceb96" + +RDEPENDS:${PN} = "${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-six \ +" + +inherit setuptools3 +inherit pypi + +CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" + +BORING_SSL_PLATFORM:arm = "linux-arm" +BORING_SSL_PLATFORM:x86-64 = "linux-x86_64" +BORING_SSL_PLATFORM:aarch64 = "linux-aarch64" +BORING_SSL_PLATFORM ?= "unsupported" +export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" +export GRPC_BUILD_OVERRIDE_BORING_SSL_ASM_PLATFORM = "${BORING_SSL_PLATFORM}" + +BORING_SSL:arm = "1" +BORING_SSL:x86-64 = "1" +BORING_SSL:aarch64 = "1" +BORING_SSL ?= "0" +export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" + +GRPC_CFLAGS ?= "" +GRPC_CFLAGS:append:toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" +export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" + +CLEANBROKEN = "1" + +BBCLASSEXTEND = "native nativesdk" + +CCACHE_DISABLE = "1" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.0.bb deleted file mode 100644 index f6275754b4..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.0.bb +++ /dev/null @@ -1,12 +0,0 @@ -SUMMARY = "Python library that provides an easy interface to read and \ -write a wide range of image data, including animated images, video, \ -volumetric data, and scientific formats." -SECTION = "devel/python" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=24cb9a367a9e641b459a01c4d15256ba" - -SRC_URI[sha256sum] = "39999d05eb500089e60be467dd7d618f56e142229b44c3961c2b420eeb538d7e" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "python3-numpy python3-pillow" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.1.bb new file mode 100644 index 0000000000..32b4472c6c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-imageio_2.33.1.bb @@ -0,0 +1,12 @@ +SUMMARY = "Python library that provides an easy interface to read and \ +write a wide range of image data, including animated images, video, \ +volumetric data, and scientific formats." +SECTION = "devel/python" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=24cb9a367a9e641b459a01c4d15256ba" + +SRC_URI[sha256sum] = "78722d40b137bd98f5ec7312119f8aea9ad2049f76f434748eb306b6937cc1ce" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = "python3-numpy python3-pillow" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython-genutils_0.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython-genutils_0.2.0.bb index 8725150e4b..3261d80474 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython-genutils_0.2.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython-genutils_0.2.0.bb @@ -5,6 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYING.md;md5=f7c3032c3ac398265224533a0a333a35" PYPI_PACKAGE = "ipython_genutils" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ipython_genutils" +UPSTREAM_CHECK_REGEX = "/ipython_genutils/(?P(\d+[\.\-_]*)+)" + SRC_URI[md5sum] = "5a4f9781f78466da0ea1a648f3e1f79f" SRC_URI[sha256sum] = "eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb deleted file mode 100644 index aaeb720e6c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.18.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "IPython: Productive Interactive Computing" -HOMEPAGE = "https://ipython.org" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" - -PYPI_PACKAGE = "ipython" - -SRC_URI[sha256sum] = "4feb61210160f75e229ce932dbf8b719bff37af123c0b985fd038b14233daa16" - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-jedi \ - ${PYTHON_PN}-decorator \ - ${PYTHON_PN}-pickleshare \ - ${PYTHON_PN}-traitlets \ - ${PYTHON_PN}-prompt-toolkit \ - ${PYTHON_PN}-pygments \ - ${PYTHON_PN}-backcall \ - ${PYTHON_PN}-pydoc \ - ${PYTHON_PN}-debugger \ - ${PYTHON_PN}-pexpect \ - ${PYTHON_PN}-unixadmin \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-sqlite3 \ - ${PYTHON_PN}-stack-data \ -" - -inherit setuptools3 pypi diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.19.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.19.0.bb new file mode 100644 index 0000000000..87474e4ed3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ipython_8.19.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "IPython: Productive Interactive Computing" +HOMEPAGE = "https://ipython.org" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING.rst;md5=59b20262b8663cdd094005bddf47af5f" + +PYPI_PACKAGE = "ipython" + +SRC_URI[sha256sum] = "ac4da4ecf0042fb4e0ce57c60430c2db3c719fa8bdf92f8631d6bd8a5785d1f0" + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-jedi \ + ${PYTHON_PN}-decorator \ + ${PYTHON_PN}-pickleshare \ + ${PYTHON_PN}-traitlets \ + ${PYTHON_PN}-prompt-toolkit \ + ${PYTHON_PN}-pygments \ + ${PYTHON_PN}-backcall \ + ${PYTHON_PN}-pydoc \ + ${PYTHON_PN}-debugger \ + ${PYTHON_PN}-pexpect \ + ${PYTHON_PN}-unixadmin \ + ${PYTHON_PN}-misc \ + ${PYTHON_PN}-sqlite3 \ + ${PYTHON_PN}-stack-data \ +" + +inherit setuptools3 pypi diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.12.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.12.0.bb deleted file mode 100644 index d111393eaf..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.12.0.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "A Python utility / library to sort Python imports." -HOMEPAGE = "https://pypi.python.org/pypi/isort" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=8227180126797a0148f94f483f3e1489" - -SRC_URI[sha256sum] = "8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504" - -inherit pypi python_poetry_core - -RDEPENDS:${PN} += " \ - python3-compression \ - python3-datetime \ - python3-difflib \ - python3-email \ - python3-numbers \ - python3-pprint \ - python3-profile \ - python3-shell \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.13.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.13.2.bb new file mode 100644 index 0000000000..60d44181c0 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-isort_5.13.2.bb @@ -0,0 +1,22 @@ +SUMMARY = "A Python utility / library to sort Python imports." +HOMEPAGE = "https://pypi.python.org/pypi/isort" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=8227180126797a0148f94f483f3e1489" + +SRC_URI[sha256sum] = "48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109" + +inherit pypi python_poetry_core + +RDEPENDS:${PN} += " \ + python3-compression \ + python3-datetime \ + python3-difflib \ + python3-email \ + python3-numbers \ + python3-pprint \ + python3-profile \ + python3-shell \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.3.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.3.2.bb index fe1e68c5ad..d68b40e384 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.3.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-joblib_1.3.2.bb @@ -8,7 +8,6 @@ SRC_URI[sha256sum] = "92f865e621e17784e7955080b6d042489e3b8e294949cc44c6eac304f5 RDEPENDS:${PN} += " \ python3-asyncio \ - python3-distutils \ python3-json \ python3-multiprocessing \ python3-pprint \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-kmod_0.9.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-kmod_0.9.1.bb index 2ec4d474b5..52e1cf6af7 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-kmod_0.9.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-kmod_0.9.1.bb @@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6d62c2454850386a2ffe44f72db83d74" inherit pypi setuptools3 +RECIPE_NO_UPDATE_REASON = "Version 0.9.2 is broken when using latest build machinery for C extensions" SRC_URI[sha256sum] = "f3bf829059bf88eca22f4f549e17aa316cdaa14302bf2ba49ddeee60cea109ff" DEPENDS += " \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb new file mode 100644 index 0000000000..9232a5a917 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.10.0.bb @@ -0,0 +1,11 @@ +SUMMARY = "A fast and thorough lazy object proxy" +HOMEPAGE = "https://python-lazy-object-proxy.readthedocs.io/" +LICENSE = "BSD-2-Clause" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d606e94f56c21c8e0cdde0b622dcdf57" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native ${PYTHON_PN}-pip-native" + +SRC_URI[sha256sum] = "78247b6d45f43a52ef35c25b5581459e85117225408a4128a3daf8bf9648ac69" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.9.0.bb deleted file mode 100644 index 74c5e9b520..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-lazy-object-proxy_1.9.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "A fast and thorough lazy object proxy" -HOMEPAGE = "https://python-lazy-object-proxy.readthedocs.io/" -LICENSE = "BSD-2-Clause" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d606e94f56c21c8e0cdde0b622dcdf57" - -DEPENDS += "${PYTHON_PN}-setuptools-scm-native ${PYTHON_PN}-pip-native" - -SRC_URI[sha256sum] = "659fb5809fa4629b8a1ac5106f669cfc7bef26fbb389dda53b3e010d1ac4ebae" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.40.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.40.1.bb index a55ded34d7..062a63a39c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.40.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-m2crypto_0.40.1.bb @@ -19,12 +19,11 @@ inherit pypi siteinfo setuptools3 DEPENDS += "openssl swig-native" RDEPENDS:${PN} += "\ ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-distutils \ + ${PYTHON_PN}-setuptools \ ${PYTHON_PN}-logging \ ${PYTHON_PN}-netclient \ ${PYTHON_PN}-netserver \ ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-smtpd \ ${PYTHON_PN}-xmlrpc \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-meld3_2.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-meld3_2.0.1.bb index 1be3fa5ada..7ebf9f1411 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-meld3_2.0.1.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-meld3_2.0.1.bb @@ -15,6 +15,5 @@ inherit pypi setuptools3 RDEPENDS:${PN} += " \ python3-cgitb \ - python3-smtpd \ python3-xml \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb deleted file mode 100644 index 90301f3ccb..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.7.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" -HOMEPAGE = "https://github.com/python/mypy" -LICENSE = "MIT & Python-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "fcb6d9afb1b6208b4c712af0dafdc650f518836065df0d4fb1d800f5d6773db2" - -BBCLASSEXTEND = "native" - -DEPENDS += " \ - python3-mypy-extensions-native \ - python3-types-psutil-native \ - python3-types-setuptools-native \ - python3-typing-extensions-native \ -" - -RDEPENDS:${PN} += " \ - python3-modules \ - python3-mypy-extensions \ - python3-typing-extensions \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.8.0.bb new file mode 100644 index 0000000000..2e6c7cc076 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-mypy_1.8.0.bb @@ -0,0 +1,23 @@ +SUMMARY = "Optional static typing for Python 3 and 2 (PEP 484)" +HOMEPAGE = "https://github.com/python/mypy" +LICENSE = "MIT & Python-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8d62fd8f8648cb018e52857347e340b9" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07" + +BBCLASSEXTEND = "native" + +DEPENDS += " \ + python3-mypy-extensions-native \ + python3-types-psutil-native \ + python3-types-setuptools-native \ + python3-typing-extensions-native \ +" + +RDEPENDS:${PN} += " \ + python3-modules \ + python3-mypy-extensions \ + python3-typing-extensions \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch index 276fb50172..b7d191e244 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja/no-scikit-build.patch @@ -8,11 +8,11 @@ diff --git a/pyproject.toml b/pyproject.toml index b895c20..577b642 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -1,7 +1,6 @@ - [build-system] +@@ -2,7 +2,6 @@ requires = [ - "setuptools>=42", -- "scikit-build>=0.12", + "setuptools >=42", + "setuptools-scm[toml]", +- "scikit-build", ] build-backend = "setuptools.build_meta" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb new file mode 100644 index 0000000000..a9e0ed208c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Ninja is a small build system with a focus on speed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5" + +PYPI_PACKAGE = "ninja" +PYPI_ARCHIVE_NAME_PREFIX = "pypi-" + +inherit pypi python_setuptools_build_meta +SRC_URI[sha256sum] = "9d793b08dd857e38d0b6ffe9e6b7145d7c485a42dcfea04905ca0cdb6017cc3c" + +SRC_URI += "file://no-scikit-build.patch \ + file://run-ninja-from-path.patch" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" + +do_install:append () { + rm -rf ${D}${bindir} +} + +RDEPENDS:${PN} = " \ + ninja \ + python3-io \ + python3-json \ + python3-ninja-syntax \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb deleted file mode 100644 index 3b9077f326..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ninja_1.11.1.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Ninja is a small build system with a focus on speed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE_Apache_20;md5=19cbd64715b51267a47bf3750cc6a8a5" - -PYPI_PACKAGE = "ninja" -PYPI_ARCHIVE_NAME_PREFIX = "pypi-" - -inherit pypi python_setuptools_build_meta -SRC_URI[sha256sum] = "c833a47d39b2d1eee3f9ca886fa1581efd5be6068b82734ac229961ee8748f90" - -SRC_URI += "file://no-scikit-build.patch \ - file://run-ninja-from-path.patch" - -do_install:append () { - rm -rf ${D}${bindir} -} - -RDEPENDS:${PN} = " \ - ninja \ - python3-io \ - python3-json \ - python3-ninja-syntax \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.46.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.46.bb deleted file mode 100644 index e29f30f6ff..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.46.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Python package to parse, read and write Microsoft OLE2 files" -HOMEPAGE = "https://github.com/decalage2/olefile" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e21a06208415d5eb2001555d37851362" - -SRC_URI[sha256sum] = "133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "olefile" -PYPI_PACKAGE_EXT = "zip" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-logging \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.47.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.47.bb new file mode 100644 index 0000000000..2db0adad8b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-olefile_0.47.bb @@ -0,0 +1,17 @@ +SUMMARY = "Python package to parse, read and write Microsoft OLE2 files" +HOMEPAGE = "https://github.com/decalage2/olefile" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f18814bd70fd28e11a4545145dcb3822" + +SRC_URI[sha256sum] = "599383381a0bf3dfbd932ca0ca6515acd174ed48870cbf7fee123d698c192c1c" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "olefile" +PYPI_PACKAGE_EXT = "zip" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-logging \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.3.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.3.1.bb deleted file mode 100644 index da87e5199f..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.3.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "The leading native Python SSHv2 protocol library." -HOMEPAGE = "https://github.com/paramiko/paramiko/" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fd0120fc2e9f841c73ac707a30389af5" - -SRC_URI[sha256sum] = "6a3777a961ac86dbef375c5f5b8d50014a1a96d0fd7f054a43bc880134b0ff77" - -PYPI_PACKAGE = "paramiko" - -inherit pypi setuptools3 - -CLEANBROKEN = "1" - -RDEPENDS:${PN} += " \ - python3-bcrypt \ - python3-cryptography \ - python3-logging \ - python3-pynacl \ - python3-unixadmin \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb new file mode 100644 index 0000000000..0d32d361cf --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-paramiko_3.4.0.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "The leading native Python SSHv2 protocol library." +HOMEPAGE = "https://github.com/paramiko/paramiko/" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=fd0120fc2e9f841c73ac707a30389af5" + +SRC_URI[sha256sum] = "aac08f26a31dc4dffd92821527d1682d99d52f9ef6851968114a8728f3c274d3" + +PYPI_PACKAGE = "paramiko" + +inherit pypi setuptools3 + +CLEANBROKEN = "1" + +RDEPENDS:${PN} += " \ + python3-bcrypt \ + python3-cryptography \ + python3-logging \ + python3-pynacl \ + python3-unixadmin \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.19.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.19.1.bb deleted file mode 100644 index 9dc7f79318..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.19.1.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "Parse strings using a specification based on the Python format() syntax" -HOMEPAGE = "https://github.com/r1chardj0n3s/parse" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=8ab458ad281b60e6f1b39b3feafbfc05" - -SRC_URI[sha256sum] = "cc3a47236ff05da377617ddefa867b7ba983819c664e1afe46249e5b469be464" - -SRC_URI += " \ - git://github.com/r1chardj0n3s/parse.git;branch=master;protocol=https \ - file://run-ptest \ -" - -SRCREV ?= "72776522285d516032faa0f80c4ee6a8964075e8" - -S = "${WORKDIR}/git" - -inherit python_setuptools_build_meta ptest - -RDEPENDS:${PN} += "\ - python3-datetime \ - python3-logging \ - python3-numbers \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ -" - -do_install_ptest() { - cp -f ${S}/test_parse.py ${D}${PTEST_PATH}/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.0.bb new file mode 100644 index 0000000000..3ca6fbbeb2 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-parse_1.20.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "Parse strings using a specification based on the Python format() syntax" +HOMEPAGE = "https://github.com/r1chardj0n3s/parse" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8ab458ad281b60e6f1b39b3feafbfc05" + +SRC_URI[sha256sum] = "bd28bae37714b45d5894d77160a16e2be36b64a3b618c81168b3684676aa498b" + +SRC_URI += " \ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-logging \ + python3-numbers \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ +" + +do_install_ptest() { + cp -f ${S}/tests/test*.py ${D}${PTEST_PATH}/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.7.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.7.1.bb deleted file mode 100644 index d9576ed0b8..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.7.1.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "A module wrapper for os.path" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=141643e11c48898150daa83802dbc65f" - -SRC_URI[sha256sum] = "2b477f5887033f3cbea1cfd8553ee6a6a498eb2540a19f4aa082822aadcea30a" - -SRC_URI += "\ - file://run-ptest \ -" - -inherit pypi python_setuptools_build_meta ptest - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += " \ - python3-appdirs \ - python3-crypt \ - python3-io \ - python3-numbers \ - python3-shell \ -" -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-unittest-automake-output \ -" - -BBCLASSEXTEND = "nativesdk native" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/test - cp -rf ${S}/test_* ${D}${PTEST_PATH}/test/ - install -d ${D}${PTEST_PATH}/path - cp -rf ${S}/path/* ${D}${PTEST_PATH}/path/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.9.0.bb new file mode 100644 index 0000000000..19bf11b6c8 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-path_16.9.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "A module wrapper for os.path" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=141643e11c48898150daa83802dbc65f" + +SRC_URI[sha256sum] = "dfd31c2af60e8889a13538bef302ade7adacdb5351836be22638e2349ddd5d7b" + +SRC_URI += "\ + file://run-ptest \ +" + +inherit pypi python_setuptools_build_meta ptest + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += " \ + python3-appdirs \ + python3-crypt \ + python3-io \ + python3-numbers \ + python3-shell \ +" +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" + +BBCLASSEXTEND = "nativesdk native" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/test + cp -rf ${S}/test_* ${D}${PTEST_PATH}/test/ + install -d ${D}${PTEST_PATH}/path + cp -rf ${S}/path/* ${D}${PTEST_PATH}/path/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.7.bb deleted file mode 100644 index 679ecb0d4a..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.7.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "The build backend used by PDM that supports latest packaging standards" -HOMEPAGE = "https://github.com/pdm-project/pdm-backend" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4a564297b3c5b629a528b92fd8ff61ea" - -SRC_URI[sha256sum] = "d3b50ab6374557c1edc348135e0da5decef228ddf8c973a58e40f437cf3595ba" - -inherit pypi python_setuptools_build_meta - -PYPI_PACKAGE= "pdm_backend" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb new file mode 100644 index 0000000000..f1f507243e --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm-backend_2.1.8.bb @@ -0,0 +1,13 @@ +SUMMARY = "The build backend used by PDM that supports latest packaging standards" +HOMEPAGE = "https://github.com/pdm-project/pdm-backend" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4a564297b3c5b629a528b92fd8ff61ea" + +SRC_URI[sha256sum] = "2487dfbd13f69d80fb4e6a08006a3ee68272833970813047dc5fcfacdfdc0151" + +inherit pypi python_setuptools_build_meta + +PYPI_PACKAGE= "pdm_backend" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb deleted file mode 100644 index fffefb3c69..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.10.4.bb +++ /dev/null @@ -1,15 +0,0 @@ -SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" -HOMEPAGE = "https://pdm-project.org/latest/" -LICENSE = "MIT" -SECTION = "devel/python" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" - -SRC_URI[sha256sum] = "6dfd9d4cb59043edecb2d0b47d208e55d89d333ba7197deb05cca2dfbc7a4bfb" - -inherit pypi python_setuptools_build_meta - -DEPENDS += " \ - ${PYTHON_PN}-pdm-backend-native \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.11.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.11.1.bb new file mode 100644 index 0000000000..5ff6ffc9e3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pdm_2.11.1.bb @@ -0,0 +1,15 @@ +SUMMARY = "A modern Python package and dependency manager supporting the latest PEP standards" +HOMEPAGE = "https://pdm-project.org/latest/" +LICENSE = "MIT" +SECTION = "devel/python" +LIC_FILES_CHKSUM = "file://LICENSE;md5=2eb31a2cc1a758c34b499f287dd04ef2" + +SRC_URI[sha256sum] = "b10bc4e5394856f1639ddc9bc754d9c26323ec5b828a135c6ed35f935b054b83" + +inherit pypi python_setuptools_build_meta + +DEPENDS += " \ + ${PYTHON_PN}-pdm-backend-native \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.1.0.bb index 322c90eda5..f895b1db32 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.1.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pillow_10.1.0.bb @@ -39,7 +39,6 @@ RDEPENDS:${PN}-ptest += " \ jpeg-tools \ libwebp \ ${PYTHON_PN}-core \ - ${PYTHON_PN}-distutils \ ${PYTHON_PN}-image \ ${PYTHON_PN}-mmap \ ${PYTHON_PN}-pytest \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.22.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.22.bb deleted file mode 100644 index 0eed33f799..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.22.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "Physical quantities module" -DESCRIPTION = "Physical quantities Python module" -HOMEPAGE = "https://github.com/hgrecco/pint" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=bccf824202692270a1e0829a62e3f47b" - -PYPI_PACKAGE := "Pint" - -inherit pypi ptest python_setuptools_build_meta - -SRC_URI[sha256sum] = "2d139f6abbcf3016cad7d3cec05707fe908ac4f99cf59aedfd6ee667b7a64433" - -DEPENDS += "python3-setuptools-scm-native" - -BBCLASSEXTEND = "native nativesdk" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-packaging \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/testsuite - cp -rf ${S}/pint/testsuite/* ${D}${PTEST_PATH}/testsuite/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb new file mode 100644 index 0000000000..82709ea08a --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pint_0.23.bb @@ -0,0 +1,35 @@ +SUMMARY = "Physical quantities module" +DESCRIPTION = "Physical quantities Python module" +HOMEPAGE = "https://github.com/hgrecco/pint" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=bccf824202692270a1e0829a62e3f47b" + +PYPI_PACKAGE := "Pint" + +inherit pypi ptest python_setuptools_build_meta + +SRC_URI[sha256sum] = "e1509b91606dbc52527c600a4ef74ffac12fff70688aff20e9072409346ec9b4" + +DEPENDS += "python3-setuptools-scm-native" + +BBCLASSEXTEND = "native nativesdk" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-packaging \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/testsuite + cp -rf ${S}/pint/testsuite/* ${D}${PTEST_PATH}/testsuite/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.0.0.bb deleted file mode 100644 index 5a33be400e..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.0.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -SUMMARY = "A small Python module for determining appropriate platform-specific dirs" -HOMEPAGE = "https://github.com/platformdirs/platformdirs" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a" - -SRC_URI += " \ - file://run-ptest \ -" - -SRC_URI[sha256sum] = "cb633b2bcf10c51af60beb0ab06d2f1d69064b43abf4c185ca6b28865f3f9731" - -inherit pypi python_hatchling ptest - -DEPENDS += " \ - ${PYTHON_PN}-hatch-vcs-native \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-appdirs \ - ${PYTHON_PN}-covdefaults \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-pytest-mock \ - ${PYTHON_PN}-pytest-cov \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH} - cp -rf ${S}/tests ${D}${PTEST_PATH}/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.1.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.1.0.bb new file mode 100644 index 0000000000..b4fb9356c1 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-platformdirs_4.1.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "A small Python module for determining appropriate platform-specific dirs" +HOMEPAGE = "https://github.com/platformdirs/platformdirs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea4f5a41454746a9ed111e3d8723d17a" + +SRC_URI += " \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420" + +inherit pypi python_hatchling ptest + +DEPENDS += " \ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-appdirs \ + ${PYTHON_PN}-covdefaults \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-pytest-mock \ + ${PYTHON_PN}-pytest-cov \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH} + cp -rf ${S}/tests ${D}${PTEST_PATH}/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.1.bb deleted file mode 100644 index a340ba7fce..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Python data structure and operations for intervals" -HOMEPAGE = "https://github.com/AlexandreDecan/portion" -SECTION = "devel/python" - -LICENSE = "LGPL-3.0-only" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "9dcbf1808898f440aed304a5e9f0742a2859eca3b0ac7f1f58e50502852a8ef9" - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-sortedcontainers \ -" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb new file mode 100644 index 0000000000..b4bbfc6c6f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-portion_2.4.2.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Python data structure and operations for intervals" +HOMEPAGE = "https://github.com/AlexandreDecan/portion" +SECTION = "devel/python" + +LICENSE = "LGPL-3.0-only" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05f1e16a8e59ce3e9a979e881816c2ab" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "5289b40d98959b16b3f6927781678935d3df1b7c14947f5d7778e5e04dd9a065" + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-sortedcontainers \ +" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.41.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.41.bb deleted file mode 100644 index aa19116e8e..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.41.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Library for building powerful interactive command lines in Python" -HOMEPAGE = "https://python-prompt-toolkit.readthedocs.io/" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b2cde7da89f0c1f3e49bf968d00d554f" - -SRC_URI[sha256sum] = "941367d97fc815548822aa26c2a269fdc4eb21e9ec05fc5d447cf09bad5d75f0" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "prompt_toolkit" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-terminal \ - ${PYTHON_PN}-threading \ - ${PYTHON_PN}-wcwidth \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-shell \ - ${PYTHON_PN}-image \ - ${PYTHON_PN}-asyncio \ - ${PYTHON_PN}-xml \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb new file mode 100644 index 0000000000..9f7802b538 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-prompt-toolkit_3.0.43.bb @@ -0,0 +1,25 @@ +SUMMARY = "Library for building powerful interactive command lines in Python" +HOMEPAGE = "https://python-prompt-toolkit.readthedocs.io/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b2cde7da89f0c1f3e49bf968d00d554f" + +SRC_URI[sha256sum] = "3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d" + +inherit pypi setuptools3 + +PYPI_PACKAGE = "prompt_toolkit" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-terminal \ + ${PYTHON_PN}-threading \ + ${PYTHON_PN}-wcwidth \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-shell \ + ${PYTHON_PN}-image \ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-xml \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch deleted file mode 100644 index 89315e3a7d..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf/0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 8ce4b50b210d3c0f8de40156d4ba7827bfe16b21 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 16 Aug 2023 17:36:19 -0700 -Subject: [PATCH] message.c: Cast uintptr_t types to upb_MessageDef - -This fixes build with clang - -python/message.c:1238:49: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1238 | upb_MessageDef_MiniTable(other->def), - | ^~~~~~~~~~ -/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here - 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); - | ^ -python/message.c:1609:69: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1609 | upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def), - | ^~~~~~~~~ -/mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here - 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); - | ^ -python/message.c:1611:44: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] - 1611 | PyObject* ret = PyUpb_Message_Get(clone, self->def, arena); - | ^~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/protocolbuffers/upb/pull/1492] -Signed-off-by: Khem Raj ---- - python/message.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/python/message.c b/python/message.c -index a01ce16..c418b84 100644 ---- a/python/message.c -+++ b/python/message.c -@@ -1235,7 +1235,7 @@ static PyObject* PyUpb_Message_CopyFrom(PyObject* _self, PyObject* arg) { - Py_DECREF(tmp); - - upb_Message_DeepCopy(self->ptr.msg, other->ptr.msg, -- upb_MessageDef_MiniTable(other->def), -+ upb_MessageDef_MiniTable((const upb_MessageDef*)other->def), - PyUpb_Arena_Get(self->arena)); - PyUpb_Message_SyncSubobjs(self); - -@@ -1606,9 +1606,9 @@ PyObject* DeepCopy(PyObject* _self, PyObject* arg) { - - PyObject* arena = PyUpb_Arena_New(); - upb_Message* clone = -- upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def), -+ upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable((const upb_MessageDef*)self->def), - PyUpb_Arena_Get(arena)); -- PyObject* ret = PyUpb_Message_Get(clone, self->def, arena); -+ PyObject* ret = PyUpb_Message_Get(clone, (const upb_MessageDef*)self->def, arena); - Py_DECREF(arena); - - return ret; --- -2.41.0 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb deleted file mode 100644 index 4b530c3b1d..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.24.4.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "Protocol Buffers" -HOMEPAGE = "https://developers.google.com/protocol-buffers/" -SECTION = "devel/python" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" - -inherit pypi setuptools3 -SRC_URI += "file://0001-message.c-Cast-uintptr_t-types-to-upb_MessageDef.patch" -SRC_URI[sha256sum] = "5a70731910cd9104762161719c3d883c960151eea077134458503723b60e3667" - -# http://errors.yoctoproject.org/Errors/Details/184715/ -# Can't find required file: ../src/google/protobuf/descriptor.proto -CLEANBROKEN = "1" - -UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" - -DEPENDS += "protobuf" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-pkgutil \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-unittest \ -" - -# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) -BBCLASSEXTEND = "native nativesdk" - -DISTUTILS_BUILD_ARGS += "--cpp_implementation" -DISTUTILS_INSTALL_ARGS += "--cpp_implementation" - -do_compile:prepend:class-native () { - export KOKORO_BUILD_NUMBER="1" -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb new file mode 100644 index 0000000000..3c770e41d3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-protobuf_4.25.1.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Protocol Buffers" +HOMEPAGE = "https://developers.google.com/protocol-buffers/" +SECTION = "devel/python" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "57d65074b4f5baa4ab5da1605c02be90ac20c8b40fb137d6a8df9f416b0d0ce2" + +# http://errors.yoctoproject.org/Errors/Details/184715/ +# Can't find required file: ../src/google/protobuf/descriptor.proto +CLEANBROKEN = "1" + +UPSTREAM_CHECK_REGEX = "protobuf/(?P\d+(\.\d+)+)/" + +DEPENDS += "protobuf" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-pkgutil \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-unittest \ +" + +# For usage in other recipies when compiling protobuf files (e.g. by grpcio-tools) +BBCLASSEXTEND = "native nativesdk" + +DISTUTILS_BUILD_ARGS += "--cpp_implementation" +DISTUTILS_INSTALL_ARGS += "--cpp_implementation" + +do_compile:prepend:class-native () { + export KOKORO_BUILD_NUMBER="1" +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc new file mode 100644 index 0000000000..932cfc8522 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core-crates.inc @@ -0,0 +1,166 @@ +# Autogenerated with 'bitbake -c update_crates python3-pydantic-core' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/ahash/0.8.6 \ + crate://crates.io/aho-corasick/1.0.2 \ + crate://crates.io/autocfg/1.1.0 \ + crate://crates.io/base64/0.21.5 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/cc/1.0.79 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/enum_dispatch/0.3.12 \ + crate://crates.io/equivalent/1.0.1 \ + crate://crates.io/form_urlencoded/1.2.0 \ + crate://crates.io/getrandom/0.2.10 \ + crate://crates.io/hashbrown/0.14.0 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/idna/0.4.0 \ + crate://crates.io/indexmap/2.0.0 \ + crate://crates.io/indoc/2.0.4 \ + crate://crates.io/itoa/1.0.8 \ + crate://crates.io/jiter/0.0.4 \ + crate://crates.io/lexical-core/0.8.5 \ + crate://crates.io/lexical-parse-float/0.8.5 \ + crate://crates.io/lexical-parse-integer/0.8.6 \ + crate://crates.io/lexical-util/0.8.5 \ + crate://crates.io/lexical-write-float/0.8.5 \ + crate://crates.io/lexical-write-integer/0.8.5 \ + crate://crates.io/libc/0.2.147 \ + crate://crates.io/lock_api/0.4.10 \ + crate://crates.io/memchr/2.6.3 \ + crate://crates.io/memoffset/0.9.0 \ + crate://crates.io/num-bigint/0.4.4 \ + crate://crates.io/num-integer/0.1.45 \ + crate://crates.io/num-traits/0.2.16 \ + crate://crates.io/once_cell/1.18.0 \ + crate://crates.io/parking_lot/0.12.1 \ + crate://crates.io/parking_lot_core/0.9.8 \ + crate://crates.io/percent-encoding/2.3.0 \ + crate://crates.io/proc-macro2/1.0.69 \ + crate://crates.io/pyo3/0.20.0 \ + crate://crates.io/pyo3-build-config/0.20.0 \ + crate://crates.io/pyo3-ffi/0.20.0 \ + crate://crates.io/pyo3-macros/0.20.0 \ + crate://crates.io/pyo3-macros-backend/0.20.0 \ + crate://crates.io/python3-dll-a/0.2.9 \ + crate://crates.io/quote/1.0.29 \ + crate://crates.io/redox_syscall/0.3.5 \ + crate://crates.io/regex/1.10.2 \ + crate://crates.io/regex-automata/0.4.3 \ + crate://crates.io/regex-syntax/0.8.2 \ + crate://crates.io/rustversion/1.0.13 \ + crate://crates.io/ryu/1.0.14 \ + crate://crates.io/scopeguard/1.1.0 \ + crate://crates.io/serde/1.0.190 \ + crate://crates.io/serde_derive/1.0.190 \ + crate://crates.io/serde_json/1.0.108 \ + crate://crates.io/smallvec/1.11.1 \ + crate://crates.io/speedate/0.13.0 \ + crate://crates.io/static_assertions/1.1.0 \ + crate://crates.io/strum/0.25.0 \ + crate://crates.io/strum_macros/0.25.3 \ + crate://crates.io/syn/2.0.38 \ + crate://crates.io/target-lexicon/0.12.9 \ + crate://crates.io/tinyvec/1.6.0 \ + crate://crates.io/tinyvec_macros/0.1.1 \ + crate://crates.io/unicode-bidi/0.3.13 \ + crate://crates.io/unicode-ident/1.0.10 \ + crate://crates.io/unicode-normalization/0.1.22 \ + crate://crates.io/unindent/0.2.3 \ + crate://crates.io/url/2.4.1 \ + crate://crates.io/uuid/1.5.0 \ + crate://crates.io/version_check/0.9.4 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/windows-targets/0.48.1 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.0 \ + crate://crates.io/windows_aarch64_msvc/0.48.0 \ + crate://crates.io/windows_i686_gnu/0.48.0 \ + crate://crates.io/windows_i686_msvc/0.48.0 \ + crate://crates.io/windows_x86_64_gnu/0.48.0 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.0 \ + crate://crates.io/windows_x86_64_msvc/0.48.0 \ + crate://crates.io/zerocopy/0.7.20 \ + crate://crates.io/zerocopy-derive/0.7.20 \ +" + +SRC_URI[ahash-0.8.6.sha256sum] = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +SRC_URI[aho-corasick-1.0.2.sha256sum] = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +SRC_URI[base64-0.21.5.sha256sum] = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[cc-1.0.79.sha256sum] = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[enum_dispatch-0.3.12.sha256sum] = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +SRC_URI[equivalent-1.0.1.sha256sum] = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +SRC_URI[form_urlencoded-1.2.0.sha256sum] = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +SRC_URI[getrandom-0.2.10.sha256sum] = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +SRC_URI[hashbrown-0.14.0.sha256sum] = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[idna-0.4.0.sha256sum] = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +SRC_URI[indexmap-2.0.0.sha256sum] = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +SRC_URI[indoc-2.0.4.sha256sum] = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +SRC_URI[itoa-1.0.8.sha256sum] = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +SRC_URI[jiter-0.0.4.sha256sum] = "b27d419c535bf7b50ad355278b1159cbf0cc8d507ea003d625b17bf0375720b8" +SRC_URI[lexical-core-0.8.5.sha256sum] = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" +SRC_URI[lexical-parse-float-0.8.5.sha256sum] = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" +SRC_URI[lexical-parse-integer-0.8.6.sha256sum] = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +SRC_URI[lexical-util-0.8.5.sha256sum] = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +SRC_URI[lexical-write-float-0.8.5.sha256sum] = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +SRC_URI[lexical-write-integer-0.8.5.sha256sum] = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +SRC_URI[libc-0.2.147.sha256sum] = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +SRC_URI[lock_api-0.4.10.sha256sum] = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +SRC_URI[memchr-2.6.3.sha256sum] = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +SRC_URI[memoffset-0.9.0.sha256sum] = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +SRC_URI[num-bigint-0.4.4.sha256sum] = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +SRC_URI[num-integer-0.1.45.sha256sum] = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +SRC_URI[num-traits-0.2.16.sha256sum] = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +SRC_URI[parking_lot-0.12.1.sha256sum] = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +SRC_URI[parking_lot_core-0.9.8.sha256sum] = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +SRC_URI[percent-encoding-2.3.0.sha256sum] = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +SRC_URI[proc-macro2-1.0.69.sha256sum] = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +SRC_URI[pyo3-0.20.0.sha256sum] = "04e8453b658fe480c3e70c8ed4e3d3ec33eb74988bd186561b0cc66b85c3bc4b" +SRC_URI[pyo3-build-config-0.20.0.sha256sum] = "a96fe70b176a89cff78f2fa7b3c930081e163d5379b4dcdf993e3ae29ca662e5" +SRC_URI[pyo3-ffi-0.20.0.sha256sum] = "214929900fd25e6604661ed9cf349727c8920d47deff196c4e28165a6ef2a96b" +SRC_URI[pyo3-macros-0.20.0.sha256sum] = "dac53072f717aa1bfa4db832b39de8c875b7c7af4f4a6fe93cdbf9264cf8383b" +SRC_URI[pyo3-macros-backend-0.20.0.sha256sum] = "7774b5a8282bd4f25f803b1f0d945120be959a36c72e08e7cd031c792fdfd424" +SRC_URI[python3-dll-a-0.2.9.sha256sum] = "d5f07cd4412be8fa09a721d40007c483981bbe072cd6a21f2e83e04ec8f8343f" +SRC_URI[quote-1.0.29.sha256sum] = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +SRC_URI[redox_syscall-0.3.5.sha256sum] = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +SRC_URI[regex-1.10.2.sha256sum] = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +SRC_URI[regex-automata-0.4.3.sha256sum] = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +SRC_URI[regex-syntax-0.8.2.sha256sum] = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +SRC_URI[rustversion-1.0.13.sha256sum] = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +SRC_URI[ryu-1.0.14.sha256sum] = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +SRC_URI[scopeguard-1.1.0.sha256sum] = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +SRC_URI[serde-1.0.190.sha256sum] = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +SRC_URI[serde_derive-1.0.190.sha256sum] = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +SRC_URI[serde_json-1.0.108.sha256sum] = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +SRC_URI[smallvec-1.11.1.sha256sum] = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +SRC_URI[speedate-0.13.0.sha256sum] = "242f76c50fd18cbf098607090ade73a08d39cfd84ea835f3796a2c855223b19b" +SRC_URI[static_assertions-1.1.0.sha256sum] = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +SRC_URI[strum-0.25.0.sha256sum] = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +SRC_URI[strum_macros-0.25.3.sha256sum] = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +SRC_URI[syn-2.0.38.sha256sum] = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +SRC_URI[target-lexicon-0.12.9.sha256sum] = "df8e77cb757a61f51b947ec4a7e3646efd825b73561db1c232a8ccb639e611a0" +SRC_URI[tinyvec-1.6.0.sha256sum] = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +SRC_URI[tinyvec_macros-0.1.1.sha256sum] = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +SRC_URI[unicode-bidi-0.3.13.sha256sum] = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +SRC_URI[unicode-ident-1.0.10.sha256sum] = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +SRC_URI[unicode-normalization-0.1.22.sha256sum] = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +SRC_URI[unindent-0.2.3.sha256sum] = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" +SRC_URI[url-2.4.1.sha256sum] = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +SRC_URI[uuid-1.5.0.sha256sum] = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[windows-targets-0.48.1.sha256sum] = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +SRC_URI[windows_aarch64_gnullvm-0.48.0.sha256sum] = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +SRC_URI[windows_aarch64_msvc-0.48.0.sha256sum] = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +SRC_URI[windows_i686_gnu-0.48.0.sha256sum] = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +SRC_URI[windows_i686_msvc-0.48.0.sha256sum] = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +SRC_URI[windows_x86_64_gnu-0.48.0.sha256sum] = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +SRC_URI[windows_x86_64_gnullvm-0.48.0.sha256sum] = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +SRC_URI[windows_x86_64_msvc-0.48.0.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +SRC_URI[zerocopy-0.7.20.sha256sum] = "dd66a62464e3ffd4e37bd09950c2b9dd6c4f8767380fabba0d523f9a775bc85a" +SRC_URI[zerocopy-derive-0.7.20.sha256sum] = "255c4596d41e6916ced49cfafea18727b24d67878fa180ddfd69b9df34fd1726" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb new file mode 100644 index 0000000000..01f180c8cb --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic-core_2.14.5.bb @@ -0,0 +1,40 @@ +SUMMARY = "Provides the core functionality for pydantic validation and serialization." +DESCRIPTION = "This package provides the core functionality for \ +pydantic validation and serialization.\ +\ +Pydantic-core is currently around 17x faster than pydantic V1." +HOMEPAGE = "https://github.com/pydantic/pydantic-core" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ab599c188b4a314d2856b3a55030c75c" + +SRC_URI[sha256sum] = "6d30226dfc816dd0fdf120cae611dd2215117e4f9b124af8c60ab9093b6e8e71" + +DEPENDS = "python3-maturin-native python3-typing-extensions" + +require ${BPN}-crates.inc + +inherit pypi cargo-update-recipe-crates python_maturin + +S = "${WORKDIR}/pydantic_core-${PV}" + +PYPI_ARCHIVE_NAME = "pydantic_core-${PV}.${PYPI_PACKAGE_EXT}" + +RDEPENDS:${PN} += "python3-typing-extensions" + +INSANE_SKIP:${PN} = "already-stripped" + +inherit ptest +SRC_URI += "file://run-ptest" +RDEPENDS:${PN}-ptest += "\ + python3-dirty-equals \ + python3-hypothesis \ + python3-pytest \ + python3-pytest-mock \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + rm -rf ${D}${PTEST_PATH}/tests/benchmarks +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic/run-ptest new file mode 100644 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb deleted file mode 100644 index 3750d49a97..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.2.bb +++ /dev/null @@ -1,23 +0,0 @@ -SUMMARY = "Data validation and settings management using Python type hinting" -HOMEPAGE = "https://github.com/samuelcolvin/pydantic" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" - -inherit pypi python_hatchling - -SRC_URI[sha256sum] = "ff177ba64c6faf73d7afa2e8cad38fd456c0dbe01c9954e71038001cd15a6edd" - -DEPENDS += "python3-hatch-fancy-pypi-readme-native" - -RDEPENDS:${PN} += "\ - python3-core \ - python3-datetime \ - python3-image \ - python3-io \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-profile \ - python3-typing-extensions \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.3.bb new file mode 100644 index 0000000000..21341d26c3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pydantic_2.5.3.bb @@ -0,0 +1,53 @@ +SUMMARY = "Data validation using Python type hinting" +DESCRIPTION = "Data validation and settings management using Python \ +type hints.\ +\ +Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. \ +Define how data should be in pure, canonical Python 3.7+; validate it with \ +Pydantic." +HOMEPAGE = "https://github.com/samuelcolvin/pydantic" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=09280955509d1c4ca14bae02f21d49a6" + +inherit pypi python_hatchling + +SRC_URI[sha256sum] = "b3ef57c62535b0941697cce638c08900d87fcb67e29cfa99e8a68f747f393f7a" + +DEPENDS += "python3-hatch-fancy-pypi-readme-native" + +RDEPENDS:${PN} += "\ + python3-annotated-types \ + python3-core \ + python3-datetime \ + python3-image \ + python3-io \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-profile \ + python3-pydantic-core \ + python3-typing-extensions \ +" + +inherit ptest +SRC_URI += "file://run-ptest" +RDEPENDS:${PN}-ptest += "\ + python3-cloudpickle \ + python3-dirty-equals \ + python3-pytest \ + python3-pytest-mock \ + python3-unittest-automake-output \ +" + +do_install_ptest() { + cp -rf ${S}/tests/ ${D}${PTEST_PATH}/ + # Requires 'ruff' (python3-ruff) which we cannot build + # until we have Rust 1.71+ in oe-core + rm -f ${D}${PTEST_PATH}/tests/test_docs.py + # We are not trying to support mypy + rm -f ${D}${PTEST_PATH}/tests/test_mypy.py + # We are not trying to run benchmarks + rm -rf ${D}${PTEST_PATH}/tests/benchmarks +} + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch index 2fa3cb05d4..4c279bbcda 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify/0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch @@ -1,19 +1,20 @@ -From 9e7894b97ae7afe43a9901b774de5aef401549ac Mon Sep 17 00:00:00 2001 +From 87f1bf7d1e0ca2a841706d1c41d14382f11264db Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Thu, 28 Apr 2022 16:32:06 +0200 Subject: [PATCH] ext: define FNM_EXTMATCH if not already defined On musl this constant is not defined. Define it locally if not present. -Signed-off-by: Bartosz Golaszewski ---- Upstream-Status: Inappropriate +Signed-off-by: Bartosz Golaszewski + +--- src/ext.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ext.c b/src/ext.c -index e0bbe21..7d979d3 100644 +index fb33de1..fa01a81 100644 --- a/src/ext.c +++ b/src/ext.c @@ -19,6 +19,9 @@ @@ -24,8 +25,5 @@ index e0bbe21..7d979d3 100644 +#define FNM_EXTMATCH 0 +#endif - PyDoc_STRVAR(ext__doc__, - "Wrapper for fanotify.\n" --- -2.34.1 - + #define FUNUSED __attribute__((unused)) + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.1.bb deleted file mode 100644 index c9fd07144c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.1.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Python wrapper for Linux fanotify." -HOMEPAGE = "https://github.com/baskiton/pyfanotify" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=636a36c9df04efcfacf839b8866d9a37" - -SRC_URI += "file://0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch" -SRC_URI[sha256sum] = "fd62dccdf3c17ca117e3279f0cbc65c639e53c9dec8a459d44ed6a35c1a18e60" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-crypt \ - python3-datetime \ - python3-logging \ - python3-multiprocessing \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb new file mode 100644 index 0000000000..292ceab2e3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyfanotify_0.2.2.bb @@ -0,0 +1,17 @@ +SUMMARY = "Python wrapper for Linux fanotify." +HOMEPAGE = "https://github.com/baskiton/pyfanotify" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=636a36c9df04efcfacf839b8866d9a37" + +SRC_URI += "file://0001-ext-define-FNM_EXTMATCH-if-not-already-defined.patch" +SRC_URI[sha256sum] = "90219aa9f8b78fa732f24aa7b21c7bb6ac97a6eb47f1763c899b8194e23af1df" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-crypt \ + python3-datetime \ + python3-logging \ + python3-multiprocessing \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb deleted file mode 100644 index 8dd5e1580a..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyinotify_0.9.6.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "Python pyinotify: Linux filesystem events monitoring" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=ab173cade7965b411528464589a08382" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-ctypes \ - ${PYTHON_PN}-fcntl \ - ${PYTHON_PN}-io \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-shell \ - ${PYTHON_PN}-smtpd \ - ${PYTHON_PN}-threading \ -" - -SRC_URI[md5sum] = "8e580fa1ff3971f94a6f81672b76c406" -SRC_URI[sha256sum] = "9c998a5d7606ca835065cdabc013ae6c66eb9ea76a00a1e3bc6e0cfe2b4f71f4" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.2.bb deleted file mode 100644 index 8af74b7cba..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.2.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY="Pylint is a Python source code analyzer" -HOMEPAGE= "http://www.pylint.org/" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" - -SRC_URI += "git://github.com/pylint-dev/pylint;branch=maintenance/3.0.x;protocol=https \ - file://run-ptest \ - " -SRCREV = "efee9618894795cc8847727108522aa79431ee25" - -inherit python_setuptools_build_meta ptest - -RDEPENDS:${PN} += "${PYTHON_PN}-astroid \ - ${PYTHON_PN}-dill \ - ${PYTHON_PN}-isort \ - ${PYTHON_PN}-mccabe \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-platformdirs \ - ${PYTHON_PN}-shell \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-pkgutil \ - ${PYTHON_PN}-difflib \ - ${PYTHON_PN}-netserver \ - ${PYTHON_PN}-tomlkit \ - " - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-git \ - ${PYTHON_PN}-py \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-pytest-benchmark \ - ${PYTHON_PN}-pytest-runner \ - ${PYTHON_PN}-pytest-timeout \ - ${PYTHON_PN}-pytest-xdist \ - ${PYTHON_PN}-requests \ - ${PYTHON_PN}-statistics \ - ${PYTHON_PN}-tomllib \ - ${PYTHON_PN}-typing-extensions \ - " - -S = "${WORKDIR}/git" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep - sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.3.bb new file mode 100644 index 0000000000..09ab1f26ff --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint_3.0.3.bb @@ -0,0 +1,51 @@ +SUMMARY="Pylint is a Python source code analyzer" +HOMEPAGE= "http://www.pylint.org/" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c107cf754550e65755c42985a5d4e9c9" + +SRC_URI += "git://github.com/pylint-dev/pylint;branch=maintenance/3.0.x;protocol=https \ + file://run-ptest \ + " +SRCREV = "1a5ffc1f447b77071ffe18a9c6836c09147ee2ed" + +inherit python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "${PYTHON_PN}-astroid \ + ${PYTHON_PN}-dill \ + ${PYTHON_PN}-isort \ + ${PYTHON_PN}-mccabe \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-platformdirs \ + ${PYTHON_PN}-shell \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-pkgutil \ + ${PYTHON_PN}-difflib \ + ${PYTHON_PN}-netserver \ + ${PYTHON_PN}-tomlkit \ + " + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-git \ + ${PYTHON_PN}-py \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-pytest-benchmark \ + ${PYTHON_PN}-pytest-runner \ + ${PYTHON_PN}-pytest-timeout \ + ${PYTHON_PN}-pytest-xdist \ + ${PYTHON_PN}-requests \ + ${PYTHON_PN}-statistics \ + ${PYTHON_PN}-tomllib \ + ${PYTHON_PN}-typing-extensions \ + " + +S = "${WORKDIR}/git" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + install -Dm 0644 ${S}/tests/.pylint_primer_tests/.gitkeep ${D}${PTEST_PATH}/tests/.pylint_primer_tests/.gitkeep + sed -i 's#/usr/bin/python$#/usr/bin/python3#g' ${D}${PTEST_PATH}/tests/data/ascript +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb deleted file mode 100644 index 69c7742215..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.179.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Python API for MISP" -HOMEPAGE = "https://github.com/MISP/PyMISP" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" - -SRC_URI = "git://github.com/MISP/PyMISP.git;protocol=https;branch=main" -SRCREV = "cc6391233c01362a1b4b483c4ea8e67f306e3459" -S = "${WORKDIR}/git" - -inherit python_poetry_core - -PIP_INSTALL_PACKAGE = "pymisp" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-dateutil \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-jsonschema \ - ${PYTHON_PN}-requests \ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-deprecated \ - ${PYTHON_PN}-wrapt \ -" - -# Fixes: python3-pymisp requires /bin/bash, but no -# providers found in RDEPENDS:python3-pymisp? [file-rdep] -RDEPENDS:${PN} += "bash" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.182.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.182.bb new file mode 100644 index 0000000000..12bf6245e5 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymisp_2.4.182.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Python API for MISP" +HOMEPAGE = "https://github.com/MISP/PyMISP" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3639cf5780f71b125d3e9d1dc127c20" + +SRC_URI[sha256sum] = "888e848494e04148c8ff5887f04154a2b40f3065c53d93f9cec65f7ca7171362" + +inherit python_poetry_core pypi + +PIP_INSTALL_PACKAGE = "pymisp" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-dateutil \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-jsonschema \ + ${PYTHON_PN}-requests \ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-deprecated \ + ${PYTHON_PN}-wrapt \ +" + +# Fixes: python3-pymisp requires /bin/bash, but no +# providers found in RDEPENDS:python3-pymisp? [file-rdep] +RDEPENDS:${PN} += "bash" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.0.bb deleted file mode 100644 index 18e29a17bd..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -SUMMARY = "Python driver for MongoDB " -DESCRIPTION = "\ -The PyMongo distribution contains tools for interacting with MongoDB \ -database from Python. The bson package is an implementation of the BSON \ -format for Python. The pymongo package is a native Python driver for \ -MongoDB. The gridfs package is a gridfs implementation on top of pymongo." -HOMEPAGE = "http://github.com/mongodb/mongo-python-driver" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI[sha256sum] = "fb1c56d891f9e34303c451998ef62ba52659648bb0d75b03c5e4ac223a3342c2" - -inherit pypi setuptools3 - -PACKAGES =+ "${PYTHON_PN}-bson" - -FILES:${PYTHON_PN}-bson = "${PYTHON_SITEPACKAGES_DIR}/bson/*" - -RDEPENDS:${PYTHON_PN}-bson += " \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-bson \ - ${PYTHON_PN}-pprint \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb new file mode 100644 index 0000000000..2704637d34 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pymongo_4.6.1.bb @@ -0,0 +1,30 @@ +SUMMARY = "Python driver for MongoDB " +DESCRIPTION = "\ +The PyMongo distribution contains tools for interacting with MongoDB \ +database from Python. The bson package is an implementation of the BSON \ +format for Python. The pymongo package is a native Python driver for \ +MongoDB. The gridfs package is a gridfs implementation on top of pymongo." +HOMEPAGE = "http://github.com/mongodb/mongo-python-driver" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRC_URI[sha256sum] = "31dab1f3e1d0cdd57e8df01b645f52d43cc1b653ed3afd535d2891f4fc4f9712" + +inherit pypi setuptools3 + +PACKAGES =+ "${PYTHON_PN}-bson" + +FILES:${PYTHON_PN}-bson = "${PYTHON_SITEPACKAGES_DIR}/bson/*" + +RDEPENDS:${PYTHON_PN}-bson += " \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-threading \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-bson \ + ${PYTHON_PN}-pprint \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb new file mode 100644 index 0000000000..6b340a18ce --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.10.bb @@ -0,0 +1,40 @@ +SUMMARY = "A pure Python netlink and Linux network configuration library" +LICENSE = "GPL-2.0-or-later | Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dccbff78d7d79ae7e53953d43445c6e6 \ + file://LICENSE.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE.Apache-2.0;md5=34281e312165f843a2b7d1f114fe65ce" + +SRC_URI[sha256sum] = "cc2f90aad1517cb0b301041f678cc8d3c3427c26e53f15c78c93c67928d89a02" + +inherit setuptools3 pypi ptest + +RDEPENDS:${PN} += " \ + python3-ctypes \ + python3-io \ + python3-json \ + python3-fcntl \ + python3-logging \ + python3-multiprocessing \ + python3-pickle \ + python3-pkgutil \ + python3-pprint \ + python3-shell \ + python3-unixadmin \ +" + +SRC_URI += " \ + file://run-ptest \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-fcntl \ + python3-sqlite3 \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + sed -e "s|'test_unit|'tests/test_unit|g" -i ${D}${PTEST_PATH}/tests/test_unit/test_nlmsg/test_marshal.py \ + ${D}${PTEST_PATH}/tests/test_unit/test_iproute_match/test_match.py +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb deleted file mode 100644 index baf3cf8ede..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyroute2_0.7.9.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "A pure Python netlink and Linux network configuration library" -LICENSE = "GPL-2.0-or-later | Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=dccbff78d7d79ae7e53953d43445c6e6 \ - file://LICENSE.GPL-2.0-or-later;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LICENSE.Apache-2.0;md5=34281e312165f843a2b7d1f114fe65ce" - -SRC_URI[sha256sum] = "b69d82f140b0774317d7ba40f6c5fa1d755098ba3f3eb619982d16e750dc631a" - -inherit setuptools3 pypi ptest - -RDEPENDS:${PN} += " \ - python3-ctypes \ - python3-distutils \ - python3-io \ - python3-json \ - python3-fcntl \ - python3-logging \ - python3-multiprocessing \ - python3-pickle \ - python3-pkgutil \ - python3-pprint \ - python3-shell \ - python3-unixadmin \ -" - -SRC_URI += " \ - file://run-ptest \ -" - -RDEPENDS:${PN}-ptest += " \ - python3-pytest \ - python3-fcntl \ - python3-sqlite3 \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - sed -e "s|'test_unit|'tests/test_unit|g" -i ${D}${PTEST_PATH}/tests/test_unit/test_nlmsg/test_marshal.py \ - ${D}${PTEST_PATH}/tests/test_unit/test_iproute_match/test_match.py -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.22.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.22.0.bb deleted file mode 100644 index 8fa77ac056..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.22.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "pytest-asyncio is an Apache2 licensed library, written in Python, for testing asyncio code with pytest" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=136e4f49dbf29942c572a3a8f6e88a77" - -SRC_URI[sha256sum] = "01da1bf94ff0b969cc8d760104f7c1011903d0d658bdaef0bbae769660a7fbc4" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "python3-setuptools-scm-native" - -RDEPENDS:${PN} += " \ - python3-pytest \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.23.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.23.2.bb new file mode 100644 index 0000000000..a00778c99f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-asyncio_0.23.2.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "pytest-asyncio is an Apache2 licensed library, written in Python, for testing asyncio code with pytest" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=136e4f49dbf29942c572a3a8f6e88a77" + +SRC_URI[sha256sum] = "c16052382554c7b22d48782ab3438d5b10f8cf7a4bdcae7f0f67f097d95beecc" + +inherit pypi python_setuptools_build_meta + +DEPENDS += "python3-setuptools-scm-native" + +RDEPENDS:${PN} += " \ + python3-pytest \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_3.2.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_3.2.0.bb deleted file mode 100644 index 713a84b416..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_3.2.0.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "pytest plugin for generating html reports from test results" -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" - -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=5d425c8f3157dbf212db2ec53d9e5132" - -SRC_URI[sha256sum] = "c4e2f4bb0bffc437f51ad2174a8a3e71df81bbc2f6894604e604af18fbe687c3" - -PYPI_PACKAGE = "pytest-html" - -inherit pypi python_setuptools_build_meta - -DEPENDS += "python3-setuptools-scm-git-archive-native" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-pytest \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_4.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_4.1.1.bb new file mode 100644 index 0000000000..b9023dfcde --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pytest-html_4.1.1.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "pytest plugin for generating html reports from test results" +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" + +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=5d425c8f3157dbf212db2ec53d9e5132" + +SRC_URI[sha256sum] = "70a01e8ae5800f4a074b56a4cb1025c8f4f9b038bba5fe31e3c98eb996686f07" + +PYPI_PACKAGE = "pytest_html" + +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-pytest \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.1.bb deleted file mode 100644 index 504ef7abc0..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.1.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "PyZMQ: Python bindings for ZMQ" -DESCRIPTION = "This package contains Python bindings for ZeroMQ. ZMQ is a lightweight and fast messaging implementation." -HOMEPAGE = "http://zeromq.org/bindings:python" -LICENSE = "BSD-3-Clause & LGPL-3.0-only" -LIC_FILES_CHKSUM = "\ - file://LICENSE.BSD;md5=1787206f198344195a671b60326c59dc \ - file://LICENSE.LESSER;md5=0e99bfbdd8b9d33b0221986fe3be89ed \ -" - -DEPENDS = "python3-packaging-native python3-cython-native python3-setuptools-scm-native zeromq" - -SRC_URI:append = " \ - file://club-rpath-out.patch \ - file://run-ptest \ -" -SRC_URI[sha256sum] = "259c22485b71abacdfa8bf79720cd7bcf4b9d128b30ea554f01ae71fdbfdaa23" - -inherit pypi pkgconfig python_setuptools_build_meta ptest - -PACKAGES =+ "\ - ${PN}-test \ -" - -FILES:${PN}-test += "\ - ${libdir}/${PYTHON_DIR}/site-packages/*/tests \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-multiprocessing \ -" - -RDEPENDS:${PN}-ptest += "\ - ${PN}-test \ - ${PYTHON_PN}-pytest \ -" - -do_compile:prepend() { - echo [global] > ${S}/setup.cfg - echo zmq_prefix = ${STAGING_DIR_HOST} >> ${S}/setup.cfg - echo have_sys_un_h = True >> ${S}/setup.cfg - echo skip_check_zmq = True >> ${S}/setup.cfg - echo libzmq_extension = False >> ${S}/setup.cfg - echo no_libzmq_extension = True >> ${S}/setup.cfg -} - -do_install:append() { - sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/config.json - sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/compiler.json -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb new file mode 100644 index 0000000000..658dbe6e25 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pyzmq_25.1.2.bb @@ -0,0 +1,55 @@ +SUMMARY = "PyZMQ: Python bindings for ZMQ" +DESCRIPTION = "This package contains Python bindings for ZeroMQ. ZMQ is a lightweight and fast messaging implementation." +HOMEPAGE = "http://zeromq.org/bindings:python" +LICENSE = "BSD-3-Clause & LGPL-3.0-only" +LIC_FILES_CHKSUM = "\ + file://LICENSE.BSD;md5=1787206f198344195a671b60326c59dc \ + file://LICENSE.LESSER;md5=0e99bfbdd8b9d33b0221986fe3be89ed \ +" + +DEPENDS = "python3-packaging-native python3-cython-native python3-setuptools-scm-native zeromq" + +SRC_URI:append = " \ + file://club-rpath-out.patch \ + file://run-ptest \ +" +SRC_URI[sha256sum] = "93f1aa311e8bb912e34f004cf186407a4e90eec4f0ecc0efd26056bf7eda0226" + +inherit pypi pkgconfig python_setuptools_build_meta ptest + +PACKAGES =+ "\ + ${PN}-test \ +" + +FILES:${PN}-test += "\ + ${libdir}/${PYTHON_DIR}/site-packages/*/tests \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-multiprocessing \ +" + +RDEPENDS:${PN}-ptest += "\ + ${PN}-test \ + ${PYTHON_PN}-pytest \ +" + +do_compile:prepend() { + echo [global] > ${S}/setup.cfg + echo zmq_prefix = ${STAGING_DIR_HOST} >> ${S}/setup.cfg + echo have_sys_un_h = True >> ${S}/setup.cfg + echo skip_check_zmq = True >> ${S}/setup.cfg + echo libzmq_extension = False >> ${S}/setup.cfg + echo no_libzmq_extension = True >> ${S}/setup.cfg +} + +do_install:append() { + sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/config.json + sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${PYTHON_SITEPACKAGES_DIR}/zmq/utils/compiler.json +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/zmq/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.13.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.13.bb deleted file mode 100644 index 1623f721fc..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.13.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Python wrapper around rapidjson" -HOMEPAGE = "https://github.com/python-rapidjson/python-rapidjson" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4daf3929156304df67003c33274a98bd" - -SRC_URI = "git://github.com/python-rapidjson/python-rapidjson.git;protocol=https;branch=master" -SRCREV = "a87053d9b97750afddb504da05bd1cd9f4b94654" - -S = "${WORKDIR}/git" - -# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe -inherit setuptools3 ptest - -SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}" - -# run-ptest is a shell script that starts the test suite -SRC_URI += " \ - file://run-ptest \ -" - -DEPENDS += " \ - rapidjson \ -" - -# Adding required python package for the ptest (pytest and pytest->automake report translation) -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-unittest-automake-output \ - ${PYTHON_PN}-pytz \ -" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-core \ -" - -# Installing the test suite on the target -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb new file mode 100644 index 0000000000..8b76397bfe --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-rapidjson_1.14.bb @@ -0,0 +1,40 @@ +SUMMARY = "Python wrapper around rapidjson" +HOMEPAGE = "https://github.com/python-rapidjson/python-rapidjson" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=4daf3929156304df67003c33274a98bd" + +SRC_URI[sha256sum] = "26806f0a658c34b48d2951d8d3f846ca9deb93a34e664ef436db632a188b6779" + +# Inheriting ptest provides functionality for packaging and installing runtime tests for this recipe +inherit setuptools3 pypi ptest + +PYPI_PACKAGE = "python-rapidjson" + +SETUPTOOLS_BUILD_ARGS += " --rj-include-dir=${RECIPE_SYSROOT}${includedir}" + +# run-ptest is a shell script that starts the test suite +SRC_URI += " \ + file://run-ptest \ +" + +DEPENDS += " \ + rapidjson \ +" + +# Adding required python package for the ptest (pytest and pytest->automake report translation) +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ + ${PYTHON_PN}-pytz \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-core \ +" + +# Installing the test suite on the target +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.10.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.10.3.bb deleted file mode 100644 index c26d55f474..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.10.3.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Alternative regular expression module, to replace re." -HOMEPAGE = "https://bitbucket.org/mrabarnett/mrab-regex/src" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7b5751ddd6b643203c31ff873051d069" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "3fef4f844d2290ee0ba57addcec17eec9e3df73f10a2748485dfd6a3a188cc0f" - -RDEPENDS:${PN} += " \ - python3-stringold \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.12.25.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.12.25.bb new file mode 100644 index 0000000000..d7ac616083 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-regex_2023.12.25.bb @@ -0,0 +1,14 @@ +SUMMARY = "Alternative regular expression module, to replace re." +HOMEPAGE = "https://bitbucket.org/mrabarnett/mrab-regex/src" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7b5751ddd6b643203c31ff873051d069" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "29171aa128da69afdf4bde412d5bedc335f2ca8fcfe4489038577d05f16181e5" + +RDEPENDS:${PN} += " \ + python3-stringold \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp/0001-setup-don-t-use-setuptools-markdown.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp/0001-setup-don-t-use-setuptools-markdown.patch deleted file mode 100644 index 0ab012a982..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp/0001-setup-don-t-use-setuptools-markdown.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5a2db801c6520be296cee9cba0e0e4ffac68430c Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski -Date: Wed, 11 May 2022 15:11:19 +0200 -Subject: [PATCH] setup: don't use setuptools-markdown - -This project is deprecated and irrelevant for the functionality of -pyrlp. We don't support it in meta-python so just drop it from the -dependencies. - -Signed-off-by: Bartosz Golaszewski ---- -Upstream-Status: Pending - - setup.py | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/setup.py b/setup.py -index 1055fb1..55fca24 100755 ---- a/setup.py -+++ b/setup.py -@@ -46,13 +46,11 @@ setup( - # *IMPORTANT*: Don't manually change the version here. See README for more. - version='3.0.0', - description="A package for Recursive Length Prefix encoding and decoding", -- long_description_markdown_filename='README.md', - author="jnnk", - author_email='jnnknnj@gmail.com', - url='https://github.com/ethereum/pyrlp', - packages=find_packages(exclude=["tests", "tests.*"]), - include_package_data=True, -- setup_requires=['setuptools-markdown'], - install_requires=[ - "eth-utils>=2.0.0,<3", - ], --- -2.34.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_3.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_3.0.0.bb deleted file mode 100644 index e747ae33ba..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_3.0.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "A Python implementation of Recursive Length Prefix encoding (RLP)." -HOMEPAGE = "https://github.com/ethereum/pyrlp" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=00854fa80a84236706b11f47f23e61e7" - -SRC_URI[sha256sum] = "63b0465d2948cd9f01de449d7adfb92d207c1aef3982f20310f8009be4a507e8" -SRC_URI += "file://0001-setup-don-t-use-setuptools-markdown.patch" - -inherit pypi setuptools3 - -DEPENDS += "python3-pip-native" - -RDEPENDS:${PN} += "python3-eth-utils" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb new file mode 100644 index 0000000000..49efd09a4b --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-rlp_4.0.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "A Python implementation of Recursive Length Prefix encoding (RLP)." +HOMEPAGE = "https://github.com/ethereum/pyrlp" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=00854fa80a84236706b11f47f23e61e7" + +SRC_URI[sha256sum] = "61a5541f86e4684ab145cb849a5929d2ced8222930a570b3941cf4af16b72a78" + +inherit pypi setuptools3 + +DEPENDS += "python3-pip-native" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-eth-utils \ + ${PYTHON_PN}-typing-extensions \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.0.bb deleted file mode 100644 index 6abdad0be1..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.0.bb +++ /dev/null @@ -1,11 +0,0 @@ -SUMMARY = "Modern Python library for the systemd D-Bus" -HOMEPAGE = "https://python-sdbus.readthedocs.io/en/latest/" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e77986dc8e2ee22d44a7c863e96852ae" - -SRC_URI[sha256sum] = "f86fbadae54fea6441ec2f27dc29daf085269d66c5d9df1a4fbc9474a24b91d0" - -REQUIRED_DISTRO_FEATURES = "systemd" -DEPENDS += "systemd" - -inherit pypi setuptools3 features_check pkgconfig diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb new file mode 100644 index 0000000000..6372d3488d --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sdbus_0.11.1.bb @@ -0,0 +1,17 @@ +SUMMARY = "Modern Python library for the systemd D-Bus" +HOMEPAGE = "https://python-sdbus.readthedocs.io/en/latest/" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e77986dc8e2ee22d44a7c863e96852ae" + +SRC_URI[sha256sum] = "adb97718ce996bb308520682c50b1a13e606d65a6edb1c1967a15d2e570cb3b7" + +REQUIRED_DISTRO_FEATURES = "systemd" +DEPENDS += "systemd" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-core \ +" + +inherit pypi setuptools3 features_check pkgconfig diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb deleted file mode 100644 index 868a7e2f30..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.37.1.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "The new Python SDK for Sentry.io" -DESCRIPTION = "This is the next line of the Python SDK \ -for Sentry, intended to replace the raven package on PyPI." -HOMEPAGE = "https://github.com/getsentry/sentry-python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=03dc788d9a9486be5e6a1d99c2c1ce3a" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-urllib3 \ - ${PYTHON_PN}-core \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-logging \ - ${PYTHON_PN}-threading \ - ${PYTHON_PN}-compression \ - ${PYTHON_PN}-datetime \ -" - -SRC_URI[sha256sum] = "7cd324dd2877fdc861f75cba4242bce23a58272a6fea581fcb218bb718bd9cc5" - -PYPI_PACKAGE = "sentry-sdk" - -inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.39.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.39.1.bb new file mode 100644 index 0000000000..9f421328b9 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sentry-sdk_1.39.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "The new Python SDK for Sentry.io" +DESCRIPTION = "This is the next line of the Python SDK \ +for Sentry, intended to replace the raven package on PyPI." +HOMEPAGE = "https://github.com/getsentry/sentry-python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=03dc788d9a9486be5e6a1d99c2c1ce3a" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-urllib3 \ + ${PYTHON_PN}-core \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-logging \ + ${PYTHON_PN}-threading \ + ${PYTHON_PN}-compression \ + ${PYTHON_PN}-datetime \ +" + +SRC_URI[sha256sum] = "320a55cdf9da9097a0bead239c35b7e61f53660ef9878861824fd6d9b2eaf3b5" + +PYPI_PACKAGE = "sentry-sdk" + +inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm-git-archive_1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm-git-archive_1.1.bb deleted file mode 100644 index 2068871d93..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-setuptools-scm-git-archive_1.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "setuptools_scm plugin for git archives" -HOMEPAGE = "https://pypi.org/project/setuptools-scm-git-archive/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=838c366f69b72c5df05c96dff79b35f2" - -SRC_URI[sha256sum] = "6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "setuptools_scm_git_archive" -PYPI_SRC_URI = "https://files.pythonhosted.org/packages/7e/2c/0c15b29a1b5940250bfdc4a4f53272e35cd7cf8a34159291b6b4ec9eb291/${PYPI_ARCHIVE_NAME}" - -DEPENDS += "python3-setuptools-scm-native" -RDEPENDS:${PN} += "python3-setuptools-scm" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.23.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.23.bb deleted file mode 100644 index ce216b0164..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.23.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \ -application developers the full power and flexibility of SQL" -HOMEPAGE = "http://www.sqlalchemy.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b707d50badb798e1d897f2c8f649382d" - -SRC_URI[sha256sum] = "c1bda93cbbe4aa2aa0aa8655c5aeda505cd219ff3e8da91d1d329e143e4aff69" - -PYPI_PACKAGE = "SQLAlchemy" -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-compression \ - python3-json \ - python3-logging \ - python3-netclient \ - python3-numbers \ - python3-pickle \ - python3-profile \ - python3-threading \ - python3-typing-extensions \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.24.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.24.bb new file mode 100644 index 0000000000..91ab762eb6 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-sqlalchemy_2.0.24.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Python SQL toolkit and Object Relational Mapper that gives \ +application developers the full power and flexibility of SQL" +HOMEPAGE = "http://www.sqlalchemy.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b707d50badb798e1d897f2c8f649382d" + +SRC_URI[sha256sum] = "6db97656fd3fe3f7e5b077f12fa6adb5feb6e0b567a3e99f47ecf5f7ea0a09e3" + +PYPI_PACKAGE = "SQLAlchemy" +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-compression \ + python3-json \ + python3-logging \ + python3-netclient \ + python3-numbers \ + python3-pickle \ + python3-profile \ + python3-threading \ + python3-typing-extensions \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb index 53f8011b02..06b08e78a3 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-supervisor_4.2.5.bb @@ -17,7 +17,6 @@ RDEPENDS:${PN} = "\ python3-xmlrpc \ python3-resource \ python3-setuptools \ - python3-smtpd \ " SRC_URI += "file://supervisord.conf \ diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.3.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.3.0.bb deleted file mode 100644 index bbaefc7ec2..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.3.0.bb +++ /dev/null @@ -1,16 +0,0 @@ -SUMMARY = "ANSII Color formatting for output in terminal" -HOMEPAGE = "https://pypi.python.org/pypi/termcolor" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING.txt;md5=e5f5f7c9b280511f124dba5dda3d180e" - -inherit pypi python_setuptools_build_meta - -SRC_URI[sha256sum] = "b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a" - -DEPENDS += " \ - ${PYTHON_PN}-toml-native \ - ${PYTHON_PN}-hatch-vcs-native \ -" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.4.0.bb new file mode 100644 index 0000000000..212a293510 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-termcolor_2.4.0.bb @@ -0,0 +1,16 @@ +SUMMARY = "ANSII Color formatting for output in terminal" +HOMEPAGE = "https://pypi.python.org/pypi/termcolor" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING.txt;md5=e5f5f7c9b280511f124dba5dda3d180e" + +inherit pypi python_setuptools_build_meta + +SRC_URI[sha256sum] = "aab9e56047c8ac41ed798fa36d892a37aca6b3e9159f3e0c24bc64a9b3ac7b7a" + +DEPENDS += " \ + ${PYTHON_PN}-toml-native \ + ${PYTHON_PN}-hatch-vcs-native \ +" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.3.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.3.3.bb deleted file mode 100644 index c587422960..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.3.3.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed." -DESCRIPTION = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. \ -By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long \ -polling, WebSockets, and other applications that require a long-lived connection to each user." -HOMEPAGE = "http://www.tornadoweb.org/en/stable/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "e7d8db41c0181c80d76c982aacc442c0783a2c54d6400fe028954201a2e032fe" - -inherit pypi setuptools3 - -# Requires _compression which is currently located in misc -RDEPENDS:${PN} += " \ - python3-asyncio \ - python3-certifi \ - python3-compression \ - python3-ctypes \ - python3-email \ - python3-html \ - python3-json \ - python3-misc \ - python3-multiprocessing \ - python3-numbers \ - python3-pkgutil \ - python3-pycurl \ - python3-threading \ - python3-unittest \ -" - -RDEPENDS:${PN}-test += "python3-unittest" - -PACKAGES =+ "\ - ${PN}-test \ -" - -FILES:${PN}-test = " \ - ${libdir}/${PYTHON_DIR}/site-packages/*/test \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.bb new file mode 100644 index 0000000000..e3d0209e1a --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-tornado_6.4.bb @@ -0,0 +1,39 @@ +SUMMARY = "Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed." +DESCRIPTION = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. \ +By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long \ +polling, WebSockets, and other applications that require a long-lived connection to each user." +HOMEPAGE = "http://www.tornadoweb.org/en/stable/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "72291fa6e6bc84e626589f1c29d90a5a6d593ef5ae68052ee2ef000dfd273dee" + +inherit pypi setuptools3 + +# Requires _compression which is currently located in misc +RDEPENDS:${PN} += " \ + python3-asyncio \ + python3-certifi \ + python3-compression \ + python3-ctypes \ + python3-email \ + python3-html \ + python3-json \ + python3-misc \ + python3-multiprocessing \ + python3-numbers \ + python3-pkgutil \ + python3-pycurl \ + python3-threading \ + python3-unittest \ +" + +RDEPENDS:${PN}-test += "python3-unittest" + +PACKAGES =+ "\ + ${PN}-test \ +" + +FILES:${PN}-test = " \ + ${libdir}/${PYTHON_DIR}/site-packages/*/test \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.3.bb deleted file mode 100644 index be42c4b6f6..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.3.bb +++ /dev/null @@ -1,34 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "Automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software (alongside pytest and devpi)." -HOMEPAGE = "http://tox.readthedocs.org/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" - -SRC_URI[sha256sum] = "5039f68276461fae6a9452a3b2c7295798f00a0e92edcd9a3b78ba1a73577951" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - ${PYTHON_PN}-hatch-vcs-native \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-cachetools \ - ${PYTHON_PN}-chardet \ - ${PYTHON_PN}-colorama \ - ${PYTHON_PN}-filelock \ - ${PYTHON_PN}-packaging \ - ${PYTHON_PN}-platformdirs \ - ${PYTHON_PN}-pluggy \ - ${PYTHON_PN}-pyproject-api \ - ${PYTHON_PN}-tomli \ - ${PYTHON_PN}-virtualenv \ -" - -# Install all built-in python3 modules, as the software tested with tox might -# depend on it. Tox will attempt to install all required dependencies -# in a virtualenv using pip, but this obviously does not include the built-in modules. -RDEPENDS:${PN} += "${PYTHON_PN}-modules" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.4.bb new file mode 100644 index 0000000000..62c15a7db3 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-tox_4.11.4.bb @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "Automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software (alongside pytest and devpi)." +HOMEPAGE = "http://tox.readthedocs.org/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=11610a9d8fd95649cf8159be12b98cb7" + +SRC_URI[sha256sum] = "73a7240778fabf305aeb05ab8ea26e575e042ab5a18d71d0ed13e343a51d6ce1" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-cachetools \ + ${PYTHON_PN}-chardet \ + ${PYTHON_PN}-colorama \ + ${PYTHON_PN}-filelock \ + ${PYTHON_PN}-packaging \ + ${PYTHON_PN}-platformdirs \ + ${PYTHON_PN}-pluggy \ + ${PYTHON_PN}-pyproject-api \ + ${PYTHON_PN}-tomli \ + ${PYTHON_PN}-virtualenv \ +" + +# Install all built-in python3 modules, as the software tested with tox might +# depend on it. Tox will attempt to install all required dependencies +# in a virtualenv using pip, but this obviously does not include the built-in modules. +RDEPENDS:${PN} += "${PYTHON_PN}-modules" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.13.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.13.0.bb deleted file mode 100644 index c16c1ef0ef..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.13.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Traitlets Python config system" -HOMEPAGE = "http://ipython.org" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=13bed0ee6f46a6f6dbf1f9f9572f250a" - -SRC_URI[sha256sum] = "9b232b9430c8f57288c1024b34a8f0251ddcc47268927367a0dd3eeaca40deb5" - -inherit pypi python_hatchling - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-ipython-genutils \ - ${PYTHON_PN}-decorator \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.14.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.14.0.bb new file mode 100644 index 0000000000..19ea0113a5 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-traitlets_5.14.0.bb @@ -0,0 +1,13 @@ +SUMMARY = "Traitlets Python config system" +HOMEPAGE = "http://ipython.org" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=13bed0ee6f46a6f6dbf1f9f9572f250a" + +SRC_URI[sha256sum] = "fcdaa8ac49c04dfa0ed3ee3384ef6dfdb5d6f3741502be247279407679296772" + +inherit pypi python_hatchling + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-ipython-genutils \ + ${PYTHON_PN}-decorator \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb deleted file mode 100644 index 4042ab55f0..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_68.2.0.2.bb +++ /dev/null @@ -1,10 +0,0 @@ -SUMMARY = "Typing stubs for setuptools" -HOMEPAGE = "https://github.com/python/typeshed" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" - -inherit pypi setuptools3 - -SRC_URI[sha256sum] = "09efc380ad5c7f78e30bca1546f706469568cf26084cfab73ecf83dea1d28446" - -BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.0.bb new file mode 100644 index 0000000000..2fc1895b01 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-types-setuptools_69.0.0.0.bb @@ -0,0 +1,10 @@ +SUMMARY = "Typing stubs for setuptools" +HOMEPAGE = "https://github.com/python/typeshed" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=ef4dc1e740f5c928f1608a4a9c7b578e" + +inherit pypi setuptools3 + +SRC_URI[sha256sum] = "b0a06219f628c6527b2f8ce770a4f47550e00d3e8c3ad83e2dc31bc6e6eda95d" + +BBCLASSEXTEND = "native" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch deleted file mode 100644 index 4095fc9095..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 69adf9e32f5b11e15c0cbe17f9331c77fed65bf8 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 28 May 2022 15:50:50 -0700 -Subject: [PATCH] Deal with 64bit time_t default on 32bit architectures - -Deal with Y2K38 concerns related to Linux input events on more recent -kernels and libcs on 32-bit systems - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - libsuinput/src/suinput.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/libsuinput/src/suinput.c b/libsuinput/src/suinput.c -index 8d5fb71..13ff16a 100644 ---- a/libsuinput/src/suinput.c -+++ b/libsuinput/src/suinput.c -@@ -45,11 +45,20 @@ int suinput_emit(int uinput_fd, uint16_t ev_type, uint16_t ev_code, - struct input_event event; - - memset(&event, 0, sizeof(event)); -- gettimeofday(&event.time, 0); - event.type = ev_type; - event.code = ev_code; - event.value = ev_value; - -+/* attempt to deal with 64-bit time keeping on recent 32-bit systems */ -+#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) -+ gettimeofday(&event.time, 0); -+#else -+ struct timeval now; -+ memset(&now, 0, sizeof(now)); -+ gettimeofday(&now, 0); -+ event.input_event_sec = now.tv_sec; -+ event.input_event_usec = now.tv_usec; -+#endif - return suinput_write_event(uinput_fd, &event); - } - --- -2.36.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-setup-use-setuptools-instead-of-distutils.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-setup-use-setuptools-instead-of-distutils.patch deleted file mode 100644 index b2e1b9cd82..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput/0001-setup-use-setuptools-instead-of-distutils.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7a4dde83a9584adb42c7f810d882b1fbf5767e2c Mon Sep 17 00:00:00 2001 -From: Bartosz Golaszewski -Date: Tue, 24 May 2022 21:43:35 +0200 -Subject: [PATCH] setup: use setuptools instead of distutils - -The latter is deprecated, use setuptools instead. - -Signed-off-by: Bartosz Golaszewski ---- -Upstream-Status: Pending - - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 3fa3343..4900b8b 100644 ---- a/setup.py -+++ b/setup.py -@@ -3,7 +3,7 @@ - import errno - import subprocess - --from distutils.core import setup, Extension -+from setuptools import setup, Extension - - libudev_so = "libudev.so.1" - --- -2.34.1 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput_0.11.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput_0.11.2.bb deleted file mode 100644 index ef466539bd..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-uinput_0.11.2.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Python interface to Linux uinput kernel module." -HOMEPAGE = "https://pypi.org/project/python-uinput/" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" - -SRC_URI += "file://0001-setup-use-setuptools-instead-of-distutils.patch \ - file://0001-Deal-with-64bit-time_t-default-on-32bit-architecture.patch \ -" -SRC_URI[sha256sum] = "99392b676c77b5795b86b7d75274db33fe754fd1e06fb3d58b167c797dc47f0c" - -PYPI_PACKAGE = "python-uinput" - -inherit pypi setuptools3 - -DEPENDS += "udev" -RDEPENDS:${PN} += " \ - python3-ctypes \ - python3-distutils \ -" -RRECOMMENDS:${PN} += "kernel-module-uinput" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.8.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.8.0.bb deleted file mode 100644 index 9486435d73..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.8.0.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Ultra fast JSON encoder and decoder for Python" -DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3." - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e0039a83d8a99726b5418f0b03302d0a" - -SRC_URI[sha256sum] = "78e318def4ade898a461b3d92a79f9441e7e0e4d2ad5419abed4336d702c7425" - -inherit pypi ptest setuptools3 - -SRC_URI += " \ - file://run-ptest \ - file://0001-setup.py-Do-not-strip-debugging-symbols.patch \ -" - -DEPENDS += "${PYTHON_PN}-setuptools-scm-native" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-numbers \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-json \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-pytz \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb new file mode 100644 index 0000000000..8de9b030dd --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-ujson_5.9.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Ultra fast JSON encoder and decoder for Python" +DESCRIPTION = "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3." + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=e0039a83d8a99726b5418f0b03302d0a" + +SRC_URI[sha256sum] = "89cc92e73d5501b8a7f48575eeb14ad27156ad092c2e9fc7e3cf949f07e75532" + +inherit pypi ptest setuptools3 + +SRC_URI += " \ + file://run-ptest \ + file://0001-setup.py-Do-not-strip-debugging-symbols.patch \ +" + +DEPENDS += "${PYTHON_PN}-setuptools-scm-native" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-numbers \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-json \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-pytz \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-unoconv_0.9.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-unoconv_0.9.0.bb index 3c944b4f2c..be1dab476c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-unoconv_0.9.0.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-unoconv_0.9.0.bb @@ -11,7 +11,7 @@ inherit pypi setuptools3 PYPI_PACKAGE="unoconv" RDEPENDS:${PN} += "\ - ${PYTHON_PN}-distutils \ + ${PYTHON_PN}-setuptools \ ${PYTHON_PN}-core \ ${PYTHON_PN}-shell \ " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb new file mode 100644 index 0000000000..4499edb216 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_0.4.7.bb @@ -0,0 +1,19 @@ +SUMMARY = "A pure-python library for embedding CoSWID data" +HOMEPAGE = "https://github.com/hughsie/python-uswid" +SECTION = "devel/python" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88" + +SRC_URI[sha256sum] = "de15c2421bedaa5f54606558700c1f628f07d73da49ec69d1888214ac52c49e6" + +inherit setuptools3 python3native pypi + +DEPENDS += " python3-cbor2 python3-lxml python3-pefile" +RDEPENDS:${PN} += " \ + python3-cbor2 \ + python3-json \ + python3-lxml \ + python3-netclient \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_git.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_git.bb deleted file mode 100644 index 40adc34c10..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-uswid_git.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "A pure-python library for embedding CoSWID data" -HOMEPAGE = "https://github.com/hughsie/python-uswid" -SECTION = "devel/python" -LICENSE = "LGPL-2.1-or-later" - -DEPENDS += " python3-cbor2 python3-lxml python3-pefile" -RDEPENDS:${PN} += " \ - python3-cbor2 \ - python3-json \ - python3-lxml \ - python3-netclient \ -" -LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88" - -SRC_URI = "git://github.com/hughsie/python-uswid.git;branch=main;protocol=https" -SRCREV = "3223034abef88ae29cf79fdc7fe11ec7e21e11ff" -S = "${WORKDIR}/git" - -inherit setuptools3 python3native - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb deleted file mode 100644 index a4e5607e7e..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.24.7.bb +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: MIT -# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors - -SUMMARY = "A tool for creating isolated virtual python environments." -HOMEPAGE = "https://github.com/pypa/virtualenv" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" - -SRC_URI[sha256sum] = "69050ffb42419c91f6c1284a7b24e0475d793447e35929b488bf6a0aade39353" - -BBCLASSEXTEND = "native nativesdk" -inherit pypi python_hatchling - -DEPENDS += "\ - ${PYTHON_PN}-hatch-vcs-native \ -" - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-distlib \ - ${PYTHON_PN}-filelock \ - ${PYTHON_PN}-platformdirs \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb new file mode 100644 index 0000000000..0a9ba59452 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-virtualenv_20.25.0.bb @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT +# Copyright (C) 2023 iris-GmbH infrared & intelligent sensors + +SUMMARY = "A tool for creating isolated virtual python environments." +HOMEPAGE = "https://github.com/pypa/virtualenv" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" + +SRC_URI[sha256sum] = "bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b" + +BBCLASSEXTEND = "native nativesdk" +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-hatch-vcs-native \ +" + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-distlib \ + ${PYTHON_PN}-filelock \ + ${PYTHON_PN}-platformdirs \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.11.3.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.11.3.bb deleted file mode 100644 index 2c7aca9ba9..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.11.3.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "A Python library for interacting with Ethereum." -HOMEPAGE = "https://github.com/ethereum/web3.py" -SECTION = "devel/python" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=373fede350846fdffd23648fba504635" - -SRC_URI[sha256sum] = "f9bec9d2339bf649fe25293435a5c897a4b035aa96d6c33670ed467acf59dbe7" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - python3-aiohttp \ - python3-distutils \ - python3-eth-account \ - python3-idna \ - python3-jsonschema \ - python3-google-api-core \ - python3-lru-dict \ - python3-requests \ - python3-setuptools \ - python3-websockets \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.13.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.13.0.bb new file mode 100644 index 0000000000..0f0682fca4 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-web3_6.13.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "A Python library for interacting with Ethereum." +HOMEPAGE = "https://github.com/ethereum/web3.py" +SECTION = "devel/python" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=373fede350846fdffd23648fba504635" + +SRC_URI[sha256sum] = "769ab3cfffea69c6b495c63a1aecdb522651c0304260fc25467a886d0be622e2" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + python3-aiohttp \ + python3-eth-account \ + python3-idna \ + python3-jsonschema \ + python3-google-api-core \ + python3-lru-dict \ + python3-requests \ + python3-setuptools \ + python3-websockets \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.6.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.6.4.bb deleted file mode 100644 index 961cdb916c..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.6.4.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "websocket client for python" -DESCRIPTION = "\ -websocket-client module is WebSocket client for python. \ -This provide the low level APIs for WebSocket. All APIs \ -are the synchronous functions." -HOMEPAGE = "https://github.com/websocket-client/websocket-client" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6eae3bb7247ccb2c3a087ea8de759c01" - -SRC_URI[sha256sum] = "b3324019b3c28572086c4a319f91d1dcd44e6e11cd340232978c684a7650d0df" - -inherit pypi setuptools3 - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-six \ - ${PYTHON_PN}-logging \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.7.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.7.0.bb new file mode 100644 index 0000000000..b202d68552 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-websocket-client_1.7.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "websocket client for python" +DESCRIPTION = "\ +websocket-client module is WebSocket client for python. \ +This provide the low level APIs for WebSocket. All APIs \ +are the synchronous functions." +HOMEPAGE = "https://github.com/websocket-client/websocket-client" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6eae3bb7247ccb2c3a087ea8de759c01" + +SRC_URI[sha256sum] = "10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6" + +inherit pypi setuptools3 + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-six \ + ${PYTHON_PN}-logging \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wpa-supplicant_0.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-wpa-supplicant_0.2.bb index 5ac7786ad3..b9c62ced78 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-wpa-supplicant_0.2.bb +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-wpa-supplicant_0.2.bb @@ -10,6 +10,8 @@ SRC_URI[sha256sum] = "3ad0f40a696763bb0f4d4dec5b51f6b53ccfeb7c16ebb5897349303045 SRC_URI += "file://0001-cli-drop-the-second-argument-from-click.argument-dec.patch" PYPI_PACKAGE = "wpa_supplicant" +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/wpa_supplicant" +UPSTREAM_CHECK_REGEX = "/wpa_supplicant/(?P(\d+[\.\-_]*)+)" inherit pypi setuptools3 diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.0.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.0.1.bb deleted file mode 100644 index 36a0191dc9..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.0.1.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "A flexible forms validation and rendering library for python web development." -HOMEPAGE = "https://pypi.python.org/pypi/WTForms" -SECTION = "devel/python" -LICENSE = "BSD-3-Clause" - -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=53dbfa56f61b90215a9f8f0d527c043d" - -SRC_URI[sha256sum] = "6b351bbb12dd58af57ffef05bc78425d08d1914e0fd68ee14143b7ade023c5bc" - -PYPI_PACKAGE = "WTForms" - -inherit pypi setuptools3 - -DEPENDS += "\ - ${PYTHON_PN}-pip-native \ - ${PYTHON_PN}-babel-native \ - " - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-netserver \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-markupsafe \ - " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.1.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.1.1.bb new file mode 100644 index 0000000000..b57c311002 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-wtforms_3.1.1.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "A flexible forms validation and rendering library for python web development." +HOMEPAGE = "https://pypi.python.org/pypi/WTForms" +SECTION = "devel/python" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=17ed54aa95f4a6cd0d7a4747d14b64d0" + +SRC_URI[sha256sum] = "5e51df8af9a60f6beead75efa10975e97768825a82146a65c7cbf5b915990620" + +UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/WTForms" +UPSTREAM_CHECK_REGEX = "/WTForms/(?P(\d+[\.\-_]*)+)" + +inherit pypi python_hatchling + +DEPENDS += "\ + ${PYTHON_PN}-pip-native \ + ${PYTHON_PN}-babel-native \ + " + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-netserver \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-markupsafe \ + " diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.1.bb deleted file mode 100644 index 9be7cb5551..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.3.1.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "The xmlschema library is an implementation of XML Schema for Python (supports Python 3.6+)." -HOMEPAGE = "https://github.com/sissaschool/xmlschema" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0ab20f8e337bea2e6874f372edfd12c0" - -SRC_URI[sha256sum] = "2eb426c5710833a05610c22c8766713a1b87e9405e3eca0b7c658375bf7ec810" - -PYPI_PACKAGE = "xmlschema" -inherit pypi setuptools3 - -DEPENDS += "\ - ${PYTHON_PN}-elementpath-native \ -" - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-elementpath \ - ${PYTHON_PN}-modules \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.5.1.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.5.1.bb new file mode 100644 index 0000000000..19fae91315 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-xmlschema_2.5.1.bb @@ -0,0 +1,20 @@ +SUMMARY = "The xmlschema library is an implementation of XML Schema for Python (supports Python 3.6+)." +HOMEPAGE = "https://github.com/sissaschool/xmlschema" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0ab20f8e337bea2e6874f372edfd12c0" + +SRC_URI[sha256sum] = "4f7497de6c8b6dc2c28ad7b9ed6e21d186f4afe248a5bea4f54eedab4da44083" + +PYPI_PACKAGE = "xmlschema" +inherit pypi setuptools3 + +DEPENDS += "\ + ${PYTHON_PN}-elementpath-native \ +" + +RDEPENDS:${PN} += "\ + ${PYTHON_PN}-elementpath \ + ${PYTHON_PN}-modules \ +" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch deleted file mode 100644 index 476db4b7d0..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-Fix-imports-for-ptests.patch +++ /dev/null @@ -1,3895 +0,0 @@ -From 0dedc1c573ddc4e87475eb03c64555cd54a72e92 Mon Sep 17 00:00:00 2001 -From: Trevor Gamblin -Date: Mon, 7 Jun 2021 09:40:20 -0400 -Subject: [PATCH] Fix imports for tests - -Signed-off-by: Trevor Gamblin ---- -Upstream-Status: Pending - - tests/test_asyncio.py | 2 +- - tests/test_asyncio_context_vars.py | 2 +- - tests/test_functionality.py | 2 +- - tests/test_hooks.py | 2 +- - tests/test_tags.py | 2 +- - 5 files changed, 6 insertions(+), 6 deletions(-) - ---- a/tests/test_asyncio.py -+++ b/tests/test_asyncio.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import asyncio - import threading --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - async def async_sleep(sec): ---- a/tests/test_asyncio_context_vars.py -+++ b/tests/test_asyncio_context_vars.py -@@ -5,7 +5,7 @@ import contextvars - import functools - import time - import os --import utils -+import tests.utils as utils - import yappi - - async_context_id = contextvars.ContextVar('async_context_id') ---- a/tests/test_functionality.py -+++ b/tests/test_functionality.py -@@ -1,1916 +1,1916 @@ --import os --import sys --import time --import threading --import unittest --import yappi --import _yappi --import utils --import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 --import subprocess -- --_counter = 0 -- -- --class BasicUsage(utils.YappiUnitTestCase): -- -- def test_callback_function_int_return_overflow(self): -- # this test is just here to check if any errors are generated, as the err -- # is printed in C side, I did not include it here. THere are ways to test -- # this deterministically, I did not bother -- import ctypes -- -- def _unsigned_overflow_margin(): -- return 2**(ctypes.sizeof(ctypes.c_void_p) * 8) - 1 -- -- def foo(): -- pass -- -- #with utils.captured_output() as (out, err): -- yappi.set_context_id_callback(_unsigned_overflow_margin) -- yappi.set_tag_callback(_unsigned_overflow_margin) -- yappi.start() -- foo() -- -- def test_issue60(self): -- -- def foo(): -- buf = bytearray() -- buf += b't' * 200 -- view = memoryview(buf)[10:] -- view = view.tobytes() -- del buf[:10] # this throws exception -- return view -- -- yappi.start(builtins=True) -- foo() -- self.assertTrue( -- len( -- yappi.get_func_stats( -- filter_callback=lambda x: yappi. -- func_matches(x, [memoryview.tobytes]) -- ) -- ) > 0 -- ) -- yappi.stop() -- -- def test_issue54(self): -- -- def _tag_cbk(): -- global _counter -- _counter += 1 -- return _counter -- -- def a(): -- pass -- -- def b(): -- pass -- -- yappi.set_tag_callback(_tag_cbk) -- yappi.start() -- a() -- a() -- a() -- yappi.stop() -- stats = yappi.get_func_stats() -- self.assertEqual(stats.pop().ncall, 3) # aggregated if no tag is given -- stats = yappi.get_func_stats(tag=1) -- -- for i in range(1, 3): -- stats = yappi.get_func_stats(tag=i) -- stats = yappi.get_func_stats( -- tag=i, filter_callback=lambda x: yappi.func_matches(x, [a]) -- ) -- -- stat = stats.pop() -- self.assertEqual(stat.ncall, 1) -- -- yappi.set_tag_callback(None) -- yappi.clear_stats() -- yappi.start() -- b() -- b() -- stats = yappi.get_func_stats() -- self.assertEqual(len(stats), 1) -- stat = stats.pop() -- self.assertEqual(stat.ncall, 2) -- -- def test_filter(self): -- -- def a(): -- pass -- -- def b(): -- a() -- -- def c(): -- b() -- -- _TCOUNT = 5 -- -- ts = [] -- yappi.start() -- for i in range(_TCOUNT): -- t = threading.Thread(target=c) -- t.start() -- ts.append(t) -- -- for t in ts: -- t.join() -- -- yappi.stop() -- -- ctx_ids = [] -- for tstat in yappi.get_thread_stats(): -- if tstat.name == '_MainThread': -- main_ctx_id = tstat.id -- else: -- ctx_ids.append(tstat.id) -- -- fstats = yappi.get_func_stats(filter={"ctx_id": 9}) -- self.assertTrue(fstats.empty()) -- fstats = yappi.get_func_stats( -- filter={ -- "ctx_id": main_ctx_id, -- "name": "c" -- } -- ) # main thread -- self.assertTrue(fstats.empty()) -- -- for i in ctx_ids: -- fstats = yappi.get_func_stats( -- filter={ -- "ctx_id": i, -- "name": "a", -- "ncall": 1 -- } -- ) -- self.assertEqual(fstats.pop().ncall, 1) -- fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "b"}) -- self.assertEqual(fstats.pop().ncall, 1) -- fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "c"}) -- self.assertEqual(fstats.pop().ncall, 1) -- -- yappi.clear_stats() -- yappi.start(builtins=True) -- time.sleep(0.1) -- yappi.stop() -- fstats = yappi.get_func_stats(filter={"module": "time"}) -- self.assertEqual(len(fstats), 1) -- -- # invalid filters` -- self.assertRaises( -- Exception, yappi.get_func_stats, filter={'tag': "sss"} -- ) -- self.assertRaises( -- Exception, yappi.get_func_stats, filter={'ctx_id': "None"} -- ) -- -- def test_filter_callback(self): -- -- def a(): -- time.sleep(0.1) -- -- def b(): -- a() -- -- def c(): -- pass -- -- def d(): -- pass -- -- yappi.set_clock_type("wall") -- yappi.start(builtins=True) -- a() -- b() -- c() -- d() -- stats = yappi.get_func_stats( -- filter_callback=lambda x: yappi.func_matches(x, [a, b]) -- ) -- #stats.print_all() -- r1 = ''' -- tests/test_functionality.py:98 a 2 0.000000 0.200350 0.100175 -- tests/test_functionality.py:101 b 1 0.000000 0.120000 0.100197 -- ''' -- self.assert_traces_almost_equal(r1, stats) -- self.assertEqual(len(stats), 2) -- stats = yappi.get_func_stats( -- filter_callback=lambda x: yappi. -- module_matches(x, [sys.modules[__name__]]) -- ) -- r1 = ''' -- tests/test_functionality.py:98 a 2 0.000000 0.230130 0.115065 -- tests/test_functionality.py:101 b 1 0.000000 0.120000 0.109011 -- tests/test_functionality.py:104 c 1 0.000000 0.000002 0.000002 -- tests/test_functionality.py:107 d 1 0.000000 0.000001 0.000001 -- ''' -- self.assert_traces_almost_equal(r1, stats) -- self.assertEqual(len(stats), 4) -- -- stats = yappi.get_func_stats( -- filter_callback=lambda x: yappi.func_matches(x, [time.sleep]) -- ) -- self.assertEqual(len(stats), 1) -- r1 = ''' -- time.sleep 2 0.206804 0.220000 0.103402 -- ''' -- self.assert_traces_almost_equal(r1, stats) -- -- def test_print_formatting(self): -- -- def a(): -- pass -- -- def b(): -- a() -- -- func_cols = { -- 1: ("name", 48), -- 0: ("ncall", 5), -- 2: ("tsub", 8), -- } -- thread_cols = { -- 1: ("name", 48), -- 0: ("ttot", 8), -- } -- -- yappi.start() -- a() -- b() -- yappi.stop() -- fs = yappi.get_func_stats() -- cs = fs[1].children -- ts = yappi.get_thread_stats() -- #fs.print_all(out=sys.stderr, columns={1:("name", 70), }) -- #cs.print_all(out=sys.stderr, columns=func_cols) -- #ts.print_all(out=sys.stderr, columns=thread_cols) -- #cs.print_all(out=sys.stderr, columns={}) -- -- self.assertRaises( -- yappi.YappiError, fs.print_all, columns={1: ("namee", 9)} -- ) -- self.assertRaises( -- yappi.YappiError, cs.print_all, columns={1: ("dd", 0)} -- ) -- self.assertRaises( -- yappi.YappiError, ts.print_all, columns={1: ("tidd", 0)} -- ) -- -- def test_get_clock(self): -- yappi.set_clock_type('cpu') -- self.assertEqual('cpu', yappi.get_clock_type()) -- clock_info = yappi.get_clock_info() -- self.assertTrue('api' in clock_info) -- self.assertTrue('resolution' in clock_info) -- -- yappi.set_clock_type('wall') -- self.assertEqual('wall', yappi.get_clock_type()) -- -- t0 = yappi.get_clock_time() -- time.sleep(0.1) -- duration = yappi.get_clock_time() - t0 -- self.assertTrue(0.05 < duration < 0.3) -- -- def test_profile_decorator(self): -- -- def aggregate(func, stats): -- fname = "tests/%s.profile" % (func.__name__) -- try: -- stats.add(fname) -- except IOError: -- pass -- stats.save(fname) -- raise Exception("messing around") -- -- @yappi.profile(return_callback=aggregate) -- def a(x, y): -- if x + y == 25: -- raise Exception("") -- return x + y -- -- def b(): -- pass -- -- try: -- os.remove( -- "tests/a.profile" -- ) # remove the one from prev test, if available -- except: -- pass -- -- # global profile is on to mess things up -- yappi.start() -- b() -- -- # assert functionality and call function at same time -- try: -- self.assertEqual(a(1, 2), 3) -- except: -- pass -- try: -- self.assertEqual(a(2, 5), 7) -- except: -- pass -- try: -- a(4, 21) -- except: -- pass -- stats = yappi.get_func_stats().add("tests/a.profile") -- fsa = utils.find_stat_by_name(stats, 'a') -- self.assertEqual(fsa.ncall, 3) -- self.assertEqual(len(stats), 1) # b() should be cleared out. -- -- @yappi.profile(return_callback=aggregate) -- def count_down_rec(n): -- if n == 0: -- return -- count_down_rec(n - 1) -- -- try: -- os.remove( -- "tests/count_down_rec.profile" -- ) # remove the one from prev test, if available -- except: -- pass -- -- try: -- count_down_rec(4) -- except: -- pass -- try: -- count_down_rec(3) -- except: -- pass -- -- stats = yappi.YFuncStats("tests/count_down_rec.profile") -- fsrec = utils.find_stat_by_name(stats, 'count_down_rec') -- self.assertEqual(fsrec.ncall, 9) -- self.assertEqual(fsrec.nactualcall, 2) -- -- def test_strip_dirs(self): -- -- def a(): -- pass -- -- stats = utils.run_and_get_func_stats(a, ) -- stats.strip_dirs() -- fsa = utils.find_stat_by_name(stats, "a") -- self.assertEqual(fsa.module, os.path.basename(fsa.module)) -- -- @unittest.skipIf(os.name == "nt", "do not run on Windows") -- def test_run_as_script(self): -- import re -- p = subprocess.Popen( -- ['yappi', os.path.join('./tests', 'run_as_script.py')], -- stdout=subprocess.PIPE -- ) -- out, err = p.communicate() -- self.assertEqual(p.returncode, 0) -- func_stats, thread_stats = re.split( -- b'name\\s+id\\s+tid\\s+ttot\\s+scnt\\s*\n', out -- ) -- self.assertTrue(b'FancyThread' in thread_stats) -- -- def test_yappi_overhead(self): -- LOOP_COUNT = 100000 -- -- def a(): -- pass -- -- def b(): -- for i in range(LOOP_COUNT): -- a() -- -- t0 = time.time() -- yappi.start() -- b() -- yappi.stop() -- time_with_yappi = time.time() - t0 -- t0 = time.time() -- b() -- time_without_yappi = time.time() - t0 -- if time_without_yappi == 0: -- time_without_yappi = 0.000001 -- -- # in latest v0.82, I calculated this as close to "7.0" in my machine. -- # however, %83 of this overhead is coming from tickcount(). The other %17 -- # seems to have been evenly distributed to the internal bookkeeping -- # structures/algorithms which seems acceptable. Note that our test only -- # tests one function being profiled at-a-time in a short interval. -- # profiling high number of functions in a small time -- # is a different beast, (which is pretty unlikely in most applications) -- # So as a conclusion: I cannot see any optimization window for Yappi that -- # is worth implementing as we will only optimize %17 of the time. -- sys.stderr.write("\r\nYappi puts %0.1f times overhead to the profiled application in average.\r\n" % \ -- (time_with_yappi / time_without_yappi)) -- -- def test_clear_stats_while_running(self): -- -- def a(): -- pass -- -- yappi.start() -- a() -- yappi.clear_stats() -- a() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- self.assertEqual(fsa.ncall, 1) -- -- def test_generator(self): -- -- def _gen(n): -- while (n > 0): -- yield n -- n -= 1 -- -- yappi.start() -- for x in _gen(5): -- pass -- self.assertTrue( -- yappi.convert2pstats(yappi.get_func_stats()) is not None -- ) -- -- def test_slice_child_stats_and_strip_dirs(self): -- -- def b(): -- for i in range(10000000): -- pass -- -- def a(): -- b() -- -- yappi.start(builtins=True) -- a() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- self.assertTrue(fsa.children[0:1] is not None) -- prev_afullname = fsa.full_name -- prev_bchildfullname = fsa.children[fsb].full_name -- stats.strip_dirs() -- self.assertTrue(len(prev_afullname) > len(fsa.full_name)) -- self.assertTrue( -- len(prev_bchildfullname) > len(fsa.children[fsb].full_name) -- ) -- -- def test_children_stat_functions(self): -- _timings = {"a_1": 5, "b_1": 3, "c_1": 1} -- _yappi._set_test_timings(_timings) -- -- def b(): -- pass -- -- def c(): -- pass -- -- def a(): -- b() -- c() -- -- yappi.start() -- a() -- b() # non-child call -- c() # non-child call -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- childs_of_a = fsa.children.get().sort("tavg", "desc") -- prev_item = None -- for item in childs_of_a: -- if prev_item: -- self.assertTrue(prev_item.tavg > item.tavg) -- prev_item = item -- childs_of_a.sort("name", "desc") -- prev_item = None -- for item in childs_of_a: -- if prev_item: -- self.assertTrue(prev_item.name > item.name) -- prev_item = item -- childs_of_a.clear() -- self.assertTrue(childs_of_a.empty()) -- -- def test_no_stats_different_clock_type_load(self): -- -- def a(): -- pass -- -- yappi.start() -- a() -- yappi.stop() -- yappi.get_func_stats().save("tests/ystats1.ys") -- yappi.clear_stats() -- yappi.set_clock_type("WALL") -- yappi.start() -- yappi.stop() -- stats = yappi.get_func_stats().add("tests/ystats1.ys") -- fsa = utils.find_stat_by_name(stats, 'a') -- self.assertTrue(fsa is not None) -- -- def test_subsequent_profile(self): -- _timings = {"a_1": 1, "b_1": 1} -- _yappi._set_test_timings(_timings) -- -- def a(): -- pass -- -- def b(): -- pass -- -- yappi.start() -- a() -- yappi.stop() -- yappi.start() -- b() -- yappi.stop() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- self.assertTrue(fsa is not None) -- self.assertTrue(fsb is not None) -- self.assertEqual(fsa.ttot, 1) -- self.assertEqual(fsb.ttot, 1) -- -- def test_lambda(self): -- f = lambda: time.sleep(0.3) -- yappi.set_clock_type("wall") -- yappi.start() -- f() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, '') -- self.assertTrue(fsa.ttot > 0.1) -- -- def test_module_stress(self): -- self.assertEqual(yappi.is_running(), False) -- -- yappi.start() -- yappi.clear_stats() -- self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") -- -- yappi.stop() -- yappi.clear_stats() -- yappi.set_clock_type("cpu") -- self.assertRaises(yappi.YappiError, yappi.set_clock_type, "dummy") -- self.assertEqual(yappi.is_running(), False) -- yappi.clear_stats() -- yappi.clear_stats() -- -- def test_stat_sorting(self): -- _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- b() -- -- def b(): -- if self._ncall == 2: -- return -- self._ncall += 1 -- a() -- -- stats = utils.run_and_get_func_stats(a) -- stats = stats.sort("totaltime", "desc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.ttot >= stat.ttot) -- prev_stat = stat -- stats = stats.sort("totaltime", "asc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.ttot <= stat.ttot) -- prev_stat = stat -- stats = stats.sort("avgtime", "asc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.tavg <= stat.tavg) -- prev_stat = stat -- stats = stats.sort("name", "asc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.name <= stat.name) -- prev_stat = stat -- stats = stats.sort("subtime", "asc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.tsub <= stat.tsub) -- prev_stat = stat -- -- self.assertRaises( -- yappi.YappiError, stats.sort, "invalid_func_sorttype_arg" -- ) -- self.assertRaises( -- yappi.YappiError, stats.sort, "totaltime", -- "invalid_func_sortorder_arg" -- ) -- -- def test_start_flags(self): -- self.assertEqual(_yappi._get_start_flags(), None) -- yappi.start() -- -- def a(): -- pass -- -- a() -- self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) -- self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) -- self.assertEqual(len(yappi.get_thread_stats()), 1) -- -- def test_builtin_profiling(self): -- -- def a(): -- time.sleep(0.4) # is a builtin function -- -- yappi.set_clock_type('wall') -- -- yappi.start(builtins=True) -- a() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'sleep') -- self.assertTrue(fsa is not None) -- self.assertTrue(fsa.ttot > 0.3) -- yappi.stop() -- yappi.clear_stats() -- -- def a(): -- pass -- -- yappi.start() -- t = threading.Thread(target=a) -- t.start() -- t.join() -- stats = yappi.get_func_stats() -- -- def test_singlethread_profiling(self): -- yappi.set_clock_type('wall') -- -- def a(): -- time.sleep(0.2) -- -- class Worker1(threading.Thread): -- -- def a(self): -- time.sleep(0.3) -- -- def run(self): -- self.a() -- -- yappi.start(profile_threads=False) -- -- c = Worker1() -- c.start() -- c.join() -- a() -- stats = yappi.get_func_stats() -- fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') -- fsa2 = utils.find_stat_by_name(stats, 'a') -- self.assertTrue(fsa1 is None) -- self.assertTrue(fsa2 is not None) -- self.assertTrue(fsa2.ttot > 0.1) -- -- def test_run(self): -- -- def profiled(): -- pass -- -- yappi.clear_stats() -- try: -- with yappi.run(): -- profiled() -- stats = yappi.get_func_stats() -- finally: -- yappi.clear_stats() -- -- self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) -- -- def test_run_recursive(self): -- -- def profiled(): -- pass -- -- def not_profiled(): -- pass -- -- yappi.clear_stats() -- try: -- with yappi.run(): -- with yappi.run(): -- profiled() -- # Profiling stopped here -- not_profiled() -- stats = yappi.get_func_stats() -- finally: -- yappi.clear_stats() -- -- self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) -- self.assertIsNone(utils.find_stat_by_name(stats, 'not_profiled')) -- -- --class StatSaveScenarios(utils.YappiUnitTestCase): -- -- def test_pstats_conversion(self): -- -- def pstat_id(fs): -- return (fs.module, fs.lineno, fs.name) -- -- def a(): -- d() -- -- def b(): -- d() -- -- def c(): -- pass -- -- def d(): -- pass -- -- _timings = {"a_1": 12, "b_1": 7, "c_1": 5, "d_1": 2} -- _yappi._set_test_timings(_timings) -- stats = utils.run_and_get_func_stats(a, ) -- stats.strip_dirs() -- stats.save("tests/a1.pstats", type="pstat") -- fsa_pid = pstat_id(utils.find_stat_by_name(stats, "a")) -- fsd_pid = pstat_id(utils.find_stat_by_name(stats, "d")) -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- stats = utils.run_and_get_func_stats(a, ) -- stats.strip_dirs() -- stats.save("tests/a2.pstats", type="pstat") -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- stats = utils.run_and_get_func_stats(b, ) -- stats.strip_dirs() -- stats.save("tests/b1.pstats", type="pstat") -- fsb_pid = pstat_id(utils.find_stat_by_name(stats, "b")) -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- stats = utils.run_and_get_func_stats(c, ) -- stats.strip_dirs() -- stats.save("tests/c1.pstats", type="pstat") -- fsc_pid = pstat_id(utils.find_stat_by_name(stats, "c")) -- -- # merge saved stats and check pstats values are correct -- import pstats -- p = pstats.Stats( -- 'tests/a1.pstats', 'tests/a2.pstats', 'tests/b1.pstats', -- 'tests/c1.pstats' -- ) -- p.strip_dirs() -- # ct = ttot, tt = tsub -- (cc, nc, tt, ct, callers) = p.stats[fsa_pid] -- self.assertEqual(cc, nc, 2) -- self.assertEqual(tt, 20) -- self.assertEqual(ct, 24) -- (cc, nc, tt, ct, callers) = p.stats[fsd_pid] -- self.assertEqual(cc, nc, 3) -- self.assertEqual(tt, 6) -- self.assertEqual(ct, 6) -- self.assertEqual(len(callers), 2) -- (cc, nc, tt, ct) = callers[fsa_pid] -- self.assertEqual(cc, nc, 2) -- self.assertEqual(tt, 4) -- self.assertEqual(ct, 4) -- (cc, nc, tt, ct) = callers[fsb_pid] -- self.assertEqual(cc, nc, 1) -- self.assertEqual(tt, 2) -- self.assertEqual(ct, 2) -- -- def test_merge_stats(self): -- _timings = { -- "a_1": 15, -- "b_1": 14, -- "c_1": 12, -- "d_1": 10, -- "e_1": 9, -- "f_1": 7, -- "g_1": 6, -- "h_1": 5, -- "i_1": 1 -- } -- _yappi._set_test_timings(_timings) -- -- def a(): -- b() -- -- def b(): -- c() -- -- def c(): -- d() -- -- def d(): -- e() -- -- def e(): -- f() -- -- def f(): -- g() -- -- def g(): -- h() -- -- def h(): -- i() -- -- def i(): -- pass -- -- yappi.start() -- a() -- a() -- yappi.stop() -- stats = yappi.get_func_stats() -- self.assertRaises( -- NotImplementedError, stats.save, "", "INVALID_SAVE_TYPE" -- ) -- stats.save("tests/ystats2.ys") -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- yappi.start() -- a() -- stats = yappi.get_func_stats().add("tests/ystats2.ys") -- fsa = utils.find_stat_by_name(stats, "a") -- fsb = utils.find_stat_by_name(stats, "b") -- fsc = utils.find_stat_by_name(stats, "c") -- fsd = utils.find_stat_by_name(stats, "d") -- fse = utils.find_stat_by_name(stats, "e") -- fsf = utils.find_stat_by_name(stats, "f") -- fsg = utils.find_stat_by_name(stats, "g") -- fsh = utils.find_stat_by_name(stats, "h") -- fsi = utils.find_stat_by_name(stats, "i") -- self.assertEqual(fsa.ttot, 45) -- self.assertEqual(fsa.ncall, 3) -- self.assertEqual(fsa.nactualcall, 3) -- self.assertEqual(fsa.tsub, 3) -- self.assertEqual(fsa.children[fsb].ttot, fsb.ttot) -- self.assertEqual(fsa.children[fsb].tsub, fsb.tsub) -- self.assertEqual(fsb.children[fsc].ttot, fsc.ttot) -- self.assertEqual(fsb.children[fsc].tsub, fsc.tsub) -- self.assertEqual(fsc.tsub, 6) -- self.assertEqual(fsc.children[fsd].ttot, fsd.ttot) -- self.assertEqual(fsc.children[fsd].tsub, fsd.tsub) -- self.assertEqual(fsd.children[fse].ttot, fse.ttot) -- self.assertEqual(fsd.children[fse].tsub, fse.tsub) -- self.assertEqual(fse.children[fsf].ttot, fsf.ttot) -- self.assertEqual(fse.children[fsf].tsub, fsf.tsub) -- self.assertEqual(fsf.children[fsg].ttot, fsg.ttot) -- self.assertEqual(fsf.children[fsg].tsub, fsg.tsub) -- self.assertEqual(fsg.ttot, 18) -- self.assertEqual(fsg.tsub, 3) -- self.assertEqual(fsg.children[fsh].ttot, fsh.ttot) -- self.assertEqual(fsg.children[fsh].tsub, fsh.tsub) -- self.assertEqual(fsh.ttot, 15) -- self.assertEqual(fsh.tsub, 12) -- self.assertEqual(fsh.tavg, 5) -- self.assertEqual(fsh.children[fsi].ttot, fsi.ttot) -- self.assertEqual(fsh.children[fsi].tsub, fsi.tsub) -- #stats.debug_print() -- -- def test_merge_multithreaded_stats(self): -- import _yappi -- timings = {"a_1": 2, "b_1": 1} -- _yappi._set_test_timings(timings) -- -- def a(): -- pass -- -- def b(): -- pass -- -- yappi.start() -- t = threading.Thread(target=a) -- t.start() -- t.join() -- t = threading.Thread(target=b) -- t.start() -- t.join() -- yappi.get_func_stats().save("tests/ystats1.ys") -- yappi.clear_stats() -- _yappi._set_test_timings(timings) -- self.assertEqual(len(yappi.get_func_stats()), 0) -- self.assertEqual(len(yappi.get_thread_stats()), 1) -- t = threading.Thread(target=a) -- t.start() -- t.join() -- -- self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) -- self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) -- yappi.get_func_stats().save("tests/ystats2.ys") -- -- stats = yappi.YFuncStats([ -- "tests/ystats1.ys", -- "tests/ystats2.ys", -- ]) -- fsa = utils.find_stat_by_name(stats, "a") -- fsb = utils.find_stat_by_name(stats, "b") -- self.assertEqual(fsa.ncall, 2) -- self.assertEqual(fsb.ncall, 1) -- self.assertEqual(fsa.tsub, fsa.ttot, 4) -- self.assertEqual(fsb.tsub, fsb.ttot, 1) -- -- def test_merge_load_different_clock_types(self): -- yappi.start(builtins=True) -- -- def a(): -- b() -- -- def b(): -- c() -- -- def c(): -- pass -- -- t = threading.Thread(target=a) -- t.start() -- t.join() -- yappi.get_func_stats().sort("name", "asc").save("tests/ystats1.ys") -- yappi.stop() -- yappi.clear_stats() -- yappi.start(builtins=False) -- t = threading.Thread(target=a) -- t.start() -- t.join() -- yappi.get_func_stats().save("tests/ystats2.ys") -- yappi.stop() -- self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") -- yappi.clear_stats() -- yappi.set_clock_type("wall") -- yappi.start() -- t = threading.Thread(target=a) -- t.start() -- t.join() -- yappi.get_func_stats().save("tests/ystats3.ys") -- self.assertRaises( -- yappi.YappiError, -- yappi.YFuncStats().add("tests/ystats1.ys").add, "tests/ystats3.ys" -- ) -- stats = yappi.YFuncStats(["tests/ystats1.ys", -- "tests/ystats2.ys"]).sort("name") -- fsa = utils.find_stat_by_name(stats, "a") -- fsb = utils.find_stat_by_name(stats, "b") -- fsc = utils.find_stat_by_name(stats, "c") -- self.assertEqual(fsa.ncall, 2) -- self.assertEqual(fsa.ncall, fsb.ncall, fsc.ncall) -- -- def test_merge_aabab_aabbc(self): -- _timings = { -- "a_1": 15, -- "a_2": 14, -- "b_1": 12, -- "a_3": 10, -- "b_2": 9, -- "c_1": 4 -- } -- _yappi._set_test_timings(_timings) -- -- def a(): -- if self._ncall == 1: -- self._ncall += 1 -- a() -- elif self._ncall == 5: -- self._ncall += 1 -- a() -- else: -- b() -- -- def b(): -- if self._ncall == 2: -- self._ncall += 1 -- a() -- elif self._ncall == 6: -- self._ncall += 1 -- b() -- elif self._ncall == 7: -- c() -- else: -- return -- -- def c(): -- pass -- -- self._ncall = 1 -- stats = utils.run_and_get_func_stats(a, ) -- stats.save("tests/ystats1.ys") -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- #stats.print_all() -- -- self._ncall = 5 -- stats = utils.run_and_get_func_stats(a, ) -- stats.save("tests/ystats2.ys") -- -- #stats.print_all() -- -- def a(): # same name but another function(code object) -- pass -- -- yappi.start() -- a() -- stats = yappi.get_func_stats().add( -- ["tests/ystats1.ys", "tests/ystats2.ys"] -- ) -- #stats.print_all() -- self.assertEqual(len(stats), 4) -- -- fsa = None -- for stat in stats: -- if stat.name == "a" and stat.ttot == 45: -- fsa = stat -- break -- self.assertTrue(fsa is not None) -- -- self.assertEqual(fsa.ncall, 7) -- self.assertEqual(fsa.nactualcall, 3) -- self.assertEqual(fsa.ttot, 45) -- self.assertEqual(fsa.tsub, 10) -- fsb = utils.find_stat_by_name(stats, "b") -- fsc = utils.find_stat_by_name(stats, "c") -- self.assertEqual(fsb.ncall, 6) -- self.assertEqual(fsb.nactualcall, 3) -- self.assertEqual(fsb.ttot, 36) -- self.assertEqual(fsb.tsub, 27) -- self.assertEqual(fsb.tavg, 6) -- self.assertEqual(fsc.ttot, 8) -- self.assertEqual(fsc.tsub, 8) -- self.assertEqual(fsc.tavg, 4) -- self.assertEqual(fsc.nactualcall, fsc.ncall, 2) -- -- --class MultithreadedScenarios(utils.YappiUnitTestCase): -- -- def test_issue_32(self): -- ''' -- Start yappi from different thread and we get Internal Error(15) as -- the current_ctx_id() called while enumerating the threads in start() -- and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() -- returns wrong object and thus sets an invalid id for the _ctx structure. -- -- When this issue happens multiple Threads have same tid as the internal ts_ptr -- will be same for different contexts. So, let's see if that happens -- ''' -- -- def foo(): -- time.sleep(0.2) -- -- def bar(): -- time.sleep(0.1) -- -- def thread_func(): -- yappi.set_clock_type("wall") -- yappi.start() -- -- bar() -- -- t = threading.Thread(target=thread_func) -- t.start() -- t.join() -- -- foo() -- -- yappi.stop() -- -- thread_ids = set() -- for tstat in yappi.get_thread_stats(): -- self.assertTrue(tstat.tid not in thread_ids) -- thread_ids.add(tstat.tid) -- -- def test_subsequent_profile(self): -- WORKER_COUNT = 5 -- -- def a(): -- pass -- -- def b(): -- pass -- -- def c(): -- pass -- -- _timings = { -- "a_1": 3, -- "b_1": 2, -- "c_1": 1, -- } -- -- yappi.start() -- -- def g(): -- pass -- -- g() -- yappi.stop() -- yappi.clear_stats() -- _yappi._set_test_timings(_timings) -- yappi.start() -- -- _dummy = [] -- for i in range(WORKER_COUNT): -- t = threading.Thread(target=a) -- t.start() -- t.join() -- for i in range(WORKER_COUNT): -- t = threading.Thread(target=b) -- t.start() -- _dummy.append(t) -- t.join() -- for i in range(WORKER_COUNT): -- t = threading.Thread(target=a) -- t.start() -- t.join() -- for i in range(WORKER_COUNT): -- t = threading.Thread(target=c) -- t.start() -- t.join() -- yappi.stop() -- yappi.start() -- -- def f(): -- pass -- -- f() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- self.assertEqual(fsa.ncall, 10) -- self.assertEqual(fsb.ncall, 5) -- self.assertEqual(fsc.ncall, 5) -- self.assertEqual(fsa.ttot, fsa.tsub, 30) -- self.assertEqual(fsb.ttot, fsb.tsub, 10) -- self.assertEqual(fsc.ttot, fsc.tsub, 5) -- -- # MACOSx optimizes by only creating one worker thread -- self.assertTrue(len(yappi.get_thread_stats()) >= 2) -- -- def test_basic(self): -- yappi.set_clock_type('wall') -- -- def dummy(): -- pass -- -- def a(): -- time.sleep(0.2) -- -- class Worker1(threading.Thread): -- -- def a(self): -- time.sleep(0.3) -- -- def run(self): -- self.a() -- -- yappi.start(builtins=False, profile_threads=True) -- -- c = Worker1() -- c.start() -- c.join() -- a() -- stats = yappi.get_func_stats() -- fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') -- fsa2 = utils.find_stat_by_name(stats, 'a') -- self.assertTrue(fsa1 is not None) -- self.assertTrue(fsa2 is not None) -- self.assertTrue(fsa1.ttot > 0.2) -- self.assertTrue(fsa2.ttot > 0.1) -- tstats = yappi.get_thread_stats() -- self.assertEqual(len(tstats), 2) -- tsa = utils.find_stat_by_name(tstats, 'Worker1') -- tsm = utils.find_stat_by_name(tstats, '_MainThread') -- dummy() # call dummy to force ctx name to be retrieved again. -- self.assertTrue(tsa is not None) -- # TODO: I put dummy() to fix below, remove the comments after a while. -- self.assertTrue( # FIX: I see this fails sometimes? -- tsm is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) -- -- def test_ctx_stats(self): -- from threading import Thread -- DUMMY_WORKER_COUNT = 5 -- yappi.start() -- -- class DummyThread(Thread): -- pass -- -- def dummy(): -- pass -- -- def dummy_worker(): -- pass -- -- for i in range(DUMMY_WORKER_COUNT): -- t = DummyThread(target=dummy_worker) -- t.start() -- t.join() -- yappi.stop() -- stats = yappi.get_thread_stats() -- tsa = utils.find_stat_by_name(stats, "DummyThread") -- self.assertTrue(tsa is not None) -- yappi.clear_stats() -- time.sleep(1.0) -- _timings = { -- "a_1": 6, -- "b_1": 5, -- "c_1": 3, -- "d_1": 1, -- "a_2": 4, -- "b_2": 3, -- "c_2": 2, -- "d_2": 1 -- } -- _yappi._set_test_timings(_timings) -- -- class Thread1(Thread): -- pass -- -- class Thread2(Thread): -- pass -- -- def a(): -- b() -- -- def b(): -- c() -- -- def c(): -- d() -- -- def d(): -- time.sleep(0.6) -- -- yappi.set_clock_type("wall") -- yappi.start() -- t1 = Thread1(target=a) -- t1.start() -- t2 = Thread2(target=a) -- t2.start() -- t1.join() -- t2.join() -- stats = yappi.get_thread_stats() -- -- # the fist clear_stats clears the context table? -- tsa = utils.find_stat_by_name(stats, "DummyThread") -- self.assertTrue(tsa is None) -- -- tst1 = utils.find_stat_by_name(stats, "Thread1") -- tst2 = utils.find_stat_by_name(stats, "Thread2") -- tsmain = utils.find_stat_by_name(stats, "_MainThread") -- dummy() # call dummy to force ctx name to be retrieved again. -- self.assertTrue(len(stats) == 3) -- self.assertTrue(tst1 is not None) -- self.assertTrue(tst2 is not None) -- # TODO: I put dummy() to fix below, remove the comments after a while. -- self.assertTrue( # FIX: I see this fails sometimes -- tsmain is not None, -- 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) -- self.assertTrue(1.0 > tst2.ttot >= 0.5) -- self.assertTrue(1.0 > tst1.ttot >= 0.5) -- -- # test sorting of the ctx stats -- stats = stats.sort("totaltime", "desc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.ttot >= stat.ttot) -- prev_stat = stat -- stats = stats.sort("totaltime", "asc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.ttot <= stat.ttot) -- prev_stat = stat -- stats = stats.sort("schedcount", "desc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.sched_count >= stat.sched_count) -- prev_stat = stat -- stats = stats.sort("name", "desc") -- prev_stat = None -- for stat in stats: -- if prev_stat: -- self.assertTrue(prev_stat.name.lower() >= stat.name.lower()) -- prev_stat = stat -- self.assertRaises( -- yappi.YappiError, stats.sort, "invalid_thread_sorttype_arg" -- ) -- self.assertRaises( -- yappi.YappiError, stats.sort, "invalid_thread_sortorder_arg" -- ) -- -- def test_ctx_stats_cpu(self): -- -- def get_thread_name(): -- try: -- return threading.current_thread().name -- except AttributeError: -- return "Anonymous" -- -- def burn_cpu(sec): -- t0 = yappi.get_clock_time() -- elapsed = 0 -- while (elapsed < sec): -- for _ in range(1000): -- pass -- elapsed = yappi.get_clock_time() - t0 -- -- def test(): -- -- ts = [] -- for i in (0.01, 0.05, 0.1): -- t = threading.Thread(target=burn_cpu, args=(i, )) -- t.name = "burn_cpu-%s" % str(i) -- t.start() -- ts.append(t) -- for t in ts: -- t.join() -- -- yappi.set_clock_type("cpu") -- yappi.set_context_name_callback(get_thread_name) -- -- yappi.start() -- -- test() -- -- yappi.stop() -- -- tstats = yappi.get_thread_stats() -- r1 = ''' -- burn_cpu-0.1 3 123145356058624 0.100105 8 -- burn_cpu-0.05 2 123145361313792 0.050149 8 -- burn_cpu-0.01 1 123145356058624 0.010127 2 -- MainThread 0 4321620864 0.001632 6 -- ''' -- self.assert_ctx_stats_almost_equal(r1, tstats) -- -- def test_producer_consumer_with_queues(self): -- # we currently just stress yappi, no functionality test is done here. -- yappi.start() -- if utils.is_py3x(): -- from queue import Queue -- else: -- from Queue import Queue -- from threading import Thread -- WORKER_THREAD_COUNT = 50 -- WORK_ITEM_COUNT = 2000 -- -- def worker(): -- while True: -- item = q.get() -- # do the work with item -- q.task_done() -- -- q = Queue() -- for i in range(WORKER_THREAD_COUNT): -- t = Thread(target=worker) -- t.daemon = True -- t.start() -- -- for item in range(WORK_ITEM_COUNT): -- q.put(item) -- q.join() # block until all tasks are done -- #yappi.get_func_stats().sort("callcount").print_all() -- yappi.stop() -- -- def test_temporary_lock_waiting(self): -- yappi.start() -- _lock = threading.Lock() -- -- def worker(): -- _lock.acquire() -- try: -- time.sleep(1.0) -- finally: -- _lock.release() -- -- t1 = threading.Thread(target=worker) -- t2 = threading.Thread(target=worker) -- t1.start() -- t2.start() -- t1.join() -- t2.join() -- #yappi.get_func_stats().sort("callcount").print_all() -- yappi.stop() -- -- @unittest.skipIf(os.name != "posix", "requires Posix compliant OS") -- def test_signals_with_blocking_calls(self): -- import signal, os, time -- -- # just to verify if signal is handled correctly and stats/yappi are not corrupted. -- def handler(signum, frame): -- raise Exception("Signal handler executed!") -- -- yappi.start() -- signal.signal(signal.SIGALRM, handler) -- signal.alarm(1) -- self.assertRaises(Exception, time.sleep, 2) -- stats = yappi.get_func_stats() -- fsh = utils.find_stat_by_name(stats, "handler") -- self.assertTrue(fsh is not None) -- -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") -- def test_concurrent_futures(self): -- yappi.start() -- from concurrent.futures import ThreadPoolExecutor -- with ThreadPoolExecutor(max_workers=5) as executor: -- f = executor.submit(pow, 5, 2) -- self.assertEqual(f.result(), 25) -- time.sleep(1.0) -- yappi.stop() -- -- @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") -- def test_barrier(self): -- yappi.start() -- b = threading.Barrier(2, timeout=1) -- -- def worker(): -- try: -- b.wait() -- except threading.BrokenBarrierError: -- pass -- except Exception: -- raise Exception("BrokenBarrierError not raised") -- -- t1 = threading.Thread(target=worker) -- t1.start() -- #b.wait() -- t1.join() -- yappi.stop() -- -- --class NonRecursiveFunctions(utils.YappiUnitTestCase): -- -- def test_abcd(self): -- _timings = {"a_1": 6, "b_1": 5, "c_1": 3, "d_1": 1} -- _yappi._set_test_timings(_timings) -- -- def a(): -- b() -- -- def b(): -- c() -- -- def c(): -- d() -- -- def d(): -- pass -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- fsd = utils.find_stat_by_name(stats, 'd') -- cfsab = fsa.children[fsb] -- cfsbc = fsb.children[fsc] -- cfscd = fsc.children[fsd] -- -- self.assertEqual(fsa.ttot, 6) -- self.assertEqual(fsa.tsub, 1) -- self.assertEqual(fsb.ttot, 5) -- self.assertEqual(fsb.tsub, 2) -- self.assertEqual(fsc.ttot, 3) -- self.assertEqual(fsc.tsub, 2) -- self.assertEqual(fsd.ttot, 1) -- self.assertEqual(fsd.tsub, 1) -- self.assertEqual(cfsab.ttot, 5) -- self.assertEqual(cfsab.tsub, 2) -- self.assertEqual(cfsbc.ttot, 3) -- self.assertEqual(cfsbc.tsub, 2) -- self.assertEqual(cfscd.ttot, 1) -- self.assertEqual(cfscd.tsub, 1) -- -- def test_stop_in_middle(self): -- _timings = {"a_1": 6, "b_1": 4} -- _yappi._set_test_timings(_timings) -- -- def a(): -- b() -- yappi.stop() -- -- def b(): -- time.sleep(0.2) -- -- yappi.start() -- a() -- stats = yappi.get_func_stats() -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- -- self.assertEqual(fsa.ncall, 1) -- self.assertEqual(fsa.nactualcall, 0) -- self.assertEqual(fsa.ttot, 0) # no call_leave called -- self.assertEqual(fsa.tsub, 0) # no call_leave called -- self.assertEqual(fsb.ttot, 4) -- -- --class RecursiveFunctions(utils.YappiUnitTestCase): -- -- def test_fibonacci(self): -- -- def fib(n): -- if n > 1: -- return fib(n - 1) + fib(n - 2) -- else: -- return n -- -- stats = utils.run_and_get_func_stats(fib, 22) -- fs = utils.find_stat_by_name(stats, 'fib') -- self.assertEqual(fs.ncall, 57313) -- self.assertEqual(fs.ttot, fs.tsub) -- -- def test_abcadc(self): -- _timings = { -- "a_1": 20, -- "b_1": 19, -- "c_1": 17, -- "a_2": 13, -- "d_1": 12, -- "c_2": 10, -- "a_3": 5 -- } -- _yappi._set_test_timings(_timings) -- -- def a(n): -- if n == 3: -- return -- if n == 1 + 1: -- d(n) -- else: -- b(n) -- -- def b(n): -- c(n) -- -- def c(n): -- a(n + 1) -- -- def d(n): -- c(n) -- -- stats = utils.run_and_get_func_stats(a, 1) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- fsd = utils.find_stat_by_name(stats, 'd') -- self.assertEqual(fsa.ncall, 3) -- self.assertEqual(fsa.nactualcall, 1) -- self.assertEqual(fsa.ttot, 20) -- self.assertEqual(fsa.tsub, 7) -- self.assertEqual(fsb.ttot, 19) -- self.assertEqual(fsb.tsub, 2) -- self.assertEqual(fsc.ttot, 17) -- self.assertEqual(fsc.tsub, 9) -- self.assertEqual(fsd.ttot, 12) -- self.assertEqual(fsd.tsub, 2) -- cfsca = fsc.children[fsa] -- self.assertEqual(cfsca.nactualcall, 0) -- self.assertEqual(cfsca.ncall, 2) -- self.assertEqual(cfsca.ttot, 13) -- self.assertEqual(cfsca.tsub, 6) -- -- def test_aaaa(self): -- _timings = {"d_1": 9, "d_2": 7, "d_3": 3, "d_4": 2} -- _yappi._set_test_timings(_timings) -- -- def d(n): -- if n == 3: -- return -- d(n + 1) -- -- stats = utils.run_and_get_func_stats(d, 0) -- fsd = utils.find_stat_by_name(stats, 'd') -- self.assertEqual(fsd.ncall, 4) -- self.assertEqual(fsd.nactualcall, 1) -- self.assertEqual(fsd.ttot, 9) -- self.assertEqual(fsd.tsub, 9) -- cfsdd = fsd.children[fsd] -- self.assertEqual(cfsdd.ttot, 7) -- self.assertEqual(cfsdd.tsub, 7) -- self.assertEqual(cfsdd.ncall, 3) -- self.assertEqual(cfsdd.nactualcall, 0) -- -- def test_abcabc(self): -- _timings = { -- "a_1": 20, -- "b_1": 19, -- "c_1": 17, -- "a_2": 13, -- "b_2": 11, -- "c_2": 9, -- "a_3": 6 -- } -- _yappi._set_test_timings(_timings) -- -- def a(n): -- if n == 3: -- return -- else: -- b(n) -- -- def b(n): -- c(n) -- -- def c(n): -- a(n + 1) -- -- stats = utils.run_and_get_func_stats(a, 1) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- self.assertEqual(fsa.ncall, 3) -- self.assertEqual(fsa.nactualcall, 1) -- self.assertEqual(fsa.ttot, 20) -- self.assertEqual(fsa.tsub, 9) -- self.assertEqual(fsb.ttot, 19) -- self.assertEqual(fsb.tsub, 4) -- self.assertEqual(fsc.ttot, 17) -- self.assertEqual(fsc.tsub, 7) -- cfsab = fsa.children[fsb] -- cfsbc = fsb.children[fsc] -- cfsca = fsc.children[fsa] -- self.assertEqual(cfsab.ttot, 19) -- self.assertEqual(cfsab.tsub, 4) -- self.assertEqual(cfsbc.ttot, 17) -- self.assertEqual(cfsbc.tsub, 7) -- self.assertEqual(cfsca.ttot, 13) -- self.assertEqual(cfsca.tsub, 8) -- -- def test_abcbca(self): -- _timings = {"a_1": 10, "b_1": 9, "c_1": 7, "b_2": 4, "c_2": 2, "a_2": 1} -- _yappi._set_test_timings(_timings) -- self._ncall = 1 -- -- def a(): -- if self._ncall == 1: -- b() -- else: -- return -- -- def b(): -- c() -- -- def c(): -- if self._ncall == 1: -- self._ncall += 1 -- b() -- else: -- a() -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- cfsab = fsa.children[fsb] -- cfsbc = fsb.children[fsc] -- cfsca = fsc.children[fsa] -- self.assertEqual(fsa.ttot, 10) -- self.assertEqual(fsa.tsub, 2) -- self.assertEqual(fsb.ttot, 9) -- self.assertEqual(fsb.tsub, 4) -- self.assertEqual(fsc.ttot, 7) -- self.assertEqual(fsc.tsub, 4) -- self.assertEqual(cfsab.ttot, 9) -- self.assertEqual(cfsab.tsub, 2) -- self.assertEqual(cfsbc.ttot, 7) -- self.assertEqual(cfsbc.tsub, 4) -- self.assertEqual(cfsca.ttot, 1) -- self.assertEqual(cfsca.tsub, 1) -- self.assertEqual(cfsca.ncall, 1) -- self.assertEqual(cfsca.nactualcall, 0) -- -- def test_aabccb(self): -- _timings = { -- "a_1": 13, -- "a_2": 11, -- "b_1": 9, -- "c_1": 5, -- "c_2": 3, -- "b_2": 1 -- } -- _yappi._set_test_timings(_timings) -- self._ncall = 1 -- -- def a(): -- if self._ncall == 1: -- self._ncall += 1 -- a() -- else: -- b() -- -- def b(): -- if self._ncall == 3: -- return -- else: -- c() -- -- def c(): -- if self._ncall == 2: -- self._ncall += 1 -- c() -- else: -- b() -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- fsc = utils.find_stat_by_name(stats, 'c') -- cfsaa = fsa.children[fsa.index] -- cfsab = fsa.children[fsb] -- cfsbc = fsb.children[fsc.full_name] -- cfscc = fsc.children[fsc] -- cfscb = fsc.children[fsb] -- self.assertEqual(fsb.ttot, 9) -- self.assertEqual(fsb.tsub, 5) -- self.assertEqual(cfsbc.ttot, 5) -- self.assertEqual(cfsbc.tsub, 2) -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 4) -- self.assertEqual(cfsab.ttot, 9) -- self.assertEqual(cfsab.tsub, 4) -- self.assertEqual(cfsaa.ttot, 11) -- self.assertEqual(cfsaa.tsub, 2) -- self.assertEqual(fsc.ttot, 5) -- self.assertEqual(fsc.tsub, 4) -- -- def test_abaa(self): -- _timings = {"a_1": 13, "b_1": 10, "a_2": 9, "a_3": 5} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- if self._ncall == 1: -- b() -- elif self._ncall == 2: -- self._ncall += 1 -- a() -- else: -- return -- -- def b(): -- self._ncall += 1 -- a() -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- cfsaa = fsa.children[fsa] -- cfsba = fsb.children[fsa] -- self.assertEqual(fsb.ttot, 10) -- self.assertEqual(fsb.tsub, 1) -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 12) -- self.assertEqual(cfsaa.ttot, 5) -- self.assertEqual(cfsaa.tsub, 5) -- self.assertEqual(cfsba.ttot, 9) -- self.assertEqual(cfsba.tsub, 4) -- -- def test_aabb(self): -- _timings = {"a_1": 13, "a_2": 10, "b_1": 9, "b_2": 5} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- if self._ncall == 1: -- self._ncall += 1 -- a() -- elif self._ncall == 2: -- b() -- else: -- return -- -- def b(): -- if self._ncall == 2: -- self._ncall += 1 -- b() -- else: -- return -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- cfsaa = fsa.children[fsa] -- cfsab = fsa.children[fsb] -- cfsbb = fsb.children[fsb] -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 4) -- self.assertEqual(fsb.ttot, 9) -- self.assertEqual(fsb.tsub, 9) -- self.assertEqual(cfsaa.ttot, 10) -- self.assertEqual(cfsaa.tsub, 1) -- self.assertEqual(cfsab.ttot, 9) -- self.assertEqual(cfsab.tsub, 4) -- self.assertEqual(cfsbb.ttot, 5) -- self.assertEqual(cfsbb.tsub, 5) -- -- def test_abbb(self): -- _timings = {"a_1": 13, "b_1": 10, "b_2": 6, "b_3": 1} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- if self._ncall == 1: -- b() -- -- def b(): -- if self._ncall == 3: -- return -- self._ncall += 1 -- b() -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- cfsab = fsa.children[fsb] -- cfsbb = fsb.children[fsb] -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 3) -- self.assertEqual(fsb.ttot, 10) -- self.assertEqual(fsb.tsub, 10) -- self.assertEqual(fsb.ncall, 3) -- self.assertEqual(fsb.nactualcall, 1) -- self.assertEqual(cfsab.ttot, 10) -- self.assertEqual(cfsab.tsub, 4) -- self.assertEqual(cfsbb.ttot, 6) -- self.assertEqual(cfsbb.tsub, 6) -- self.assertEqual(cfsbb.nactualcall, 0) -- self.assertEqual(cfsbb.ncall, 2) -- -- def test_aaab(self): -- _timings = {"a_1": 13, "a_2": 10, "a_3": 6, "b_1": 1} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- if self._ncall == 3: -- b() -- return -- self._ncall += 1 -- a() -- -- def b(): -- return -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- cfsaa = fsa.children[fsa] -- cfsab = fsa.children[fsb] -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 12) -- self.assertEqual(fsb.ttot, 1) -- self.assertEqual(fsb.tsub, 1) -- self.assertEqual(cfsaa.ttot, 10) -- self.assertEqual(cfsaa.tsub, 9) -- self.assertEqual(cfsab.ttot, 1) -- self.assertEqual(cfsab.tsub, 1) -- -- def test_abab(self): -- _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} -- _yappi._set_test_timings(_timings) -- -- self._ncall = 1 -- -- def a(): -- b() -- -- def b(): -- if self._ncall == 2: -- return -- self._ncall += 1 -- a() -- -- stats = utils.run_and_get_func_stats(a) -- fsa = utils.find_stat_by_name(stats, 'a') -- fsb = utils.find_stat_by_name(stats, 'b') -- cfsab = fsa.children[fsb] -- cfsba = fsb.children[fsa] -- self.assertEqual(fsa.ttot, 13) -- self.assertEqual(fsa.tsub, 8) -- self.assertEqual(fsb.ttot, 10) -- self.assertEqual(fsb.tsub, 5) -- self.assertEqual(cfsab.ttot, 10) -- self.assertEqual(cfsab.tsub, 5) -- self.assertEqual(cfsab.ncall, 2) -- self.assertEqual(cfsab.nactualcall, 1) -- self.assertEqual(cfsba.ttot, 6) -- self.assertEqual(cfsba.tsub, 5) -- -- --if __name__ == '__main__': -- # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] -- # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] -- unittest.main() -+import os -+import sys -+import time -+import threading -+import unittest -+import yappi -+import _yappi -+import tests.utils as utils -+import multiprocessing # added to fix http://bugs.python.org/issue15881 for > Py2.6 -+import subprocess -+ -+_counter = 0 -+ -+ -+class BasicUsage(utils.YappiUnitTestCase): -+ -+ def test_callback_function_int_return_overflow(self): -+ # this test is just here to check if any errors are generated, as the err -+ # is printed in C side, I did not include it here. THere are ways to test -+ # this deterministically, I did not bother -+ import ctypes -+ -+ def _unsigned_overflow_margin(): -+ return 2**(ctypes.sizeof(ctypes.c_void_p) * 8) - 1 -+ -+ def foo(): -+ pass -+ -+ #with utils.captured_output() as (out, err): -+ yappi.set_context_id_callback(_unsigned_overflow_margin) -+ yappi.set_tag_callback(_unsigned_overflow_margin) -+ yappi.start() -+ foo() -+ -+ def test_issue60(self): -+ -+ def foo(): -+ buf = bytearray() -+ buf += b't' * 200 -+ view = memoryview(buf)[10:] -+ view = view.tobytes() -+ del buf[:10] # this throws exception -+ return view -+ -+ yappi.start(builtins=True) -+ foo() -+ self.assertTrue( -+ len( -+ yappi.get_func_stats( -+ filter_callback=lambda x: yappi. -+ func_matches(x, [memoryview.tobytes]) -+ ) -+ ) > 0 -+ ) -+ yappi.stop() -+ -+ def test_issue54(self): -+ -+ def _tag_cbk(): -+ global _counter -+ _counter += 1 -+ return _counter -+ -+ def a(): -+ pass -+ -+ def b(): -+ pass -+ -+ yappi.set_tag_callback(_tag_cbk) -+ yappi.start() -+ a() -+ a() -+ a() -+ yappi.stop() -+ stats = yappi.get_func_stats() -+ self.assertEqual(stats.pop().ncall, 3) # aggregated if no tag is given -+ stats = yappi.get_func_stats(tag=1) -+ -+ for i in range(1, 3): -+ stats = yappi.get_func_stats(tag=i) -+ stats = yappi.get_func_stats( -+ tag=i, filter_callback=lambda x: yappi.func_matches(x, [a]) -+ ) -+ -+ stat = stats.pop() -+ self.assertEqual(stat.ncall, 1) -+ -+ yappi.set_tag_callback(None) -+ yappi.clear_stats() -+ yappi.start() -+ b() -+ b() -+ stats = yappi.get_func_stats() -+ self.assertEqual(len(stats), 1) -+ stat = stats.pop() -+ self.assertEqual(stat.ncall, 2) -+ -+ def test_filter(self): -+ -+ def a(): -+ pass -+ -+ def b(): -+ a() -+ -+ def c(): -+ b() -+ -+ _TCOUNT = 5 -+ -+ ts = [] -+ yappi.start() -+ for i in range(_TCOUNT): -+ t = threading.Thread(target=c) -+ t.start() -+ ts.append(t) -+ -+ for t in ts: -+ t.join() -+ -+ yappi.stop() -+ -+ ctx_ids = [] -+ for tstat in yappi.get_thread_stats(): -+ if tstat.name == '_MainThread': -+ main_ctx_id = tstat.id -+ else: -+ ctx_ids.append(tstat.id) -+ -+ fstats = yappi.get_func_stats(filter={"ctx_id": 9}) -+ self.assertTrue(fstats.empty()) -+ fstats = yappi.get_func_stats( -+ filter={ -+ "ctx_id": main_ctx_id, -+ "name": "c" -+ } -+ ) # main thread -+ self.assertTrue(fstats.empty()) -+ -+ for i in ctx_ids: -+ fstats = yappi.get_func_stats( -+ filter={ -+ "ctx_id": i, -+ "name": "a", -+ "ncall": 1 -+ } -+ ) -+ self.assertEqual(fstats.pop().ncall, 1) -+ fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "b"}) -+ self.assertEqual(fstats.pop().ncall, 1) -+ fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "c"}) -+ self.assertEqual(fstats.pop().ncall, 1) -+ -+ yappi.clear_stats() -+ yappi.start(builtins=True) -+ time.sleep(0.1) -+ yappi.stop() -+ fstats = yappi.get_func_stats(filter={"module": "time"}) -+ self.assertEqual(len(fstats), 1) -+ -+ # invalid filters` -+ self.assertRaises( -+ Exception, yappi.get_func_stats, filter={'tag': "sss"} -+ ) -+ self.assertRaises( -+ Exception, yappi.get_func_stats, filter={'ctx_id': "None"} -+ ) -+ -+ def test_filter_callback(self): -+ -+ def a(): -+ time.sleep(0.1) -+ -+ def b(): -+ a() -+ -+ def c(): -+ pass -+ -+ def d(): -+ pass -+ -+ yappi.set_clock_type("wall") -+ yappi.start(builtins=True) -+ a() -+ b() -+ c() -+ d() -+ stats = yappi.get_func_stats( -+ filter_callback=lambda x: yappi.func_matches(x, [a, b]) -+ ) -+ #stats.print_all() -+ r1 = ''' -+ tests/test_functionality.py:98 a 2 0.000000 0.200350 0.100175 -+ tests/test_functionality.py:101 b 1 0.000000 0.120000 0.100197 -+ ''' -+ self.assert_traces_almost_equal(r1, stats) -+ self.assertEqual(len(stats), 2) -+ stats = yappi.get_func_stats( -+ filter_callback=lambda x: yappi. -+ module_matches(x, [sys.modules[__name__]]) -+ ) -+ r1 = ''' -+ tests/test_functionality.py:98 a 2 0.000000 0.230130 0.115065 -+ tests/test_functionality.py:101 b 1 0.000000 0.120000 0.109011 -+ tests/test_functionality.py:104 c 1 0.000000 0.000002 0.000002 -+ tests/test_functionality.py:107 d 1 0.000000 0.000001 0.000001 -+ ''' -+ self.assert_traces_almost_equal(r1, stats) -+ self.assertEqual(len(stats), 4) -+ -+ stats = yappi.get_func_stats( -+ filter_callback=lambda x: yappi.func_matches(x, [time.sleep]) -+ ) -+ self.assertEqual(len(stats), 1) -+ r1 = ''' -+ time.sleep 2 0.206804 0.220000 0.103402 -+ ''' -+ self.assert_traces_almost_equal(r1, stats) -+ -+ def test_print_formatting(self): -+ -+ def a(): -+ pass -+ -+ def b(): -+ a() -+ -+ func_cols = { -+ 1: ("name", 48), -+ 0: ("ncall", 5), -+ 2: ("tsub", 8), -+ } -+ thread_cols = { -+ 1: ("name", 48), -+ 0: ("ttot", 8), -+ } -+ -+ yappi.start() -+ a() -+ b() -+ yappi.stop() -+ fs = yappi.get_func_stats() -+ cs = fs[1].children -+ ts = yappi.get_thread_stats() -+ #fs.print_all(out=sys.stderr, columns={1:("name", 70), }) -+ #cs.print_all(out=sys.stderr, columns=func_cols) -+ #ts.print_all(out=sys.stderr, columns=thread_cols) -+ #cs.print_all(out=sys.stderr, columns={}) -+ -+ self.assertRaises( -+ yappi.YappiError, fs.print_all, columns={1: ("namee", 9)} -+ ) -+ self.assertRaises( -+ yappi.YappiError, cs.print_all, columns={1: ("dd", 0)} -+ ) -+ self.assertRaises( -+ yappi.YappiError, ts.print_all, columns={1: ("tidd", 0)} -+ ) -+ -+ def test_get_clock(self): -+ yappi.set_clock_type('cpu') -+ self.assertEqual('cpu', yappi.get_clock_type()) -+ clock_info = yappi.get_clock_info() -+ self.assertTrue('api' in clock_info) -+ self.assertTrue('resolution' in clock_info) -+ -+ yappi.set_clock_type('wall') -+ self.assertEqual('wall', yappi.get_clock_type()) -+ -+ t0 = yappi.get_clock_time() -+ time.sleep(0.1) -+ duration = yappi.get_clock_time() - t0 -+ self.assertTrue(0.05 < duration < 0.3) -+ -+ def test_profile_decorator(self): -+ -+ def aggregate(func, stats): -+ fname = "tests/%s.profile" % (func.__name__) -+ try: -+ stats.add(fname) -+ except IOError: -+ pass -+ stats.save(fname) -+ raise Exception("messing around") -+ -+ @yappi.profile(return_callback=aggregate) -+ def a(x, y): -+ if x + y == 25: -+ raise Exception("") -+ return x + y -+ -+ def b(): -+ pass -+ -+ try: -+ os.remove( -+ "tests/a.profile" -+ ) # remove the one from prev test, if available -+ except: -+ pass -+ -+ # global profile is on to mess things up -+ yappi.start() -+ b() -+ -+ # assert functionality and call function at same time -+ try: -+ self.assertEqual(a(1, 2), 3) -+ except: -+ pass -+ try: -+ self.assertEqual(a(2, 5), 7) -+ except: -+ pass -+ try: -+ a(4, 21) -+ except: -+ pass -+ stats = yappi.get_func_stats().add("tests/a.profile") -+ fsa = utils.find_stat_by_name(stats, 'a') -+ self.assertEqual(fsa.ncall, 3) -+ self.assertEqual(len(stats), 1) # b() should be cleared out. -+ -+ @yappi.profile(return_callback=aggregate) -+ def count_down_rec(n): -+ if n == 0: -+ return -+ count_down_rec(n - 1) -+ -+ try: -+ os.remove( -+ "tests/count_down_rec.profile" -+ ) # remove the one from prev test, if available -+ except: -+ pass -+ -+ try: -+ count_down_rec(4) -+ except: -+ pass -+ try: -+ count_down_rec(3) -+ except: -+ pass -+ -+ stats = yappi.YFuncStats("tests/count_down_rec.profile") -+ fsrec = utils.find_stat_by_name(stats, 'count_down_rec') -+ self.assertEqual(fsrec.ncall, 9) -+ self.assertEqual(fsrec.nactualcall, 2) -+ -+ def test_strip_dirs(self): -+ -+ def a(): -+ pass -+ -+ stats = utils.run_and_get_func_stats(a, ) -+ stats.strip_dirs() -+ fsa = utils.find_stat_by_name(stats, "a") -+ self.assertEqual(fsa.module, os.path.basename(fsa.module)) -+ -+ @unittest.skipIf(os.name == "nt", "do not run on Windows") -+ def test_run_as_script(self): -+ import re -+ p = subprocess.Popen( -+ ['yappi', os.path.join('./tests', 'run_as_script.py')], -+ stdout=subprocess.PIPE -+ ) -+ out, err = p.communicate() -+ self.assertEqual(p.returncode, 0) -+ func_stats, thread_stats = re.split( -+ b'name\\s+id\\s+tid\\s+ttot\\s+scnt\\s*\n', out -+ ) -+ self.assertTrue(b'FancyThread' in thread_stats) -+ -+ def test_yappi_overhead(self): -+ LOOP_COUNT = 100000 -+ -+ def a(): -+ pass -+ -+ def b(): -+ for i in range(LOOP_COUNT): -+ a() -+ -+ t0 = time.time() -+ yappi.start() -+ b() -+ yappi.stop() -+ time_with_yappi = time.time() - t0 -+ t0 = time.time() -+ b() -+ time_without_yappi = time.time() - t0 -+ if time_without_yappi == 0: -+ time_without_yappi = 0.000001 -+ -+ # in latest v0.82, I calculated this as close to "7.0" in my machine. -+ # however, %83 of this overhead is coming from tickcount(). The other %17 -+ # seems to have been evenly distributed to the internal bookkeeping -+ # structures/algorithms which seems acceptable. Note that our test only -+ # tests one function being profiled at-a-time in a short interval. -+ # profiling high number of functions in a small time -+ # is a different beast, (which is pretty unlikely in most applications) -+ # So as a conclusion: I cannot see any optimization window for Yappi that -+ # is worth implementing as we will only optimize %17 of the time. -+ sys.stderr.write("\r\nYappi puts %0.1f times overhead to the profiled application in average.\r\n" % \ -+ (time_with_yappi / time_without_yappi)) -+ -+ def test_clear_stats_while_running(self): -+ -+ def a(): -+ pass -+ -+ yappi.start() -+ a() -+ yappi.clear_stats() -+ a() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ self.assertEqual(fsa.ncall, 1) -+ -+ def test_generator(self): -+ -+ def _gen(n): -+ while (n > 0): -+ yield n -+ n -= 1 -+ -+ yappi.start() -+ for x in _gen(5): -+ pass -+ self.assertTrue( -+ yappi.convert2pstats(yappi.get_func_stats()) is not None -+ ) -+ -+ def test_slice_child_stats_and_strip_dirs(self): -+ -+ def b(): -+ for i in range(10000000): -+ pass -+ -+ def a(): -+ b() -+ -+ yappi.start(builtins=True) -+ a() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ self.assertTrue(fsa.children[0:1] is not None) -+ prev_afullname = fsa.full_name -+ prev_bchildfullname = fsa.children[fsb].full_name -+ stats.strip_dirs() -+ self.assertTrue(len(prev_afullname) > len(fsa.full_name)) -+ self.assertTrue( -+ len(prev_bchildfullname) > len(fsa.children[fsb].full_name) -+ ) -+ -+ def test_children_stat_functions(self): -+ _timings = {"a_1": 5, "b_1": 3, "c_1": 1} -+ _yappi._set_test_timings(_timings) -+ -+ def b(): -+ pass -+ -+ def c(): -+ pass -+ -+ def a(): -+ b() -+ c() -+ -+ yappi.start() -+ a() -+ b() # non-child call -+ c() # non-child call -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ childs_of_a = fsa.children.get().sort("tavg", "desc") -+ prev_item = None -+ for item in childs_of_a: -+ if prev_item: -+ self.assertTrue(prev_item.tavg > item.tavg) -+ prev_item = item -+ childs_of_a.sort("name", "desc") -+ prev_item = None -+ for item in childs_of_a: -+ if prev_item: -+ self.assertTrue(prev_item.name > item.name) -+ prev_item = item -+ childs_of_a.clear() -+ self.assertTrue(childs_of_a.empty()) -+ -+ def test_no_stats_different_clock_type_load(self): -+ -+ def a(): -+ pass -+ -+ yappi.start() -+ a() -+ yappi.stop() -+ yappi.get_func_stats().save("tests/ystats1.ys") -+ yappi.clear_stats() -+ yappi.set_clock_type("WALL") -+ yappi.start() -+ yappi.stop() -+ stats = yappi.get_func_stats().add("tests/ystats1.ys") -+ fsa = utils.find_stat_by_name(stats, 'a') -+ self.assertTrue(fsa is not None) -+ -+ def test_subsequent_profile(self): -+ _timings = {"a_1": 1, "b_1": 1} -+ _yappi._set_test_timings(_timings) -+ -+ def a(): -+ pass -+ -+ def b(): -+ pass -+ -+ yappi.start() -+ a() -+ yappi.stop() -+ yappi.start() -+ b() -+ yappi.stop() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ self.assertTrue(fsa is not None) -+ self.assertTrue(fsb is not None) -+ self.assertEqual(fsa.ttot, 1) -+ self.assertEqual(fsb.ttot, 1) -+ -+ def test_lambda(self): -+ f = lambda: time.sleep(0.3) -+ yappi.set_clock_type("wall") -+ yappi.start() -+ f() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, '') -+ self.assertTrue(fsa.ttot > 0.1) -+ -+ def test_module_stress(self): -+ self.assertEqual(yappi.is_running(), False) -+ -+ yappi.start() -+ yappi.clear_stats() -+ self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") -+ -+ yappi.stop() -+ yappi.clear_stats() -+ yappi.set_clock_type("cpu") -+ self.assertRaises(yappi.YappiError, yappi.set_clock_type, "dummy") -+ self.assertEqual(yappi.is_running(), False) -+ yappi.clear_stats() -+ yappi.clear_stats() -+ -+ def test_stat_sorting(self): -+ _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ b() -+ -+ def b(): -+ if self._ncall == 2: -+ return -+ self._ncall += 1 -+ a() -+ -+ stats = utils.run_and_get_func_stats(a) -+ stats = stats.sort("totaltime", "desc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.ttot >= stat.ttot) -+ prev_stat = stat -+ stats = stats.sort("totaltime", "asc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.ttot <= stat.ttot) -+ prev_stat = stat -+ stats = stats.sort("avgtime", "asc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.tavg <= stat.tavg) -+ prev_stat = stat -+ stats = stats.sort("name", "asc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.name <= stat.name) -+ prev_stat = stat -+ stats = stats.sort("subtime", "asc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.tsub <= stat.tsub) -+ prev_stat = stat -+ -+ self.assertRaises( -+ yappi.YappiError, stats.sort, "invalid_func_sorttype_arg" -+ ) -+ self.assertRaises( -+ yappi.YappiError, stats.sort, "totaltime", -+ "invalid_func_sortorder_arg" -+ ) -+ -+ def test_start_flags(self): -+ self.assertEqual(_yappi._get_start_flags(), None) -+ yappi.start() -+ -+ def a(): -+ pass -+ -+ a() -+ self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) -+ self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) -+ self.assertEqual(len(yappi.get_thread_stats()), 1) -+ -+ def test_builtin_profiling(self): -+ -+ def a(): -+ time.sleep(0.4) # is a builtin function -+ -+ yappi.set_clock_type('wall') -+ -+ yappi.start(builtins=True) -+ a() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'sleep') -+ self.assertTrue(fsa is not None) -+ self.assertTrue(fsa.ttot > 0.3) -+ yappi.stop() -+ yappi.clear_stats() -+ -+ def a(): -+ pass -+ -+ yappi.start() -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ stats = yappi.get_func_stats() -+ -+ def test_singlethread_profiling(self): -+ yappi.set_clock_type('wall') -+ -+ def a(): -+ time.sleep(0.2) -+ -+ class Worker1(threading.Thread): -+ -+ def a(self): -+ time.sleep(0.3) -+ -+ def run(self): -+ self.a() -+ -+ yappi.start(profile_threads=False) -+ -+ c = Worker1() -+ c.start() -+ c.join() -+ a() -+ stats = yappi.get_func_stats() -+ fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') -+ fsa2 = utils.find_stat_by_name(stats, 'a') -+ self.assertTrue(fsa1 is None) -+ self.assertTrue(fsa2 is not None) -+ self.assertTrue(fsa2.ttot > 0.1) -+ -+ def test_run(self): -+ -+ def profiled(): -+ pass -+ -+ yappi.clear_stats() -+ try: -+ with yappi.run(): -+ profiled() -+ stats = yappi.get_func_stats() -+ finally: -+ yappi.clear_stats() -+ -+ self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) -+ -+ def test_run_recursive(self): -+ -+ def profiled(): -+ pass -+ -+ def not_profiled(): -+ pass -+ -+ yappi.clear_stats() -+ try: -+ with yappi.run(): -+ with yappi.run(): -+ profiled() -+ # Profiling stopped here -+ not_profiled() -+ stats = yappi.get_func_stats() -+ finally: -+ yappi.clear_stats() -+ -+ self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) -+ self.assertIsNone(utils.find_stat_by_name(stats, 'not_profiled')) -+ -+ -+class StatSaveScenarios(utils.YappiUnitTestCase): -+ -+ def test_pstats_conversion(self): -+ -+ def pstat_id(fs): -+ return (fs.module, fs.lineno, fs.name) -+ -+ def a(): -+ d() -+ -+ def b(): -+ d() -+ -+ def c(): -+ pass -+ -+ def d(): -+ pass -+ -+ _timings = {"a_1": 12, "b_1": 7, "c_1": 5, "d_1": 2} -+ _yappi._set_test_timings(_timings) -+ stats = utils.run_and_get_func_stats(a, ) -+ stats.strip_dirs() -+ stats.save("tests/a1.pstats", type="pstat") -+ fsa_pid = pstat_id(utils.find_stat_by_name(stats, "a")) -+ fsd_pid = pstat_id(utils.find_stat_by_name(stats, "d")) -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ stats = utils.run_and_get_func_stats(a, ) -+ stats.strip_dirs() -+ stats.save("tests/a2.pstats", type="pstat") -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ stats = utils.run_and_get_func_stats(b, ) -+ stats.strip_dirs() -+ stats.save("tests/b1.pstats", type="pstat") -+ fsb_pid = pstat_id(utils.find_stat_by_name(stats, "b")) -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ stats = utils.run_and_get_func_stats(c, ) -+ stats.strip_dirs() -+ stats.save("tests/c1.pstats", type="pstat") -+ fsc_pid = pstat_id(utils.find_stat_by_name(stats, "c")) -+ -+ # merge saved stats and check pstats values are correct -+ import pstats -+ p = pstats.Stats( -+ 'tests/a1.pstats', 'tests/a2.pstats', 'tests/b1.pstats', -+ 'tests/c1.pstats' -+ ) -+ p.strip_dirs() -+ # ct = ttot, tt = tsub -+ (cc, nc, tt, ct, callers) = p.stats[fsa_pid] -+ self.assertEqual(cc, nc, 2) -+ self.assertEqual(tt, 20) -+ self.assertEqual(ct, 24) -+ (cc, nc, tt, ct, callers) = p.stats[fsd_pid] -+ self.assertEqual(cc, nc, 3) -+ self.assertEqual(tt, 6) -+ self.assertEqual(ct, 6) -+ self.assertEqual(len(callers), 2) -+ (cc, nc, tt, ct) = callers[fsa_pid] -+ self.assertEqual(cc, nc, 2) -+ self.assertEqual(tt, 4) -+ self.assertEqual(ct, 4) -+ (cc, nc, tt, ct) = callers[fsb_pid] -+ self.assertEqual(cc, nc, 1) -+ self.assertEqual(tt, 2) -+ self.assertEqual(ct, 2) -+ -+ def test_merge_stats(self): -+ _timings = { -+ "a_1": 15, -+ "b_1": 14, -+ "c_1": 12, -+ "d_1": 10, -+ "e_1": 9, -+ "f_1": 7, -+ "g_1": 6, -+ "h_1": 5, -+ "i_1": 1 -+ } -+ _yappi._set_test_timings(_timings) -+ -+ def a(): -+ b() -+ -+ def b(): -+ c() -+ -+ def c(): -+ d() -+ -+ def d(): -+ e() -+ -+ def e(): -+ f() -+ -+ def f(): -+ g() -+ -+ def g(): -+ h() -+ -+ def h(): -+ i() -+ -+ def i(): -+ pass -+ -+ yappi.start() -+ a() -+ a() -+ yappi.stop() -+ stats = yappi.get_func_stats() -+ self.assertRaises( -+ NotImplementedError, stats.save, "", "INVALID_SAVE_TYPE" -+ ) -+ stats.save("tests/ystats2.ys") -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ yappi.start() -+ a() -+ stats = yappi.get_func_stats().add("tests/ystats2.ys") -+ fsa = utils.find_stat_by_name(stats, "a") -+ fsb = utils.find_stat_by_name(stats, "b") -+ fsc = utils.find_stat_by_name(stats, "c") -+ fsd = utils.find_stat_by_name(stats, "d") -+ fse = utils.find_stat_by_name(stats, "e") -+ fsf = utils.find_stat_by_name(stats, "f") -+ fsg = utils.find_stat_by_name(stats, "g") -+ fsh = utils.find_stat_by_name(stats, "h") -+ fsi = utils.find_stat_by_name(stats, "i") -+ self.assertEqual(fsa.ttot, 45) -+ self.assertEqual(fsa.ncall, 3) -+ self.assertEqual(fsa.nactualcall, 3) -+ self.assertEqual(fsa.tsub, 3) -+ self.assertEqual(fsa.children[fsb].ttot, fsb.ttot) -+ self.assertEqual(fsa.children[fsb].tsub, fsb.tsub) -+ self.assertEqual(fsb.children[fsc].ttot, fsc.ttot) -+ self.assertEqual(fsb.children[fsc].tsub, fsc.tsub) -+ self.assertEqual(fsc.tsub, 6) -+ self.assertEqual(fsc.children[fsd].ttot, fsd.ttot) -+ self.assertEqual(fsc.children[fsd].tsub, fsd.tsub) -+ self.assertEqual(fsd.children[fse].ttot, fse.ttot) -+ self.assertEqual(fsd.children[fse].tsub, fse.tsub) -+ self.assertEqual(fse.children[fsf].ttot, fsf.ttot) -+ self.assertEqual(fse.children[fsf].tsub, fsf.tsub) -+ self.assertEqual(fsf.children[fsg].ttot, fsg.ttot) -+ self.assertEqual(fsf.children[fsg].tsub, fsg.tsub) -+ self.assertEqual(fsg.ttot, 18) -+ self.assertEqual(fsg.tsub, 3) -+ self.assertEqual(fsg.children[fsh].ttot, fsh.ttot) -+ self.assertEqual(fsg.children[fsh].tsub, fsh.tsub) -+ self.assertEqual(fsh.ttot, 15) -+ self.assertEqual(fsh.tsub, 12) -+ self.assertEqual(fsh.tavg, 5) -+ self.assertEqual(fsh.children[fsi].ttot, fsi.ttot) -+ self.assertEqual(fsh.children[fsi].tsub, fsi.tsub) -+ #stats.debug_print() -+ -+ def test_merge_multithreaded_stats(self): -+ import _yappi -+ timings = {"a_1": 2, "b_1": 1} -+ _yappi._set_test_timings(timings) -+ -+ def a(): -+ pass -+ -+ def b(): -+ pass -+ -+ yappi.start() -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ t = threading.Thread(target=b) -+ t.start() -+ t.join() -+ yappi.get_func_stats().save("tests/ystats1.ys") -+ yappi.clear_stats() -+ _yappi._set_test_timings(timings) -+ self.assertEqual(len(yappi.get_func_stats()), 0) -+ self.assertEqual(len(yappi.get_thread_stats()), 1) -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ -+ self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) -+ self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) -+ yappi.get_func_stats().save("tests/ystats2.ys") -+ -+ stats = yappi.YFuncStats([ -+ "tests/ystats1.ys", -+ "tests/ystats2.ys", -+ ]) -+ fsa = utils.find_stat_by_name(stats, "a") -+ fsb = utils.find_stat_by_name(stats, "b") -+ self.assertEqual(fsa.ncall, 2) -+ self.assertEqual(fsb.ncall, 1) -+ self.assertEqual(fsa.tsub, fsa.ttot, 4) -+ self.assertEqual(fsb.tsub, fsb.ttot, 1) -+ -+ def test_merge_load_different_clock_types(self): -+ yappi.start(builtins=True) -+ -+ def a(): -+ b() -+ -+ def b(): -+ c() -+ -+ def c(): -+ pass -+ -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ yappi.get_func_stats().sort("name", "asc").save("tests/ystats1.ys") -+ yappi.stop() -+ yappi.clear_stats() -+ yappi.start(builtins=False) -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ yappi.get_func_stats().save("tests/ystats2.ys") -+ yappi.stop() -+ self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") -+ yappi.clear_stats() -+ yappi.set_clock_type("wall") -+ yappi.start() -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ yappi.get_func_stats().save("tests/ystats3.ys") -+ self.assertRaises( -+ yappi.YappiError, -+ yappi.YFuncStats().add("tests/ystats1.ys").add, "tests/ystats3.ys" -+ ) -+ stats = yappi.YFuncStats(["tests/ystats1.ys", -+ "tests/ystats2.ys"]).sort("name") -+ fsa = utils.find_stat_by_name(stats, "a") -+ fsb = utils.find_stat_by_name(stats, "b") -+ fsc = utils.find_stat_by_name(stats, "c") -+ self.assertEqual(fsa.ncall, 2) -+ self.assertEqual(fsa.ncall, fsb.ncall, fsc.ncall) -+ -+ def test_merge_aabab_aabbc(self): -+ _timings = { -+ "a_1": 15, -+ "a_2": 14, -+ "b_1": 12, -+ "a_3": 10, -+ "b_2": 9, -+ "c_1": 4 -+ } -+ _yappi._set_test_timings(_timings) -+ -+ def a(): -+ if self._ncall == 1: -+ self._ncall += 1 -+ a() -+ elif self._ncall == 5: -+ self._ncall += 1 -+ a() -+ else: -+ b() -+ -+ def b(): -+ if self._ncall == 2: -+ self._ncall += 1 -+ a() -+ elif self._ncall == 6: -+ self._ncall += 1 -+ b() -+ elif self._ncall == 7: -+ c() -+ else: -+ return -+ -+ def c(): -+ pass -+ -+ self._ncall = 1 -+ stats = utils.run_and_get_func_stats(a, ) -+ stats.save("tests/ystats1.ys") -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ #stats.print_all() -+ -+ self._ncall = 5 -+ stats = utils.run_and_get_func_stats(a, ) -+ stats.save("tests/ystats2.ys") -+ -+ #stats.print_all() -+ -+ def a(): # same name but another function(code object) -+ pass -+ -+ yappi.start() -+ a() -+ stats = yappi.get_func_stats().add( -+ ["tests/ystats1.ys", "tests/ystats2.ys"] -+ ) -+ #stats.print_all() -+ self.assertEqual(len(stats), 4) -+ -+ fsa = None -+ for stat in stats: -+ if stat.name == "a" and stat.ttot == 45: -+ fsa = stat -+ break -+ self.assertTrue(fsa is not None) -+ -+ self.assertEqual(fsa.ncall, 7) -+ self.assertEqual(fsa.nactualcall, 3) -+ self.assertEqual(fsa.ttot, 45) -+ self.assertEqual(fsa.tsub, 10) -+ fsb = utils.find_stat_by_name(stats, "b") -+ fsc = utils.find_stat_by_name(stats, "c") -+ self.assertEqual(fsb.ncall, 6) -+ self.assertEqual(fsb.nactualcall, 3) -+ self.assertEqual(fsb.ttot, 36) -+ self.assertEqual(fsb.tsub, 27) -+ self.assertEqual(fsb.tavg, 6) -+ self.assertEqual(fsc.ttot, 8) -+ self.assertEqual(fsc.tsub, 8) -+ self.assertEqual(fsc.tavg, 4) -+ self.assertEqual(fsc.nactualcall, fsc.ncall, 2) -+ -+ -+class MultithreadedScenarios(utils.YappiUnitTestCase): -+ -+ def test_issue_32(self): -+ ''' -+ Start yappi from different thread and we get Internal Error(15) as -+ the current_ctx_id() called while enumerating the threads in start() -+ and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() -+ returns wrong object and thus sets an invalid id for the _ctx structure. -+ -+ When this issue happens multiple Threads have same tid as the internal ts_ptr -+ will be same for different contexts. So, let's see if that happens -+ ''' -+ -+ def foo(): -+ time.sleep(0.2) -+ -+ def bar(): -+ time.sleep(0.1) -+ -+ def thread_func(): -+ yappi.set_clock_type("wall") -+ yappi.start() -+ -+ bar() -+ -+ t = threading.Thread(target=thread_func) -+ t.start() -+ t.join() -+ -+ foo() -+ -+ yappi.stop() -+ -+ thread_ids = set() -+ for tstat in yappi.get_thread_stats(): -+ self.assertTrue(tstat.tid not in thread_ids) -+ thread_ids.add(tstat.tid) -+ -+ def test_subsequent_profile(self): -+ WORKER_COUNT = 5 -+ -+ def a(): -+ pass -+ -+ def b(): -+ pass -+ -+ def c(): -+ pass -+ -+ _timings = { -+ "a_1": 3, -+ "b_1": 2, -+ "c_1": 1, -+ } -+ -+ yappi.start() -+ -+ def g(): -+ pass -+ -+ g() -+ yappi.stop() -+ yappi.clear_stats() -+ _yappi._set_test_timings(_timings) -+ yappi.start() -+ -+ _dummy = [] -+ for i in range(WORKER_COUNT): -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ for i in range(WORKER_COUNT): -+ t = threading.Thread(target=b) -+ t.start() -+ _dummy.append(t) -+ t.join() -+ for i in range(WORKER_COUNT): -+ t = threading.Thread(target=a) -+ t.start() -+ t.join() -+ for i in range(WORKER_COUNT): -+ t = threading.Thread(target=c) -+ t.start() -+ t.join() -+ yappi.stop() -+ yappi.start() -+ -+ def f(): -+ pass -+ -+ f() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ self.assertEqual(fsa.ncall, 10) -+ self.assertEqual(fsb.ncall, 5) -+ self.assertEqual(fsc.ncall, 5) -+ self.assertEqual(fsa.ttot, fsa.tsub, 30) -+ self.assertEqual(fsb.ttot, fsb.tsub, 10) -+ self.assertEqual(fsc.ttot, fsc.tsub, 5) -+ -+ # MACOSx optimizes by only creating one worker thread -+ self.assertTrue(len(yappi.get_thread_stats()) >= 2) -+ -+ def test_basic(self): -+ yappi.set_clock_type('wall') -+ -+ def dummy(): -+ pass -+ -+ def a(): -+ time.sleep(0.2) -+ -+ class Worker1(threading.Thread): -+ -+ def a(self): -+ time.sleep(0.3) -+ -+ def run(self): -+ self.a() -+ -+ yappi.start(builtins=False, profile_threads=True) -+ -+ c = Worker1() -+ c.start() -+ c.join() -+ a() -+ stats = yappi.get_func_stats() -+ fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') -+ fsa2 = utils.find_stat_by_name(stats, 'a') -+ self.assertTrue(fsa1 is not None) -+ self.assertTrue(fsa2 is not None) -+ self.assertTrue(fsa1.ttot > 0.2) -+ self.assertTrue(fsa2.ttot > 0.1) -+ tstats = yappi.get_thread_stats() -+ self.assertEqual(len(tstats), 2) -+ tsa = utils.find_stat_by_name(tstats, 'Worker1') -+ tsm = utils.find_stat_by_name(tstats, '_MainThread') -+ dummy() # call dummy to force ctx name to be retrieved again. -+ self.assertTrue(tsa is not None) -+ # TODO: I put dummy() to fix below, remove the comments after a while. -+ self.assertTrue( # FIX: I see this fails sometimes? -+ tsm is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(tstats)))) -+ -+ def test_ctx_stats(self): -+ from threading import Thread -+ DUMMY_WORKER_COUNT = 5 -+ yappi.start() -+ -+ class DummyThread(Thread): -+ pass -+ -+ def dummy(): -+ pass -+ -+ def dummy_worker(): -+ pass -+ -+ for i in range(DUMMY_WORKER_COUNT): -+ t = DummyThread(target=dummy_worker) -+ t.start() -+ t.join() -+ yappi.stop() -+ stats = yappi.get_thread_stats() -+ tsa = utils.find_stat_by_name(stats, "DummyThread") -+ self.assertTrue(tsa is not None) -+ yappi.clear_stats() -+ time.sleep(1.0) -+ _timings = { -+ "a_1": 6, -+ "b_1": 5, -+ "c_1": 3, -+ "d_1": 1, -+ "a_2": 4, -+ "b_2": 3, -+ "c_2": 2, -+ "d_2": 1 -+ } -+ _yappi._set_test_timings(_timings) -+ -+ class Thread1(Thread): -+ pass -+ -+ class Thread2(Thread): -+ pass -+ -+ def a(): -+ b() -+ -+ def b(): -+ c() -+ -+ def c(): -+ d() -+ -+ def d(): -+ time.sleep(0.6) -+ -+ yappi.set_clock_type("wall") -+ yappi.start() -+ t1 = Thread1(target=a) -+ t1.start() -+ t2 = Thread2(target=a) -+ t2.start() -+ t1.join() -+ t2.join() -+ stats = yappi.get_thread_stats() -+ -+ # the fist clear_stats clears the context table? -+ tsa = utils.find_stat_by_name(stats, "DummyThread") -+ self.assertTrue(tsa is None) -+ -+ tst1 = utils.find_stat_by_name(stats, "Thread1") -+ tst2 = utils.find_stat_by_name(stats, "Thread2") -+ tsmain = utils.find_stat_by_name(stats, "_MainThread") -+ dummy() # call dummy to force ctx name to be retrieved again. -+ self.assertTrue(len(stats) == 3) -+ self.assertTrue(tst1 is not None) -+ self.assertTrue(tst2 is not None) -+ # TODO: I put dummy() to fix below, remove the comments after a while. -+ self.assertTrue( # FIX: I see this fails sometimes -+ tsmain is not None, -+ 'Could not find "_MainThread". Found: %s' % (', '.join(utils.get_stat_names(stats)))) -+ self.assertTrue(1.0 > tst2.ttot >= 0.5) -+ self.assertTrue(1.0 > tst1.ttot >= 0.5) -+ -+ # test sorting of the ctx stats -+ stats = stats.sort("totaltime", "desc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.ttot >= stat.ttot) -+ prev_stat = stat -+ stats = stats.sort("totaltime", "asc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.ttot <= stat.ttot) -+ prev_stat = stat -+ stats = stats.sort("schedcount", "desc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.sched_count >= stat.sched_count) -+ prev_stat = stat -+ stats = stats.sort("name", "desc") -+ prev_stat = None -+ for stat in stats: -+ if prev_stat: -+ self.assertTrue(prev_stat.name.lower() >= stat.name.lower()) -+ prev_stat = stat -+ self.assertRaises( -+ yappi.YappiError, stats.sort, "invalid_thread_sorttype_arg" -+ ) -+ self.assertRaises( -+ yappi.YappiError, stats.sort, "invalid_thread_sortorder_arg" -+ ) -+ -+ def test_ctx_stats_cpu(self): -+ -+ def get_thread_name(): -+ try: -+ return threading.current_thread().name -+ except AttributeError: -+ return "Anonymous" -+ -+ def burn_cpu(sec): -+ t0 = yappi.get_clock_time() -+ elapsed = 0 -+ while (elapsed < sec): -+ for _ in range(1000): -+ pass -+ elapsed = yappi.get_clock_time() - t0 -+ -+ def test(): -+ -+ ts = [] -+ for i in (0.01, 0.05, 0.1): -+ t = threading.Thread(target=burn_cpu, args=(i, )) -+ t.name = "burn_cpu-%s" % str(i) -+ t.start() -+ ts.append(t) -+ for t in ts: -+ t.join() -+ -+ yappi.set_clock_type("cpu") -+ yappi.set_context_name_callback(get_thread_name) -+ -+ yappi.start() -+ -+ test() -+ -+ yappi.stop() -+ -+ tstats = yappi.get_thread_stats() -+ r1 = ''' -+ burn_cpu-0.1 3 123145356058624 0.100105 8 -+ burn_cpu-0.05 2 123145361313792 0.050149 8 -+ burn_cpu-0.01 1 123145356058624 0.010127 2 -+ MainThread 0 4321620864 0.001632 6 -+ ''' -+ self.assert_ctx_stats_almost_equal(r1, tstats) -+ -+ def test_producer_consumer_with_queues(self): -+ # we currently just stress yappi, no functionality test is done here. -+ yappi.start() -+ if utils.is_py3x(): -+ from queue import Queue -+ else: -+ from Queue import Queue -+ from threading import Thread -+ WORKER_THREAD_COUNT = 50 -+ WORK_ITEM_COUNT = 2000 -+ -+ def worker(): -+ while True: -+ item = q.get() -+ # do the work with item -+ q.task_done() -+ -+ q = Queue() -+ for i in range(WORKER_THREAD_COUNT): -+ t = Thread(target=worker) -+ t.daemon = True -+ t.start() -+ -+ for item in range(WORK_ITEM_COUNT): -+ q.put(item) -+ q.join() # block until all tasks are done -+ #yappi.get_func_stats().sort("callcount").print_all() -+ yappi.stop() -+ -+ def test_temporary_lock_waiting(self): -+ yappi.start() -+ _lock = threading.Lock() -+ -+ def worker(): -+ _lock.acquire() -+ try: -+ time.sleep(1.0) -+ finally: -+ _lock.release() -+ -+ t1 = threading.Thread(target=worker) -+ t2 = threading.Thread(target=worker) -+ t1.start() -+ t2.start() -+ t1.join() -+ t2.join() -+ #yappi.get_func_stats().sort("callcount").print_all() -+ yappi.stop() -+ -+ @unittest.skipIf(os.name != "posix", "requires Posix compliant OS") -+ def test_signals_with_blocking_calls(self): -+ import signal, os, time -+ -+ # just to verify if signal is handled correctly and stats/yappi are not corrupted. -+ def handler(signum, frame): -+ raise Exception("Signal handler executed!") -+ -+ yappi.start() -+ signal.signal(signal.SIGALRM, handler) -+ signal.alarm(1) -+ self.assertRaises(Exception, time.sleep, 2) -+ stats = yappi.get_func_stats() -+ fsh = utils.find_stat_by_name(stats, "handler") -+ self.assertTrue(fsh is not None) -+ -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") -+ def test_concurrent_futures(self): -+ yappi.start() -+ from concurrent.futures import ThreadPoolExecutor -+ with ThreadPoolExecutor(max_workers=5) as executor: -+ f = executor.submit(pow, 5, 2) -+ self.assertEqual(f.result(), 25) -+ time.sleep(1.0) -+ yappi.stop() -+ -+ @unittest.skipIf(not sys.version_info >= (3, 2), "requires Python 3.2") -+ def test_barrier(self): -+ yappi.start() -+ b = threading.Barrier(2, timeout=1) -+ -+ def worker(): -+ try: -+ b.wait() -+ except threading.BrokenBarrierError: -+ pass -+ except Exception: -+ raise Exception("BrokenBarrierError not raised") -+ -+ t1 = threading.Thread(target=worker) -+ t1.start() -+ #b.wait() -+ t1.join() -+ yappi.stop() -+ -+ -+class NonRecursiveFunctions(utils.YappiUnitTestCase): -+ -+ def test_abcd(self): -+ _timings = {"a_1": 6, "b_1": 5, "c_1": 3, "d_1": 1} -+ _yappi._set_test_timings(_timings) -+ -+ def a(): -+ b() -+ -+ def b(): -+ c() -+ -+ def c(): -+ d() -+ -+ def d(): -+ pass -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ fsd = utils.find_stat_by_name(stats, 'd') -+ cfsab = fsa.children[fsb] -+ cfsbc = fsb.children[fsc] -+ cfscd = fsc.children[fsd] -+ -+ self.assertEqual(fsa.ttot, 6) -+ self.assertEqual(fsa.tsub, 1) -+ self.assertEqual(fsb.ttot, 5) -+ self.assertEqual(fsb.tsub, 2) -+ self.assertEqual(fsc.ttot, 3) -+ self.assertEqual(fsc.tsub, 2) -+ self.assertEqual(fsd.ttot, 1) -+ self.assertEqual(fsd.tsub, 1) -+ self.assertEqual(cfsab.ttot, 5) -+ self.assertEqual(cfsab.tsub, 2) -+ self.assertEqual(cfsbc.ttot, 3) -+ self.assertEqual(cfsbc.tsub, 2) -+ self.assertEqual(cfscd.ttot, 1) -+ self.assertEqual(cfscd.tsub, 1) -+ -+ def test_stop_in_middle(self): -+ _timings = {"a_1": 6, "b_1": 4} -+ _yappi._set_test_timings(_timings) -+ -+ def a(): -+ b() -+ yappi.stop() -+ -+ def b(): -+ time.sleep(0.2) -+ -+ yappi.start() -+ a() -+ stats = yappi.get_func_stats() -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ -+ self.assertEqual(fsa.ncall, 1) -+ self.assertEqual(fsa.nactualcall, 0) -+ self.assertEqual(fsa.ttot, 0) # no call_leave called -+ self.assertEqual(fsa.tsub, 0) # no call_leave called -+ self.assertEqual(fsb.ttot, 4) -+ -+ -+class RecursiveFunctions(utils.YappiUnitTestCase): -+ -+ def test_fibonacci(self): -+ -+ def fib(n): -+ if n > 1: -+ return fib(n - 1) + fib(n - 2) -+ else: -+ return n -+ -+ stats = utils.run_and_get_func_stats(fib, 22) -+ fs = utils.find_stat_by_name(stats, 'fib') -+ self.assertEqual(fs.ncall, 57313) -+ self.assertEqual(fs.ttot, fs.tsub) -+ -+ def test_abcadc(self): -+ _timings = { -+ "a_1": 20, -+ "b_1": 19, -+ "c_1": 17, -+ "a_2": 13, -+ "d_1": 12, -+ "c_2": 10, -+ "a_3": 5 -+ } -+ _yappi._set_test_timings(_timings) -+ -+ def a(n): -+ if n == 3: -+ return -+ if n == 1 + 1: -+ d(n) -+ else: -+ b(n) -+ -+ def b(n): -+ c(n) -+ -+ def c(n): -+ a(n + 1) -+ -+ def d(n): -+ c(n) -+ -+ stats = utils.run_and_get_func_stats(a, 1) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ fsd = utils.find_stat_by_name(stats, 'd') -+ self.assertEqual(fsa.ncall, 3) -+ self.assertEqual(fsa.nactualcall, 1) -+ self.assertEqual(fsa.ttot, 20) -+ self.assertEqual(fsa.tsub, 7) -+ self.assertEqual(fsb.ttot, 19) -+ self.assertEqual(fsb.tsub, 2) -+ self.assertEqual(fsc.ttot, 17) -+ self.assertEqual(fsc.tsub, 9) -+ self.assertEqual(fsd.ttot, 12) -+ self.assertEqual(fsd.tsub, 2) -+ cfsca = fsc.children[fsa] -+ self.assertEqual(cfsca.nactualcall, 0) -+ self.assertEqual(cfsca.ncall, 2) -+ self.assertEqual(cfsca.ttot, 13) -+ self.assertEqual(cfsca.tsub, 6) -+ -+ def test_aaaa(self): -+ _timings = {"d_1": 9, "d_2": 7, "d_3": 3, "d_4": 2} -+ _yappi._set_test_timings(_timings) -+ -+ def d(n): -+ if n == 3: -+ return -+ d(n + 1) -+ -+ stats = utils.run_and_get_func_stats(d, 0) -+ fsd = utils.find_stat_by_name(stats, 'd') -+ self.assertEqual(fsd.ncall, 4) -+ self.assertEqual(fsd.nactualcall, 1) -+ self.assertEqual(fsd.ttot, 9) -+ self.assertEqual(fsd.tsub, 9) -+ cfsdd = fsd.children[fsd] -+ self.assertEqual(cfsdd.ttot, 7) -+ self.assertEqual(cfsdd.tsub, 7) -+ self.assertEqual(cfsdd.ncall, 3) -+ self.assertEqual(cfsdd.nactualcall, 0) -+ -+ def test_abcabc(self): -+ _timings = { -+ "a_1": 20, -+ "b_1": 19, -+ "c_1": 17, -+ "a_2": 13, -+ "b_2": 11, -+ "c_2": 9, -+ "a_3": 6 -+ } -+ _yappi._set_test_timings(_timings) -+ -+ def a(n): -+ if n == 3: -+ return -+ else: -+ b(n) -+ -+ def b(n): -+ c(n) -+ -+ def c(n): -+ a(n + 1) -+ -+ stats = utils.run_and_get_func_stats(a, 1) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ self.assertEqual(fsa.ncall, 3) -+ self.assertEqual(fsa.nactualcall, 1) -+ self.assertEqual(fsa.ttot, 20) -+ self.assertEqual(fsa.tsub, 9) -+ self.assertEqual(fsb.ttot, 19) -+ self.assertEqual(fsb.tsub, 4) -+ self.assertEqual(fsc.ttot, 17) -+ self.assertEqual(fsc.tsub, 7) -+ cfsab = fsa.children[fsb] -+ cfsbc = fsb.children[fsc] -+ cfsca = fsc.children[fsa] -+ self.assertEqual(cfsab.ttot, 19) -+ self.assertEqual(cfsab.tsub, 4) -+ self.assertEqual(cfsbc.ttot, 17) -+ self.assertEqual(cfsbc.tsub, 7) -+ self.assertEqual(cfsca.ttot, 13) -+ self.assertEqual(cfsca.tsub, 8) -+ -+ def test_abcbca(self): -+ _timings = {"a_1": 10, "b_1": 9, "c_1": 7, "b_2": 4, "c_2": 2, "a_2": 1} -+ _yappi._set_test_timings(_timings) -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 1: -+ b() -+ else: -+ return -+ -+ def b(): -+ c() -+ -+ def c(): -+ if self._ncall == 1: -+ self._ncall += 1 -+ b() -+ else: -+ a() -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ cfsab = fsa.children[fsb] -+ cfsbc = fsb.children[fsc] -+ cfsca = fsc.children[fsa] -+ self.assertEqual(fsa.ttot, 10) -+ self.assertEqual(fsa.tsub, 2) -+ self.assertEqual(fsb.ttot, 9) -+ self.assertEqual(fsb.tsub, 4) -+ self.assertEqual(fsc.ttot, 7) -+ self.assertEqual(fsc.tsub, 4) -+ self.assertEqual(cfsab.ttot, 9) -+ self.assertEqual(cfsab.tsub, 2) -+ self.assertEqual(cfsbc.ttot, 7) -+ self.assertEqual(cfsbc.tsub, 4) -+ self.assertEqual(cfsca.ttot, 1) -+ self.assertEqual(cfsca.tsub, 1) -+ self.assertEqual(cfsca.ncall, 1) -+ self.assertEqual(cfsca.nactualcall, 0) -+ -+ def test_aabccb(self): -+ _timings = { -+ "a_1": 13, -+ "a_2": 11, -+ "b_1": 9, -+ "c_1": 5, -+ "c_2": 3, -+ "b_2": 1 -+ } -+ _yappi._set_test_timings(_timings) -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 1: -+ self._ncall += 1 -+ a() -+ else: -+ b() -+ -+ def b(): -+ if self._ncall == 3: -+ return -+ else: -+ c() -+ -+ def c(): -+ if self._ncall == 2: -+ self._ncall += 1 -+ c() -+ else: -+ b() -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ fsc = utils.find_stat_by_name(stats, 'c') -+ cfsaa = fsa.children[fsa.index] -+ cfsab = fsa.children[fsb] -+ cfsbc = fsb.children[fsc.full_name] -+ cfscc = fsc.children[fsc] -+ cfscb = fsc.children[fsb] -+ self.assertEqual(fsb.ttot, 9) -+ self.assertEqual(fsb.tsub, 5) -+ self.assertEqual(cfsbc.ttot, 5) -+ self.assertEqual(cfsbc.tsub, 2) -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 4) -+ self.assertEqual(cfsab.ttot, 9) -+ self.assertEqual(cfsab.tsub, 4) -+ self.assertEqual(cfsaa.ttot, 11) -+ self.assertEqual(cfsaa.tsub, 2) -+ self.assertEqual(fsc.ttot, 5) -+ self.assertEqual(fsc.tsub, 4) -+ -+ def test_abaa(self): -+ _timings = {"a_1": 13, "b_1": 10, "a_2": 9, "a_3": 5} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 1: -+ b() -+ elif self._ncall == 2: -+ self._ncall += 1 -+ a() -+ else: -+ return -+ -+ def b(): -+ self._ncall += 1 -+ a() -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ cfsaa = fsa.children[fsa] -+ cfsba = fsb.children[fsa] -+ self.assertEqual(fsb.ttot, 10) -+ self.assertEqual(fsb.tsub, 1) -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 12) -+ self.assertEqual(cfsaa.ttot, 5) -+ self.assertEqual(cfsaa.tsub, 5) -+ self.assertEqual(cfsba.ttot, 9) -+ self.assertEqual(cfsba.tsub, 4) -+ -+ def test_aabb(self): -+ _timings = {"a_1": 13, "a_2": 10, "b_1": 9, "b_2": 5} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 1: -+ self._ncall += 1 -+ a() -+ elif self._ncall == 2: -+ b() -+ else: -+ return -+ -+ def b(): -+ if self._ncall == 2: -+ self._ncall += 1 -+ b() -+ else: -+ return -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ cfsaa = fsa.children[fsa] -+ cfsab = fsa.children[fsb] -+ cfsbb = fsb.children[fsb] -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 4) -+ self.assertEqual(fsb.ttot, 9) -+ self.assertEqual(fsb.tsub, 9) -+ self.assertEqual(cfsaa.ttot, 10) -+ self.assertEqual(cfsaa.tsub, 1) -+ self.assertEqual(cfsab.ttot, 9) -+ self.assertEqual(cfsab.tsub, 4) -+ self.assertEqual(cfsbb.ttot, 5) -+ self.assertEqual(cfsbb.tsub, 5) -+ -+ def test_abbb(self): -+ _timings = {"a_1": 13, "b_1": 10, "b_2": 6, "b_3": 1} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 1: -+ b() -+ -+ def b(): -+ if self._ncall == 3: -+ return -+ self._ncall += 1 -+ b() -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ cfsab = fsa.children[fsb] -+ cfsbb = fsb.children[fsb] -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 3) -+ self.assertEqual(fsb.ttot, 10) -+ self.assertEqual(fsb.tsub, 10) -+ self.assertEqual(fsb.ncall, 3) -+ self.assertEqual(fsb.nactualcall, 1) -+ self.assertEqual(cfsab.ttot, 10) -+ self.assertEqual(cfsab.tsub, 4) -+ self.assertEqual(cfsbb.ttot, 6) -+ self.assertEqual(cfsbb.tsub, 6) -+ self.assertEqual(cfsbb.nactualcall, 0) -+ self.assertEqual(cfsbb.ncall, 2) -+ -+ def test_aaab(self): -+ _timings = {"a_1": 13, "a_2": 10, "a_3": 6, "b_1": 1} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ if self._ncall == 3: -+ b() -+ return -+ self._ncall += 1 -+ a() -+ -+ def b(): -+ return -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ cfsaa = fsa.children[fsa] -+ cfsab = fsa.children[fsb] -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 12) -+ self.assertEqual(fsb.ttot, 1) -+ self.assertEqual(fsb.tsub, 1) -+ self.assertEqual(cfsaa.ttot, 10) -+ self.assertEqual(cfsaa.tsub, 9) -+ self.assertEqual(cfsab.ttot, 1) -+ self.assertEqual(cfsab.tsub, 1) -+ -+ def test_abab(self): -+ _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} -+ _yappi._set_test_timings(_timings) -+ -+ self._ncall = 1 -+ -+ def a(): -+ b() -+ -+ def b(): -+ if self._ncall == 2: -+ return -+ self._ncall += 1 -+ a() -+ -+ stats = utils.run_and_get_func_stats(a) -+ fsa = utils.find_stat_by_name(stats, 'a') -+ fsb = utils.find_stat_by_name(stats, 'b') -+ cfsab = fsa.children[fsb] -+ cfsba = fsb.children[fsa] -+ self.assertEqual(fsa.ttot, 13) -+ self.assertEqual(fsa.tsub, 8) -+ self.assertEqual(fsb.ttot, 10) -+ self.assertEqual(fsb.tsub, 5) -+ self.assertEqual(cfsab.ttot, 10) -+ self.assertEqual(cfsab.tsub, 5) -+ self.assertEqual(cfsab.ncall, 2) -+ self.assertEqual(cfsab.nactualcall, 1) -+ self.assertEqual(cfsba.ttot, 6) -+ self.assertEqual(cfsba.tsub, 5) -+ -+ -+if __name__ == '__main__': -+ # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] -+ # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] -+ unittest.main() ---- a/tests/test_hooks.py -+++ b/tests/test_hooks.py -@@ -5,7 +5,7 @@ import unittest - import time - - import yappi --import utils -+import tests.utils as utils - - - def a(): ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -2,7 +2,7 @@ import unittest - import yappi - import threading - import time --from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io -+from .utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io - - - class MultiThreadTests(YappiUnitTestCase): diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch new file mode 100644 index 0000000000..70d4607c29 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0001-test_functionality-convert-line-endings-to-Unix.patch @@ -0,0 +1,3845 @@ +From 0136ca731cba8b056b3f2ff0e7df3953b94f1e87 Mon Sep 17 00:00:00 2001 +From: Tim Orling +Date: Sun, 24 Dec 2023 09:41:57 -0800 +Subject: [PATCH 1/2] test_functionality: convert line endings to Unix + +Convert the Windows line endings with dos2unix to be like the +other files in tests/* + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling +--- + tests/test_functionality.py | 3822 +++++++++++++++++------------------ + 1 file changed, 1911 insertions(+), 1911 deletions(-) + +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 0e99c47..38bbe67 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -1,1911 +1,1911 @@ +-import os +-import sys +-import time +-import threading +-import unittest +-import yappi +-import _yappi +-import utils +-import multiprocessing +-import subprocess +- +-_counter = 0 +- +- +-class BasicUsage(utils.YappiUnitTestCase): +- +- def test_callback_function_int_return_overflow(self): +- # this test is just here to check if any errors are generated, as the err +- # is printed in C side, I did not include it here. THere are ways to test +- # this deterministically, I did not bother +- import ctypes +- +- def _unsigned_overflow_margin(): +- return 2**(ctypes.sizeof(ctypes.c_void_p) * 8) - 1 +- +- def foo(): +- pass +- +- #with utils.captured_output() as (out, err): +- yappi.set_context_id_callback(_unsigned_overflow_margin) +- yappi.set_tag_callback(_unsigned_overflow_margin) +- yappi.start() +- foo() +- +- def test_issue60(self): +- +- def foo(): +- buf = bytearray() +- buf += b't' * 200 +- view = memoryview(buf)[10:] +- view = view.tobytes() +- del buf[:10] # this throws exception +- return view +- +- yappi.start(builtins=True) +- foo() +- self.assertTrue( +- len( +- yappi.get_func_stats( +- filter_callback=lambda x: yappi. +- func_matches(x, [memoryview.tobytes]) +- ) +- ) > 0 +- ) +- yappi.stop() +- +- def test_issue54(self): +- +- def _tag_cbk(): +- global _counter +- _counter += 1 +- return _counter +- +- def a(): +- pass +- +- def b(): +- pass +- +- yappi.set_tag_callback(_tag_cbk) +- yappi.start() +- a() +- a() +- a() +- yappi.stop() +- stats = yappi.get_func_stats() +- self.assertEqual(stats.pop().ncall, 3) # aggregated if no tag is given +- stats = yappi.get_func_stats(tag=1) +- +- for i in range(1, 3): +- stats = yappi.get_func_stats(tag=i) +- stats = yappi.get_func_stats( +- tag=i, filter_callback=lambda x: yappi.func_matches(x, [a]) +- ) +- +- stat = stats.pop() +- self.assertEqual(stat.ncall, 1) +- +- yappi.set_tag_callback(None) +- yappi.clear_stats() +- yappi.start() +- b() +- b() +- stats = yappi.get_func_stats() +- self.assertEqual(len(stats), 1) +- stat = stats.pop() +- self.assertEqual(stat.ncall, 2) +- +- def test_filter(self): +- +- def a(): +- pass +- +- def b(): +- a() +- +- def c(): +- b() +- +- _TCOUNT = 5 +- +- ts = [] +- yappi.start() +- for i in range(_TCOUNT): +- t = threading.Thread(target=c) +- t.start() +- ts.append(t) +- +- for t in ts: +- t.join() +- +- yappi.stop() +- +- ctx_ids = [] +- for tstat in yappi.get_thread_stats(): +- if tstat.name == '_MainThread': +- main_ctx_id = tstat.id +- else: +- ctx_ids.append(tstat.id) +- +- fstats = yappi.get_func_stats(filter={"ctx_id": 9}) +- self.assertTrue(fstats.empty()) +- fstats = yappi.get_func_stats( +- filter={ +- "ctx_id": main_ctx_id, +- "name": "c" +- } +- ) # main thread +- self.assertTrue(fstats.empty()) +- +- for i in ctx_ids: +- fstats = yappi.get_func_stats( +- filter={ +- "ctx_id": i, +- "name": "a", +- "ncall": 1 +- } +- ) +- self.assertEqual(fstats.pop().ncall, 1) +- fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "b"}) +- self.assertEqual(fstats.pop().ncall, 1) +- fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "c"}) +- self.assertEqual(fstats.pop().ncall, 1) +- +- yappi.clear_stats() +- yappi.start(builtins=True) +- time.sleep(0.1) +- yappi.stop() +- fstats = yappi.get_func_stats(filter={"module": "time"}) +- self.assertEqual(len(fstats), 1) +- +- # invalid filters` +- self.assertRaises( +- Exception, yappi.get_func_stats, filter={'tag': "sss"} +- ) +- self.assertRaises( +- Exception, yappi.get_func_stats, filter={'ctx_id': "None"} +- ) +- +- def test_filter_callback(self): +- +- def a(): +- time.sleep(0.1) +- +- def b(): +- a() +- +- def c(): +- pass +- +- def d(): +- pass +- +- yappi.set_clock_type("wall") +- yappi.start(builtins=True) +- a() +- b() +- c() +- d() +- stats = yappi.get_func_stats( +- filter_callback=lambda x: yappi.func_matches(x, [a, b]) +- ) +- #stats.print_all() +- r1 = ''' +- tests/test_functionality.py:98 a 2 0.000000 0.200350 0.100175 +- tests/test_functionality.py:101 b 1 0.000000 0.120000 0.100197 +- ''' +- self.assert_traces_almost_equal(r1, stats) +- self.assertEqual(len(stats), 2) +- stats = yappi.get_func_stats( +- filter_callback=lambda x: yappi. +- module_matches(x, [sys.modules[__name__]]) +- ) +- r1 = ''' +- tests/test_functionality.py:98 a 2 0.000000 0.230130 0.115065 +- tests/test_functionality.py:101 b 1 0.000000 0.120000 0.109011 +- tests/test_functionality.py:104 c 1 0.000000 0.000002 0.000002 +- tests/test_functionality.py:107 d 1 0.000000 0.000001 0.000001 +- ''' +- self.assert_traces_almost_equal(r1, stats) +- self.assertEqual(len(stats), 4) +- +- stats = yappi.get_func_stats( +- filter_callback=lambda x: yappi.func_matches(x, [time.sleep]) +- ) +- self.assertEqual(len(stats), 1) +- r1 = ''' +- time.sleep 2 0.206804 0.220000 0.103402 +- ''' +- self.assert_traces_almost_equal(r1, stats) +- +- def test_print_formatting(self): +- +- def a(): +- pass +- +- def b(): +- a() +- +- func_cols = { +- 1: ("name", 48), +- 0: ("ncall", 5), +- 2: ("tsub", 8), +- } +- thread_cols = { +- 1: ("name", 48), +- 0: ("ttot", 8), +- } +- +- yappi.start() +- a() +- b() +- yappi.stop() +- fs = yappi.get_func_stats() +- cs = fs[1].children +- ts = yappi.get_thread_stats() +- #fs.print_all(out=sys.stderr, columns={1:("name", 70), }) +- #cs.print_all(out=sys.stderr, columns=func_cols) +- #ts.print_all(out=sys.stderr, columns=thread_cols) +- #cs.print_all(out=sys.stderr, columns={}) +- +- self.assertRaises( +- yappi.YappiError, fs.print_all, columns={1: ("namee", 9)} +- ) +- self.assertRaises( +- yappi.YappiError, cs.print_all, columns={1: ("dd", 0)} +- ) +- self.assertRaises( +- yappi.YappiError, ts.print_all, columns={1: ("tidd", 0)} +- ) +- +- def test_get_clock(self): +- yappi.set_clock_type('cpu') +- self.assertEqual('cpu', yappi.get_clock_type()) +- clock_info = yappi.get_clock_info() +- self.assertTrue('api' in clock_info) +- self.assertTrue('resolution' in clock_info) +- +- yappi.set_clock_type('wall') +- self.assertEqual('wall', yappi.get_clock_type()) +- +- t0 = yappi.get_clock_time() +- time.sleep(0.1) +- duration = yappi.get_clock_time() - t0 +- self.assertTrue(0.05 < duration < 0.3) +- +- def test_profile_decorator(self): +- +- def aggregate(func, stats): +- fname = f"tests/{func.__name__}.profile" +- try: +- stats.add(fname) +- except OSError: +- pass +- stats.save(fname) +- raise Exception("messing around") +- +- @yappi.profile(return_callback=aggregate) +- def a(x, y): +- if x + y == 25: +- raise Exception("") +- return x + y +- +- def b(): +- pass +- +- try: +- os.remove( +- "tests/a.profile" +- ) # remove the one from prev test, if available +- except: +- pass +- +- # global profile is on to mess things up +- yappi.start() +- b() +- +- # assert functionality and call function at same time +- try: +- self.assertEqual(a(1, 2), 3) +- except: +- pass +- try: +- self.assertEqual(a(2, 5), 7) +- except: +- pass +- try: +- a(4, 21) +- except: +- pass +- stats = yappi.get_func_stats().add("tests/a.profile") +- fsa = utils.find_stat_by_name(stats, 'a') +- self.assertEqual(fsa.ncall, 3) +- self.assertEqual(len(stats), 1) # b() should be cleared out. +- +- @yappi.profile(return_callback=aggregate) +- def count_down_rec(n): +- if n == 0: +- return +- count_down_rec(n - 1) +- +- try: +- os.remove( +- "tests/count_down_rec.profile" +- ) # remove the one from prev test, if available +- except: +- pass +- +- try: +- count_down_rec(4) +- except: +- pass +- try: +- count_down_rec(3) +- except: +- pass +- +- stats = yappi.YFuncStats("tests/count_down_rec.profile") +- fsrec = utils.find_stat_by_name(stats, 'count_down_rec') +- self.assertEqual(fsrec.ncall, 9) +- self.assertEqual(fsrec.nactualcall, 2) +- +- def test_strip_dirs(self): +- +- def a(): +- pass +- +- stats = utils.run_and_get_func_stats(a, ) +- stats.strip_dirs() +- fsa = utils.find_stat_by_name(stats, "a") +- self.assertEqual(fsa.module, os.path.basename(fsa.module)) +- +- @unittest.skipIf(os.name == "nt", "do not run on Windows") +- def test_run_as_script(self): +- import re +- p = subprocess.Popen( +- ['yappi', os.path.join('./tests', 'run_as_script.py')], +- stdout=subprocess.PIPE +- ) +- out, err = p.communicate() +- self.assertEqual(p.returncode, 0) +- func_stats, thread_stats = re.split( +- b'name\\s+id\\s+tid\\s+ttot\\s+scnt\\s*\n', out +- ) +- self.assertTrue(b'FancyThread' in thread_stats) +- +- def test_yappi_overhead(self): +- LOOP_COUNT = 100000 +- +- def a(): +- pass +- +- def b(): +- for i in range(LOOP_COUNT): +- a() +- +- t0 = time.time() +- yappi.start() +- b() +- yappi.stop() +- time_with_yappi = time.time() - t0 +- t0 = time.time() +- b() +- time_without_yappi = time.time() - t0 +- if time_without_yappi == 0: +- time_without_yappi = 0.000001 +- +- # in latest v0.82, I calculated this as close to "7.0" in my machine. +- # however, %83 of this overhead is coming from tickcount(). The other %17 +- # seems to have been evenly distributed to the internal bookkeeping +- # structures/algorithms which seems acceptable. Note that our test only +- # tests one function being profiled at-a-time in a short interval. +- # profiling high number of functions in a small time +- # is a different beast, (which is pretty unlikely in most applications) +- # So as a conclusion: I cannot see any optimization window for Yappi that +- # is worth implementing as we will only optimize %17 of the time. +- sys.stderr.write("\r\nYappi puts %0.1f times overhead to the profiled application in average.\r\n" % \ +- (time_with_yappi / time_without_yappi)) +- +- def test_clear_stats_while_running(self): +- +- def a(): +- pass +- +- yappi.start() +- a() +- yappi.clear_stats() +- a() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- self.assertEqual(fsa.ncall, 1) +- +- def test_generator(self): +- +- def _gen(n): +- while (n > 0): +- yield n +- n -= 1 +- +- yappi.start() +- for x in _gen(5): +- pass +- self.assertTrue( +- yappi.convert2pstats(yappi.get_func_stats()) is not None +- ) +- +- def test_slice_child_stats_and_strip_dirs(self): +- +- def b(): +- for i in range(10000000): +- pass +- +- def a(): +- b() +- +- yappi.start(builtins=True) +- a() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- self.assertTrue(fsa.children[0:1] is not None) +- prev_afullname = fsa.full_name +- prev_bchildfullname = fsa.children[fsb].full_name +- stats.strip_dirs() +- self.assertTrue(len(prev_afullname) > len(fsa.full_name)) +- self.assertTrue( +- len(prev_bchildfullname) > len(fsa.children[fsb].full_name) +- ) +- +- def test_children_stat_functions(self): +- _timings = {"a_1": 5, "b_1": 3, "c_1": 1} +- _yappi._set_test_timings(_timings) +- +- def b(): +- pass +- +- def c(): +- pass +- +- def a(): +- b() +- c() +- +- yappi.start() +- a() +- b() # non-child call +- c() # non-child call +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- childs_of_a = fsa.children.get().sort("tavg", "desc") +- prev_item = None +- for item in childs_of_a: +- if prev_item: +- self.assertTrue(prev_item.tavg > item.tavg) +- prev_item = item +- childs_of_a.sort("name", "desc") +- prev_item = None +- for item in childs_of_a: +- if prev_item: +- self.assertTrue(prev_item.name > item.name) +- prev_item = item +- childs_of_a.clear() +- self.assertTrue(childs_of_a.empty()) +- +- def test_no_stats_different_clock_type_load(self): +- +- def a(): +- pass +- +- yappi.start() +- a() +- yappi.stop() +- yappi.get_func_stats().save("tests/ystats1.ys") +- yappi.clear_stats() +- yappi.set_clock_type("WALL") +- yappi.start() +- yappi.stop() +- stats = yappi.get_func_stats().add("tests/ystats1.ys") +- fsa = utils.find_stat_by_name(stats, 'a') +- self.assertTrue(fsa is not None) +- +- def test_subsequent_profile(self): +- _timings = {"a_1": 1, "b_1": 1} +- _yappi._set_test_timings(_timings) +- +- def a(): +- pass +- +- def b(): +- pass +- +- yappi.start() +- a() +- yappi.stop() +- yappi.start() +- b() +- yappi.stop() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- self.assertTrue(fsa is not None) +- self.assertTrue(fsb is not None) +- self.assertEqual(fsa.ttot, 1) +- self.assertEqual(fsb.ttot, 1) +- +- def test_lambda(self): +- f = lambda: time.sleep(0.3) +- yappi.set_clock_type("wall") +- yappi.start() +- f() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, '') +- self.assertTrue(fsa.ttot > 0.1) +- +- def test_module_stress(self): +- self.assertEqual(yappi.is_running(), False) +- +- yappi.start() +- yappi.clear_stats() +- self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") +- +- yappi.stop() +- yappi.clear_stats() +- yappi.set_clock_type("cpu") +- self.assertRaises(yappi.YappiError, yappi.set_clock_type, "dummy") +- self.assertEqual(yappi.is_running(), False) +- yappi.clear_stats() +- yappi.clear_stats() +- +- def test_stat_sorting(self): +- _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- b() +- +- def b(): +- if self._ncall == 2: +- return +- self._ncall += 1 +- a() +- +- stats = utils.run_and_get_func_stats(a) +- stats = stats.sort("totaltime", "desc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.ttot >= stat.ttot) +- prev_stat = stat +- stats = stats.sort("totaltime", "asc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.ttot <= stat.ttot) +- prev_stat = stat +- stats = stats.sort("avgtime", "asc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.tavg <= stat.tavg) +- prev_stat = stat +- stats = stats.sort("name", "asc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.name <= stat.name) +- prev_stat = stat +- stats = stats.sort("subtime", "asc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.tsub <= stat.tsub) +- prev_stat = stat +- +- self.assertRaises( +- yappi.YappiError, stats.sort, "invalid_func_sorttype_arg" +- ) +- self.assertRaises( +- yappi.YappiError, stats.sort, "totaltime", +- "invalid_func_sortorder_arg" +- ) +- +- def test_start_flags(self): +- self.assertEqual(_yappi._get_start_flags(), None) +- yappi.start() +- +- def a(): +- pass +- +- a() +- self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) +- self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) +- self.assertEqual(len(yappi.get_thread_stats()), 1) +- +- def test_builtin_profiling(self): +- +- def a(): +- time.sleep(0.4) # is a builtin function +- +- yappi.set_clock_type('wall') +- +- yappi.start(builtins=True) +- a() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'sleep') +- self.assertTrue(fsa is not None) +- self.assertTrue(fsa.ttot > 0.3) +- yappi.stop() +- yappi.clear_stats() +- +- def a(): +- pass +- +- yappi.start() +- t = threading.Thread(target=a) +- t.start() +- t.join() +- stats = yappi.get_func_stats() +- +- def test_singlethread_profiling(self): +- yappi.set_clock_type('wall') +- +- def a(): +- time.sleep(0.2) +- +- class Worker1(threading.Thread): +- +- def a(self): +- time.sleep(0.3) +- +- def run(self): +- self.a() +- +- yappi.start(profile_threads=False) +- +- c = Worker1() +- c.start() +- c.join() +- a() +- stats = yappi.get_func_stats() +- fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') +- fsa2 = utils.find_stat_by_name(stats, 'a') +- self.assertTrue(fsa1 is None) +- self.assertTrue(fsa2 is not None) +- self.assertTrue(fsa2.ttot > 0.1) +- +- def test_run(self): +- +- def profiled(): +- pass +- +- yappi.clear_stats() +- try: +- with yappi.run(): +- profiled() +- stats = yappi.get_func_stats() +- finally: +- yappi.clear_stats() +- +- self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) +- +- def test_run_recursive(self): +- +- def profiled(): +- pass +- +- def not_profiled(): +- pass +- +- yappi.clear_stats() +- try: +- with yappi.run(): +- with yappi.run(): +- profiled() +- # Profiling stopped here +- not_profiled() +- stats = yappi.get_func_stats() +- finally: +- yappi.clear_stats() +- +- self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) +- self.assertIsNone(utils.find_stat_by_name(stats, 'not_profiled')) +- +- +-class StatSaveScenarios(utils.YappiUnitTestCase): +- +- def test_pstats_conversion(self): +- +- def pstat_id(fs): +- return (fs.module, fs.lineno, fs.name) +- +- def a(): +- d() +- +- def b(): +- d() +- +- def c(): +- pass +- +- def d(): +- pass +- +- _timings = {"a_1": 12, "b_1": 7, "c_1": 5, "d_1": 2} +- _yappi._set_test_timings(_timings) +- stats = utils.run_and_get_func_stats(a, ) +- stats.strip_dirs() +- stats.save("tests/a1.pstats", type="pstat") +- fsa_pid = pstat_id(utils.find_stat_by_name(stats, "a")) +- fsd_pid = pstat_id(utils.find_stat_by_name(stats, "d")) +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- stats = utils.run_and_get_func_stats(a, ) +- stats.strip_dirs() +- stats.save("tests/a2.pstats", type="pstat") +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- stats = utils.run_and_get_func_stats(b, ) +- stats.strip_dirs() +- stats.save("tests/b1.pstats", type="pstat") +- fsb_pid = pstat_id(utils.find_stat_by_name(stats, "b")) +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- stats = utils.run_and_get_func_stats(c, ) +- stats.strip_dirs() +- stats.save("tests/c1.pstats", type="pstat") +- fsc_pid = pstat_id(utils.find_stat_by_name(stats, "c")) +- +- # merge saved stats and check pstats values are correct +- import pstats +- p = pstats.Stats( +- 'tests/a1.pstats', 'tests/a2.pstats', 'tests/b1.pstats', +- 'tests/c1.pstats' +- ) +- p.strip_dirs() +- # ct = ttot, tt = tsub +- (cc, nc, tt, ct, callers) = p.stats[fsa_pid] +- self.assertEqual(cc, nc, 2) +- self.assertEqual(tt, 20) +- self.assertEqual(ct, 24) +- (cc, nc, tt, ct, callers) = p.stats[fsd_pid] +- self.assertEqual(cc, nc, 3) +- self.assertEqual(tt, 6) +- self.assertEqual(ct, 6) +- self.assertEqual(len(callers), 2) +- (cc, nc, tt, ct) = callers[fsa_pid] +- self.assertEqual(cc, nc, 2) +- self.assertEqual(tt, 4) +- self.assertEqual(ct, 4) +- (cc, nc, tt, ct) = callers[fsb_pid] +- self.assertEqual(cc, nc, 1) +- self.assertEqual(tt, 2) +- self.assertEqual(ct, 2) +- +- def test_merge_stats(self): +- _timings = { +- "a_1": 15, +- "b_1": 14, +- "c_1": 12, +- "d_1": 10, +- "e_1": 9, +- "f_1": 7, +- "g_1": 6, +- "h_1": 5, +- "i_1": 1 +- } +- _yappi._set_test_timings(_timings) +- +- def a(): +- b() +- +- def b(): +- c() +- +- def c(): +- d() +- +- def d(): +- e() +- +- def e(): +- f() +- +- def f(): +- g() +- +- def g(): +- h() +- +- def h(): +- i() +- +- def i(): +- pass +- +- yappi.start() +- a() +- a() +- yappi.stop() +- stats = yappi.get_func_stats() +- self.assertRaises( +- NotImplementedError, stats.save, "", "INVALID_SAVE_TYPE" +- ) +- stats.save("tests/ystats2.ys") +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- yappi.start() +- a() +- stats = yappi.get_func_stats().add("tests/ystats2.ys") +- fsa = utils.find_stat_by_name(stats, "a") +- fsb = utils.find_stat_by_name(stats, "b") +- fsc = utils.find_stat_by_name(stats, "c") +- fsd = utils.find_stat_by_name(stats, "d") +- fse = utils.find_stat_by_name(stats, "e") +- fsf = utils.find_stat_by_name(stats, "f") +- fsg = utils.find_stat_by_name(stats, "g") +- fsh = utils.find_stat_by_name(stats, "h") +- fsi = utils.find_stat_by_name(stats, "i") +- self.assertEqual(fsa.ttot, 45) +- self.assertEqual(fsa.ncall, 3) +- self.assertEqual(fsa.nactualcall, 3) +- self.assertEqual(fsa.tsub, 3) +- self.assertEqual(fsa.children[fsb].ttot, fsb.ttot) +- self.assertEqual(fsa.children[fsb].tsub, fsb.tsub) +- self.assertEqual(fsb.children[fsc].ttot, fsc.ttot) +- self.assertEqual(fsb.children[fsc].tsub, fsc.tsub) +- self.assertEqual(fsc.tsub, 6) +- self.assertEqual(fsc.children[fsd].ttot, fsd.ttot) +- self.assertEqual(fsc.children[fsd].tsub, fsd.tsub) +- self.assertEqual(fsd.children[fse].ttot, fse.ttot) +- self.assertEqual(fsd.children[fse].tsub, fse.tsub) +- self.assertEqual(fse.children[fsf].ttot, fsf.ttot) +- self.assertEqual(fse.children[fsf].tsub, fsf.tsub) +- self.assertEqual(fsf.children[fsg].ttot, fsg.ttot) +- self.assertEqual(fsf.children[fsg].tsub, fsg.tsub) +- self.assertEqual(fsg.ttot, 18) +- self.assertEqual(fsg.tsub, 3) +- self.assertEqual(fsg.children[fsh].ttot, fsh.ttot) +- self.assertEqual(fsg.children[fsh].tsub, fsh.tsub) +- self.assertEqual(fsh.ttot, 15) +- self.assertEqual(fsh.tsub, 12) +- self.assertEqual(fsh.tavg, 5) +- self.assertEqual(fsh.children[fsi].ttot, fsi.ttot) +- self.assertEqual(fsh.children[fsi].tsub, fsi.tsub) +- #stats.debug_print() +- +- def test_merge_multithreaded_stats(self): +- import _yappi +- timings = {"a_1": 2, "b_1": 1} +- _yappi._set_test_timings(timings) +- +- def a(): +- pass +- +- def b(): +- pass +- +- yappi.start() +- t = threading.Thread(target=a) +- t.start() +- t.join() +- t = threading.Thread(target=b) +- t.start() +- t.join() +- yappi.get_func_stats().save("tests/ystats1.ys") +- yappi.clear_stats() +- _yappi._set_test_timings(timings) +- self.assertEqual(len(yappi.get_func_stats()), 0) +- self.assertEqual(len(yappi.get_thread_stats()), 1) +- t = threading.Thread(target=a) +- t.start() +- t.join() +- +- self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) +- self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) +- yappi.get_func_stats().save("tests/ystats2.ys") +- +- stats = yappi.YFuncStats([ +- "tests/ystats1.ys", +- "tests/ystats2.ys", +- ]) +- fsa = utils.find_stat_by_name(stats, "a") +- fsb = utils.find_stat_by_name(stats, "b") +- self.assertEqual(fsa.ncall, 2) +- self.assertEqual(fsb.ncall, 1) +- self.assertEqual(fsa.tsub, fsa.ttot, 4) +- self.assertEqual(fsb.tsub, fsb.ttot, 1) +- +- def test_merge_load_different_clock_types(self): +- yappi.start(builtins=True) +- +- def a(): +- b() +- +- def b(): +- c() +- +- def c(): +- pass +- +- t = threading.Thread(target=a) +- t.start() +- t.join() +- yappi.get_func_stats().sort("name", "asc").save("tests/ystats1.ys") +- yappi.stop() +- yappi.clear_stats() +- yappi.start(builtins=False) +- t = threading.Thread(target=a) +- t.start() +- t.join() +- yappi.get_func_stats().save("tests/ystats2.ys") +- yappi.stop() +- self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") +- yappi.clear_stats() +- yappi.set_clock_type("wall") +- yappi.start() +- t = threading.Thread(target=a) +- t.start() +- t.join() +- yappi.get_func_stats().save("tests/ystats3.ys") +- self.assertRaises( +- yappi.YappiError, +- yappi.YFuncStats().add("tests/ystats1.ys").add, "tests/ystats3.ys" +- ) +- stats = yappi.YFuncStats(["tests/ystats1.ys", +- "tests/ystats2.ys"]).sort("name") +- fsa = utils.find_stat_by_name(stats, "a") +- fsb = utils.find_stat_by_name(stats, "b") +- fsc = utils.find_stat_by_name(stats, "c") +- self.assertEqual(fsa.ncall, 2) +- self.assertEqual(fsa.ncall, fsb.ncall, fsc.ncall) +- +- def test_merge_aabab_aabbc(self): +- _timings = { +- "a_1": 15, +- "a_2": 14, +- "b_1": 12, +- "a_3": 10, +- "b_2": 9, +- "c_1": 4 +- } +- _yappi._set_test_timings(_timings) +- +- def a(): +- if self._ncall == 1: +- self._ncall += 1 +- a() +- elif self._ncall == 5: +- self._ncall += 1 +- a() +- else: +- b() +- +- def b(): +- if self._ncall == 2: +- self._ncall += 1 +- a() +- elif self._ncall == 6: +- self._ncall += 1 +- b() +- elif self._ncall == 7: +- c() +- else: +- return +- +- def c(): +- pass +- +- self._ncall = 1 +- stats = utils.run_and_get_func_stats(a, ) +- stats.save("tests/ystats1.ys") +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- #stats.print_all() +- +- self._ncall = 5 +- stats = utils.run_and_get_func_stats(a, ) +- stats.save("tests/ystats2.ys") +- +- #stats.print_all() +- +- def a(): # same name but another function(code object) +- pass +- +- yappi.start() +- a() +- stats = yappi.get_func_stats().add( +- ["tests/ystats1.ys", "tests/ystats2.ys"] +- ) +- #stats.print_all() +- self.assertEqual(len(stats), 4) +- +- fsa = None +- for stat in stats: +- if stat.name == "a" and stat.ttot == 45: +- fsa = stat +- break +- self.assertTrue(fsa is not None) +- +- self.assertEqual(fsa.ncall, 7) +- self.assertEqual(fsa.nactualcall, 3) +- self.assertEqual(fsa.ttot, 45) +- self.assertEqual(fsa.tsub, 10) +- fsb = utils.find_stat_by_name(stats, "b") +- fsc = utils.find_stat_by_name(stats, "c") +- self.assertEqual(fsb.ncall, 6) +- self.assertEqual(fsb.nactualcall, 3) +- self.assertEqual(fsb.ttot, 36) +- self.assertEqual(fsb.tsub, 27) +- self.assertEqual(fsb.tavg, 6) +- self.assertEqual(fsc.ttot, 8) +- self.assertEqual(fsc.tsub, 8) +- self.assertEqual(fsc.tavg, 4) +- self.assertEqual(fsc.nactualcall, fsc.ncall, 2) +- +- +-class MultithreadedScenarios(utils.YappiUnitTestCase): +- +- def test_issue_32(self): +- ''' +- Start yappi from different thread and we get Internal Error(15) as +- the current_ctx_id() called while enumerating the threads in start() +- and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() +- returns wrong object and thus sets an invalid id for the _ctx structure. +- +- When this issue happens multiple Threads have same tid as the internal ts_ptr +- will be same for different contexts. So, let's see if that happens +- ''' +- +- def foo(): +- time.sleep(0.2) +- +- def bar(): +- time.sleep(0.1) +- +- def thread_func(): +- yappi.set_clock_type("wall") +- yappi.start() +- +- bar() +- +- t = threading.Thread(target=thread_func) +- t.start() +- t.join() +- +- foo() +- +- yappi.stop() +- +- thread_ids = set() +- for tstat in yappi.get_thread_stats(): +- self.assertTrue(tstat.tid not in thread_ids) +- thread_ids.add(tstat.tid) +- +- def test_subsequent_profile(self): +- WORKER_COUNT = 5 +- +- def a(): +- pass +- +- def b(): +- pass +- +- def c(): +- pass +- +- _timings = { +- "a_1": 3, +- "b_1": 2, +- "c_1": 1, +- } +- +- yappi.start() +- +- def g(): +- pass +- +- g() +- yappi.stop() +- yappi.clear_stats() +- _yappi._set_test_timings(_timings) +- yappi.start() +- +- _dummy = [] +- for i in range(WORKER_COUNT): +- t = threading.Thread(target=a) +- t.start() +- t.join() +- for i in range(WORKER_COUNT): +- t = threading.Thread(target=b) +- t.start() +- _dummy.append(t) +- t.join() +- for i in range(WORKER_COUNT): +- t = threading.Thread(target=a) +- t.start() +- t.join() +- for i in range(WORKER_COUNT): +- t = threading.Thread(target=c) +- t.start() +- t.join() +- yappi.stop() +- yappi.start() +- +- def f(): +- pass +- +- f() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- self.assertEqual(fsa.ncall, 10) +- self.assertEqual(fsb.ncall, 5) +- self.assertEqual(fsc.ncall, 5) +- self.assertEqual(fsa.ttot, fsa.tsub, 30) +- self.assertEqual(fsb.ttot, fsb.tsub, 10) +- self.assertEqual(fsc.ttot, fsc.tsub, 5) +- +- # MACOSx optimizes by only creating one worker thread +- self.assertTrue(len(yappi.get_thread_stats()) >= 2) +- +- def test_basic(self): +- yappi.set_clock_type('wall') +- +- def dummy(): +- pass +- +- def a(): +- time.sleep(0.2) +- +- class Worker1(threading.Thread): +- +- def a(self): +- time.sleep(0.3) +- +- def run(self): +- self.a() +- +- yappi.start(builtins=False, profile_threads=True) +- +- c = Worker1() +- c.start() +- c.join() +- a() +- stats = yappi.get_func_stats() +- fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') +- fsa2 = utils.find_stat_by_name(stats, 'a') +- self.assertTrue(fsa1 is not None) +- self.assertTrue(fsa2 is not None) +- self.assertTrue(fsa1.ttot > 0.2) +- self.assertTrue(fsa2.ttot > 0.1) +- tstats = yappi.get_thread_stats() +- self.assertEqual(len(tstats), 2) +- tsa = utils.find_stat_by_name(tstats, 'Worker1') +- tsm = utils.find_stat_by_name(tstats, '_MainThread') +- dummy() # call dummy to force ctx name to be retrieved again. +- self.assertTrue(tsa is not None) +- # TODO: I put dummy() to fix below, remove the comments after a while. +- self.assertTrue( # FIX: I see this fails sometimes? +- tsm is not None, +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") +- +- def test_ctx_stats(self): +- from threading import Thread +- DUMMY_WORKER_COUNT = 5 +- yappi.start() +- +- class DummyThread(Thread): +- pass +- +- def dummy(): +- pass +- +- def dummy_worker(): +- pass +- +- for i in range(DUMMY_WORKER_COUNT): +- t = DummyThread(target=dummy_worker) +- t.start() +- t.join() +- yappi.stop() +- stats = yappi.get_thread_stats() +- tsa = utils.find_stat_by_name(stats, "DummyThread") +- self.assertTrue(tsa is not None) +- yappi.clear_stats() +- time.sleep(1.0) +- _timings = { +- "a_1": 6, +- "b_1": 5, +- "c_1": 3, +- "d_1": 1, +- "a_2": 4, +- "b_2": 3, +- "c_2": 2, +- "d_2": 1 +- } +- _yappi._set_test_timings(_timings) +- +- class Thread1(Thread): +- pass +- +- class Thread2(Thread): +- pass +- +- def a(): +- b() +- +- def b(): +- c() +- +- def c(): +- d() +- +- def d(): +- time.sleep(0.6) +- +- yappi.set_clock_type("wall") +- yappi.start() +- t1 = Thread1(target=a) +- t1.start() +- t2 = Thread2(target=a) +- t2.start() +- t1.join() +- t2.join() +- stats = yappi.get_thread_stats() +- +- # the fist clear_stats clears the context table? +- tsa = utils.find_stat_by_name(stats, "DummyThread") +- self.assertTrue(tsa is None) +- +- tst1 = utils.find_stat_by_name(stats, "Thread1") +- tst2 = utils.find_stat_by_name(stats, "Thread2") +- tsmain = utils.find_stat_by_name(stats, "_MainThread") +- dummy() # call dummy to force ctx name to be retrieved again. +- self.assertTrue(len(stats) == 3) +- self.assertTrue(tst1 is not None) +- self.assertTrue(tst2 is not None) +- # TODO: I put dummy() to fix below, remove the comments after a while. +- self.assertTrue( # FIX: I see this fails sometimes +- tsmain is not None, +- f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") +- self.assertTrue(1.0 > tst2.ttot >= 0.5) +- self.assertTrue(1.0 > tst1.ttot >= 0.5) +- +- # test sorting of the ctx stats +- stats = stats.sort("totaltime", "desc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.ttot >= stat.ttot) +- prev_stat = stat +- stats = stats.sort("totaltime", "asc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.ttot <= stat.ttot) +- prev_stat = stat +- stats = stats.sort("schedcount", "desc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.sched_count >= stat.sched_count) +- prev_stat = stat +- stats = stats.sort("name", "desc") +- prev_stat = None +- for stat in stats: +- if prev_stat: +- self.assertTrue(prev_stat.name.lower() >= stat.name.lower()) +- prev_stat = stat +- self.assertRaises( +- yappi.YappiError, stats.sort, "invalid_thread_sorttype_arg" +- ) +- self.assertRaises( +- yappi.YappiError, stats.sort, "invalid_thread_sortorder_arg" +- ) +- +- def test_ctx_stats_cpu(self): +- +- def get_thread_name(): +- try: +- return threading.current_thread().name +- except AttributeError: +- return "Anonymous" +- +- def burn_cpu(sec): +- t0 = yappi.get_clock_time() +- elapsed = 0 +- while (elapsed < sec): +- for _ in range(1000): +- pass +- elapsed = yappi.get_clock_time() - t0 +- +- def test(): +- +- ts = [] +- for i in (0.01, 0.05, 0.1): +- t = threading.Thread(target=burn_cpu, args=(i, )) +- t.name = f"burn_cpu-{str(i)}" +- t.start() +- ts.append(t) +- for t in ts: +- t.join() +- +- yappi.set_clock_type("cpu") +- yappi.set_context_name_callback(get_thread_name) +- +- yappi.start() +- +- test() +- +- yappi.stop() +- +- tstats = yappi.get_thread_stats() +- r1 = ''' +- burn_cpu-0.1 3 123145356058624 0.100105 8 +- burn_cpu-0.05 2 123145361313792 0.050149 8 +- burn_cpu-0.01 1 123145356058624 0.010127 2 +- MainThread 0 4321620864 0.001632 6 +- ''' +- self.assert_ctx_stats_almost_equal(r1, tstats) +- +- def test_producer_consumer_with_queues(self): +- # we currently just stress yappi, no functionality test is done here. +- yappi.start() +- from queue import Queue +- from threading import Thread +- WORKER_THREAD_COUNT = 50 +- WORK_ITEM_COUNT = 2000 +- +- def worker(): +- while True: +- item = q.get() +- # do the work with item +- q.task_done() +- +- q = Queue() +- for i in range(WORKER_THREAD_COUNT): +- t = Thread(target=worker) +- t.daemon = True +- t.start() +- +- for item in range(WORK_ITEM_COUNT): +- q.put(item) +- q.join() # block until all tasks are done +- #yappi.get_func_stats().sort("callcount").print_all() +- yappi.stop() +- +- def test_temporary_lock_waiting(self): +- yappi.start() +- _lock = threading.Lock() +- +- def worker(): +- _lock.acquire() +- try: +- time.sleep(1.0) +- finally: +- _lock.release() +- +- t1 = threading.Thread(target=worker) +- t2 = threading.Thread(target=worker) +- t1.start() +- t2.start() +- t1.join() +- t2.join() +- #yappi.get_func_stats().sort("callcount").print_all() +- yappi.stop() +- +- @unittest.skipIf(os.name != "posix", "requires Posix compliant OS") +- def test_signals_with_blocking_calls(self): +- import signal, os, time +- +- # just to verify if signal is handled correctly and stats/yappi are not corrupted. +- def handler(signum, frame): +- raise Exception("Signal handler executed!") +- +- yappi.start() +- signal.signal(signal.SIGALRM, handler) +- signal.alarm(1) +- self.assertRaises(Exception, time.sleep, 2) +- stats = yappi.get_func_stats() +- fsh = utils.find_stat_by_name(stats, "handler") +- self.assertTrue(fsh is not None) +- +- def test_concurrent_futures(self): +- yappi.start() +- from concurrent.futures import ThreadPoolExecutor +- with ThreadPoolExecutor(max_workers=5) as executor: +- f = executor.submit(pow, 5, 2) +- self.assertEqual(f.result(), 25) +- time.sleep(1.0) +- yappi.stop() +- +- def test_barrier(self): +- yappi.start() +- b = threading.Barrier(2, timeout=1) +- +- def worker(): +- try: +- b.wait() +- except threading.BrokenBarrierError: +- pass +- except Exception: +- raise Exception("BrokenBarrierError not raised") +- +- t1 = threading.Thread(target=worker) +- t1.start() +- #b.wait() +- t1.join() +- yappi.stop() +- +- +-class NonRecursiveFunctions(utils.YappiUnitTestCase): +- +- def test_abcd(self): +- _timings = {"a_1": 6, "b_1": 5, "c_1": 3, "d_1": 1} +- _yappi._set_test_timings(_timings) +- +- def a(): +- b() +- +- def b(): +- c() +- +- def c(): +- d() +- +- def d(): +- pass +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- fsd = utils.find_stat_by_name(stats, 'd') +- cfsab = fsa.children[fsb] +- cfsbc = fsb.children[fsc] +- cfscd = fsc.children[fsd] +- +- self.assertEqual(fsa.ttot, 6) +- self.assertEqual(fsa.tsub, 1) +- self.assertEqual(fsb.ttot, 5) +- self.assertEqual(fsb.tsub, 2) +- self.assertEqual(fsc.ttot, 3) +- self.assertEqual(fsc.tsub, 2) +- self.assertEqual(fsd.ttot, 1) +- self.assertEqual(fsd.tsub, 1) +- self.assertEqual(cfsab.ttot, 5) +- self.assertEqual(cfsab.tsub, 2) +- self.assertEqual(cfsbc.ttot, 3) +- self.assertEqual(cfsbc.tsub, 2) +- self.assertEqual(cfscd.ttot, 1) +- self.assertEqual(cfscd.tsub, 1) +- +- def test_stop_in_middle(self): +- _timings = {"a_1": 6, "b_1": 4} +- _yappi._set_test_timings(_timings) +- +- def a(): +- b() +- yappi.stop() +- +- def b(): +- time.sleep(0.2) +- +- yappi.start() +- a() +- stats = yappi.get_func_stats() +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- +- self.assertEqual(fsa.ncall, 1) +- self.assertEqual(fsa.nactualcall, 0) +- self.assertEqual(fsa.ttot, 0) # no call_leave called +- self.assertEqual(fsa.tsub, 0) # no call_leave called +- self.assertEqual(fsb.ttot, 4) +- +- +-class RecursiveFunctions(utils.YappiUnitTestCase): +- +- def test_fibonacci(self): +- +- def fib(n): +- if n > 1: +- return fib(n - 1) + fib(n - 2) +- else: +- return n +- +- stats = utils.run_and_get_func_stats(fib, 22) +- fs = utils.find_stat_by_name(stats, 'fib') +- self.assertEqual(fs.ncall, 57313) +- self.assertEqual(fs.ttot, fs.tsub) +- +- def test_abcadc(self): +- _timings = { +- "a_1": 20, +- "b_1": 19, +- "c_1": 17, +- "a_2": 13, +- "d_1": 12, +- "c_2": 10, +- "a_3": 5 +- } +- _yappi._set_test_timings(_timings) +- +- def a(n): +- if n == 3: +- return +- if n == 1 + 1: +- d(n) +- else: +- b(n) +- +- def b(n): +- c(n) +- +- def c(n): +- a(n + 1) +- +- def d(n): +- c(n) +- +- stats = utils.run_and_get_func_stats(a, 1) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- fsd = utils.find_stat_by_name(stats, 'd') +- self.assertEqual(fsa.ncall, 3) +- self.assertEqual(fsa.nactualcall, 1) +- self.assertEqual(fsa.ttot, 20) +- self.assertEqual(fsa.tsub, 7) +- self.assertEqual(fsb.ttot, 19) +- self.assertEqual(fsb.tsub, 2) +- self.assertEqual(fsc.ttot, 17) +- self.assertEqual(fsc.tsub, 9) +- self.assertEqual(fsd.ttot, 12) +- self.assertEqual(fsd.tsub, 2) +- cfsca = fsc.children[fsa] +- self.assertEqual(cfsca.nactualcall, 0) +- self.assertEqual(cfsca.ncall, 2) +- self.assertEqual(cfsca.ttot, 13) +- self.assertEqual(cfsca.tsub, 6) +- +- def test_aaaa(self): +- _timings = {"d_1": 9, "d_2": 7, "d_3": 3, "d_4": 2} +- _yappi._set_test_timings(_timings) +- +- def d(n): +- if n == 3: +- return +- d(n + 1) +- +- stats = utils.run_and_get_func_stats(d, 0) +- fsd = utils.find_stat_by_name(stats, 'd') +- self.assertEqual(fsd.ncall, 4) +- self.assertEqual(fsd.nactualcall, 1) +- self.assertEqual(fsd.ttot, 9) +- self.assertEqual(fsd.tsub, 9) +- cfsdd = fsd.children[fsd] +- self.assertEqual(cfsdd.ttot, 7) +- self.assertEqual(cfsdd.tsub, 7) +- self.assertEqual(cfsdd.ncall, 3) +- self.assertEqual(cfsdd.nactualcall, 0) +- +- def test_abcabc(self): +- _timings = { +- "a_1": 20, +- "b_1": 19, +- "c_1": 17, +- "a_2": 13, +- "b_2": 11, +- "c_2": 9, +- "a_3": 6 +- } +- _yappi._set_test_timings(_timings) +- +- def a(n): +- if n == 3: +- return +- else: +- b(n) +- +- def b(n): +- c(n) +- +- def c(n): +- a(n + 1) +- +- stats = utils.run_and_get_func_stats(a, 1) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- self.assertEqual(fsa.ncall, 3) +- self.assertEqual(fsa.nactualcall, 1) +- self.assertEqual(fsa.ttot, 20) +- self.assertEqual(fsa.tsub, 9) +- self.assertEqual(fsb.ttot, 19) +- self.assertEqual(fsb.tsub, 4) +- self.assertEqual(fsc.ttot, 17) +- self.assertEqual(fsc.tsub, 7) +- cfsab = fsa.children[fsb] +- cfsbc = fsb.children[fsc] +- cfsca = fsc.children[fsa] +- self.assertEqual(cfsab.ttot, 19) +- self.assertEqual(cfsab.tsub, 4) +- self.assertEqual(cfsbc.ttot, 17) +- self.assertEqual(cfsbc.tsub, 7) +- self.assertEqual(cfsca.ttot, 13) +- self.assertEqual(cfsca.tsub, 8) +- +- def test_abcbca(self): +- _timings = {"a_1": 10, "b_1": 9, "c_1": 7, "b_2": 4, "c_2": 2, "a_2": 1} +- _yappi._set_test_timings(_timings) +- self._ncall = 1 +- +- def a(): +- if self._ncall == 1: +- b() +- else: +- return +- +- def b(): +- c() +- +- def c(): +- if self._ncall == 1: +- self._ncall += 1 +- b() +- else: +- a() +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- cfsab = fsa.children[fsb] +- cfsbc = fsb.children[fsc] +- cfsca = fsc.children[fsa] +- self.assertEqual(fsa.ttot, 10) +- self.assertEqual(fsa.tsub, 2) +- self.assertEqual(fsb.ttot, 9) +- self.assertEqual(fsb.tsub, 4) +- self.assertEqual(fsc.ttot, 7) +- self.assertEqual(fsc.tsub, 4) +- self.assertEqual(cfsab.ttot, 9) +- self.assertEqual(cfsab.tsub, 2) +- self.assertEqual(cfsbc.ttot, 7) +- self.assertEqual(cfsbc.tsub, 4) +- self.assertEqual(cfsca.ttot, 1) +- self.assertEqual(cfsca.tsub, 1) +- self.assertEqual(cfsca.ncall, 1) +- self.assertEqual(cfsca.nactualcall, 0) +- +- def test_aabccb(self): +- _timings = { +- "a_1": 13, +- "a_2": 11, +- "b_1": 9, +- "c_1": 5, +- "c_2": 3, +- "b_2": 1 +- } +- _yappi._set_test_timings(_timings) +- self._ncall = 1 +- +- def a(): +- if self._ncall == 1: +- self._ncall += 1 +- a() +- else: +- b() +- +- def b(): +- if self._ncall == 3: +- return +- else: +- c() +- +- def c(): +- if self._ncall == 2: +- self._ncall += 1 +- c() +- else: +- b() +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- fsc = utils.find_stat_by_name(stats, 'c') +- cfsaa = fsa.children[fsa.index] +- cfsab = fsa.children[fsb] +- cfsbc = fsb.children[fsc.full_name] +- cfscc = fsc.children[fsc] +- cfscb = fsc.children[fsb] +- self.assertEqual(fsb.ttot, 9) +- self.assertEqual(fsb.tsub, 5) +- self.assertEqual(cfsbc.ttot, 5) +- self.assertEqual(cfsbc.tsub, 2) +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 4) +- self.assertEqual(cfsab.ttot, 9) +- self.assertEqual(cfsab.tsub, 4) +- self.assertEqual(cfsaa.ttot, 11) +- self.assertEqual(cfsaa.tsub, 2) +- self.assertEqual(fsc.ttot, 5) +- self.assertEqual(fsc.tsub, 4) +- +- def test_abaa(self): +- _timings = {"a_1": 13, "b_1": 10, "a_2": 9, "a_3": 5} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- if self._ncall == 1: +- b() +- elif self._ncall == 2: +- self._ncall += 1 +- a() +- else: +- return +- +- def b(): +- self._ncall += 1 +- a() +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- cfsaa = fsa.children[fsa] +- cfsba = fsb.children[fsa] +- self.assertEqual(fsb.ttot, 10) +- self.assertEqual(fsb.tsub, 1) +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 12) +- self.assertEqual(cfsaa.ttot, 5) +- self.assertEqual(cfsaa.tsub, 5) +- self.assertEqual(cfsba.ttot, 9) +- self.assertEqual(cfsba.tsub, 4) +- +- def test_aabb(self): +- _timings = {"a_1": 13, "a_2": 10, "b_1": 9, "b_2": 5} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- if self._ncall == 1: +- self._ncall += 1 +- a() +- elif self._ncall == 2: +- b() +- else: +- return +- +- def b(): +- if self._ncall == 2: +- self._ncall += 1 +- b() +- else: +- return +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- cfsaa = fsa.children[fsa] +- cfsab = fsa.children[fsb] +- cfsbb = fsb.children[fsb] +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 4) +- self.assertEqual(fsb.ttot, 9) +- self.assertEqual(fsb.tsub, 9) +- self.assertEqual(cfsaa.ttot, 10) +- self.assertEqual(cfsaa.tsub, 1) +- self.assertEqual(cfsab.ttot, 9) +- self.assertEqual(cfsab.tsub, 4) +- self.assertEqual(cfsbb.ttot, 5) +- self.assertEqual(cfsbb.tsub, 5) +- +- def test_abbb(self): +- _timings = {"a_1": 13, "b_1": 10, "b_2": 6, "b_3": 1} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- if self._ncall == 1: +- b() +- +- def b(): +- if self._ncall == 3: +- return +- self._ncall += 1 +- b() +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- cfsab = fsa.children[fsb] +- cfsbb = fsb.children[fsb] +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 3) +- self.assertEqual(fsb.ttot, 10) +- self.assertEqual(fsb.tsub, 10) +- self.assertEqual(fsb.ncall, 3) +- self.assertEqual(fsb.nactualcall, 1) +- self.assertEqual(cfsab.ttot, 10) +- self.assertEqual(cfsab.tsub, 4) +- self.assertEqual(cfsbb.ttot, 6) +- self.assertEqual(cfsbb.tsub, 6) +- self.assertEqual(cfsbb.nactualcall, 0) +- self.assertEqual(cfsbb.ncall, 2) +- +- def test_aaab(self): +- _timings = {"a_1": 13, "a_2": 10, "a_3": 6, "b_1": 1} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- if self._ncall == 3: +- b() +- return +- self._ncall += 1 +- a() +- +- def b(): +- return +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- cfsaa = fsa.children[fsa] +- cfsab = fsa.children[fsb] +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 12) +- self.assertEqual(fsb.ttot, 1) +- self.assertEqual(fsb.tsub, 1) +- self.assertEqual(cfsaa.ttot, 10) +- self.assertEqual(cfsaa.tsub, 9) +- self.assertEqual(cfsab.ttot, 1) +- self.assertEqual(cfsab.tsub, 1) +- +- def test_abab(self): +- _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} +- _yappi._set_test_timings(_timings) +- +- self._ncall = 1 +- +- def a(): +- b() +- +- def b(): +- if self._ncall == 2: +- return +- self._ncall += 1 +- a() +- +- stats = utils.run_and_get_func_stats(a) +- fsa = utils.find_stat_by_name(stats, 'a') +- fsb = utils.find_stat_by_name(stats, 'b') +- cfsab = fsa.children[fsb] +- cfsba = fsb.children[fsa] +- self.assertEqual(fsa.ttot, 13) +- self.assertEqual(fsa.tsub, 8) +- self.assertEqual(fsb.ttot, 10) +- self.assertEqual(fsb.tsub, 5) +- self.assertEqual(cfsab.ttot, 10) +- self.assertEqual(cfsab.tsub, 5) +- self.assertEqual(cfsab.ncall, 2) +- self.assertEqual(cfsab.nactualcall, 1) +- self.assertEqual(cfsba.ttot, 6) +- self.assertEqual(cfsba.tsub, 5) +- +- +-if __name__ == '__main__': +- # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] +- # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] +- unittest.main() ++import os ++import sys ++import time ++import threading ++import unittest ++import yappi ++import _yappi ++import utils ++import multiprocessing ++import subprocess ++ ++_counter = 0 ++ ++ ++class BasicUsage(utils.YappiUnitTestCase): ++ ++ def test_callback_function_int_return_overflow(self): ++ # this test is just here to check if any errors are generated, as the err ++ # is printed in C side, I did not include it here. THere are ways to test ++ # this deterministically, I did not bother ++ import ctypes ++ ++ def _unsigned_overflow_margin(): ++ return 2**(ctypes.sizeof(ctypes.c_void_p) * 8) - 1 ++ ++ def foo(): ++ pass ++ ++ #with utils.captured_output() as (out, err): ++ yappi.set_context_id_callback(_unsigned_overflow_margin) ++ yappi.set_tag_callback(_unsigned_overflow_margin) ++ yappi.start() ++ foo() ++ ++ def test_issue60(self): ++ ++ def foo(): ++ buf = bytearray() ++ buf += b't' * 200 ++ view = memoryview(buf)[10:] ++ view = view.tobytes() ++ del buf[:10] # this throws exception ++ return view ++ ++ yappi.start(builtins=True) ++ foo() ++ self.assertTrue( ++ len( ++ yappi.get_func_stats( ++ filter_callback=lambda x: yappi. ++ func_matches(x, [memoryview.tobytes]) ++ ) ++ ) > 0 ++ ) ++ yappi.stop() ++ ++ def test_issue54(self): ++ ++ def _tag_cbk(): ++ global _counter ++ _counter += 1 ++ return _counter ++ ++ def a(): ++ pass ++ ++ def b(): ++ pass ++ ++ yappi.set_tag_callback(_tag_cbk) ++ yappi.start() ++ a() ++ a() ++ a() ++ yappi.stop() ++ stats = yappi.get_func_stats() ++ self.assertEqual(stats.pop().ncall, 3) # aggregated if no tag is given ++ stats = yappi.get_func_stats(tag=1) ++ ++ for i in range(1, 3): ++ stats = yappi.get_func_stats(tag=i) ++ stats = yappi.get_func_stats( ++ tag=i, filter_callback=lambda x: yappi.func_matches(x, [a]) ++ ) ++ ++ stat = stats.pop() ++ self.assertEqual(stat.ncall, 1) ++ ++ yappi.set_tag_callback(None) ++ yappi.clear_stats() ++ yappi.start() ++ b() ++ b() ++ stats = yappi.get_func_stats() ++ self.assertEqual(len(stats), 1) ++ stat = stats.pop() ++ self.assertEqual(stat.ncall, 2) ++ ++ def test_filter(self): ++ ++ def a(): ++ pass ++ ++ def b(): ++ a() ++ ++ def c(): ++ b() ++ ++ _TCOUNT = 5 ++ ++ ts = [] ++ yappi.start() ++ for i in range(_TCOUNT): ++ t = threading.Thread(target=c) ++ t.start() ++ ts.append(t) ++ ++ for t in ts: ++ t.join() ++ ++ yappi.stop() ++ ++ ctx_ids = [] ++ for tstat in yappi.get_thread_stats(): ++ if tstat.name == '_MainThread': ++ main_ctx_id = tstat.id ++ else: ++ ctx_ids.append(tstat.id) ++ ++ fstats = yappi.get_func_stats(filter={"ctx_id": 9}) ++ self.assertTrue(fstats.empty()) ++ fstats = yappi.get_func_stats( ++ filter={ ++ "ctx_id": main_ctx_id, ++ "name": "c" ++ } ++ ) # main thread ++ self.assertTrue(fstats.empty()) ++ ++ for i in ctx_ids: ++ fstats = yappi.get_func_stats( ++ filter={ ++ "ctx_id": i, ++ "name": "a", ++ "ncall": 1 ++ } ++ ) ++ self.assertEqual(fstats.pop().ncall, 1) ++ fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "b"}) ++ self.assertEqual(fstats.pop().ncall, 1) ++ fstats = yappi.get_func_stats(filter={"ctx_id": i, "name": "c"}) ++ self.assertEqual(fstats.pop().ncall, 1) ++ ++ yappi.clear_stats() ++ yappi.start(builtins=True) ++ time.sleep(0.1) ++ yappi.stop() ++ fstats = yappi.get_func_stats(filter={"module": "time"}) ++ self.assertEqual(len(fstats), 1) ++ ++ # invalid filters` ++ self.assertRaises( ++ Exception, yappi.get_func_stats, filter={'tag': "sss"} ++ ) ++ self.assertRaises( ++ Exception, yappi.get_func_stats, filter={'ctx_id': "None"} ++ ) ++ ++ def test_filter_callback(self): ++ ++ def a(): ++ time.sleep(0.1) ++ ++ def b(): ++ a() ++ ++ def c(): ++ pass ++ ++ def d(): ++ pass ++ ++ yappi.set_clock_type("wall") ++ yappi.start(builtins=True) ++ a() ++ b() ++ c() ++ d() ++ stats = yappi.get_func_stats( ++ filter_callback=lambda x: yappi.func_matches(x, [a, b]) ++ ) ++ #stats.print_all() ++ r1 = ''' ++ tests/test_functionality.py:98 a 2 0.000000 0.200350 0.100175 ++ tests/test_functionality.py:101 b 1 0.000000 0.120000 0.100197 ++ ''' ++ self.assert_traces_almost_equal(r1, stats) ++ self.assertEqual(len(stats), 2) ++ stats = yappi.get_func_stats( ++ filter_callback=lambda x: yappi. ++ module_matches(x, [sys.modules[__name__]]) ++ ) ++ r1 = ''' ++ tests/test_functionality.py:98 a 2 0.000000 0.230130 0.115065 ++ tests/test_functionality.py:101 b 1 0.000000 0.120000 0.109011 ++ tests/test_functionality.py:104 c 1 0.000000 0.000002 0.000002 ++ tests/test_functionality.py:107 d 1 0.000000 0.000001 0.000001 ++ ''' ++ self.assert_traces_almost_equal(r1, stats) ++ self.assertEqual(len(stats), 4) ++ ++ stats = yappi.get_func_stats( ++ filter_callback=lambda x: yappi.func_matches(x, [time.sleep]) ++ ) ++ self.assertEqual(len(stats), 1) ++ r1 = ''' ++ time.sleep 2 0.206804 0.220000 0.103402 ++ ''' ++ self.assert_traces_almost_equal(r1, stats) ++ ++ def test_print_formatting(self): ++ ++ def a(): ++ pass ++ ++ def b(): ++ a() ++ ++ func_cols = { ++ 1: ("name", 48), ++ 0: ("ncall", 5), ++ 2: ("tsub", 8), ++ } ++ thread_cols = { ++ 1: ("name", 48), ++ 0: ("ttot", 8), ++ } ++ ++ yappi.start() ++ a() ++ b() ++ yappi.stop() ++ fs = yappi.get_func_stats() ++ cs = fs[1].children ++ ts = yappi.get_thread_stats() ++ #fs.print_all(out=sys.stderr, columns={1:("name", 70), }) ++ #cs.print_all(out=sys.stderr, columns=func_cols) ++ #ts.print_all(out=sys.stderr, columns=thread_cols) ++ #cs.print_all(out=sys.stderr, columns={}) ++ ++ self.assertRaises( ++ yappi.YappiError, fs.print_all, columns={1: ("namee", 9)} ++ ) ++ self.assertRaises( ++ yappi.YappiError, cs.print_all, columns={1: ("dd", 0)} ++ ) ++ self.assertRaises( ++ yappi.YappiError, ts.print_all, columns={1: ("tidd", 0)} ++ ) ++ ++ def test_get_clock(self): ++ yappi.set_clock_type('cpu') ++ self.assertEqual('cpu', yappi.get_clock_type()) ++ clock_info = yappi.get_clock_info() ++ self.assertTrue('api' in clock_info) ++ self.assertTrue('resolution' in clock_info) ++ ++ yappi.set_clock_type('wall') ++ self.assertEqual('wall', yappi.get_clock_type()) ++ ++ t0 = yappi.get_clock_time() ++ time.sleep(0.1) ++ duration = yappi.get_clock_time() - t0 ++ self.assertTrue(0.05 < duration < 0.3) ++ ++ def test_profile_decorator(self): ++ ++ def aggregate(func, stats): ++ fname = f"tests/{func.__name__}.profile" ++ try: ++ stats.add(fname) ++ except OSError: ++ pass ++ stats.save(fname) ++ raise Exception("messing around") ++ ++ @yappi.profile(return_callback=aggregate) ++ def a(x, y): ++ if x + y == 25: ++ raise Exception("") ++ return x + y ++ ++ def b(): ++ pass ++ ++ try: ++ os.remove( ++ "tests/a.profile" ++ ) # remove the one from prev test, if available ++ except: ++ pass ++ ++ # global profile is on to mess things up ++ yappi.start() ++ b() ++ ++ # assert functionality and call function at same time ++ try: ++ self.assertEqual(a(1, 2), 3) ++ except: ++ pass ++ try: ++ self.assertEqual(a(2, 5), 7) ++ except: ++ pass ++ try: ++ a(4, 21) ++ except: ++ pass ++ stats = yappi.get_func_stats().add("tests/a.profile") ++ fsa = utils.find_stat_by_name(stats, 'a') ++ self.assertEqual(fsa.ncall, 3) ++ self.assertEqual(len(stats), 1) # b() should be cleared out. ++ ++ @yappi.profile(return_callback=aggregate) ++ def count_down_rec(n): ++ if n == 0: ++ return ++ count_down_rec(n - 1) ++ ++ try: ++ os.remove( ++ "tests/count_down_rec.profile" ++ ) # remove the one from prev test, if available ++ except: ++ pass ++ ++ try: ++ count_down_rec(4) ++ except: ++ pass ++ try: ++ count_down_rec(3) ++ except: ++ pass ++ ++ stats = yappi.YFuncStats("tests/count_down_rec.profile") ++ fsrec = utils.find_stat_by_name(stats, 'count_down_rec') ++ self.assertEqual(fsrec.ncall, 9) ++ self.assertEqual(fsrec.nactualcall, 2) ++ ++ def test_strip_dirs(self): ++ ++ def a(): ++ pass ++ ++ stats = utils.run_and_get_func_stats(a, ) ++ stats.strip_dirs() ++ fsa = utils.find_stat_by_name(stats, "a") ++ self.assertEqual(fsa.module, os.path.basename(fsa.module)) ++ ++ @unittest.skipIf(os.name == "nt", "do not run on Windows") ++ def test_run_as_script(self): ++ import re ++ p = subprocess.Popen( ++ ['yappi', os.path.join('./tests', 'run_as_script.py')], ++ stdout=subprocess.PIPE ++ ) ++ out, err = p.communicate() ++ self.assertEqual(p.returncode, 0) ++ func_stats, thread_stats = re.split( ++ b'name\\s+id\\s+tid\\s+ttot\\s+scnt\\s*\n', out ++ ) ++ self.assertTrue(b'FancyThread' in thread_stats) ++ ++ def test_yappi_overhead(self): ++ LOOP_COUNT = 100000 ++ ++ def a(): ++ pass ++ ++ def b(): ++ for i in range(LOOP_COUNT): ++ a() ++ ++ t0 = time.time() ++ yappi.start() ++ b() ++ yappi.stop() ++ time_with_yappi = time.time() - t0 ++ t0 = time.time() ++ b() ++ time_without_yappi = time.time() - t0 ++ if time_without_yappi == 0: ++ time_without_yappi = 0.000001 ++ ++ # in latest v0.82, I calculated this as close to "7.0" in my machine. ++ # however, %83 of this overhead is coming from tickcount(). The other %17 ++ # seems to have been evenly distributed to the internal bookkeeping ++ # structures/algorithms which seems acceptable. Note that our test only ++ # tests one function being profiled at-a-time in a short interval. ++ # profiling high number of functions in a small time ++ # is a different beast, (which is pretty unlikely in most applications) ++ # So as a conclusion: I cannot see any optimization window for Yappi that ++ # is worth implementing as we will only optimize %17 of the time. ++ sys.stderr.write("\r\nYappi puts %0.1f times overhead to the profiled application in average.\r\n" % \ ++ (time_with_yappi / time_without_yappi)) ++ ++ def test_clear_stats_while_running(self): ++ ++ def a(): ++ pass ++ ++ yappi.start() ++ a() ++ yappi.clear_stats() ++ a() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ self.assertEqual(fsa.ncall, 1) ++ ++ def test_generator(self): ++ ++ def _gen(n): ++ while (n > 0): ++ yield n ++ n -= 1 ++ ++ yappi.start() ++ for x in _gen(5): ++ pass ++ self.assertTrue( ++ yappi.convert2pstats(yappi.get_func_stats()) is not None ++ ) ++ ++ def test_slice_child_stats_and_strip_dirs(self): ++ ++ def b(): ++ for i in range(10000000): ++ pass ++ ++ def a(): ++ b() ++ ++ yappi.start(builtins=True) ++ a() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ self.assertTrue(fsa.children[0:1] is not None) ++ prev_afullname = fsa.full_name ++ prev_bchildfullname = fsa.children[fsb].full_name ++ stats.strip_dirs() ++ self.assertTrue(len(prev_afullname) > len(fsa.full_name)) ++ self.assertTrue( ++ len(prev_bchildfullname) > len(fsa.children[fsb].full_name) ++ ) ++ ++ def test_children_stat_functions(self): ++ _timings = {"a_1": 5, "b_1": 3, "c_1": 1} ++ _yappi._set_test_timings(_timings) ++ ++ def b(): ++ pass ++ ++ def c(): ++ pass ++ ++ def a(): ++ b() ++ c() ++ ++ yappi.start() ++ a() ++ b() # non-child call ++ c() # non-child call ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ childs_of_a = fsa.children.get().sort("tavg", "desc") ++ prev_item = None ++ for item in childs_of_a: ++ if prev_item: ++ self.assertTrue(prev_item.tavg > item.tavg) ++ prev_item = item ++ childs_of_a.sort("name", "desc") ++ prev_item = None ++ for item in childs_of_a: ++ if prev_item: ++ self.assertTrue(prev_item.name > item.name) ++ prev_item = item ++ childs_of_a.clear() ++ self.assertTrue(childs_of_a.empty()) ++ ++ def test_no_stats_different_clock_type_load(self): ++ ++ def a(): ++ pass ++ ++ yappi.start() ++ a() ++ yappi.stop() ++ yappi.get_func_stats().save("tests/ystats1.ys") ++ yappi.clear_stats() ++ yappi.set_clock_type("WALL") ++ yappi.start() ++ yappi.stop() ++ stats = yappi.get_func_stats().add("tests/ystats1.ys") ++ fsa = utils.find_stat_by_name(stats, 'a') ++ self.assertTrue(fsa is not None) ++ ++ def test_subsequent_profile(self): ++ _timings = {"a_1": 1, "b_1": 1} ++ _yappi._set_test_timings(_timings) ++ ++ def a(): ++ pass ++ ++ def b(): ++ pass ++ ++ yappi.start() ++ a() ++ yappi.stop() ++ yappi.start() ++ b() ++ yappi.stop() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ self.assertTrue(fsa is not None) ++ self.assertTrue(fsb is not None) ++ self.assertEqual(fsa.ttot, 1) ++ self.assertEqual(fsb.ttot, 1) ++ ++ def test_lambda(self): ++ f = lambda: time.sleep(0.3) ++ yappi.set_clock_type("wall") ++ yappi.start() ++ f() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, '') ++ self.assertTrue(fsa.ttot > 0.1) ++ ++ def test_module_stress(self): ++ self.assertEqual(yappi.is_running(), False) ++ ++ yappi.start() ++ yappi.clear_stats() ++ self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") ++ ++ yappi.stop() ++ yappi.clear_stats() ++ yappi.set_clock_type("cpu") ++ self.assertRaises(yappi.YappiError, yappi.set_clock_type, "dummy") ++ self.assertEqual(yappi.is_running(), False) ++ yappi.clear_stats() ++ yappi.clear_stats() ++ ++ def test_stat_sorting(self): ++ _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ b() ++ ++ def b(): ++ if self._ncall == 2: ++ return ++ self._ncall += 1 ++ a() ++ ++ stats = utils.run_and_get_func_stats(a) ++ stats = stats.sort("totaltime", "desc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.ttot >= stat.ttot) ++ prev_stat = stat ++ stats = stats.sort("totaltime", "asc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.ttot <= stat.ttot) ++ prev_stat = stat ++ stats = stats.sort("avgtime", "asc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.tavg <= stat.tavg) ++ prev_stat = stat ++ stats = stats.sort("name", "asc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.name <= stat.name) ++ prev_stat = stat ++ stats = stats.sort("subtime", "asc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.tsub <= stat.tsub) ++ prev_stat = stat ++ ++ self.assertRaises( ++ yappi.YappiError, stats.sort, "invalid_func_sorttype_arg" ++ ) ++ self.assertRaises( ++ yappi.YappiError, stats.sort, "totaltime", ++ "invalid_func_sortorder_arg" ++ ) ++ ++ def test_start_flags(self): ++ self.assertEqual(_yappi._get_start_flags(), None) ++ yappi.start() ++ ++ def a(): ++ pass ++ ++ a() ++ self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) ++ self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) ++ self.assertEqual(len(yappi.get_thread_stats()), 1) ++ ++ def test_builtin_profiling(self): ++ ++ def a(): ++ time.sleep(0.4) # is a builtin function ++ ++ yappi.set_clock_type('wall') ++ ++ yappi.start(builtins=True) ++ a() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'sleep') ++ self.assertTrue(fsa is not None) ++ self.assertTrue(fsa.ttot > 0.3) ++ yappi.stop() ++ yappi.clear_stats() ++ ++ def a(): ++ pass ++ ++ yappi.start() ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ stats = yappi.get_func_stats() ++ ++ def test_singlethread_profiling(self): ++ yappi.set_clock_type('wall') ++ ++ def a(): ++ time.sleep(0.2) ++ ++ class Worker1(threading.Thread): ++ ++ def a(self): ++ time.sleep(0.3) ++ ++ def run(self): ++ self.a() ++ ++ yappi.start(profile_threads=False) ++ ++ c = Worker1() ++ c.start() ++ c.join() ++ a() ++ stats = yappi.get_func_stats() ++ fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') ++ fsa2 = utils.find_stat_by_name(stats, 'a') ++ self.assertTrue(fsa1 is None) ++ self.assertTrue(fsa2 is not None) ++ self.assertTrue(fsa2.ttot > 0.1) ++ ++ def test_run(self): ++ ++ def profiled(): ++ pass ++ ++ yappi.clear_stats() ++ try: ++ with yappi.run(): ++ profiled() ++ stats = yappi.get_func_stats() ++ finally: ++ yappi.clear_stats() ++ ++ self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) ++ ++ def test_run_recursive(self): ++ ++ def profiled(): ++ pass ++ ++ def not_profiled(): ++ pass ++ ++ yappi.clear_stats() ++ try: ++ with yappi.run(): ++ with yappi.run(): ++ profiled() ++ # Profiling stopped here ++ not_profiled() ++ stats = yappi.get_func_stats() ++ finally: ++ yappi.clear_stats() ++ ++ self.assertIsNotNone(utils.find_stat_by_name(stats, 'profiled')) ++ self.assertIsNone(utils.find_stat_by_name(stats, 'not_profiled')) ++ ++ ++class StatSaveScenarios(utils.YappiUnitTestCase): ++ ++ def test_pstats_conversion(self): ++ ++ def pstat_id(fs): ++ return (fs.module, fs.lineno, fs.name) ++ ++ def a(): ++ d() ++ ++ def b(): ++ d() ++ ++ def c(): ++ pass ++ ++ def d(): ++ pass ++ ++ _timings = {"a_1": 12, "b_1": 7, "c_1": 5, "d_1": 2} ++ _yappi._set_test_timings(_timings) ++ stats = utils.run_and_get_func_stats(a, ) ++ stats.strip_dirs() ++ stats.save("tests/a1.pstats", type="pstat") ++ fsa_pid = pstat_id(utils.find_stat_by_name(stats, "a")) ++ fsd_pid = pstat_id(utils.find_stat_by_name(stats, "d")) ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ stats = utils.run_and_get_func_stats(a, ) ++ stats.strip_dirs() ++ stats.save("tests/a2.pstats", type="pstat") ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ stats = utils.run_and_get_func_stats(b, ) ++ stats.strip_dirs() ++ stats.save("tests/b1.pstats", type="pstat") ++ fsb_pid = pstat_id(utils.find_stat_by_name(stats, "b")) ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ stats = utils.run_and_get_func_stats(c, ) ++ stats.strip_dirs() ++ stats.save("tests/c1.pstats", type="pstat") ++ fsc_pid = pstat_id(utils.find_stat_by_name(stats, "c")) ++ ++ # merge saved stats and check pstats values are correct ++ import pstats ++ p = pstats.Stats( ++ 'tests/a1.pstats', 'tests/a2.pstats', 'tests/b1.pstats', ++ 'tests/c1.pstats' ++ ) ++ p.strip_dirs() ++ # ct = ttot, tt = tsub ++ (cc, nc, tt, ct, callers) = p.stats[fsa_pid] ++ self.assertEqual(cc, nc, 2) ++ self.assertEqual(tt, 20) ++ self.assertEqual(ct, 24) ++ (cc, nc, tt, ct, callers) = p.stats[fsd_pid] ++ self.assertEqual(cc, nc, 3) ++ self.assertEqual(tt, 6) ++ self.assertEqual(ct, 6) ++ self.assertEqual(len(callers), 2) ++ (cc, nc, tt, ct) = callers[fsa_pid] ++ self.assertEqual(cc, nc, 2) ++ self.assertEqual(tt, 4) ++ self.assertEqual(ct, 4) ++ (cc, nc, tt, ct) = callers[fsb_pid] ++ self.assertEqual(cc, nc, 1) ++ self.assertEqual(tt, 2) ++ self.assertEqual(ct, 2) ++ ++ def test_merge_stats(self): ++ _timings = { ++ "a_1": 15, ++ "b_1": 14, ++ "c_1": 12, ++ "d_1": 10, ++ "e_1": 9, ++ "f_1": 7, ++ "g_1": 6, ++ "h_1": 5, ++ "i_1": 1 ++ } ++ _yappi._set_test_timings(_timings) ++ ++ def a(): ++ b() ++ ++ def b(): ++ c() ++ ++ def c(): ++ d() ++ ++ def d(): ++ e() ++ ++ def e(): ++ f() ++ ++ def f(): ++ g() ++ ++ def g(): ++ h() ++ ++ def h(): ++ i() ++ ++ def i(): ++ pass ++ ++ yappi.start() ++ a() ++ a() ++ yappi.stop() ++ stats = yappi.get_func_stats() ++ self.assertRaises( ++ NotImplementedError, stats.save, "", "INVALID_SAVE_TYPE" ++ ) ++ stats.save("tests/ystats2.ys") ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ yappi.start() ++ a() ++ stats = yappi.get_func_stats().add("tests/ystats2.ys") ++ fsa = utils.find_stat_by_name(stats, "a") ++ fsb = utils.find_stat_by_name(stats, "b") ++ fsc = utils.find_stat_by_name(stats, "c") ++ fsd = utils.find_stat_by_name(stats, "d") ++ fse = utils.find_stat_by_name(stats, "e") ++ fsf = utils.find_stat_by_name(stats, "f") ++ fsg = utils.find_stat_by_name(stats, "g") ++ fsh = utils.find_stat_by_name(stats, "h") ++ fsi = utils.find_stat_by_name(stats, "i") ++ self.assertEqual(fsa.ttot, 45) ++ self.assertEqual(fsa.ncall, 3) ++ self.assertEqual(fsa.nactualcall, 3) ++ self.assertEqual(fsa.tsub, 3) ++ self.assertEqual(fsa.children[fsb].ttot, fsb.ttot) ++ self.assertEqual(fsa.children[fsb].tsub, fsb.tsub) ++ self.assertEqual(fsb.children[fsc].ttot, fsc.ttot) ++ self.assertEqual(fsb.children[fsc].tsub, fsc.tsub) ++ self.assertEqual(fsc.tsub, 6) ++ self.assertEqual(fsc.children[fsd].ttot, fsd.ttot) ++ self.assertEqual(fsc.children[fsd].tsub, fsd.tsub) ++ self.assertEqual(fsd.children[fse].ttot, fse.ttot) ++ self.assertEqual(fsd.children[fse].tsub, fse.tsub) ++ self.assertEqual(fse.children[fsf].ttot, fsf.ttot) ++ self.assertEqual(fse.children[fsf].tsub, fsf.tsub) ++ self.assertEqual(fsf.children[fsg].ttot, fsg.ttot) ++ self.assertEqual(fsf.children[fsg].tsub, fsg.tsub) ++ self.assertEqual(fsg.ttot, 18) ++ self.assertEqual(fsg.tsub, 3) ++ self.assertEqual(fsg.children[fsh].ttot, fsh.ttot) ++ self.assertEqual(fsg.children[fsh].tsub, fsh.tsub) ++ self.assertEqual(fsh.ttot, 15) ++ self.assertEqual(fsh.tsub, 12) ++ self.assertEqual(fsh.tavg, 5) ++ self.assertEqual(fsh.children[fsi].ttot, fsi.ttot) ++ self.assertEqual(fsh.children[fsi].tsub, fsi.tsub) ++ #stats.debug_print() ++ ++ def test_merge_multithreaded_stats(self): ++ import _yappi ++ timings = {"a_1": 2, "b_1": 1} ++ _yappi._set_test_timings(timings) ++ ++ def a(): ++ pass ++ ++ def b(): ++ pass ++ ++ yappi.start() ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ t = threading.Thread(target=b) ++ t.start() ++ t.join() ++ yappi.get_func_stats().save("tests/ystats1.ys") ++ yappi.clear_stats() ++ _yappi._set_test_timings(timings) ++ self.assertEqual(len(yappi.get_func_stats()), 0) ++ self.assertEqual(len(yappi.get_thread_stats()), 1) ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ ++ self.assertEqual(_yappi._get_start_flags()["profile_builtins"], 0) ++ self.assertEqual(_yappi._get_start_flags()["profile_multicontext"], 1) ++ yappi.get_func_stats().save("tests/ystats2.ys") ++ ++ stats = yappi.YFuncStats([ ++ "tests/ystats1.ys", ++ "tests/ystats2.ys", ++ ]) ++ fsa = utils.find_stat_by_name(stats, "a") ++ fsb = utils.find_stat_by_name(stats, "b") ++ self.assertEqual(fsa.ncall, 2) ++ self.assertEqual(fsb.ncall, 1) ++ self.assertEqual(fsa.tsub, fsa.ttot, 4) ++ self.assertEqual(fsb.tsub, fsb.ttot, 1) ++ ++ def test_merge_load_different_clock_types(self): ++ yappi.start(builtins=True) ++ ++ def a(): ++ b() ++ ++ def b(): ++ c() ++ ++ def c(): ++ pass ++ ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ yappi.get_func_stats().sort("name", "asc").save("tests/ystats1.ys") ++ yappi.stop() ++ yappi.clear_stats() ++ yappi.start(builtins=False) ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ yappi.get_func_stats().save("tests/ystats2.ys") ++ yappi.stop() ++ self.assertRaises(_yappi.error, yappi.set_clock_type, "wall") ++ yappi.clear_stats() ++ yappi.set_clock_type("wall") ++ yappi.start() ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ yappi.get_func_stats().save("tests/ystats3.ys") ++ self.assertRaises( ++ yappi.YappiError, ++ yappi.YFuncStats().add("tests/ystats1.ys").add, "tests/ystats3.ys" ++ ) ++ stats = yappi.YFuncStats(["tests/ystats1.ys", ++ "tests/ystats2.ys"]).sort("name") ++ fsa = utils.find_stat_by_name(stats, "a") ++ fsb = utils.find_stat_by_name(stats, "b") ++ fsc = utils.find_stat_by_name(stats, "c") ++ self.assertEqual(fsa.ncall, 2) ++ self.assertEqual(fsa.ncall, fsb.ncall, fsc.ncall) ++ ++ def test_merge_aabab_aabbc(self): ++ _timings = { ++ "a_1": 15, ++ "a_2": 14, ++ "b_1": 12, ++ "a_3": 10, ++ "b_2": 9, ++ "c_1": 4 ++ } ++ _yappi._set_test_timings(_timings) ++ ++ def a(): ++ if self._ncall == 1: ++ self._ncall += 1 ++ a() ++ elif self._ncall == 5: ++ self._ncall += 1 ++ a() ++ else: ++ b() ++ ++ def b(): ++ if self._ncall == 2: ++ self._ncall += 1 ++ a() ++ elif self._ncall == 6: ++ self._ncall += 1 ++ b() ++ elif self._ncall == 7: ++ c() ++ else: ++ return ++ ++ def c(): ++ pass ++ ++ self._ncall = 1 ++ stats = utils.run_and_get_func_stats(a, ) ++ stats.save("tests/ystats1.ys") ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ #stats.print_all() ++ ++ self._ncall = 5 ++ stats = utils.run_and_get_func_stats(a, ) ++ stats.save("tests/ystats2.ys") ++ ++ #stats.print_all() ++ ++ def a(): # same name but another function(code object) ++ pass ++ ++ yappi.start() ++ a() ++ stats = yappi.get_func_stats().add( ++ ["tests/ystats1.ys", "tests/ystats2.ys"] ++ ) ++ #stats.print_all() ++ self.assertEqual(len(stats), 4) ++ ++ fsa = None ++ for stat in stats: ++ if stat.name == "a" and stat.ttot == 45: ++ fsa = stat ++ break ++ self.assertTrue(fsa is not None) ++ ++ self.assertEqual(fsa.ncall, 7) ++ self.assertEqual(fsa.nactualcall, 3) ++ self.assertEqual(fsa.ttot, 45) ++ self.assertEqual(fsa.tsub, 10) ++ fsb = utils.find_stat_by_name(stats, "b") ++ fsc = utils.find_stat_by_name(stats, "c") ++ self.assertEqual(fsb.ncall, 6) ++ self.assertEqual(fsb.nactualcall, 3) ++ self.assertEqual(fsb.ttot, 36) ++ self.assertEqual(fsb.tsub, 27) ++ self.assertEqual(fsb.tavg, 6) ++ self.assertEqual(fsc.ttot, 8) ++ self.assertEqual(fsc.tsub, 8) ++ self.assertEqual(fsc.tavg, 4) ++ self.assertEqual(fsc.nactualcall, fsc.ncall, 2) ++ ++ ++class MultithreadedScenarios(utils.YappiUnitTestCase): ++ ++ def test_issue_32(self): ++ ''' ++ Start yappi from different thread and we get Internal Error(15) as ++ the current_ctx_id() called while enumerating the threads in start() ++ and as it does not swap to the enumerated ThreadState* the THreadState_GetDict() ++ returns wrong object and thus sets an invalid id for the _ctx structure. ++ ++ When this issue happens multiple Threads have same tid as the internal ts_ptr ++ will be same for different contexts. So, let's see if that happens ++ ''' ++ ++ def foo(): ++ time.sleep(0.2) ++ ++ def bar(): ++ time.sleep(0.1) ++ ++ def thread_func(): ++ yappi.set_clock_type("wall") ++ yappi.start() ++ ++ bar() ++ ++ t = threading.Thread(target=thread_func) ++ t.start() ++ t.join() ++ ++ foo() ++ ++ yappi.stop() ++ ++ thread_ids = set() ++ for tstat in yappi.get_thread_stats(): ++ self.assertTrue(tstat.tid not in thread_ids) ++ thread_ids.add(tstat.tid) ++ ++ def test_subsequent_profile(self): ++ WORKER_COUNT = 5 ++ ++ def a(): ++ pass ++ ++ def b(): ++ pass ++ ++ def c(): ++ pass ++ ++ _timings = { ++ "a_1": 3, ++ "b_1": 2, ++ "c_1": 1, ++ } ++ ++ yappi.start() ++ ++ def g(): ++ pass ++ ++ g() ++ yappi.stop() ++ yappi.clear_stats() ++ _yappi._set_test_timings(_timings) ++ yappi.start() ++ ++ _dummy = [] ++ for i in range(WORKER_COUNT): ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ for i in range(WORKER_COUNT): ++ t = threading.Thread(target=b) ++ t.start() ++ _dummy.append(t) ++ t.join() ++ for i in range(WORKER_COUNT): ++ t = threading.Thread(target=a) ++ t.start() ++ t.join() ++ for i in range(WORKER_COUNT): ++ t = threading.Thread(target=c) ++ t.start() ++ t.join() ++ yappi.stop() ++ yappi.start() ++ ++ def f(): ++ pass ++ ++ f() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ self.assertEqual(fsa.ncall, 10) ++ self.assertEqual(fsb.ncall, 5) ++ self.assertEqual(fsc.ncall, 5) ++ self.assertEqual(fsa.ttot, fsa.tsub, 30) ++ self.assertEqual(fsb.ttot, fsb.tsub, 10) ++ self.assertEqual(fsc.ttot, fsc.tsub, 5) ++ ++ # MACOSx optimizes by only creating one worker thread ++ self.assertTrue(len(yappi.get_thread_stats()) >= 2) ++ ++ def test_basic(self): ++ yappi.set_clock_type('wall') ++ ++ def dummy(): ++ pass ++ ++ def a(): ++ time.sleep(0.2) ++ ++ class Worker1(threading.Thread): ++ ++ def a(self): ++ time.sleep(0.3) ++ ++ def run(self): ++ self.a() ++ ++ yappi.start(builtins=False, profile_threads=True) ++ ++ c = Worker1() ++ c.start() ++ c.join() ++ a() ++ stats = yappi.get_func_stats() ++ fsa1 = utils.find_stat_by_name(stats, 'Worker1.a') ++ fsa2 = utils.find_stat_by_name(stats, 'a') ++ self.assertTrue(fsa1 is not None) ++ self.assertTrue(fsa2 is not None) ++ self.assertTrue(fsa1.ttot > 0.2) ++ self.assertTrue(fsa2.ttot > 0.1) ++ tstats = yappi.get_thread_stats() ++ self.assertEqual(len(tstats), 2) ++ tsa = utils.find_stat_by_name(tstats, 'Worker1') ++ tsm = utils.find_stat_by_name(tstats, '_MainThread') ++ dummy() # call dummy to force ctx name to be retrieved again. ++ self.assertTrue(tsa is not None) ++ # TODO: I put dummy() to fix below, remove the comments after a while. ++ self.assertTrue( # FIX: I see this fails sometimes? ++ tsm is not None, ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(tstats))}") ++ ++ def test_ctx_stats(self): ++ from threading import Thread ++ DUMMY_WORKER_COUNT = 5 ++ yappi.start() ++ ++ class DummyThread(Thread): ++ pass ++ ++ def dummy(): ++ pass ++ ++ def dummy_worker(): ++ pass ++ ++ for i in range(DUMMY_WORKER_COUNT): ++ t = DummyThread(target=dummy_worker) ++ t.start() ++ t.join() ++ yappi.stop() ++ stats = yappi.get_thread_stats() ++ tsa = utils.find_stat_by_name(stats, "DummyThread") ++ self.assertTrue(tsa is not None) ++ yappi.clear_stats() ++ time.sleep(1.0) ++ _timings = { ++ "a_1": 6, ++ "b_1": 5, ++ "c_1": 3, ++ "d_1": 1, ++ "a_2": 4, ++ "b_2": 3, ++ "c_2": 2, ++ "d_2": 1 ++ } ++ _yappi._set_test_timings(_timings) ++ ++ class Thread1(Thread): ++ pass ++ ++ class Thread2(Thread): ++ pass ++ ++ def a(): ++ b() ++ ++ def b(): ++ c() ++ ++ def c(): ++ d() ++ ++ def d(): ++ time.sleep(0.6) ++ ++ yappi.set_clock_type("wall") ++ yappi.start() ++ t1 = Thread1(target=a) ++ t1.start() ++ t2 = Thread2(target=a) ++ t2.start() ++ t1.join() ++ t2.join() ++ stats = yappi.get_thread_stats() ++ ++ # the fist clear_stats clears the context table? ++ tsa = utils.find_stat_by_name(stats, "DummyThread") ++ self.assertTrue(tsa is None) ++ ++ tst1 = utils.find_stat_by_name(stats, "Thread1") ++ tst2 = utils.find_stat_by_name(stats, "Thread2") ++ tsmain = utils.find_stat_by_name(stats, "_MainThread") ++ dummy() # call dummy to force ctx name to be retrieved again. ++ self.assertTrue(len(stats) == 3) ++ self.assertTrue(tst1 is not None) ++ self.assertTrue(tst2 is not None) ++ # TODO: I put dummy() to fix below, remove the comments after a while. ++ self.assertTrue( # FIX: I see this fails sometimes ++ tsmain is not None, ++ f"Could not find \"_MainThread\". Found: {', '.join(utils.get_stat_names(stats))}") ++ self.assertTrue(1.0 > tst2.ttot >= 0.5) ++ self.assertTrue(1.0 > tst1.ttot >= 0.5) ++ ++ # test sorting of the ctx stats ++ stats = stats.sort("totaltime", "desc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.ttot >= stat.ttot) ++ prev_stat = stat ++ stats = stats.sort("totaltime", "asc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.ttot <= stat.ttot) ++ prev_stat = stat ++ stats = stats.sort("schedcount", "desc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.sched_count >= stat.sched_count) ++ prev_stat = stat ++ stats = stats.sort("name", "desc") ++ prev_stat = None ++ for stat in stats: ++ if prev_stat: ++ self.assertTrue(prev_stat.name.lower() >= stat.name.lower()) ++ prev_stat = stat ++ self.assertRaises( ++ yappi.YappiError, stats.sort, "invalid_thread_sorttype_arg" ++ ) ++ self.assertRaises( ++ yappi.YappiError, stats.sort, "invalid_thread_sortorder_arg" ++ ) ++ ++ def test_ctx_stats_cpu(self): ++ ++ def get_thread_name(): ++ try: ++ return threading.current_thread().name ++ except AttributeError: ++ return "Anonymous" ++ ++ def burn_cpu(sec): ++ t0 = yappi.get_clock_time() ++ elapsed = 0 ++ while (elapsed < sec): ++ for _ in range(1000): ++ pass ++ elapsed = yappi.get_clock_time() - t0 ++ ++ def test(): ++ ++ ts = [] ++ for i in (0.01, 0.05, 0.1): ++ t = threading.Thread(target=burn_cpu, args=(i, )) ++ t.name = f"burn_cpu-{str(i)}" ++ t.start() ++ ts.append(t) ++ for t in ts: ++ t.join() ++ ++ yappi.set_clock_type("cpu") ++ yappi.set_context_name_callback(get_thread_name) ++ ++ yappi.start() ++ ++ test() ++ ++ yappi.stop() ++ ++ tstats = yappi.get_thread_stats() ++ r1 = ''' ++ burn_cpu-0.1 3 123145356058624 0.100105 8 ++ burn_cpu-0.05 2 123145361313792 0.050149 8 ++ burn_cpu-0.01 1 123145356058624 0.010127 2 ++ MainThread 0 4321620864 0.001632 6 ++ ''' ++ self.assert_ctx_stats_almost_equal(r1, tstats) ++ ++ def test_producer_consumer_with_queues(self): ++ # we currently just stress yappi, no functionality test is done here. ++ yappi.start() ++ from queue import Queue ++ from threading import Thread ++ WORKER_THREAD_COUNT = 50 ++ WORK_ITEM_COUNT = 2000 ++ ++ def worker(): ++ while True: ++ item = q.get() ++ # do the work with item ++ q.task_done() ++ ++ q = Queue() ++ for i in range(WORKER_THREAD_COUNT): ++ t = Thread(target=worker) ++ t.daemon = True ++ t.start() ++ ++ for item in range(WORK_ITEM_COUNT): ++ q.put(item) ++ q.join() # block until all tasks are done ++ #yappi.get_func_stats().sort("callcount").print_all() ++ yappi.stop() ++ ++ def test_temporary_lock_waiting(self): ++ yappi.start() ++ _lock = threading.Lock() ++ ++ def worker(): ++ _lock.acquire() ++ try: ++ time.sleep(1.0) ++ finally: ++ _lock.release() ++ ++ t1 = threading.Thread(target=worker) ++ t2 = threading.Thread(target=worker) ++ t1.start() ++ t2.start() ++ t1.join() ++ t2.join() ++ #yappi.get_func_stats().sort("callcount").print_all() ++ yappi.stop() ++ ++ @unittest.skipIf(os.name != "posix", "requires Posix compliant OS") ++ def test_signals_with_blocking_calls(self): ++ import signal, os, time ++ ++ # just to verify if signal is handled correctly and stats/yappi are not corrupted. ++ def handler(signum, frame): ++ raise Exception("Signal handler executed!") ++ ++ yappi.start() ++ signal.signal(signal.SIGALRM, handler) ++ signal.alarm(1) ++ self.assertRaises(Exception, time.sleep, 2) ++ stats = yappi.get_func_stats() ++ fsh = utils.find_stat_by_name(stats, "handler") ++ self.assertTrue(fsh is not None) ++ ++ def test_concurrent_futures(self): ++ yappi.start() ++ from concurrent.futures import ThreadPoolExecutor ++ with ThreadPoolExecutor(max_workers=5) as executor: ++ f = executor.submit(pow, 5, 2) ++ self.assertEqual(f.result(), 25) ++ time.sleep(1.0) ++ yappi.stop() ++ ++ def test_barrier(self): ++ yappi.start() ++ b = threading.Barrier(2, timeout=1) ++ ++ def worker(): ++ try: ++ b.wait() ++ except threading.BrokenBarrierError: ++ pass ++ except Exception: ++ raise Exception("BrokenBarrierError not raised") ++ ++ t1 = threading.Thread(target=worker) ++ t1.start() ++ #b.wait() ++ t1.join() ++ yappi.stop() ++ ++ ++class NonRecursiveFunctions(utils.YappiUnitTestCase): ++ ++ def test_abcd(self): ++ _timings = {"a_1": 6, "b_1": 5, "c_1": 3, "d_1": 1} ++ _yappi._set_test_timings(_timings) ++ ++ def a(): ++ b() ++ ++ def b(): ++ c() ++ ++ def c(): ++ d() ++ ++ def d(): ++ pass ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ fsd = utils.find_stat_by_name(stats, 'd') ++ cfsab = fsa.children[fsb] ++ cfsbc = fsb.children[fsc] ++ cfscd = fsc.children[fsd] ++ ++ self.assertEqual(fsa.ttot, 6) ++ self.assertEqual(fsa.tsub, 1) ++ self.assertEqual(fsb.ttot, 5) ++ self.assertEqual(fsb.tsub, 2) ++ self.assertEqual(fsc.ttot, 3) ++ self.assertEqual(fsc.tsub, 2) ++ self.assertEqual(fsd.ttot, 1) ++ self.assertEqual(fsd.tsub, 1) ++ self.assertEqual(cfsab.ttot, 5) ++ self.assertEqual(cfsab.tsub, 2) ++ self.assertEqual(cfsbc.ttot, 3) ++ self.assertEqual(cfsbc.tsub, 2) ++ self.assertEqual(cfscd.ttot, 1) ++ self.assertEqual(cfscd.tsub, 1) ++ ++ def test_stop_in_middle(self): ++ _timings = {"a_1": 6, "b_1": 4} ++ _yappi._set_test_timings(_timings) ++ ++ def a(): ++ b() ++ yappi.stop() ++ ++ def b(): ++ time.sleep(0.2) ++ ++ yappi.start() ++ a() ++ stats = yappi.get_func_stats() ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ ++ self.assertEqual(fsa.ncall, 1) ++ self.assertEqual(fsa.nactualcall, 0) ++ self.assertEqual(fsa.ttot, 0) # no call_leave called ++ self.assertEqual(fsa.tsub, 0) # no call_leave called ++ self.assertEqual(fsb.ttot, 4) ++ ++ ++class RecursiveFunctions(utils.YappiUnitTestCase): ++ ++ def test_fibonacci(self): ++ ++ def fib(n): ++ if n > 1: ++ return fib(n - 1) + fib(n - 2) ++ else: ++ return n ++ ++ stats = utils.run_and_get_func_stats(fib, 22) ++ fs = utils.find_stat_by_name(stats, 'fib') ++ self.assertEqual(fs.ncall, 57313) ++ self.assertEqual(fs.ttot, fs.tsub) ++ ++ def test_abcadc(self): ++ _timings = { ++ "a_1": 20, ++ "b_1": 19, ++ "c_1": 17, ++ "a_2": 13, ++ "d_1": 12, ++ "c_2": 10, ++ "a_3": 5 ++ } ++ _yappi._set_test_timings(_timings) ++ ++ def a(n): ++ if n == 3: ++ return ++ if n == 1 + 1: ++ d(n) ++ else: ++ b(n) ++ ++ def b(n): ++ c(n) ++ ++ def c(n): ++ a(n + 1) ++ ++ def d(n): ++ c(n) ++ ++ stats = utils.run_and_get_func_stats(a, 1) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ fsd = utils.find_stat_by_name(stats, 'd') ++ self.assertEqual(fsa.ncall, 3) ++ self.assertEqual(fsa.nactualcall, 1) ++ self.assertEqual(fsa.ttot, 20) ++ self.assertEqual(fsa.tsub, 7) ++ self.assertEqual(fsb.ttot, 19) ++ self.assertEqual(fsb.tsub, 2) ++ self.assertEqual(fsc.ttot, 17) ++ self.assertEqual(fsc.tsub, 9) ++ self.assertEqual(fsd.ttot, 12) ++ self.assertEqual(fsd.tsub, 2) ++ cfsca = fsc.children[fsa] ++ self.assertEqual(cfsca.nactualcall, 0) ++ self.assertEqual(cfsca.ncall, 2) ++ self.assertEqual(cfsca.ttot, 13) ++ self.assertEqual(cfsca.tsub, 6) ++ ++ def test_aaaa(self): ++ _timings = {"d_1": 9, "d_2": 7, "d_3": 3, "d_4": 2} ++ _yappi._set_test_timings(_timings) ++ ++ def d(n): ++ if n == 3: ++ return ++ d(n + 1) ++ ++ stats = utils.run_and_get_func_stats(d, 0) ++ fsd = utils.find_stat_by_name(stats, 'd') ++ self.assertEqual(fsd.ncall, 4) ++ self.assertEqual(fsd.nactualcall, 1) ++ self.assertEqual(fsd.ttot, 9) ++ self.assertEqual(fsd.tsub, 9) ++ cfsdd = fsd.children[fsd] ++ self.assertEqual(cfsdd.ttot, 7) ++ self.assertEqual(cfsdd.tsub, 7) ++ self.assertEqual(cfsdd.ncall, 3) ++ self.assertEqual(cfsdd.nactualcall, 0) ++ ++ def test_abcabc(self): ++ _timings = { ++ "a_1": 20, ++ "b_1": 19, ++ "c_1": 17, ++ "a_2": 13, ++ "b_2": 11, ++ "c_2": 9, ++ "a_3": 6 ++ } ++ _yappi._set_test_timings(_timings) ++ ++ def a(n): ++ if n == 3: ++ return ++ else: ++ b(n) ++ ++ def b(n): ++ c(n) ++ ++ def c(n): ++ a(n + 1) ++ ++ stats = utils.run_and_get_func_stats(a, 1) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ self.assertEqual(fsa.ncall, 3) ++ self.assertEqual(fsa.nactualcall, 1) ++ self.assertEqual(fsa.ttot, 20) ++ self.assertEqual(fsa.tsub, 9) ++ self.assertEqual(fsb.ttot, 19) ++ self.assertEqual(fsb.tsub, 4) ++ self.assertEqual(fsc.ttot, 17) ++ self.assertEqual(fsc.tsub, 7) ++ cfsab = fsa.children[fsb] ++ cfsbc = fsb.children[fsc] ++ cfsca = fsc.children[fsa] ++ self.assertEqual(cfsab.ttot, 19) ++ self.assertEqual(cfsab.tsub, 4) ++ self.assertEqual(cfsbc.ttot, 17) ++ self.assertEqual(cfsbc.tsub, 7) ++ self.assertEqual(cfsca.ttot, 13) ++ self.assertEqual(cfsca.tsub, 8) ++ ++ def test_abcbca(self): ++ _timings = {"a_1": 10, "b_1": 9, "c_1": 7, "b_2": 4, "c_2": 2, "a_2": 1} ++ _yappi._set_test_timings(_timings) ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 1: ++ b() ++ else: ++ return ++ ++ def b(): ++ c() ++ ++ def c(): ++ if self._ncall == 1: ++ self._ncall += 1 ++ b() ++ else: ++ a() ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ cfsab = fsa.children[fsb] ++ cfsbc = fsb.children[fsc] ++ cfsca = fsc.children[fsa] ++ self.assertEqual(fsa.ttot, 10) ++ self.assertEqual(fsa.tsub, 2) ++ self.assertEqual(fsb.ttot, 9) ++ self.assertEqual(fsb.tsub, 4) ++ self.assertEqual(fsc.ttot, 7) ++ self.assertEqual(fsc.tsub, 4) ++ self.assertEqual(cfsab.ttot, 9) ++ self.assertEqual(cfsab.tsub, 2) ++ self.assertEqual(cfsbc.ttot, 7) ++ self.assertEqual(cfsbc.tsub, 4) ++ self.assertEqual(cfsca.ttot, 1) ++ self.assertEqual(cfsca.tsub, 1) ++ self.assertEqual(cfsca.ncall, 1) ++ self.assertEqual(cfsca.nactualcall, 0) ++ ++ def test_aabccb(self): ++ _timings = { ++ "a_1": 13, ++ "a_2": 11, ++ "b_1": 9, ++ "c_1": 5, ++ "c_2": 3, ++ "b_2": 1 ++ } ++ _yappi._set_test_timings(_timings) ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 1: ++ self._ncall += 1 ++ a() ++ else: ++ b() ++ ++ def b(): ++ if self._ncall == 3: ++ return ++ else: ++ c() ++ ++ def c(): ++ if self._ncall == 2: ++ self._ncall += 1 ++ c() ++ else: ++ b() ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ fsc = utils.find_stat_by_name(stats, 'c') ++ cfsaa = fsa.children[fsa.index] ++ cfsab = fsa.children[fsb] ++ cfsbc = fsb.children[fsc.full_name] ++ cfscc = fsc.children[fsc] ++ cfscb = fsc.children[fsb] ++ self.assertEqual(fsb.ttot, 9) ++ self.assertEqual(fsb.tsub, 5) ++ self.assertEqual(cfsbc.ttot, 5) ++ self.assertEqual(cfsbc.tsub, 2) ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 4) ++ self.assertEqual(cfsab.ttot, 9) ++ self.assertEqual(cfsab.tsub, 4) ++ self.assertEqual(cfsaa.ttot, 11) ++ self.assertEqual(cfsaa.tsub, 2) ++ self.assertEqual(fsc.ttot, 5) ++ self.assertEqual(fsc.tsub, 4) ++ ++ def test_abaa(self): ++ _timings = {"a_1": 13, "b_1": 10, "a_2": 9, "a_3": 5} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 1: ++ b() ++ elif self._ncall == 2: ++ self._ncall += 1 ++ a() ++ else: ++ return ++ ++ def b(): ++ self._ncall += 1 ++ a() ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ cfsaa = fsa.children[fsa] ++ cfsba = fsb.children[fsa] ++ self.assertEqual(fsb.ttot, 10) ++ self.assertEqual(fsb.tsub, 1) ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 12) ++ self.assertEqual(cfsaa.ttot, 5) ++ self.assertEqual(cfsaa.tsub, 5) ++ self.assertEqual(cfsba.ttot, 9) ++ self.assertEqual(cfsba.tsub, 4) ++ ++ def test_aabb(self): ++ _timings = {"a_1": 13, "a_2": 10, "b_1": 9, "b_2": 5} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 1: ++ self._ncall += 1 ++ a() ++ elif self._ncall == 2: ++ b() ++ else: ++ return ++ ++ def b(): ++ if self._ncall == 2: ++ self._ncall += 1 ++ b() ++ else: ++ return ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ cfsaa = fsa.children[fsa] ++ cfsab = fsa.children[fsb] ++ cfsbb = fsb.children[fsb] ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 4) ++ self.assertEqual(fsb.ttot, 9) ++ self.assertEqual(fsb.tsub, 9) ++ self.assertEqual(cfsaa.ttot, 10) ++ self.assertEqual(cfsaa.tsub, 1) ++ self.assertEqual(cfsab.ttot, 9) ++ self.assertEqual(cfsab.tsub, 4) ++ self.assertEqual(cfsbb.ttot, 5) ++ self.assertEqual(cfsbb.tsub, 5) ++ ++ def test_abbb(self): ++ _timings = {"a_1": 13, "b_1": 10, "b_2": 6, "b_3": 1} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 1: ++ b() ++ ++ def b(): ++ if self._ncall == 3: ++ return ++ self._ncall += 1 ++ b() ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ cfsab = fsa.children[fsb] ++ cfsbb = fsb.children[fsb] ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 3) ++ self.assertEqual(fsb.ttot, 10) ++ self.assertEqual(fsb.tsub, 10) ++ self.assertEqual(fsb.ncall, 3) ++ self.assertEqual(fsb.nactualcall, 1) ++ self.assertEqual(cfsab.ttot, 10) ++ self.assertEqual(cfsab.tsub, 4) ++ self.assertEqual(cfsbb.ttot, 6) ++ self.assertEqual(cfsbb.tsub, 6) ++ self.assertEqual(cfsbb.nactualcall, 0) ++ self.assertEqual(cfsbb.ncall, 2) ++ ++ def test_aaab(self): ++ _timings = {"a_1": 13, "a_2": 10, "a_3": 6, "b_1": 1} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ if self._ncall == 3: ++ b() ++ return ++ self._ncall += 1 ++ a() ++ ++ def b(): ++ return ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ cfsaa = fsa.children[fsa] ++ cfsab = fsa.children[fsb] ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 12) ++ self.assertEqual(fsb.ttot, 1) ++ self.assertEqual(fsb.tsub, 1) ++ self.assertEqual(cfsaa.ttot, 10) ++ self.assertEqual(cfsaa.tsub, 9) ++ self.assertEqual(cfsab.ttot, 1) ++ self.assertEqual(cfsab.tsub, 1) ++ ++ def test_abab(self): ++ _timings = {"a_1": 13, "b_1": 10, "a_2": 6, "b_2": 1} ++ _yappi._set_test_timings(_timings) ++ ++ self._ncall = 1 ++ ++ def a(): ++ b() ++ ++ def b(): ++ if self._ncall == 2: ++ return ++ self._ncall += 1 ++ a() ++ ++ stats = utils.run_and_get_func_stats(a) ++ fsa = utils.find_stat_by_name(stats, 'a') ++ fsb = utils.find_stat_by_name(stats, 'b') ++ cfsab = fsa.children[fsb] ++ cfsba = fsb.children[fsa] ++ self.assertEqual(fsa.ttot, 13) ++ self.assertEqual(fsa.tsub, 8) ++ self.assertEqual(fsb.ttot, 10) ++ self.assertEqual(fsb.tsub, 5) ++ self.assertEqual(cfsab.ttot, 10) ++ self.assertEqual(cfsab.tsub, 5) ++ self.assertEqual(cfsab.ncall, 2) ++ self.assertEqual(cfsab.nactualcall, 1) ++ self.assertEqual(cfsba.ttot, 6) ++ self.assertEqual(cfsba.tsub, 5) ++ ++ ++if __name__ == '__main__': ++ # import sys;sys.argv = ['', 'BasicUsage.test_run_as_script'] ++ # import sys;sys.argv = ['', 'MultithreadedScenarios.test_subsequent_profile'] ++ unittest.main() +-- +2.34.1 + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch new file mode 100644 index 0000000000..96dd024125 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-Fix-import-of-tests.utils-to-enable-pytest.patch @@ -0,0 +1,101 @@ +From 28eac38566327091221aabbc164ea8e433c66e7e Mon Sep 17 00:00:00 2001 +From: Tim Orling +Date: Sun, 24 Dec 2023 09:27:50 -0800 +Subject: [PATCH 2/2] Fix import of tests.utils to enable pytest + +Running the test cases with pytest leads to importlib errors +because the "utils" module cannot be found. + +Upstream-Status: Submitted [https://github.com/sumerc/yappi/pull/164] + +Signed-off-by: Tim Orling +--- + tests/test_asyncio.py | 2 +- + tests/test_asyncio_context_vars.py | 2 +- + tests/test_functionality.py | 2 +- + tests/test_gevent.py | 2 +- + tests/test_hooks.py | 2 +- + tests/test_tags.py | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py +index 8e9e631..bb36f4a 100644 +--- a/tests/test_asyncio.py ++++ b/tests/test_asyncio.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import asyncio + import threading +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + async def async_sleep(sec): +diff --git a/tests/test_asyncio_context_vars.py b/tests/test_asyncio_context_vars.py +index 5bd750c..9a253c0 100644 +--- a/tests/test_asyncio_context_vars.py ++++ b/tests/test_asyncio_context_vars.py +@@ -5,7 +5,7 @@ import contextvars + import functools + import time + import os +-import utils ++import tests.utils as utils + import yappi + + async_context_id = contextvars.ContextVar('async_context_id') +diff --git a/tests/test_functionality.py b/tests/test_functionality.py +index 38bbe67..8098f17 100644 +--- a/tests/test_functionality.py ++++ b/tests/test_functionality.py +@@ -5,7 +5,7 @@ import threading + import unittest + import yappi + import _yappi +-import utils ++import tests.utils as utils + import multiprocessing + import subprocess + +diff --git a/tests/test_gevent.py b/tests/test_gevent.py +index ed9e6ae..502af5f 100644 +--- a/tests/test_gevent.py ++++ b/tests/test_gevent.py +@@ -2,7 +2,7 @@ import unittest + import _yappi + import yappi + import threading +-from utils import ( ++from tests.utils import ( + YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io, burn_io_gevent + ) + +diff --git a/tests/test_hooks.py b/tests/test_hooks.py +index 297c643..8c387fc 100644 +--- a/tests/test_hooks.py ++++ b/tests/test_hooks.py +@@ -5,7 +5,7 @@ import unittest + import time + + import yappi +-import utils ++import tests.utils as utils + + + def a(): +diff --git a/tests/test_tags.py b/tests/test_tags.py +index b0b531d..b5a4016 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -2,7 +2,7 @@ import unittest + import yappi + import threading + import time +-from utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io ++from tests.utils import YappiUnitTestCase, find_stat_by_name, burn_cpu, burn_io + + + class MultiThreadTests(YappiUnitTestCase): +-- +2.34.1 + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch deleted file mode 100644 index d40bd2b7cc..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/0002-add-3.11-to-the-setup.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 38afdacf526410f970afc58e147c7377c6c7112c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?S=C3=BCmer=20Cip?= -Date: Fri, 25 Nov 2022 15:58:03 +0300 -Subject: [PATCH 2/2] add 3.11 to the setup - ---- -Upstream-Status: Pending - - setup.py | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.py b/setup.py -index d006787..96e2a66 100644 ---- a/setup.py -+++ b/setup.py -@@ -56,6 +56,7 @@ CLASSIFIERS = [ - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', -+ 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Operating System :: OS Independent', - 'Topic :: Software Development :: Libraries', --- -2.30.2 - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/run-ptest b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/run-ptest index 3385d68939..8d2017d39c 100644 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/run-ptest +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb deleted file mode 100644 index 71e74e86f2..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.4.0.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Yet Another Python Profiler" -HOMEPAGE = "https://github.com/sumerc/yappi" - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" - -SRC_URI[sha256sum] = "504b5d8fc7433736cb5e257991d2e7f2946019174f1faec7b2fe947881a17fc0" - -SRC_URI += " \ - file://run-ptest \ - file://0001-Fix-imports-for-ptests.patch \ - file://0002-add-3.11-to-the-setup.patch \ -" - -inherit pypi setuptools3 ptest - -RDEPENDS:${PN} += "\ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-threading \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-gevent \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-profile \ - ${PYTHON_PN}-zopeinterface \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ - cp -f ${S}/yappi/yappi.py ${D}/${PTEST_PATH}/ -} - diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb new file mode 100644 index 0000000000..4349cab1e7 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yappi_1.6.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "Yet Another Python Profiler" +HOMEPAGE = "https://github.com/sumerc/yappi" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=71c208c9a4fd864385eb69ad4caa3bee" + +SRC_URI[sha256sum] = "a9aaf72009d8c03067294151ee0470ac7a6dfa7b33baab40b198d6c1ef00430a" + +SRC_URI += " \ + file://run-ptest \ + file://0001-test_functionality-convert-line-endings-to-Unix.patch \ + file://0002-Fix-import-of-tests.utils-to-enable-pytest.patch \ +" + +inherit pypi python_setuptools_build_meta ptest + +RDEPENDS:${PN} += "\ + python3-datetime \ + python3-pickle \ + python3-threading \ +" + +RDEPENDS:${PN}-ptest += " \ + python3-gevent \ + python3-multiprocessing \ + python3-pytest \ + python3-profile \ + python3-unittest-automake-output \ + python3-zopeinterface \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests ${D}${PTEST_PATH} + cp -f ${S}/run_tests.py ${D}${PTEST_PATH} +} + diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.2.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.2.bb deleted file mode 100644 index 63700024c2..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.2.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "The module provides handy URL class for url parsing and changing" -HOMEPAGE = "https://github.com/aio-libs/yarl/" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRC_URI[sha256sum] = "04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571" - -SRC_URI += "file://run-ptest" - -PYPI_PACKAGE = "yarl" - -inherit pypi ptest setuptools3 - -RDEPENDS:${PN} = "\ - ${PYTHON_PN}-multidict \ - ${PYTHON_PN}-idna \ - ${PYTHON_PN}-io \ -" - -RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ -" - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ -} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb new file mode 100644 index 0000000000..d9fe4c0c4c --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-yarl_1.9.4.bb @@ -0,0 +1,32 @@ +SUMMARY = "The module provides handy URL class for url parsing and changing" +HOMEPAGE = "https://github.com/aio-libs/yarl/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI[sha256sum] = "566db86717cf8080b99b58b083b773a908ae40f06681e87e589a976faf8246bf" + +SRC_URI += "file://run-ptest" + +PYPI_PACKAGE = "yarl" + +inherit pypi ptest python_setuptools_build_meta + +DEPENDS += " \ + ${PYTHON_PN}-expandvars-native \ + ${PYTHON_PN}-cython-native \ +" + +RDEPENDS:${PN} = "\ + ${PYTHON_PN}-multidict \ + ${PYTHON_PN}-idna \ + ${PYTHON_PN}-io \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.127.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.127.0.bb deleted file mode 100644 index 45df13eec0..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.127.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)" -HOMEPAGE = "https://github.com/jstasiak/python-zeroconf" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=6517bdc8f2416f27ab725d4702f7aac3" - -SRC_URI[sha256sum] = "1ec001989666be7f76630d6bb8b07fb3928d655fa79a1484674a776778c9a1b3" - -inherit pypi setuptools3 - -RDEPENDS:${PN} += " \ - ${PYTHON_PN}-ifaddr \ - ${PYTHON_PN}-asyncio \ - ${PYTHON_PN}-async-timeout \ -" diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.131.0.bb b/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.131.0.bb new file mode 100644 index 0000000000..1963d899b0 --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-zeroconf_0.131.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible)" +HOMEPAGE = "https://github.com/jstasiak/python-zeroconf" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=6;endline=6;md5=6517bdc8f2416f27ab725d4702f7aac3" + +SRC_URI[sha256sum] = "90c431e99192a044a5e0217afd7ca0ca9824af93190332e6f7baf4da5375f331" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-ifaddr \ + ${PYTHON_PN}-asyncio \ + ${PYTHON_PN}-async-timeout \ +" diff --git a/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.10.0.bb b/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.10.0.bb deleted file mode 100644 index 3918ed3ac7..0000000000 --- a/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.10.0.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Google Spreadsheets Python API" -HOMEPAGE = "https://github.com/burnash/gspread" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9488e21983675fa56dc05af558b83e2f" - -SRC_URI = "https://files.pythonhosted.org/packages/b4/4f/033ebf34778745061b67b104ef212ed5b05fa65a530f345f88c4355fdcc3/gspread-5.10.0.tar.gz" -SRC_URI[sha256sum] = "2b6bba6dc111580170346a9bcd1893e0e8c52f67a9e537caec7b7a1e27c14435" - -S = "${WORKDIR}/gspread-${PV}" - -RDEPENDS:${PN} = "python3-requests" - -inherit python_poetry_core diff --git a/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.12.3.bb b/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.12.3.bb new file mode 100644 index 0000000000..932cf22b1f --- /dev/null +++ b/meta-openembedded/meta-python/recipes-devtools/python3-gspread/python3-gspread_5.12.3.bb @@ -0,0 +1,12 @@ +SUMMARY = "Google Spreadsheets Python API" +HOMEPAGE = "https://github.com/burnash/gspread" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9488e21983675fa56dc05af558b83e2f" + +SRC_URI[sha256sum] = "298ebab76e6ed6a998eabc81545ec58f5610f44e2ddb4858b539a0634093f8ce" + +S = "${WORKDIR}/gspread-${PV}" + +RDEPENDS:${PN} = "python3-requests" + +inherit pypi python_poetry_core -- cgit v1.2.3