Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Python template without pipenv #327

Merged
merged 2 commits into from
Aug 31, 2020
Merged

Conversation

cmclaughlin
Copy link
Contributor

@cmclaughlin cmclaughlin commented Aug 19, 2020

No description provided.

@cmclaughlin cmclaughlin changed the title Remove pipenv dependency New Python template without pipenv Aug 22, 2020
@cmclaughlin cmclaughlin reopened this Aug 22, 2020
cmclaughlin added a commit to cmclaughlin/terraform-cdk that referenced this pull request Aug 24, 2020
@cmclaughlin cmclaughlin marked this pull request as ready for review August 24, 2020 04:22
@cmclaughlin
Copy link
Contributor Author

This seems to work well...

$ CDKTF_DIST=~/repos/terraform-cdk/dist/ cdktf init --template python-pip --local --project-name=test --project-description=test
Note: By supplying '--local' option you have chosen local storage mode for storing the state of your stack.
This means that your Terraform state file will be stored locally on disk in a file 'terraform.tfstate' in the root of your project.
Processing /Users/cmclaughlin-local/repos/terraform-cdk/dist/python/cdktf-0.0.0-py3-none-any.whl
Requirement already satisfied: jsii<2.0.0,>=1.11.0 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from cdktf==0.0.0->-r requirements.txt (line 1)) (1.11.0)
Requirement already satisfied: constructs<4.0.0,>=3.0.0 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from cdktf==0.0.0->-r requirements.txt (line 1)) (3.0.4)
Requirement already satisfied: publication>=0.0.3 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from cdktf==0.0.0->-r requirements.txt (line 1)) (0.0.3)
Requirement already satisfied: python-dateutil in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from jsii<2.0.0,>=1.11.0->cdktf==0.0.0->-r requirements.txt (line 1)) (2.8.1)
Requirement already satisfied: attrs~=19.3.0 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from jsii<2.0.0,>=1.11.0->cdktf==0.0.0->-r requirements.txt (line 1)) (19.3.0)
Requirement already satisfied: cattrs~=1.0.0 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from jsii<2.0.0,>=1.11.0->cdktf==0.0.0->-r requirements.txt (line 1)) (1.0.0)
Requirement already satisfied: typing-extensions~=3.7.4 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from jsii<2.0.0,>=1.11.0->cdktf==0.0.0->-r requirements.txt (line 1)) (3.7.4.2)
Requirement already satisfied: six>=1.5 in /Users/cmclaughlin-local/.pyenv/versions/3.8.2/envs/cdktf/lib/python3.8/site-packages (from python-dateutil->jsii<2.0.0,>=1.11.0->cdktf==0.0.0->-r requirements.txt (line 1)) (1.15.0)
Installing collected packages: cdktf
  Found existing installation: cdktf 0.0.15
    Uninstalling cdktf-0.0.15:
      Successfully uninstalled cdktf-0.0.15
Successfully installed cdktf-0.0.0
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Generated python constructs in the output directory: imports
========================================================================================================

  Your cdktf Python project is ready!

  cat help                Prints this message

  Compile:
    python3 ./main.py     Compile and run the python code.

  Synthesize:
    cdktf synth           Synthesize Terraform resources to cdktf.out/

  Diff:
    cdktf diff            Perform a diff (terraform plan) for the given stack

  Deploy:
    cdktf deploy          Deploy the given stack

  Destroy:
    cdktf destroy         Destroy the given stack

========================================================================================================

$ cat requirements.txt
/Users/cmclaughlin-local/repos/terraform-cdk/dist/python/cdktf-0.0.0-py3-none-any.whl

cmclaughlin added a commit to cmclaughlin/terraform-cdk that referenced this pull request Aug 24, 2020
cmclaughlin added a commit to cmclaughlin/terraform-cdk that referenced this pull request Aug 24, 2020
cmclaughlin added a commit to cmclaughlin/terraform-cdk that referenced this pull request Aug 24, 2020
cmclaughlin added a commit to cmclaughlin/terraform-cdk that referenced this pull request Aug 24, 2020
@skorfmann
Copy link
Contributor

There was a similar build error in #329 - Is this branch up to date with master?

@cmclaughlin
Copy link
Contributor Author

Thanks for the tip! I rebased and the tests are passing now.

Copy link
Contributor

@skorfmann skorfmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good, thanks!

Besides from the comment, an integration similar to this one would be nice. However, if you're not comfortable adding this, I'm happy to merge and add it later.

docs/getting-started/python.md Outdated Show resolved Hide resolved
@skorfmann
Copy link
Contributor

Besides from the comment, an integration similar to this one would be nice. However, if you're not comfortable adding this, I'm happy to merge and add it later.

You know what - forget about this. We'll do #338 instead. So - just the little documentation change for now.

@skorfmann skorfmann merged commit 7faebbe into hashicorp:master Aug 31, 2020
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants