-
-
Notifications
You must be signed in to change notification settings - Fork 716
feat: Allow defining direct path to pyproject.toml #525
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
Changes from all commits
bf4765f
a75d4af
adfbe11
ef45c16
ef44157
e794079
062bbf5
853504c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[tool.poetry] | ||
name = "python3-9-app-src-poetry" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Your Name <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "python39_app_src_poetry", from = "src"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
colorful = "^0.5.5" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -690,10 +690,11 @@ def poetry_install_step(path, prefix=None, required=False): | |||||
else: | ||||||
step("poetry", runtime, path, prefix) | ||||||
hash(pyproject_file) | ||||||
poetry_lock_file = os.path.join(path, "poetry.lock") | ||||||
pyproject_path = os.path.dirname(pyproject_file) | ||||||
poetry_lock_file = os.path.join(pyproject_path, "poetry.lock") | ||||||
if os.path.isfile(poetry_lock_file): | ||||||
hash(poetry_lock_file) | ||||||
poetry_toml_file = os.path.join(path, "poetry.toml") | ||||||
poetry_toml_file = os.path.join(pyproject_path, "poetry.toml") | ||||||
if os.path.isfile(poetry_toml_file): | ||||||
hash(poetry_toml_file) | ||||||
|
||||||
|
@@ -1029,14 +1030,17 @@ def install_poetry_dependencies(query, path): | |||||
# 1. Emit files instead of temp_dir | ||||||
|
||||||
# pyproject.toml is always required by poetry | ||||||
pyproject_file = os.path.join(path, "pyproject.toml") | ||||||
pyproject_file = path | ||||||
if os.path.isdir(path): | ||||||
pyproject_file = os.path.join(path, "pyproject.toml") | ||||||
if not os.path.exists(pyproject_file): | ||||||
yield | ||||||
return | ||||||
|
||||||
# poetry.lock & poetry.toml are optional | ||||||
poetry_lock_file = os.path.join(path, "poetry.lock") | ||||||
poetry_toml_file = os.path.join(path, "poetry.toml") | ||||||
pyproject_path = os.path.dirname(pyproject_file) | ||||||
poetry_lock_file = os.path.join(pyproject_path, "poetry.lock") | ||||||
poetry_toml_file = os.path.join(pyproject_path, "poetry.toml") | ||||||
|
||||||
runtime = query.runtime | ||||||
artifacts_dir = query.artifacts_dir | ||||||
|
@@ -1085,13 +1089,13 @@ def copy_file_to_target(file, temp_dir): | |||||
pyproject_target_file = copy_file_to_target(pyproject_file, temp_dir) | ||||||
|
||||||
if os.path.isfile(poetry_lock_file): | ||||||
log.info("Using poetry lock file: %s", poetry_lock_file) | ||||||
log.info("Using poetry.lock file: %s", poetry_lock_file) | ||||||
n8felton marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
poetry_lock_target_file = copy_file_to_target(poetry_lock_file, temp_dir) | ||||||
else: | ||||||
poetry_lock_target_file = None | ||||||
|
||||||
if os.path.isfile(poetry_toml_file): | ||||||
log.info("Using poetry configuration file: %s", poetry_lock_file) | ||||||
log.info("Using poetry.toml configuration file: %s", poetry_toml_file) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of duplicates the
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was to be consistent with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The larger change and bug fix was having the output point to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yeah, noticed that part 👍 |
||||||
poetry_toml_target_file = copy_file_to_target(poetry_toml_file, temp_dir) | ||||||
else: | ||||||
poetry_toml_target_file = None | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.