;;; Copyright © 2020 Collin J. Doering ;;; ;;; This file is part of the GNU Guix channel rekahsoft-guix ;;; ;;; The rekahsoft-guix channel for GNU Guix is free software; you can ;;; redistribute it and/or modify it under the terms of the GNU General Public ;;; License as published by the Free Software Foundation; either version 3 of ;;; the License, or (at your option) any later version. ;;; ;;; The rekahsoft-guix channel for GNU Guix is distributed in the hope that it ;;; will be useful, but WITHOUT ANY WARRANTY; without even the implied ;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License along ;;; with the rekahsoft-guix channel for GNU Guix. If not, see ;;; . (define-module (rekahsoft-gnu packages python-xyz) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages glib) #:use-module (gnu packages maths) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages serialization) #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system python) #:use-module (srfi srfi-1)) ;; TODO: Candidate for upstream (define-public python-virtualenv-clone (package (name "python-virtualenv-clone") (version "0.5.7") (source (origin (method url-fetch) (uri (pypi-uri "virtualenv-clone" version)) (sha256 (base32 "06jhhf8hndcgyk9k3bjbk3vz1xpajfxj9667agqzhlk1qcsyk3j1")))) (build-system python-build-system) ;; (native-inputs ;; `(("python-pytest" ,python-pytest) ;; ("python-tox" ,python-tox) ;; ("python-virtualenv" ,python-virtualenv))) (arguments ;; FIXME: Tests currently fail `(#:tests? #f)) (home-page "https://github.com/edwardgeorge/virtualenv-clone") (synopsis "Script to clone virtualenvs.") (description "Script to clone virtualenvs.") (license license:expat))) ;; TODO: Candidate for upstream (define-public python-arpeggio (package (name "python-arpeggio") (version "1.9.2") (source (origin (method url-fetch) (uri (pypi-uri "Arpeggio" version)) (sha256 (base32 "0aq2pmhfyq7vhbhyq8jgxiphncy1s79rmrsggz4p52m4cdhy134l")))) (build-system python-build-system) (native-inputs `(("python-pytest" ,python-pytest) ("python-pytest-runner" ,python-pytest-runner))) (arguments ;; FIXME: Tests currently fail `(#:tests? #f)) (home-page "https://github.com/textX/Arpeggio") (synopsis "Packrat parser interpreter") (description "Packrat parser interpreter") (license license:expat))) ;; TODO: Candidate for upstream (define-public python-ordereddict (package (name "python-ordereddict") (version "1.1") (source (origin (method url-fetch) (uri (pypi-uri "ordereddict" version)) (sha256 (base32 "07qvy11nvgxpzarrni3wrww3vpc9yafgi2bch4j2vvvc42nb8d8w")))) (build-system python-build-system) (home-page "https://pypi.org/project/ordereddict") (synopsis "Drop-in substitute for Py2.7's new collections.OrderedDict for Python 2.4-2.6") (description "A drop-in substitute for Py2.7's new collections.OrderedDict that works in Python 2.4-2.6.") (license license:expat))) ;; TODO: Candidate for upstream (define-public python-parver (package (name "python-parver") (version "0.3.0") (source (origin (method url-fetch) (uri (pypi-uri "parver" version)) (sha256 (base32 "0a6jp17c1ag6b9yp5xgy9wvznk3g0v2f8gpwkcwxpyc9ygk98zdm")))) (build-system python-build-system) (native-inputs `(("python-six" ,python-six) ("python-attrs" ,python-attrs) ("python-arpeggio" ,python-arpeggio) ("python-pytest" ,python-pytest) ("python-hypothesis" ,python-hypothesis) ("python-pretend" ,python-pretend))) (home-page "https://github.com/RazerM/parver") (synopsis "Parse and manipulate version numbers") (description "Parse and manipulate version numbers.") (license license:expat))) ;; TODO: Candidate for upstream (define-public python-pipenv (package (name "python-pipenv") (version "2018.11.26") (source (origin (method url-fetch) (uri (pypi-uri "pipenv" version)) (sha256 (base32 "0ip8zsrwmhrankrix0shig9g8q2knmr7b63sh7lqa8a5x03fcwx6")))) (build-system python-build-system) (native-inputs `(("python-pytest" ,python-pytest) ("python-arpeggio" ,python-arpeggio))) (propagated-inputs `(("python-certifi" ,python-certifi) ("python-invoke" ,python-invoke) ("python-parver" ,python-parver) ("python-ordereddict" ,python-ordereddict) ("python-requests" ,python-requests) ("python-virtualenv" ,python-virtualenv) ("python-virtualenv-clone" ,python-virtualenv-clone))) (arguments ;; FIXME: Tests currently fail due to an issue with python-typing and the ;; built in typing in pythong 3.7 '(#:tests? #f)) (home-page "https://github.com/pypa/pipenv") (synopsis "Python Development Workflow for Humans") (description "Python Development Workflow for Humans.") (license license:expat))) ;; TODO: Candidate for upstream; upstream has version 4.0.2; (define-public python-ujson (package (name "python-ujson") (version "2.0.3") (source (origin (method url-fetch) (uri (pypi-uri "ujson" version)) (sha256 (base32 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx")) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "deps") #t)))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'link-to-system-double-conversion (lambda* (#:key inputs #:allow-other-keys) (let ((d-c (assoc-ref inputs "double-conversion"))) (substitute* "setup.py" (("./deps/double-conversion/double-conversion\"") (string-append d-c "/include/double-conversion\"")) (("-lstdc++" stdc) (string-append "-L" d-c "/lib\"," " \"-ldouble-conversion\"," " \"" stdc))) #t))) (replace 'check (lambda* (#:key inputs outputs #:allow-other-keys) (add-installed-pythonpath inputs outputs) (invoke "pytest")))))) (native-inputs `(("double-conversion" ,double-conversion) ("python-setuptools-scm" ,python-setuptools-scm) ("python-pytest" ,python-pytest))) (home-page "https://github.com/ultrajson/ultrajson") (synopsis "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 3.") (license license:bsd-3))) (define-public awscliv2 (package (inherit awscli) (name "awscliv2") (version "2.4.7") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/aws/aws-cli") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1b7f8vwd90wpbzb7i4a4mdficzqaa41jfa2k6mm3i4cas48fklkk")))) (native-inputs `(("python-distro" ,python-distro-1.5) ("python-docutils" ,python-docutils-0.15) ("python-s3transfer" ,python-s3transfer) ("python-awscrt" ,python-awscrt) ("python-prompt-toolkit" ,python-prompt-toolkit-2) ("python-ruamel.yaml" ,python-ruamel.yaml-0.15) ("python-cryptography" ,python-cryptography-3.3.2) ("python-botocore" ,python-botocore-2.0.0dev155))) (propagated-inputs `(,@(fold alist-delete (package-propagated-inputs awscli) '("python-botocore")))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'build 'removed-vendored (lambda* _ (for-each delete-file-recursively '("awscli/botocore" "awscli/s3transfer")) (symlink (string-append (assoc-ref %build-inputs "python-botocore") "/lib/python" (python-version (assoc-ref %build-inputs "python")) "/site-packages/botocore") "awscli/botocore") (symlink (string-append (assoc-ref %build-inputs "python-s3transfer") "/lib/python" (python-version (assoc-ref %build-inputs "python")) "/site-packages/s3transfer") "awscli/s3transfer") #t)) (add-after 'install 'generate-completions (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (python-version (python-version (assoc-ref inputs "python"))) (data (string-append out "/lib/python" python-version "/site-packages/awscli/data")) (bash-completion (string-append out "/share/bash-completion/completions")) (zsh-site-functions (string-append out "/share/zsh/site-functions"))) (mkdir-p data) (add-installed-pythonpath inputs outputs) (invoke "python" "scripts/gen-ac-index" "--index-location" (string-append data "/ac.index")) (mkdir-p bash-completion) (call-with-output-file (string-append bash-completion "/aws") (lambda (port) (format port (string-join (list "complete" "-C" (string-append out "/bin/aws_completer") "aws"))))) (mkdir-p zsh-site-functions) (rename-file (string-append out "/bin/aws_zsh_completer.sh") (string-append zsh-site-functions "/_aws")) #t)))) ;; FIXME: Tests currently fail #:tests? #f)) (synopsis "Command line client for AWS v2") (description "AWS CLI v2 provides a unified command line interface to the Amazon Web Services (AWS) API."))) (define-public python-distro-1.5 (package (inherit python-distro) (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "distro" version)) (sha256 (base32 "14nz51cqlnxmgfqqilxyvjwwa5xfivdvlm0d0b1qzgcgwdm7an0f")))))) (define-public python-ruamel.yaml-0.15 (package (inherit python-ruamel.yaml) (name "python-ruamel.yaml") (version "0.15.100") (source (origin (method url-fetch) (uri (pypi-uri "ruamel.yaml" version)) (sha256 (base32 "1r5j9n2jdq48z0k4bdia1f7krn8f2x3y49i9ba9iks2rg83g6hlf")))))) (define-public python-cryptography-3.3.2 (package (inherit python-cryptography) (name "python-cryptography") (version "3.3.2") (source (origin (method url-fetch) (uri (pypi-uri "cryptography" version)) (sha256 (base32 "1vcvw4lkw1spiq322pm1256kail8nck6bbgpdxx3pqa905wd6q2s")))))) (define-public python-awscrt (package (name "python-awscrt") (version "0.12.4") (source (origin (method url-fetch) (uri (pypi-uri "awscrt" version)) (sha256 (base32 "1cmfkcv2zzirxsb989vx1hvna9nv24pghcvypl0zaxsjphv97mka")))) (build-system python-build-system) (native-inputs `(("cmake" ,cmake))) (propagated-inputs `(("python-boto3" ,python-boto3))) (home-page "https://github.com/awslabs/aws-crt-python") (synopsis "Common runtime for AWS Python projects") (description "Common runtime for AWS Python projects") (license license:asl2.0))) (define-public python-botocore-2.0.0dev155 (let ((commit "7083e5c204e139dc41f646e0ad85286b5e7c0c23") (revision "2")) (package (inherit python-botocore) (name "python-botocore") (version "2.0.0dev155") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/boto/botocore") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0lr98h80fgs6kplv52y92pcf1ba4041zq26wdfsfjkg84py9q83a")))) (propagated-inputs `(("python-awscrt" ,python-awscrt) ,@(package-propagated-inputs python-awscrt)))))) (define-public python-htmlark (package (name "python-htmlark") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "HTMLArk" version)) (sha256 (base32 "0qg2vwnlqhdhxxkji3l6ls4ycsrjmhvjizsa7hw08373f69mj68v")))) (build-system python-build-system) (propagated-inputs `(("python-beautifulsoup4" ,python-beautifulsoup4) ("python-lxml" ,python-lxml) ("python-html5lib" ,python-html5lib) ("python-requests" ,python-requests))) (home-page "https://github.com/BitLooter/htmlark") (synopsis "Pack a webpage including support files into a single HTML file") (description "Pack a webpage including support files into a single HTML file.") (license license:expat))) (define-public python-ofxhome (package (name "python-ofxhome") (version "0.3.3") (source (origin (method url-fetch) (uri (pypi-uri "ofxhome" version)) (sha256 (base32 "1rpyfqr2q9pnin47rjd4qapl8ngk1m9jx36iqckhdhr8s8gla445")))) (build-system python-build-system) (arguments `(;; TODO: tests currently fail due to missing test file: ;; FileNotFoundError: [Errno 2] No such file or directory: '/tmp/guix-build-python-ofxhome-0.3.3.drv-0/ofxhome-0.3.3/ofxhome/tests/testfiles/jpmorgan.xml' #:tests? #f)) (home-page "https://github.com/captin411/ofxhome") (synopsis "ofxhome.com financial institution lookup REST client") (description "ofxhome.com financial institution lookup REST client") (license license:expat))) (define-public python-argparse (package (name "python-argparse") (version "1.4.0") (source (origin (method url-fetch) (uri (pypi-uri "argparse" version)) (sha256 (base32 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32")))) (build-system python-build-system) (home-page "https://github.com/ThomasWaldmann/argparse/") (synopsis "Python command-line parsing library") (description "Python command-line parsing library") (license license:psfl))) (define-public python-ofxclient (package (name "python-ofxclient") (version "2.0.3") (source (origin (method url-fetch) (uri (pypi-uri "ofxclient" version)) (sha256 (base32 "0jdhqsbl34yn3n0x6mwsnl58c25v5lp6vr910c2hk7l74l5y7538")))) (build-system python-build-system) (propagated-inputs `(("python-beautifulsoup4" ,python-beautifulsoup4) ("python-keyring" ,python-keyring) ("python-lxml" ,python-lxml) ("python-ofxhome" ,python-ofxhome) ("python-ofxparse" ,python-ofxparse) ("python-argparse" ,python-argparse))) (home-page "https://github.com/captin411/ofxclient") (synopsis "OFX client for dowloading transactions from banks") (description "OFX client for dowloading transactions from banks") (license license:expat))) (define-public ledger-autosync (package (name "ledger-autosync") (version "1.0.3") (source (origin (method url-fetch) (uri (pypi-uri "ledger-autosync" version)) (sha256 (base32 "0i4942qbsphq72zx7kd3rgw25rpq4fg4vl43akkl189wzcrgwv6j")))) (build-system python-build-system) (inputs (list python-ofxclient python-ofxparse)) (home-page "https://gitlab.com/egh/ledger-autosync") (synopsis "Automatically sync your bank's data with ledger") (description "Automatically sync your bank's data with ledger") (license license:gpl3)))