git: ef8010c64fb3 - main - security/py-cryptography: Update to 3.4.8
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 May 2022 11:46:21 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ef8010c64fb3fb32f9051c89b58cb2643622e7e2 commit ef8010c64fb3fb32f9051c89b58cb2643622e7e2 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-05-13 11:31:29 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-05-13 11:39:35 +0000 security/py-cryptography: Update to 3.4.8 - Update pkg-descr - Update WWW Changes: https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst --- security/py-cryptography/Makefile | 48 +++++++++++------------ security/py-cryptography/distinfo | 6 +-- security/py-cryptography/files/patch-setup.py | 55 +++++++++++++++++++++++++++ security/py-cryptography/pkg-descr | 14 +++---- 4 files changed, 89 insertions(+), 34 deletions(-) diff --git a/security/py-cryptography/Makefile b/security/py-cryptography/Makefile index 306d5d7a425a..c507387a8aa8 100644 --- a/security/py-cryptography/Makefile +++ b/security/py-cryptography/Makefile @@ -1,7 +1,7 @@ # Created by: Kubilay Kocak <koobs@FreeBSD.org> PORTNAME= cryptography -PORTVERSION= 3.3.2 +PORTVERSION= 3.4.8 CATEGORIES= security python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -9,43 +9,43 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org COMMENT= Cryptographic recipes and primitives for Python developers -LICENSE= APACHE20 BSD3CLAUSE -LICENSE_COMB= dual -LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE.APACHE -LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/LICENSE.BSD - -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.8:devel/py-cffi@${PY_FLAVOR} -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.8:devel/py-cffi@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}six>=1.4.1:devel/py-six@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography-vectors>=${PORTVERSION}:security/py-cryptography-vectors@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}hypothesis>=1.11.4:devel/py-hypothesis@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}iso8601>0:devel/py-iso8601@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pretend>0:devel/py-pretend@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pytest>=3.6.0:devel/py-pytest@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} - -# Python 2.7, 3.5-3.8 -USES= cpe compiler:env python:3.6+ ssl -CPE_VENDOR= ${PORTNAME}_project +LICENSE= APACHE20 BSD3CLAUSE +LICENSE_COMB= dual +LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE.APACHE +LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE.BSD + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>=1.11.4:devel/py-hypothesis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}iso8601>=0:devel/py-iso8601@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pretend>=0:devel/py-pretend@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=6.0,1:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-subtests>=0:devel/py-pytest-subtests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0,1:devel/py-pytest-xdist@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytz>=0,1:devel/py-pytz@${PY_FLAVOR} + +USES= compiler:env cpe python:3.6+ ssl USE_PYTHON= autoplist concurrent distutils CFLAGS+= -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} +MAKE_ENV= CRYPTOGRAPHY_DONT_BUILD_RUST=1 -TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +CPE_VENDOR= cryptography_project .include <bsd.port.pre.mk> .if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 post-patch: - @${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' \ - ${WRKSRC}/src/_cffi_src/build_openssl.py + @${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' ${WRKSRC}/src/_cffi_src/build_openssl.py .endif post-install: - ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cryptography/hazmat/bindings/*.so + ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + do-test: - @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -q -v -rs -o addopts= +# cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR} ${PYTHON_CMD} -m pytest -q -rs -v -o addopts= + cd ${WRKSRC} && ${SETENV} ${PYTHON_CMD} -m pytest -q -rs -v -o addopts= .include <bsd.port.post.mk> diff --git a/security/py-cryptography/distinfo b/security/py-cryptography/distinfo index a2ec74471294..cb800cc11b12 100644 --- a/security/py-cryptography/distinfo +++ b/security/py-cryptography/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1614253508 -SHA256 (cryptography-3.3.2.tar.gz) = 5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed -SIZE (cryptography-3.3.2.tar.gz) = 539883 +TIMESTAMP = 1652122693 +SHA256 (cryptography-3.4.8.tar.gz) = 94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c +SIZE (cryptography-3.4.8.tar.gz) = 546907 diff --git a/security/py-cryptography/files/patch-setup.py b/security/py-cryptography/files/patch-setup.py new file mode 100644 index 000000000000..7e15e74dffd4 --- /dev/null +++ b/security/py-cryptography/files/patch-setup.py @@ -0,0 +1,55 @@ +--- setup.py.orig 2021-03-25 17:19:57 UTC ++++ setup.py +@@ -10,23 +10,7 @@ import sys + + from setuptools import find_packages, setup + +-try: +- from setuptools_rust import RustExtension +-except ImportError: +- print( +- """ +- =============================DEBUG ASSISTANCE========================== +- If you are seeing an error here please try the following to +- successfully install cryptography: + +- Upgrade to the latest pip and try again. This will fix errors for most +- users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip +- =============================DEBUG ASSISTANCE========================== +- """ +- ) +- raise +- +- + base_dir = os.path.dirname(__file__) + src_dir = os.path.join(base_dir, "src") + +@@ -41,9 +25,8 @@ with open(os.path.join(src_dir, "cryptography", "__abo + + # `install_requirements` and `setup_requirements` must be kept in sync with + # `pyproject.toml` +-setuptools_rust = "setuptools-rust>=0.11.4" + install_requirements = ["cffi>=1.12"] +-setup_requirements = install_requirements + [setuptools_rust] ++setup_requirements = install_requirements + + if os.environ.get("CRYPTOGRAPHY_DONT_BUILD_RUST"): + rust_extensions = [] +@@ -129,9 +112,6 @@ try: + "twine >= 1.12.0", + "sphinxcontrib-spelling >= 4.0.1", + ], +- "sdist": [ +- setuptools_rust, +- ], + "pep8test": [ + "black", + "flake8", +@@ -149,7 +129,6 @@ try: + "src/_cffi_src/build_openssl.py:ffi", + "src/_cffi_src/build_padding.py:ffi", + ], +- rust_extensions=rust_extensions, + ) + except: # noqa: E722 + # Note: This is a bare exception that re-raises so that we don't interfere diff --git a/security/py-cryptography/pkg-descr b/security/py-cryptography/pkg-descr index 212dfaf25a3f..162cb2d7df5a 100644 --- a/security/py-cryptography/pkg-descr +++ b/security/py-cryptography/pkg-descr @@ -1,9 +1,9 @@ -cryptography is a package designed to expose cryptographic recipes and -primitives to Python developers. Our goal is for it to be your "cryptographic -standard library". +cryptography is a package which provides cryptographic recipes and primitives to +Python developers. Our goal is for it to be your "cryptographic standard +library". It supports Python 3.6+ and PyPy3 7.2+. -cryptography includes both high level recipes, and low level interfaces to -common cryptographic algorithms such as symmetric ciphers, message digests -and key derivation functions. +cryptography includes both high level recipes and low level interfaces to common +cryptographic algorithms such as symmetric ciphers, message digests, and key +derivation functions. -WWW: https://github.com/pyca/cryptography/ +WWW: https://github.com/pyca/cryptography