Skip to content

Commit

Permalink
Revert "Partially remove reliance on setup.py for micropackaging"
Browse files Browse the repository at this point in the history
This reverts commit fd3efa8.
  • Loading branch information
astrojuanlu committed May 11, 2023
1 parent 0a5ac42 commit 82fa4fd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions kedro/framework/cli/micropkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,9 @@ def _generate_sdist_file(
raise KedroCliError(f"{cls.__module__}.{cls.__qualname__}: {exc}") from exc

_generate_manifest_file(temp_dir_path)
_generate_setup_file(package_name, version, install_requires, temp_dir_path)
setup_file = _generate_setup_file(
package_name, version, install_requires, temp_dir_path
)

package_file = destination / _get_sdist_name(name=package_name, version=version)

Expand All @@ -758,14 +760,14 @@ def _generate_sdist_file(
f"Package file {package_file} will be overwritten!", fg="yellow"
)

# python -m build --sdist --outdir <destination>
# python setup.py sdist --formats=gztar --dist-dir <destination>
call(
[
sys.executable,
"-m",
"build",
"--sdist",
"--outdir",
str(setup_file.resolve()),
"sdist",
"--formats=gztar",
"--dist-dir",
str(destination),
],
cwd=temp_dir,
Expand Down

0 comments on commit 82fa4fd

Please sign in to comment.