Skip to content

Conversation

@Xmader
Copy link
Member

@Xmader Xmader commented Aug 17, 2023

To test this, add --no-binary pythonmonkey flag to pip install to forcibly install from source code.

build.py Outdated

def build():
execute("git submodule update --init --recursive", cwd=TOP_DIR)
execute("git submodule update --init --recursive || echo 'Skipping. We are installing from an sdist tarball.'", cwd=TOP_DIR)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for the git submodule update --init --recursive again? If it's not necessary in build, I'm not sure why it should go in build.py, if this is for the tests or something like this, wouldn't it be better suited in whichever startup script is responsible for the tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only used for the commonjs test suite right now.

However, setup.sh script is also executed if install from .tar.gz sdist.

execute("bash ./setup.sh", cwd = TOP_DIR)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve, but I think we should consider moving the submodule update to somewhere else.

I think it's important to keep in mind the semantics of tools. In this case build.py is meant to be the necessary components to build the wheel. Calling bash ./setup.sh is absolutely necessary for building the wheel as we necessarily need the spidermonkey lib. However the commonjs test suite is not necessary for building the wheel.

Ex: If it's only needed for the commonjs test suite, perhaps peter-junior can be updated to run a setup script that runs the git submodule update.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. How about moving it to tests/js/commonjs-modules.bash?

Copy link
Contributor

@Hamada-Distributed Hamada-Distributed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with minor note.

@Hamada-Distributed Hamada-Distributed merged commit a7e1bcc into main Sep 1, 2023
@Xmader Xmader deleted the Xmader/fix/install-from-sdist branch September 1, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants