Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Only run npm when building from source #758

Merged

Conversation

BeyondEvil
Copy link
Contributor

Fixes: #747

scripts/npm.py Outdated
subprocess.check_output("npm ci", shell=True)
subprocess.check_output("npm run build", shell=True)
app_js = Path(self.root, "src", "pytest_html", "resources", "app.js")
if not app_js.exists():
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't this check also trigger after having it build once?
please check if the git folder exists first

always bui when the git folder isthere, and if its missing, perhaps print a warning and only build if the target file is missing

additionally instead of check_output, running it with subrocess.run(...,capture_output=True, check=True)
might provide better output

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated @RonnyPfannschmidt

Is that what you suggested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm... run is giving me issues...

Copy link
Member

Choose a reason for hiding this comment

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

Whops, missing shell=True

@BeyondEvil BeyondEvil force-pushed the beyondevil/fix-broken-sdist branch 3 times, most recently from 30334d6 to 6fdf1ec Compare November 3, 2023 08:27
@BeyondEvil BeyondEvil force-pushed the beyondevil/fix-broken-sdist branch from 6fdf1ec to d219e5f Compare November 3, 2023 16:56
@BeyondEvil BeyondEvil merged commit f6d3454 into pytest-dev:master Nov 3, 2023
28 checks passed
@BeyondEvil BeyondEvil deleted the beyondevil/fix-broken-sdist branch November 3, 2023 17:09
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.

npm should not be required to install pytest-html from pypi
2 participants