Skip to content

Commit

Permalink
Add comment about removing xbuildenv check
Browse files Browse the repository at this point in the history
Co-Authored-By: Gyeongjae Choi <[email protected]>
  • Loading branch information
agriyakhetarpal and ryanking13 committed Sep 17, 2024
1 parent c079b1b commit 48d9e09
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pyodide_build/cli/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,23 @@ def new_recipe_pypi(
Create a new package recipe from PyPI or update an existing recipe.
"""

# Determine the recipe directory. If it is specified by the user, we use that;
# otherwise, we assume that the recipe directory is the ``packages`` directory
# in the root of the Pyodide tree, without the need to initialize the
# cross-build environment.
#
# It is unlikely that a user will run this command outside of the Pyodide
# tree, so we do not need to initialize the environment at this stage.

cwd = Path.cwd()
root = build_env.search_pyodide_root(curdir=cwd)

if not root:
root = cwd

if recipe_dir:
recipe_dir_ = Path(recipe_dir)
else:
cwd = Path.cwd()

if build_env.in_xbuildenv():
root = cwd
else:
root = build_env.search_pyodide_root(cwd) or cwd

recipe_dir_ = root / "packages"

if update or update_patched:
Expand Down

0 comments on commit 48d9e09

Please sign in to comment.