mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-cryptography: Switch to pyproject-build-system.
* gnu/packages/python-crypto.scm (python-cryptography) [inputs]: Use ‘cargo-inputs’. Remove python-wrapper. [native-inputs]: Add rust, rust:cargo. Add rust-sysroot when cross-compiling. [arguments]: Remove #:cargo-inputs. <#:phases>: Add ‘prepare-cargo-build-system’. Remove phases provided by pyproject-build-system. * gnu/packages/rust-crates.scm (lookup-cargo-inputs)[python-cryptography]: New entry. Change-Id: I22a0ad4c7093c1323e0f61fc50d4337abb6635e9
This commit is contained in:
parent
454c7a8ebf
commit
ad275db594
2 changed files with 118 additions and 40 deletions
|
@ -75,6 +75,7 @@
|
|||
#:use-module (gnu packages python-compression)
|
||||
#:use-module (gnu packages python-web)
|
||||
#:use-module (gnu packages python-xyz)
|
||||
#:use-module (gnu packages rust)
|
||||
#:use-module (gnu packages rust-apps)
|
||||
#:use-module (gnu packages swig)
|
||||
#:use-module (gnu packages time)
|
||||
|
@ -538,54 +539,50 @@ is used by the Requests library to verify HTTPS requests.")
|
|||
(find-files "." "Cargo\\.lock$"))
|
||||
(substitute* "pyproject.toml"
|
||||
(("locked = true") "offline = true"))))))
|
||||
(build-system cargo-build-system)
|
||||
(build-system pyproject-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:imported-modules `(,@%cargo-build-system-modules
|
||||
,@%pyproject-build-system-modules)
|
||||
#:modules '((guix build cargo-build-system)
|
||||
((guix build pyproject-build-system) #:prefix py:)
|
||||
#:modules '(((guix build cargo-build-system) #:prefix cargo:)
|
||||
(guix build pyproject-build-system)
|
||||
(guix build utils))
|
||||
#:cargo-inputs
|
||||
(list rust-asn1-0.20
|
||||
rust-cc-1
|
||||
rust-cfg-if-1
|
||||
rust-foreign-types-0.3
|
||||
rust-foreign-types-shared-0.1
|
||||
rust-once-cell-1
|
||||
rust-openssl-0.10
|
||||
rust-openssl-sys-0.9
|
||||
rust-pem-3
|
||||
rust-pyo3-0.23
|
||||
rust-self-cell-1)
|
||||
#:install-source? #false
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'build
|
||||
(assoc-ref py:%standard-phases 'build))
|
||||
(delete 'check)
|
||||
(add-after 'install 'check
|
||||
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||
(when tests?
|
||||
(py:add-installed-pythonpath inputs outputs)
|
||||
(invoke "python" "-m" "pytest" "tests"))))
|
||||
(replace 'install
|
||||
(assoc-ref py:%standard-phases 'install)))))
|
||||
(add-after 'unpack 'prepare-cargo-build-system
|
||||
(lambda args
|
||||
(for-each
|
||||
(lambda (phase)
|
||||
(format #t "Running cargo phase: ~a~%" phase)
|
||||
(apply (assoc-ref cargo:%standard-phases phase)
|
||||
#:cargo-target #$(cargo-triplet)
|
||||
args))
|
||||
'(unpack-rust-crates
|
||||
configure
|
||||
check-for-pregenerated-files
|
||||
patch-cargo-checksums)))))))
|
||||
(native-inputs
|
||||
(list python-certifi
|
||||
python-cffi
|
||||
python-click
|
||||
python-cryptography-vectors
|
||||
python-mypy
|
||||
python-pretend
|
||||
python-pytest
|
||||
python-pytest-benchmark
|
||||
python-pytest-cov
|
||||
python-pytest-randomly
|
||||
python-pytest-xdist
|
||||
python-setuptools
|
||||
python-wheel))
|
||||
(inputs (list maturin openssl python-wrapper))
|
||||
(append
|
||||
(list python-certifi
|
||||
python-cffi
|
||||
python-click
|
||||
python-cryptography-vectors
|
||||
python-mypy
|
||||
python-pretend
|
||||
python-pytest
|
||||
python-pytest-benchmark
|
||||
python-pytest-cov
|
||||
python-pytest-randomly
|
||||
python-pytest-xdist
|
||||
python-setuptools
|
||||
python-wheel
|
||||
rust
|
||||
`(,rust "cargo"))
|
||||
(or (and=> (%current-target-system)
|
||||
(compose list make-rust-sysroot))
|
||||
'())))
|
||||
(inputs
|
||||
(cons* maturin openssl (cargo-inputs 'python-cryptography)))
|
||||
(propagated-inputs (list python-cffi))
|
||||
(home-page "https://github.com/pyca/cryptography")
|
||||
(synopsis "Cryptographic recipes and primitives for Python")
|
||||
|
|
|
@ -128,6 +128,14 @@
|
|||
(crate-source "arrayvec" "0.7.6"
|
||||
"0l1fz4ccgv6pm609rif37sl5nv5k6lbzi7kkppgzqzh1vwix20kw"))
|
||||
|
||||
(define rust-asn1-0.20.0
|
||||
(crate-source "asn1" "0.20.0"
|
||||
"0ckg83ingvagwjvmxadjjmkgna5kvlvrfx9arlfvzqhxxas892rd"))
|
||||
|
||||
(define rust-asn1-derive-0.20.0
|
||||
(crate-source "asn1_derive" "0.20.0"
|
||||
"1b88xsqmxpxjq4p2mrn1icj7c3k2s041v7wqp8yhnqiq06fq0052"))
|
||||
|
||||
(define rust-assert-cmd-2.0.16
|
||||
(crate-source "assert_cmd" "2.0.16"
|
||||
"0gdj0710k3lnvyjmpv8a4dgwrk9ib85l2wfw4n2xwy3qyavka66w"))
|
||||
|
@ -1353,6 +1361,10 @@
|
|||
(crate-source "memmap2" "0.9.5"
|
||||
"0krpvvkpg4i3l05cv3q2xk24a1vj5c86gbrli2wzhj1qkpnpwgzx"))
|
||||
|
||||
(define rust-memoffset-0.9.1
|
||||
(crate-source "memoffset" "0.9.1"
|
||||
"12i17wh9a9plx869g7j4whf62xw68k5zd4k0k5nh6ys5mszid028"))
|
||||
|
||||
(define rust-mime-0.3.17
|
||||
(crate-source "mime" "0.3.17"
|
||||
"16hkibgvb9klh0w0jk5crr5xv90l3wlf77ggymzjmvl1818vnxv8"))
|
||||
|
@ -1558,6 +1570,10 @@
|
|||
(crate-source "path-slash" "0.2.1"
|
||||
"0hjgljv4vy97qqw9gxnwzqhhpysjss2yhdphfccy3c388afhk48y"))
|
||||
|
||||
(define rust-pem-3.0.5
|
||||
(crate-source "pem" "3.0.5"
|
||||
"1wwfk8sbyi9l18fvvn6z9p2gy7v7q7wimbhvrvixxj8a8zl3ibrq"))
|
||||
|
||||
(define rust-pep440-rs-0.6.6
|
||||
(crate-source "pep440_rs" "0.6.6"
|
||||
"11g35bi0gagfchjcdvpaj1i82gxkrc391fcpm2f0cblw2yissvj6"))
|
||||
|
@ -1709,6 +1725,27 @@
|
|||
"125y7h40mkwb64j4v2v7s6f69ilk745kg60w1s2cq62cw8im93pm"
|
||||
#:snippet '(delete-file "src/arch/wasm32.o")))
|
||||
|
||||
(define rust-pyo3-0.23.5
|
||||
(crate-source "pyo3" "0.23.5"
|
||||
"0wm8z6jgg18z2cgr99wc34mbkffhcnb50igmq5d1ff6ghpyvyy3p"
|
||||
#:snippet '(delete-file-recursively "branding")))
|
||||
|
||||
(define rust-pyo3-build-config-0.23.5
|
||||
(crate-source "pyo3-build-config" "0.23.5"
|
||||
"1yqhw1k466k65rqvy2d4xz2shl0hzkry1xlxinciigzkdvlcpxll"))
|
||||
|
||||
(define rust-pyo3-ffi-0.23.5
|
||||
(crate-source "pyo3-ffi" "0.23.5"
|
||||
"13fxvxijl59vilv39akdzwqd1l7fb6c70f53n27irfy0672b9wg9"))
|
||||
|
||||
(define rust-pyo3-macros-0.23.5
|
||||
(crate-source "pyo3-macros" "0.23.5"
|
||||
"1nm9i19aff7zn245v35qb0lbr3cxr19zdgcayq84fg7n509j1hpv"))
|
||||
|
||||
(define rust-pyo3-macros-backend-0.23.5
|
||||
(crate-source "pyo3-macros-backend" "0.23.5"
|
||||
"0a10yxj41kvjhh9vywzd2zj3h6iwm4bg3mlkw2frrnpks1m759pw"))
|
||||
|
||||
(define rust-pyproject-toml-0.11.0
|
||||
(crate-source "pyproject-toml" "0.11.0"
|
||||
"0sm3ncm57hgcyladl55w59ycl39vq4crigjb9bya0n6b7c162w7g"))
|
||||
|
@ -1979,6 +2016,10 @@
|
|||
(crate-source "selectors" "0.25.0"
|
||||
"01kvl1r7plzlb665r64p11djabhsrd88si2zh7vci3v3ydshbcsf"))
|
||||
|
||||
(define rust-self-cell-1.1.0
|
||||
(crate-source "self_cell" "1.1.0"
|
||||
"1gmxk5bvnnimcif7v1jk8ai2azfvh9djki545nd86vsnphjgrzf2"))
|
||||
|
||||
(define rust-semver-1.0.26
|
||||
(crate-source "semver" "1.0.26"
|
||||
"1l5q2vb8fjkby657kdyfpvv40x2i2xqq9bg57pxqakfj92fgmrjn"))
|
||||
|
@ -2392,6 +2433,10 @@
|
|||
(crate-source "unicode-xid" "0.2.6"
|
||||
"0lzqaky89fq0bcrh6jj6bhlz37scfd8c7dsj5dq7y32if56c1hgb"))
|
||||
|
||||
(define rust-unindent-0.2.4
|
||||
(crate-source "unindent" "0.2.4"
|
||||
"1wvfh815i6wm6whpdz1viig7ib14cwfymyr1kn3sxk2kyl3y2r3j"))
|
||||
|
||||
(define rust-unscanny-0.1.0
|
||||
(crate-source "unscanny" "0.1.0"
|
||||
"0ivbipc1rnq15fhzgna41p1h01ncq4shycii72f3x5d7czq2mpz9"))
|
||||
|
@ -3889,6 +3934,42 @@
|
|||
rust-zerovec-derive-0.10.3
|
||||
rust-zip-2.6.1
|
||||
rust-zopfli-0.8.1))
|
||||
(python-cryptography =>
|
||||
(list rust-asn1-0.20.0
|
||||
rust-asn1-derive-0.20.0
|
||||
rust-autocfg-1.4.0
|
||||
rust-base64-0.22.1
|
||||
rust-bitflags-2.9.0
|
||||
rust-cc-1.2.18
|
||||
rust-cfg-if-1.0.0
|
||||
rust-foreign-types-0.3.2
|
||||
rust-foreign-types-shared-0.1.1
|
||||
rust-heck-0.5.0
|
||||
rust-indoc-2.0.6
|
||||
rust-itoa-1.0.15
|
||||
rust-libc-0.2.171
|
||||
rust-memoffset-0.9.1
|
||||
rust-once-cell-1.21.3
|
||||
rust-openssl-0.10.72
|
||||
rust-openssl-macros-0.1.1
|
||||
rust-openssl-sys-0.9.107
|
||||
rust-pem-3.0.5
|
||||
rust-pkg-config-0.3.32
|
||||
rust-portable-atomic-1.11.0
|
||||
rust-proc-macro2-1.0.94
|
||||
rust-pyo3-0.23.5
|
||||
rust-pyo3-build-config-0.23.5
|
||||
rust-pyo3-ffi-0.23.5
|
||||
rust-pyo3-macros-0.23.5
|
||||
rust-pyo3-macros-backend-0.23.5
|
||||
rust-quote-1.0.40
|
||||
rust-self-cell-1.1.0
|
||||
rust-shlex-1.3.0
|
||||
rust-syn-2.0.100
|
||||
rust-target-lexicon-0.12.16
|
||||
rust-unicode-ident-1.0.18
|
||||
rust-unindent-0.2.4
|
||||
rust-vcpkg-0.2.15))
|
||||
(rust-bindgen-cli =>
|
||||
(list rust-aho-corasick-1.1.3
|
||||
rust-annotate-snippets-0.11.5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue