Skip to content

Commit 8e5e67a

Browse files
committed
Bundle hash function implementations temporarily
1 parent ca2f220 commit 8e5e67a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ dist/snooty/.EXISTS: .venv/.EXISTS pyproject.toml snooty/*.py snooty/gizaparser/
3636
install -m644 snooty/rstspec.toml LICENSE* dist/snooty/
3737
chmod -R u+w dist/snooty
3838

39-
# on macOS, bundle Python and openssl
39+
# on macOS, bundle Python, openssl, and Python's hash implementations
40+
# We should only need Python and OpenSSL, but macOS Sierra is whining
4041
if [ $$(uname -s) = Darwin ]; then \
4142
dep_python_path=$$(otool -L dist/snooty/snooty | grep Python | awk '{print $$1}'); \
4243
dep_libssl_path=$$(otool -L dist/snooty/_hashlib.so | grep libssl | awk '{print $$1}'); \
@@ -55,6 +56,10 @@ dist/snooty/.EXISTS: .venv/.EXISTS pyproject.toml snooty/*.py snooty/gizaparser/
5556
-change "$$dep_libcrypto_path" \
5657
"@executable_path/$$(basename $$dep_libcrypto_path)" \
5758
"dist/snooty/$$(basename $$dep_libssl_path)" || exit 1; \
59+
for hashfunction in md5 sha1 sha512 sha256 blake2; do \
60+
path=$$(python3 -c "import _$${hashfunction}; print(_$${hashfunction}.__file__)"); \
61+
install -m755 "$${path}" dist/snooty/ || exit 1; \
62+
done; \
5863
fi
5964

6065
touch $@

0 commit comments

Comments
 (0)