(define-module (battering packages python-xyz) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages certs) #:use-module (gnu packages check) #:use-module (gnu packages pdf) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages tmux) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml)) (define-public python-pyfzf (package (name "python-pyfzf") (version "0.3.1") (source (origin (method url-fetch) (uri (pypi-uri "pyfzf" version)) (sha256 (base32 "1lkbnhjf92063gg9snxskcx4n2yj7mck2qgrh8q9rjpyrws2x46x")))) (build-system pyproject-build-system) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/nk412/pyfzf") (synopsis "Python wrapper for junegunn's fuzzyfinder (fzf)") (description "Python wrapper for junegunn's fuzzyfinder (fzf).") (license license:expat))) (define-public python-arsenal (package (name "python-arsenal") (version "1.2.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Orange-Cyberdefense/arsenal.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "19s36gkfflll7sxhd0w9qrc8lgh4ixgh97pr3bplx3b8zh3w9h0b")))) (build-system pyproject-build-system) (native-inputs (list python-hatchling python-setuptools python-wheel python-docutils)) (propagated-inputs (list python-libtmux python-pyperclip python-pyyaml python-pyfzf)) (home-page "https://github.com/Orange-Cyberdefense/arsenal") (synopsis "Arsenal of python utilities.") (description "Arsenal is just a quick inventory and launcher for hacking programs.") (license license:gpl3))) (define-public python-qt-material (package (name "python-qt-material") (version "2.14") (source (origin (method url-fetch) (uri (pypi-uri "qt-material" version)) (sha256 (base32 "08xfyzrdasliii4ql17jqyfv7glhgh27rfrnwdxcy5vjx6nvbnxm")))) (build-system pyproject-build-system) (propagated-inputs (list python-jinja2)) (native-inputs (list python-setuptools python-wheel)) (home-page "https://pypi.org/project/qt-material/") (synopsis "Material inspired stylesheet for PySide2, PySide6, PyQt5 and PyQt6.") (description "This is another stylesheet for PySide6, PySide2, PyQt5 and PyQt6, which looks like Material Design (close enough).") (license license:bsd-2))) (define-public python-pyvis (package (name "python-pyvis") (version "0.3.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/WestHealth/pyvis") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "18gp652i4z8r5rxs9mk5h2vx1bc52xlw5wramidb11ilcy9lr3vs")))) (build-system pyproject-build-system) (propagated-inputs (list python-jinja2 python-networkx python-ipython python-pandas python-jsonpickle)) (native-inputs (list python-setuptools python-wheel python-pip python-selenium python-numpy)) (arguments (list #:tests? #f)) (home-page "https://pypi.org/project/qt-material/") (synopsis "Python library for visualizing networks") (description "Python package for creating and visualizing interactive network graphs.") (license license:bsd-3))) (define-public python-xmind (package (name "python-xmind") (version "1.2.0") (source (origin (method url-fetch) (uri (pypi-uri "XMind" version)) (sha256 (base32 "0vlpz87m5xnmnbzjrzzspjrz73m2xdnxh5gmsph3z8y0y6ns8hbn")))) (build-system pyproject-build-system) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/zhuifengshen/xmind") (synopsis "XMind Python") (description "XMind Python") (license license:expat))) (define-public python-svglib (package (name "python-svglib") (version "1.5.1") (source (origin (method url-fetch) (uri (pypi-uri "svglib" version)) (sha256 (base32 "11z5jl38zjbzrmdly197m5x6303axcnlrlml1w6fd7j0m79nbrrs")))) (build-system pyproject-build-system) (propagated-inputs (list python-cssselect2 python-lxml python-reportlab python-tinycss2)) (native-inputs (list python-setuptools python-wheel python-pytest python-pytest-runner)) (arguments `(#:test-flags '("-k" "not Wikipedia and not W3CSVG") #:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? test-flags #:allow-other-keys) (when tests? (apply invoke "python" "-m" "pytest" "-v" test-flags))))))) (home-page "https://github.com/deeplook/svglib") (synopsis "A pure-Python library for reading and converting SVG") (description "Svglib is a pure-Python library for reading SVG files and converting them (to a reasonable degree) to other formats using the ReportLab Open Source toolkit.") (license license:lgpl3+))) (define-public python-pae (package (name "python-pae") (version "0.1.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MatthiasValvekens/python-pae") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "0wdgi99wxnyjabbzhqxs8abfzx83m52y3s39x28x5vyy9i7zci8g")))) (build-system pyproject-build-system) (native-inputs (list python-poetry-core python-pytest)) (home-page "https://github.com/MatthiasValvekens/python-pae") (synopsis "Pre-authentication encoding (PAE) implementation in Python") (description "Pre-authentication encoding (PAE) implementation in Python.") (license license:expat))) (define-public python-oscrypto (package (name "python-oscrypto") (version "1.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wbond/oscrypto") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1v5wkmzcyiqy39db8j2dvkdrv2nlsc48556h73x4dzjwd6kg4q0a")))) (build-system pyproject-build-system) (propagated-inputs (list python-asn1crypto openssl)) (native-inputs (list python-setuptools python-wheel python-pip nss-certs-for-test)) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'check 'skip-internet-tests (lambda _ (setenv "OSCRYPTO_SKIP_INTERNET_TESTS" "1")))))) (home-page "https://github.com/wbond/oscrypto") (synopsis "Compiler-free Python crypto library backed by the OS, supporting CPython and PyPy") (description "TLS (SSL) sockets, key generation, encryption, decryption, signing, verification and KDFs using the OS crypto libraries. Does not require a compiler, and relies on the OS for patching. Works on Windows, OS X and Linux/BSD.") (license license:expat))) (define-public python-uritools (package (name "python-uritools") (version "4.0.3") (source (origin (method url-fetch) (uri (pypi-uri "uritools" version)) (sha256 (base32 "1hivmsycmvmymavx29295bfqxk5a75sr3ynmx564cjf8m61a21pf")))) (build-system pyproject-build-system) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/tkem/uritools/") (synopsis "URI parsing, classification and composition") (description "This module provides RFC 3986 compliant functions for parsing, classifying and composing URIs and URI references, largely replacing the Python Standard Library’s @code{urllib.parse} module.") (license license:expat))) (define-public python-pyhanko-certvalidator (package (name "python-pyhanko-certvalidator") (version "0.26.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MatthiasValvekens/certvalidator") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1c50bsibr4izvbg2wsx8k3l0vkjbp0caq3jaxnnrlkpwzzxfgzgv")))) (build-system pyproject-build-system) (propagated-inputs (list python-asn1crypto python-oscrypto python-cryptography python-uritools python-requests python-aiohttp)) (native-inputs (list python-pytest python-pytest-cov python-freezegun python-pytest-aiohttp python-types-requests python-setuptools python-wheel nss-certs-for-test)) (home-page "https://github.com/MatthiasValvekens/certvalidator") (synopsis "Python library for validating X.509 certificates and paths") (description "@code{pyhanko-certvalidator} is a Python library for validating X.509 certificates paths. It supports various options, including: validation at a specific moment in time, whitelisting and revocation checks.") (license license:expat))) (define-public python-certomancer (package (name "python-certomancer") (version "0.12.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MatthiasValvekens/certomancer") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "1mj0km2qwxphz5kwigv6bdlzjxzwxh6j8gajb5d48lqncnhcn66q")))) (build-system pyproject-build-system) (propagated-inputs (list python-asn1crypto python-click python-pyyaml python-dateutil python-tzlocal python-cryptography python-requests-mock python-werkzeug python-jinja2)) (native-inputs (list python-pytest python-pytz python-freezegun python-requests python-pytest-cov python-pytest-asyncio python-pyhanko-certvalidator python-setuptools python-wheel)) (home-page "https://github.com/MatthiasValvekens/certomancer") (synopsis "PKI testing tool") (description "Construct, mock & deploy PKI test configurations using declarative configuration.") (license license:expat))) (define-public python-certomancer-csc-dummy (package (name "python-certomancer-csc-dummy") (version "0.3.0") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MatthiasValvekens/certomancer-csc-dummy") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "01kldbg9vrbq9scqd1r0x66c0dg7pzgyllkmnbv3w1103h11ib4s")) (modules '((guix build utils))) (snippet '(substitute* "setup.py" (("aiohttp~=") "aiohttp>="))))) (build-system pyproject-build-system) (propagated-inputs (list python-aiohttp python-asn1crypto python-certomancer python-cryptography python-pae)) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/MatthiasValvekens/certomancer-csc-dummy") (synopsis "A Certomancer-based demo CSC server for integration tests") (description "This package provides a Certomancer-based demo CSC server for integration tests.") (license license:expat))) (define-public python-barcode (package (name "python-barcode") (version "0.15.1") (source (origin (method url-fetch) (uri (pypi-uri "python-barcode" version)) (sha256 (base32 "1pjlr1pp4yg679b9xd8pfyjqc7lvxas8chpzdm39gr8ivgxja61v")))) (build-system pyproject-build-system) (propagated-inputs (list python-pillow)) (native-inputs (list python-pytest python-pytest-cov python-setuptools python-setuptools-scm python-wheel)) (home-page "https://github.com/WhyNotHugo/python-barcode") (synopsis "Create standard barcodes with Python.") (description "This package provides a simple way to create barcodes in Python.") (license license:expat))) (define-public python-uharfbuzz (package (name "python-uharfbuzz") (version "0.45.0") (source (origin (method url-fetch) (uri (pypi-uri "uharfbuzz" version)) (sha256 (base32 "19il53ghx6bp5nwbznvim4km9pm8dc7viq3iskx0iyc26shakhis")))) ;; TODO: use system harfbuzz instead of the bundled one (build-system pyproject-build-system) (native-inputs (list python-cython python-pkgconfig python-setuptools python-setuptools-scm python-wheel)) (home-page "https://github.com/trufont/uharfbuzz") (synopsis "Harfbuzz Python bindings") (description "Streamlined Cython bindings for the harfbuzz shaping engine.") (license license:asl2.0))) (define-public python-untokenize (package (name "python-untokenize") (version "0.1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/myint/untokenize") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "10rklx9ly1zmnlh29i1jps62dd05dd05cnv7sa3lqaqy8h13idc8")))) (build-system pyproject-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ (invoke "python" "./test_untokenize.py") (invoke "python" "./test_acid.py")))))) (native-inputs (list python-setuptools python-wheel)) (home-page "https://github.com/myint/untokenize") (synopsis "Transforms tokens into original source code (while preserving whitespace).") (description "This package transforms tokens into source code. Unlike the standard library's @code{tokenize.untokenize()}, it preserves the original whitespace between tokens.") (license license:expat))) (define-public python-docformatter (package (name "python-docformatter") (version "1.7.5") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/PyCQA/docformatter") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0szcazklngvn8yi2pl09s7dd858wlfww4df5vic8xh0arqdxwj21")))) (build-system pyproject-build-system) (propagated-inputs (list python-charset-normalizer python-tomli python-untokenize)) (native-inputs (list python-poetry-core python-pytest python-mock)) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'check 'set-virtual-env (lambda _ (setenv "VIRTUAL_ENV" #$output)))))) (home-page "https://github.com/PyCQA/docformatter") (synopsis "Formats docstrings to follow PEP 257") (description "This package automatically formats docstrings to follow a subset of the PEP 257 conventions") (license license:expat))) (define-public python-xsdata (package (name "python-xsdata") (version "24.12") (source (origin (method url-fetch) (uri (pypi-uri "xsdata" version)) (sha256 (base32 "1d00laim53pz8sinh9lf978cpbgqnkvcsa3c9w32rs5x5c1nrhb7")))) (build-system pyproject-build-system) (propagated-inputs (list python-typing-extensions python-click python-click-default-group python-docformatter python-jinja2 python-toposort python-lxml python-requests)) (native-inputs (list python-pytest python-pytest-benchmark python-pytest-cov python-setuptools python-wheel)) ;; TODO: enable these tests when ruff is packaged in Guix (arguments `(#:test-flags (list "-k" (string-append "not " (string-join '("test_ruff_code_with_invalid_code" "test_annotations" "test_xml_documents" "test_books_schema" "test_wsdl_codegen" "test_generate_restructured_docstrings" "test_generate_numpy_docstrings" "test_generate_google_docstrings" "test_generate_accessible_docstrings" "test_generate_blank_docstrings" "test_dtd_documents" "test_primer_schema" "test_json_documents") " and not "))))) (home-page "https://xsdata.readthedocs.io/") (synopsis "Naive XML Bindings for python") (description "This is a data binding library for Python allowing developers to access and use XML and JSON documents as simple objects rather than using DOM.") (license license:expat))) (define-public python-pyhanko (package (name "python-pyhanko") (version "0.25.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/MatthiasValvekens/pyHanko") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "02pryyw9n2hip3mmznsgaz0cd7ks7mpksf6nh9xvsmh3jr1h568w")) (modules '((guix build utils))) ;; TODO: enable these tests when python-pcks11 (snippet '(with-directory-excursion "pyhanko_tests" (delete-file "test_pkcs11.py"))))) (build-system pyproject-build-system) (propagated-inputs (list python-asn1crypto python-qrcode python-tzlocal python-pyhanko-certvalidator python-click python-requests python-pyyaml python-cryptography python-defusedxml python-fonttools python-uharfbuzz python-pillow python-barcode python-aiohttp python-xsdata)) (native-inputs (list python-pytest python-requests-mock python-freezegun python-certomancer python-certomancer-csc-dummy python-pytest-cov python-pytest-asyncio python-pytest-aiohttp poppler-qt6 ;; pdftoppm python-setuptools python-wheel nss-certs-for-test)) (arguments (list ;; These tests respectively require internet and fail because of a RuntimeError. #:test-flags ''("-k" "not test_ts_fetch and not [pyloop] and not [pyloop-response_obj") #:phases #~(modify-phases %standard-phases (add-before 'check 'set-pdftoppm-path (lambda _ (setenv "PDFTOPPM_PATH" (string-append #$poppler-qt6 "/bin/pdftoppm"))))))) (home-page "https://github.com/MatthiasValvekens/pyHanko") (synopsis "Sign and stamp PDF files.") (description "PyHanko is a tool for signing and stamping PDF files.") (license license:expat)))