Skip to content

Commit e76549b

Browse files
Marc Kewitzrhubert
authored andcommitted
add python::cryptography v46.0.5
1 parent 7597f17 commit e76549b

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

recipes/python/cryptography.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
- name: python::maturin
15+
tools:
16+
target-toolchain: host-compat-toolchain
17+
use: [tools]
18+
19+
- python::setuptools-rust
20+
- python::cffi
21+
- python::pycparser
22+
- python::semantic-version
23+
- libs::openssl-dev
24+
- use: []
25+
depends:
26+
- libs::openssl-tgt
27+
28+
checkoutDeterministic: True
29+
checkoutScript: |
30+
cargoFetchDeps
31+
32+
buildTools: [host-toolchain, target-toolchain, maturin]
33+
buildSetup: |
34+
# provide openssl dir
35+
export OPENSSL_DIR=${BOB_DEP_PATHS['libs::openssl-dev']}/usr/
36+
export LD_LIBRARY_PATH=${BOB_DEP_PATHS['libs::libffi-tgt']}/usr/lib
37+
buildScript: |
38+
# without a git directory maturin fails with:
39+
# fatal: not a git repository (or any parent up to mount point
40+
# dev/build/python/cryptography/2)
41+
# See https://github.com/pyca/cryptography/issues/11845
42+
git init .
43+
44+
mkdir -p bin && pushd bin
45+
ln -snf $(which $CC) cc
46+
export PATH=$(pwd):${PATH}
47+
popd # bin
48+
49+
# build wheel to avoid
50+
# ERROR Source /tmp/build-via-sdist-5zco0pfp/cryptography-46.0.5 does
51+
# not appear to be a Python project
52+
# Also see: https://github.com/pyca/cryptography/issues/11845
53+
python3Build -w $1
54+
55+
packageScript: |
56+
python3PackageTgt
57+
58+
provideDeps: ['python::*', '*-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)