Skip to content

Commit 78f8ab1

Browse files
renamed poetry_extra_args to poetry_export_extra_args
1 parent b5ac9f4 commit 78f8ab1

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ source_path = [
459459
- `pip_requirements` - Controls whether to execute `pip install`. Set to `false` to disable this feature, `true` to run `pip install` with `requirements.txt` found in `path`. Or set to another filename which you want to use instead. When `source_path` is passed as a string containing a path (and not a list of maps), and `requirements.txt` is present, `pip install` is automatically executed.
460460
- `pip_tmp_dir` - Set the base directory to make the temporary directory for pip installs. Can be useful for Docker in Docker builds.
461461
- `poetry_install` - Controls whether to execute `poetry export` and `pip install`. Set to `false` to disable this feature, `true` to run `poetry export` with `pyproject.toml` and `poetry.lock` found in `path`. When `source_path` is passed as a string containing a path (and not a list of maps), and `pyproject.toml` with a build system `poetry` is present, `poetry export` and `pip install` are automatically executed.
462-
- `poetry_extra_args` - A list of additional poetry arguments to add to the poetry export command
462+
- `poetry_export_extra_args` - A list of additional poetry arguments to add to the poetry export command
463463
- `npm_requirements` - Controls whether to execute `npm install`. Set to `false` to disable this feature, `true` to run `npm install` with `package.json` found in `path`. Or set to another filename which you want to use instead.
464464
- `npm_tmp_dir` - Set the base directory to make the temporary directory for npm installs. Can be useful for Docker in Docker builds.
465465
- `prefix_in_zip` - If specified, will be used as a prefix inside zip-archive. By default, everything installs into the root of zip-archive.

package.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ def pip_requirements_step(path, prefix=None, required=False, tmp_dir=None):
694694
hash(requirements)
695695

696696
def poetry_install_step(
697-
path, poetry_extra_args=[], prefix=None, required=False
697+
path, poetry_export_extra_args=[], prefix=None, required=False
698698
):
699699
pyproject_file = path
700700
if os.path.isdir(path):
@@ -705,7 +705,7 @@ def poetry_install_step(
705705
"poetry configuration not found: {}".format(pyproject_file)
706706
)
707707
else:
708-
step("poetry", runtime, path, poetry_extra_args, prefix)
708+
step("poetry", runtime, path, poetry_export_extra_args, prefix)
709709
hash(pyproject_file)
710710
pyproject_path = os.path.dirname(pyproject_file)
711711
poetry_lock_file = os.path.join(pyproject_path, "poetry.lock")
@@ -809,7 +809,7 @@ def commands_step(path, commands):
809809
prefix = claim.get("prefix_in_zip")
810810
pip_requirements = claim.get("pip_requirements")
811811
poetry_install = claim.get("poetry_install")
812-
poetry_extra_args = claim.get("poetry_extra_args", [])
812+
poetry_export_extra_args = claim.get("poetry_export_extra_args", [])
813813
npm_requirements = claim.get("npm_package_json")
814814
runtime = claim.get("runtime", query.runtime)
815815

@@ -834,7 +834,7 @@ def commands_step(path, commands):
834834
poetry_install_step(
835835
path,
836836
prefix=prefix,
837-
poetry_extra_args=poetry_extra_args,
837+
poetry_export_extra_args=poetry_export_extra_args,
838838
required=True,
839839
)
840840

@@ -909,11 +909,13 @@ def execute(self, build_plan, zip_stream, query):
909909
(
910910
runtime,
911911
path,
912-
poetry_extra_args,
912+
poetry_export_extra_args,
913913
prefix,
914914
) = action[1:]
915-
log.info("poetry_extra_args: %s", poetry_extra_args)
916-
with install_poetry_dependencies(query, path, poetry_extra_args) as rd:
915+
log.info("poetry_export_extra_args: %s", poetry_export_extra_args)
916+
with install_poetry_dependencies(
917+
query, path, poetry_export_extra_args
918+
) as rd:
917919
if rd:
918920
if pf:
919921
self._zip_write_with_filter(zs, pf, rd, prefix, timestamp=0)
@@ -1108,7 +1110,7 @@ def install_pip_requirements(query, requirements_file, tmp_dir):
11081110

11091111

11101112
@contextmanager
1111-
def install_poetry_dependencies(query, path, poetry_extra_args):
1113+
def install_poetry_dependencies(query, path, poetry_export_extra_args):
11121114
# TODO:
11131115
# 1. Emit files instead of temp_dir
11141116

@@ -1206,7 +1208,7 @@ def copy_file_to_target(file, temp_dir):
12061208
"--output",
12071209
"requirements.txt",
12081210
"--with-credentials",
1209-
] + poetry_extra_args
1211+
] + poetry_export_extra_args
12101212

12111213
poetry_commands = [
12121214
[

0 commit comments

Comments
 (0)