Skip to content

Commit 6fee991

Browse files
committed
reduce diff, skip compiliation of static lincurl on mac (system install works, dev tools include headers)
1 parent a3f9db8 commit 6fee991

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

awslambdaric/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
def _get_handler(handler):
3939
try:
40-
modname, fname = handler.rsplit(".", 1)
40+
(modname, fname) = handler.rsplit(".", 1)
4141
except ValueError as e:
4242
raise FaultException(
4343
FaultException.MALFORMED_HANDLER_NAME,

deps/curl-7.83.1.tar.gz

-8.13 MB
Binary file not shown.

scripts/preinstall.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,32 @@ else
1414
exit 1
1515
fi
1616

17+
skip () {
18+
[ "$(uname)" = "Darwin" ]
19+
}
20+
1721
cd deps
1822
. ./versions
1923

2024
CURL_VERSION="${CURL_MAJOR_VERSION}.${CURL_MINOR_VERSION}.${CURL_PATCH_VERSION}"
2125

22-
rm -rf ./curl-$CURL_VERSION
26+
skip || rm -rf ./curl-$CURL_VERSION
2327
rm -rf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE
2428

2529
# unpack dependencies
26-
tar xzf ./curl-$CURL_VERSION.tar.gz --no-same-owner && \
30+
skip || tar xzf ./curl-$CURL_VERSION.tar.gz --no-same-owner && \
2731
tar xzf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz --no-same-owner
2832

29-
(
33+
skip || (
3034
# Build Curl
31-
export CFLAGS="$CFLAGS -Wno-deprecated-declarations"
3235
cd curl-$CURL_VERSION && \
3336
./buildconf && \
3437
./configure \
3538
--prefix "$ARTIFACTS_DIR" \
3639
--disable-shared \
37-
--disable-ldap \
38-
--disable-ldaps \
3940
--without-ssl \
4041
--with-pic \
41-
--without-zlib \
42-
--without-nghttp2 \
43-
--without-nghttp3 \
44-
--without-ngtcp2 &&
42+
--without-zlib && \
4543
make && \
4644
make install
4745
)
@@ -52,7 +50,7 @@ tar xzf ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE.tar.gz --no-same-owner
5250
cd ./aws-lambda-cpp-$AWS_LAMBDA_CPP_RELEASE/build
5351

5452
$CMAKE .. \
55-
-DCMAKE_CXX_FLAGS="-fPIC -Wno-deprecated-declarations" \
53+
-DCMAKE_CXX_FLAGS="-fPIC" \
5654
-DCMAKE_INSTALL_PREFIX="$ARTIFACTS_DIR" \
5755
-DENABLE_LTO=$ENABLE_LTO \
5856
-DCMAKE_MODULE_PATH="$ARTIFACTS_DIR"/lib/pkgconfig && \

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def get_curl_extra_linker_flags():
1919
check_call(["./scripts/preinstall.sh"])
2020

2121
# call curl-config to get the required linker flags
22-
cmd = ["./deps/artifacts/bin/curl-config", "--static-libs"]
22+
if platform.system() in {"Darwin"}:
23+
cmd = ["curl-config", "--libs"]
24+
else:
25+
cmd = ["./deps/artifacts/bin/curl-config", "--static-libs"]
2326
curl_config = check_output(cmd).decode("utf-8").replace("\n", "")
2427

2528
# It is expected that the result of the curl-config call is similar to

0 commit comments

Comments
 (0)