Skip to content

Commit 0794d84

Browse files
author
Gabriel Y C Chan
committed
I'm trying to build cryptography by rust.
1 parent 645a79a commit 0794d84

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/deb.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
# Install Python, fpm deps (ruby) and the kitchen sink required to build everything...
4646
apt-get install -q -y git python3 python3-venv python3-dev python3-pip build-essential libffi-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev libgdbm-dev libc6-dev libbz2-dev rustc cargo squashfs-tools ruby-full jq libpq-dev postgresql postgresql-contrib
4747
48+
# these dependencies are installed for compiling cryptography
49+
apt-get install -q -y curl libssl-dev pkg-config
50+
51+
# install rustc using rustup script
52+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
53+
source "$HOME/.cargo/env"
54+
4855
# Install FPM
4956
gem install fpm
5057
@@ -54,8 +61,6 @@ jobs:
5461
5562
# poetry requires cryptography, but the latest version wants to be compiled by Rust, and this environment doesn't like Rust.
5663
# the same logic applies to the cryptography installation in the run section.
57-
export CRYPTOGRAPHY_DONT_BUILD_RUST=1
58-
pip install cryptography
5964
# using pip to install poetry, instead of shell script in Adam's work
6065
pip install poetry==1.5.1
6166
@@ -73,17 +78,12 @@ jobs:
7378
python3 -m venv /opt/hackman
7479
. /opt/hackman/bin/activate
7580
76-
# Poetry depends on Rust but our environment is hostile to Rust.
77-
export CRYPTOGRAPHY_DONT_BUILD_RUST=1
78-
7981
# workaround for poetry installation stalling. what's happening here: use pip to install the packages specified in poetry.
8082
# source: https://github.com/python-poetry/poetry/issues/7148#issuecomment-1398322105
8183
# 2 things are happening here that makes poetry stall.
8284
# the first is poetry wants to compile cryptography and gevent from source, which stalls
8385
# the second is if pip install from requirements.txt, cryptography and gevent stall as well. To get around this is to install both of them specifically using pip.
8486
poetry export -f requirements.txt --output requirements.txt
85-
pip install cryptography
86-
pip install gevent
8787
pip install -r requirements.txt
8888
8989
# Install dependencies

0 commit comments

Comments
 (0)