From b6a5aa7dc7648bd86b61345cb1a6bc384bcabbd5 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Thu, 25 Jan 2024 22:01:16 +0200 Subject: [PATCH] +cryptography.io (#4993) * new file: projects/cryptography.io/package.yml * contents > content ? * oh yeah --- projects/cryptography.io/package.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 projects/cryptography.io/package.yml diff --git a/projects/cryptography.io/package.yml b/projects/cryptography.io/package.yml new file mode 100644 index 00000000..a9baa6cf --- /dev/null +++ b/projects/cryptography.io/package.yml @@ -0,0 +1,36 @@ +distributable: + url: git+https://github.com/pyca/cryptography.git + ref: ${{version.tag}} + +versions: + github: pyca/cryptography/tags + +dependencies: + python.org: '>=3.11' + github.com/python-cffi/cffi: ^1.16 + openssl.org: '>=1.1' + +runtime: + env: + PYTHONPATH: $PYTHONPATH:{{prefix}}/lib/python{{deps.python.org.version.major}}/site-packages + +build: + dependencies: + python.org/typing_extensions: '*' + rust-lang.org: '>=1.65' + script: + - python -m pip install --prefix={{prefix}} . + - run: ln -s python{{deps.python.org.version.marketing}} python{{deps.python.org.version.major}} + working-directory: ${{prefix}}/lib + +test: + script: + - run: python $FIXTURE + fixture: + extname: py + content: | + from cryptography.fernet import Fernet + key = Fernet.generate_key() + f = Fernet(key) + token = f.encrypt(b"pkgx") + print(f.decrypt(token)) \ No newline at end of file