diff options
-rw-r--r-- | dev-python/cryptography/Manifest | 2 | ||||
-rw-r--r-- | dev-python/cryptography/cryptography-41.0.4.ebuild | 160 |
2 files changed, 162 insertions, 0 deletions
diff --git a/dev-python/cryptography/Manifest b/dev-python/cryptography/Manifest index fe2e7d3..1710d11 100644 --- a/dev-python/cryptography/Manifest +++ b/dev-python/cryptography/Manifest @@ -8,7 +8,9 @@ DIST bitflags-1.3.2.crate 23021 BLAKE2B eb990bb27b2bdeb66fd7212ce582cb36e1c616de DIST cc-1.0.79.crate 62624 BLAKE2B b3cbed3bd6fcac1c6ea258ec96cd107f859947a35dc89c3dc8f314741b0f668e61518f896ec32ce10c9a7eb20dd350bc177a71810d53ebea59fda062ed9d27db SHA512 cbf0a25f3a23fc540e9d638fabc23f761f1c240ebb4814e761e90437d71fc559cd155768ab9e78fc192220d8a605c66c3af342ed736b719181656170b98d7bf5 DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff DIST cryptography-41.0.3.tar.gz 630139 BLAKE2B 148c01d3956a821edfcbba386287707f6e327d49669d163c00080f5208d65f340096a211825d6b5550036b00c5ccf9c84b137413454d68cae5374e9c10947c87 SHA512 84f79f72be3646c1e9a932ba8aba514471f6c0e50462a0bb3a927622ce67c7932e71d44e187db8928b05f04b803b958284f785c0dc297a0c9453846af1ac1aca +DIST cryptography-41.0.4.tar.gz 630506 BLAKE2B 8d205ec707b0278f081c9d96d81d5bb2ac2554e0f73e97451c053da018ff7d0e0aaa2b1f043f2f67c0a93e7d0d02a130cdf3373ced21728268c7f882bd64fbd1 SHA512 0c0a025ed5e39195561e5a6374463ee2261448657ebb89e39e761a5b02c701a8f804c1f84733cf8376e44a46784b2cc41134952c329987a96ee85cb4532c75cd DIST cryptography_vectors-41.0.3.tar.gz 35287886 BLAKE2B 525ac26bf9b9c95a3682fee97f05426c42aab985085c80a0957735898ffe7922a477d3a1130c844e721f5489d53f636f84472fa66a38b80f8ae7794fc6f5f080 SHA512 1f794f2bf4942ec47c93178061fc581c8ab87725927e7e6f0c939e6c499c98867296f87b39583f30ab42e3e682c5be8ef0aba705adf7390898df52ec3a822621 +DIST cryptography_vectors-41.0.4.tar.gz 35288210 BLAKE2B 3554d6a7c376032b62c079db152f79bec9764b4fd28355eaad44d827cb26fc7af38bb8df89ecd93e3e1b28937059a64b21cbea2bea37ce74e6390442786a4106 SHA512 4d0d707530dbf20f07214f8e01f659cec9b4db74c5a329911b510962a2d6a843ae62e4598c00dce6b79aa402034419e6347ab8b0837beb18c173726649841704 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 DIST indoc-1.0.9.crate 13475 BLAKE2B a9696788574e56dd125c3371169fd59d6947d188f76e2669b21c0304692efd6709cd048920f7822e92c6a5620fb178e0e85c7776118cef8ccee0f58398e14abf SHA512 db8aef4a7bb606452dc8ed45aa29a255c7a135357a0bd586fb4429c5f56a1aa2ca9400d6fac39956aeb486a15d25cf5d1b9524967867f2c651d9d563e3e85be8 diff --git a/dev-python/cryptography/cryptography-41.0.4.ebuild b/dev-python/cryptography/cryptography-41.0.4.ebuild new file mode 100644 index 0000000..09f12e9 --- /dev/null +++ b/dev-python/cryptography/cryptography-41.0.4.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CARGO_OPTIONAL=yes +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +CRATES=" + Inflector@0.11.4 + aliasable@0.1.3 + asn1@0.15.2 + asn1_derive@0.15.2 + autocfg@1.1.0 + base64@0.13.1 + bitflags@1.3.2 + cc@1.0.79 + cfg-if@1.0.0 + foreign-types-shared@0.1.1 + foreign-types@0.3.2 + indoc@1.0.9 + libc@0.2.144 + lock_api@0.4.9 + memoffset@0.8.0 + once_cell@1.17.2 + openssl-macros@0.1.1 + openssl-sys@0.9.88 + openssl@0.10.54 + ouroboros@0.15.6 + ouroboros_macro@0.15.6 + parking_lot@0.12.1 + parking_lot_core@0.9.7 + pem@1.1.1 + pkg-config@0.3.27 + proc-macro-error-attr@1.0.4 + proc-macro-error@1.0.4 + proc-macro2@1.0.64 + pyo3-build-config@0.18.3 + pyo3-ffi@0.18.3 + pyo3-macros-backend@0.18.3 + pyo3-macros@0.18.3 + pyo3@0.18.3 + quote@1.0.28 + redox_syscall@0.2.16 + scopeguard@1.1.0 + smallvec@1.10.0 + syn@1.0.109 + syn@2.0.18 + target-lexicon@0.12.7 + unicode-ident@1.0.9 + unindent@0.1.11 + vcpkg@0.2.15 + version_check@0.9.4 + windows-sys@0.45.0 + windows-targets@0.42.2 + windows_aarch64_gnullvm@0.42.2 + windows_aarch64_msvc@0.42.2 + windows_i686_gnu@0.42.2 + windows_i686_msvc@0.42.2 + windows_x86_64_gnu@0.42.2 + windows_x86_64_gnullvm@0.42.2 + windows_x86_64_msvc@0.42.2 +" + +inherit cargo distutils-r1 flag-o-matic multiprocessing pypi + +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+=" + ${CARGO_CRATE_URIS} + test? ( + $(pypi_sdist_url cryptography_vectors "$(ver_cut 1-3)") + ) +" + +LICENSE="|| ( Apache-2.0 BSD ) PSF-2" +# Dependent crate licenses +LICENSE+=" + Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD MIT + Unicode-DFS-2016 +" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + >=dev-libs/openssl-1.0.2o-r6:0= + $(python_gen_cond_dep ' + >=dev-python/cffi-1.8:=[${PYTHON_USEDEP}] + ' 'python*') +" +DEPEND=" + ${RDEPEND} +" +# XXX: Drop explicit >=virtual/rust-1.56.0 dep once that's the minimum in cargo.eclass +# and replace it with ${RUST_DEPEND} +BDEPEND=" + dev-python/setuptools-rust[${PYTHON_USEDEP}] + >=virtual/rust-1.56.0 + test? ( + >=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}] + dev-python/iso8601[${PYTHON_USEDEP}] + dev-python/pretend[${PYTHON_USEDEP}] + dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/pytest-subtests[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${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" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${PN}-41.0.3-libressl.patch +) + +src_unpack() { + cargo_src_unpack +} + +src_prepare() { + default + + pushd "${ECARGO_HOME}"/gentoo/openssl-sys-0.9.88 > /dev/null || die + eapply "${FILESDIR}"/${PN}-41.0.3-libressl-openssl-sys.patch + popd > /dev/null || die + + 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 -n "$(makeopts_jobs)" +} |