Skip to content

Commit 04ab49b

Browse files
Marc Kewitzrhubert
authored andcommitted
add python::cryptography v46.0.5
1 parent 9f9c07c commit 04ab49b

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

recipes/python/cryptography.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
inherit: [cargo, "python3::build"]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "46.0.5"
5+
PKG_LICENSE: "Apache-2.0 OR BSD-3-Clause"
6+
7+
checkoutSCM:
8+
scm: url
9+
url: ${GITHUB_MIRROR}/pyca/cryptography/archive/refs/tags/${PKG_VERSION}.tar.gz
10+
digestSHA256: 7571f0e09a6d6eb22168993f94d35867b4dcbd0d34224e0eb7b392b905b3f12f
11+
stripComponents: 1
12+
13+
depends:
14+
- tools:
15+
target-toolchain: host-compat-toolchain
16+
depends:
17+
- name: python::maturin
18+
alias: python::maturin-host
19+
use: [tools]
20+
- python::cffi
21+
- name: libs::openssl-dev
22+
alias: openssl-host
23+
use: [result]
24+
25+
- python::setuptools-rust
26+
- python::pycparser
27+
- python::semantic-version
28+
- libs::openssl-dev
29+
- use: []
30+
depends:
31+
- libs::openssl-tgt
32+
33+
checkoutDeterministic: True
34+
checkoutScript: |
35+
cargoFetchDeps
36+
37+
buildTools: [host-toolchain, target-toolchain, maturin]
38+
buildSetup: |
39+
# provide openssl dir
40+
export OPENSSL_DIR=${BOB_DEP_PATHS['libs::openssl-dev']}/usr/
41+
# caro builds a native-tool depending on python::cffi
42+
export HOST_CC=gcc
43+
export CARGO_BUILD_RUSTFLAGS="-C link-arg=-L${BOB_DEP_PATHS['openssl-host']}/usr/lib"
44+
45+
buildScript: |
46+
# without a git directory maturin fails with:
47+
# fatal: not a git repository (or any parent up to mount point
48+
# dev/build/python/cryptography/2)
49+
# See https://github.com/pyca/cryptography/issues/11845
50+
git init .
51+
52+
# build wheel to avoid
53+
# ERROR Source /tmp/build-via-sdist-5zco0pfp/cryptography-46.0.5 does
54+
# not appear to be a Python project
55+
# See: https://github.com/pyca/cryptography/issues/11845
56+
python3Build -w $1
57+
58+
packageScript: |
59+
python3PackageTgt
60+
61+
provideDeps:
62+
- python::setuptools-rust
63+
- python::pycparser
64+
- python::semantic-version
65+
- '*-tgt'

tests/buildall/recipes/all.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ depends:
132132
- python::colorama
133133
- python::construct
134134
- python::construct-dataclasses
135+
- python::cryptography
135136
- python::cython
136137
- python::deprecated
137138
- python::distlib

0 commit comments

Comments
 (0)