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 11, 2023
1 parent 6b9e442 commit 04c5f35
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 @@ -749,9 +749,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 @@ -760,14 +758,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 04c5f35

Please sign in to comment.