Skip to content

Commit

Permalink
Use setup.py for cdk build (#13)
Browse files Browse the repository at this point in the history
- Pipfile has some known issue with locking file pypa/pipenv#4430
- Setup.py is what cdk init generates and we wanted to avoid some instruction confusion

Co-authored-by: Jang <[email protected]>
  • Loading branch information
2 people authored and GitHub Enterprise committed Jan 4, 2021
1 parent 2c3248a commit 5205719
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
7 changes: 4 additions & 3 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ https://docs.docker.com/docker-for-windows/install/

Instruction to run CDK
1. cd TabularDocumentDigitization/infra
2. pipenv install # builds a virtualenv and installs all your dependencies there. If the locking takes too much time run pipenv install -d --skip-lock
3. pipenv shell # assume the newly created python environment (alternatively prefix all commands with `pipenv run`)
4. cdk bootstrap # only run this once per account setup
2. python3 -m venv env - Creating a virtual environment¶
3. source env/bin/activate
4. pip3 install -r requirements.txt - (Installs Dependency)
5. cdk bootstrap # only run this once per account setup

## Notes
1 change: 1 addition & 0 deletions infra/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-e .
32 changes: 30 additions & 2 deletions infra/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,38 @@
packages=setuptools.find_packages(where="tabular_document_digitization"),

install_requires=[
"aws-cdk.core==1.70.0",
"aws-cdk.core>=1.70.0",
"aws-cdk.assets>=1.70.0",
"aws-cdk.aws-cloudformation>=1.70.0",
"aws-cdk.aws-cloudwatch>=1.70.0",
"aws-cdk.aws-dynamodb>=1.70.0",
"aws-cdk.aws-events>=1.70.0",
"aws-cdk.aws-events-targets>=1.70.0",
"aws-cdk.aws-iam>=1.70.0",
"aws-cdk.aws-lambda>=1.70.0",
"aws-cdk.aws-lambda-event-sources>=1.70.0",
"aws-cdk.aws-logs>=1.70.0",
"aws-cdk.aws-s3>=1.70.0",
"aws-cdk.aws-s3-assets>=1.70.0",
"aws-cdk.aws-s3-deployment>=1.70.0",
"aws-cdk.aws-s3-notifications>=1.70.0",
"aws-cdk.aws-sns>=1.70.0",
"aws-cdk.aws-sns-subscriptions>=1.70.0",
"aws-cdk.aws-sqs>=1.70.0",
"aws-cdk.aws-cognito>=1.70.0",
"aws-cdk.aws-sagemaker>=1.70.0",
"aws-cdk.custom-resources>=1.70.0",
"aws-cdk.core>=1.70.0",
"aws-cdk.aws-stepfunctions-tasks>=1.70.0",
"aws-cdk.aws-stepfunctions>=1.70.0",
"crhelper>=2.0.6"
"boto3>=1.16.47",
"jsii>=1.16.0",
"GitPython>=3.1.11",
"DotMap>=1.3.23"
],

python_requires=">=3.6",
python_requires=">=3.8",

classifiers=[
"Development Status :: 4 - Beta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def __init__(
"bash",
"-c",
"mkdir /asset-output/python && mkdir /asset-output/python/shared && cp -r shared /asset-output/python",
"pip install -r requirements.txt -t /asset-output/python",
],
)

Expand Down

0 comments on commit 5205719

Please sign in to comment.