diff options
Diffstat (limited to 'dev-python/cryptography')
| -rw-r--r-- | dev-python/cryptography/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/cryptography/cryptography-46.0.2.ebuild | 132 |
2 files changed, 133 insertions, 0 deletions
diff --git a/dev-python/cryptography/Manifest b/dev-python/cryptography/Manifest index 03ae1abfe9b4..835bec197be2 100644 --- a/dev-python/cryptography/Manifest +++ b/dev-python/cryptography/Manifest @@ -13,6 +13,7 @@ DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b DIST cfg-if-1.0.3.crate 8719 BLAKE2B 5cd0ac122110740895b45cdf8e0f738f2de1882d5a06c696d08e906765e4ddcd72a866dcc115da52d9fece205c9ad15dc25ad98dff36b32517012a7586e986ee SHA512 afe424a191c2aaaffec3d114e0116d0324d12117aeb22df78e47ad6752444bc5acb074ab0a174476b71e584a37743f9dcc2b0e8036d590fcc5afc7c55f86122b DIST cryptography-45.0.7.tar.gz 36155342 BLAKE2B 7e163d3407541fe95262a610ddc05cce88a1c5f6b2f0dae9da0f5c75de7e9fcd4f3a87190fec99adeb39b4dcd48371ea701218306fd3b54ed29df0222949cb36 SHA512 b0f0bcc8c75855b19f347e7e1f5fe82b79cab1c5f93c3b1936dd88997a33d4c2a0f5a0e894f6ec4d8af0d0a94ad729ec1b57c62e9026af24b1f6c8bda0414e52 DIST cryptography-46.0.1.tar.gz 749198 BLAKE2B 291ad3070f257082e620e4452b977b8600a4f53a0c40d526afe98f86689b32bd49e472dd128a6401e4fb926f94bca17e381c03bd9707047fb48faa9b5fe74983 SHA512 5d0ebdc3c86c03507389b2223f668818ce8c5b35ac506feb67fca9dbb43d38e684983cb9b805930caa9cea0c53e9f324354eef03bf8b651140c07e39ac4f8c07 +DIST cryptography-46.0.2.tar.gz 749293 BLAKE2B 15b519da25b4ab61db084d577b3045c4f00e3a8d51eedcdfcd73e282222ad0eb3c5b3cec73641ba16d3585699d9188e4421d3bbb6f68c18b5e495a5e98e12405 SHA512 f9bac5e4cc22c5c2914604bae596548356a4b62c0242ae9ffc11014167eb33fcac8b14c2c18778e2272424a80ffc2cd0ae97bea3ea61e2a143bc8c63664bab03 DIST find-msvc-tools-0.1.1.crate 30228 BLAKE2B 9f6d84697a0310021a59789a0aebcf5895490e4dd719a2ef820ddf2f225ecd13c814e2c03e8d4de4089a2d1599b469a900c0c1072f9b57dcce9fb8634dcea6b2 SHA512 cc91ce79858db4a6feb3ff0fe24d7b29a523285247116a42b27affacc3f034afc0d458ac8716922f5fec5f23deafd62e875ec899d4ea58531d028535c22e137e DIST foreign-types-0.3.2.crate 7504 BLAKE2B 520818b702d990d296ecd31a8646850202509ccfa18edd0e1b260289619a6c351e758f317ec0824bd76eccb209b6f087057c25f1bd01a47897715013dd834867 SHA512 bf27b8243ed482c202d120383374f19ff09422535e24b9c1aebccc66529bf300ca17b8bbc76d67f98ac092e614497afe3add9dc68aa69c93074df05762f91232 DIST foreign-types-shared-0.1.1.crate 5672 BLAKE2B d2e42e04b6657e7a69fe0bd20c672176629c743e49a55fd007bb30e289710b70045d445ae9cae0eeaa747ee708c90e8abd9b5fc39bad8ec0666befe1b696d4f1 SHA512 bafdb2143e136fb0818e2ffd90b5c862b7181647d6568947d4e4531012bbf7a57b597221ec7056c1b562dfc0c3b5dead26d1a4111ebc15e7863737a873518a4a diff --git a/dev-python/cryptography/cryptography-46.0.2.ebuild b/dev-python/cryptography/cryptography-46.0.2.ebuild new file mode 100644 index 000000000000..32813f7feeef --- /dev/null +++ b/dev-python/cryptography/cryptography-46.0.2.ebuild @@ -0,0 +1,132 @@ +# Copyright 2021-2025 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +CARGO_OPTIONAL=yes +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=maturin +PYTHON_COMPAT=( python3_{9,10,11,12,13} ) +PYTHON_REQ_USE="threads(+)" + +CRATES=" + asn1@0.22.0 + asn1_derive@0.22.0 + autocfg@1.5.0 + base64@0.22.1 + bitflags@2.9.4 + cc@1.2.37 + cfg-if@1.0.3 + find-msvc-tools@0.1.1 + foreign-types-shared@0.1.1 + foreign-types@0.3.2 + heck@0.5.0 + indoc@2.0.6 + itoa@1.0.15 + libc@0.2.175 + memoffset@0.9.1 + once_cell@1.21.3 + openssl-macros@0.1.1 + openssl-sys@0.9.109 + openssl@0.10.73 + pem@3.0.5 + pkg-config@0.3.32 + portable-atomic@1.11.1 + proc-macro2@1.0.101 + pyo3-build-config@0.26.0 + pyo3-ffi@0.26.0 + pyo3-macros-backend@0.26.0 + pyo3-macros@0.26.0 + pyo3@0.26.0 + quote@1.0.40 + self_cell@1.2.0 + shlex@1.3.0 + syn@2.0.106 + target-lexicon@0.13.3 + unicode-ident@1.0.19 + unindent@0.2.4 + vcpkg@0.2.15 +" + + +inherit cargo distutils-r1 multiprocessing + +VEC_P=cryptography_vectors-$(ver_cut 1-3) +DESCRIPTION="Library providing cryptographic recipes and primitives" +HOMEPAGE=" + https://github.com/pyca/cryptography/ + https://pypi.org/project/cryptography/ +" +SRC_URI=" + https://github.com/pyca/cryptography/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + $(cargo_crate_uris ${CRATES})" + +LICENSE="|| ( Apache-2.0 BSD ) PSF-2" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-DFS-2016 +" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv ~s390 sparc ~x86" +IUSE="libressl" + +RDEPEND=" + !libressl? ( >=dev-libs/openssl-1.0.2o-r6:0= ) + libressl? ( dev-libs/libressl:= ) + $(python_gen_cond_dep ' + >=dev-python/cffi-1.8:=[${PYTHON_USEDEP}] + ' 'python*') +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + ${RUST_DEPEND} + >=dev-util/maturin-1.9.4[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/certifi[${PYTHON_USEDEP}] + dev-python/iso8601[${PYTHON_USEDEP}] + dev-python/pretend[${PYTHON_USEDEP}] + dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + ) +" + +# Files built without CFLAGS/LDFLAGS, acceptable for rust +QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/cryptography/hazmat/bindings/_rust.*.so" + +EPYTEST_PLUGINS=( hypothesis pytest-subtests ) +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_unpack() { + cargo_src_unpack +} + +src_prepare() { + distutils-r1_src_prepare + + sed -i -e 's:--benchmark-disable::' pyproject.toml || die + + # work around availability macros not supported in GCC (yet) + if [[ ${CHOST} == *-darwin* ]] ; then + local darwinok=0 + if [[ ${CHOST##*-darwin} -ge 16 ]] ; then + darwinok=1 + fi + sed -i -e 's/__builtin_available(macOS 10\.12, \*)/'"${darwinok}"'/' \ + src/_cffi_src/openssl/src/osrandom_engine.c || die + fi +} + +python_configure_all() { + filter-lto # bug #903908 +} + +python_test() { + local -x PYTHONPATH="${PYTHONPATH}:${WORKDIR}/cryptography_vectors-${PV}" + local EPYTEST_IGNORE=( + tests/bench + ) + epytest +} |
