Skip to content

Commit

Permalink
Refs #774
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Oct 17, 2023
1 parent c70832e commit ba782fd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fixtures/pyproject.toml/poetry-yaml-fm/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# pyproject. toml
# ---
# pkgx:
# python@3.10
# ---

[tool-poetry]
name = "magicaitrainer"
version = "0.1.0"
description =
authors = ["jlphilli"]
readme = "README. md"
3 changes: 3 additions & 0 deletions fixtures/pyproject.toml/poetry/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool-poetry.dependencies]
python = "3.11.4"
1 change: 1 addition & 0 deletions src/utils/devenv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Deno.test("devenv.ts", async runner => {
[".ruby-version", "ruby-lang.org@3.2.1"],
["yarn.lock", "yarnpkg.com"],
["bun.lockb", "bun.sh>=1"],
["pyproject.toml/poetry-yaml-fm/pyproject.toml", "pip.pypa.io", "python.org~3.10"],
]

for (const [keyfile, ...deps] of keyfiles) {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/devenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ export default async function(dir: Path) {
}

async function pyproject(path: Path) {
//TODO parse the TOML lol!

const content = await path.read()
if (content.includes("poetry.core.masonry.api")) {
pkgs.push({project: "python-poetry.org", constraint})
Expand Down

0 comments on commit ba782fd

Please sign in to comment.