Skip to content

Commit

Permalink
Saved some unsaved files and added the config.py back to the git repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Oct 4, 2023
1 parent ca34baf commit 6156ead
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,3 @@ deps/
# API docs are updated automatically by .github/workflows/docs.yml
docs/

# generated source files
awscrt/config.py

14 changes: 14 additions & 0 deletions awscrt/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Config module which can always be checked regardless of if the CRT was successfully built, installed on system, or not.
"""

"""
Returns True if either _awscrt was installed in the local environment or loaded from the system.
Otherwise returns False indicating that any other functions or modules in this library will also fail.
"""
def crt_wheel_installed():
try:
import _awscrt
return True
except Exception:
return False
1 change: 1 addition & 0 deletions codebuild/cd/manylinux-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ phases:
pre_build:
commands:
- export CC=gcc
- export AWS_CRT_BUILD_STRICT_MODE=ON
- cd aws-crt-python
- /opt/python/cp37-cp37m/bin/python ./continuous-delivery/update-version.py
build:
Expand Down
1 change: 1 addition & 0 deletions codebuild/cd/manylinux-x86-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ phases:
pre_build:
commands:
- export CC=gcc
- export AWS_CRT_BUILD_STRICT_MODE=ON
- cd aws-crt-python
- /opt/python/cp37-cp37m/bin/python ./continuous-delivery/update-version.py
build:
Expand Down
2 changes: 2 additions & 0 deletions codebuild/cd/manylinux1-tee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ phases:
pre_build:
commands:
- export CC=gcc
- export AWS_CRT_BUILD_STRICT_MODE=ON

build:
commands:
- echo Build started on `date`
Expand Down
2 changes: 2 additions & 0 deletions continuous-delivery/build-wheels-manylinux2014-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#assumes image based on manylinux2014 + extras (cmake3, libcrypto, etc)
set -ex

export AWS_CRT_BUILD_STRICT_MODE=ON

/opt/python/cp39-cp39/bin/python ./continuous-delivery/update-version.py

/opt/python/cp37-cp37m/bin/python setup.py sdist bdist_wheel
Expand Down
1 change: 1 addition & 0 deletions continuous-delivery/build-wheels-manylinux2014-x86_64.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
#assumes image based on manylinux2014 + extras (cmake3, libcrypto, etc)
set -ex
export AWS_CRT_BUILD_STRICT_MODE=ON

/opt/python/cp39-cp39/bin/python ./continuous-delivery/update-version.py

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def using_system_libcrypto():

def strict_build_success_mode():
strict_mode = os.getenv('AWS_CRT_BUILD_STRICT_MODE')
return strict_mode != None and strict_mode.lower() != 'off'
return strict_mode != None and strict_mode.strip().lower() != 'off'

def report_build_status(status):
with open('awscrt/config.py', 'w') as f:
Expand Down

0 comments on commit 6156ead

Please sign in to comment.