Skip to content

Commit 984d71e

Browse files
authored
fix: ensure python poetry envs are created when installing (#720)
- use pnpm instead of yarn for non-node projects. - force usage of pyenv as a global dependency as this leads to more predicatable installs/builds and less errors to do with python aliases, etc - Ensure all non-node projects have their `install:ci` target called as part of the root `install:ci` script - Ensure all python projects call `poetry env use pythonXXX` before installing to ensure the venv is setup correctly. - The logic here is to parse the `pyproject.toml` and fetch the listed `python` version. If it starts with a '^', we fetch the latest installed python version from the user's machine matching the major version. If the version is pinned, then we use that version. - Update docs to mention pyenv should be used. - Replace yarn with pnpm in getting started.
1 parent 2574f73 commit 984d71e

File tree

15 files changed

+926
-324
lines changed

15 files changed

+926
-324
lines changed

.projen/tasks.json

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/getting_started/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ Other prerequisites depend on the language in which you develop AWS PDK projects
200200
- `YARN` [if `--package-manager` flag is unset]: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
201201

202202
=== "PYTHON"
203-
- `Python >= 3.9`: https://github.com/pyenv/pyenv
203+
- `Python >= 3.11`: We highly recommend using [PyEnv](https://github.com/pyenv/pyenv) to manage your Python environments.
204204
- `Poetry >= 1.5.1`: https://python-poetry.org/docs/
205-
- `YARN`: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
205+
- `PNPM >= 8.6.3`: https://pnpm.io/installation
206206

207207
=== "JAVA"
208-
- `YARN`: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
208+
- `PNPM >= 8.6.3`: https://pnpm.io/installation
209209

210210
### Install the AWS CDK
211211

packages/cloudscape-react-ts-website/src/cloudscape-react-ts-website-project.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as path from "path";
55
import { TypeSafeApiProject } from "@aws/type-safe-api";
66
import * as Mustache from "mustache";
77
import { SampleDir } from "projen";
8-
import { NodeProject } from "projen/lib/javascript";
8+
import { NodePackageManager, NodeProject } from "projen/lib/javascript";
99
import { ReactTypeScriptProject } from "projen/lib/web";
1010
import { ReactTypeScriptProjectOptions } from "./react-ts-project-options";
1111

@@ -59,7 +59,7 @@ export class CloudscapeReactTsWebsiteProject extends ReactTypeScriptProject {
5959
packageManager:
6060
options.parent && options.parent instanceof NodeProject
6161
? options.parent.package.packageManager
62-
: options.packageManager,
62+
: options.packageManager ?? NodePackageManager.PNPM,
6363
readme: {
6464
contents: fs
6565
.readFileSync(

packages/cloudscape-react-ts-website/test/__snapshots__/cloudscape-react-ts-website-project.test.ts.snap

+60-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)