Skip to content

Commit

Permalink
Partially remove reliance on setup.py for micropackaging
Browse files Browse the repository at this point in the history
Incomplete effort, see gh-2414.

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
  • Loading branch information
astrojuanlu committed May 9, 2023
1 parent d9427f2 commit fd3efa8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions kedro/framework/cli/micropkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,7 @@ def _generate_sdist_file(
raise KedroCliError(f"{cls.__module__}.{cls.__qualname__}: {exc}") from exc

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

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

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

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

0 comments on commit fd3efa8

Please sign in to comment.