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

📦 Use nodeenv when Node.js can't be found by Python package #1487

Merged
merged 14 commits into from
Sep 3, 2024

Conversation

agoose77
Copy link
Contributor

Fixes #1443 by using nodeenv to provision a Node.js environment for installs of our Python package.

Here's an example running in Podman (the final crash appears container related)
https://github.com/user-attachments/assets/9ca90520-f1fa-4d37-a6da-a64edc5f0a83

Copy link

changeset-bot bot commented Aug 22, 2024

⚠️ No Changeset found

Latest commit: f7b6df8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@agoose77 agoose77 requested a review from fwkoch August 22, 2024 15:46
@agoose77
Copy link
Contributor Author

@rowanc1 I've added an input call (that can be bypassed by defining the MYSTMD_ALLOW_NODENV env var, where the result depends upon the truthiness ({"yes", "true", "1", "y"}) of the lowercased value.

@rowanc1
Copy link
Collaborator

rowanc1 commented Aug 23, 2024

Can you rebase this on the docs PR that just got merged. My understanding is that this will simplify the pip install instructions?

@agoose77 agoose77 force-pushed the agoose77/feat-nodeenv-binary branch from 85b5ea0 to 1eaeebe Compare August 23, 2024 14:51
@agoose77
Copy link
Contributor Author

agoose77 commented Aug 28, 2024

I have lifted the custom build hook into https://github.com/jupyter-book/hatch-deps-selector/, which means that others can also use it.

Simply put, this plugin makes it possible for us to add additional predefined dependencies to our package metadata at build-time by setting an environment variable.

We will update our conda-forge deployment to reflect this.

@agoose77
Copy link
Contributor Author

This PR now should hold until conda-forge/staged-recipes#27417 is merged, so that we can immediately update our feedstock recipe.

@agoose77 agoose77 added blocked Waiting for another task to be compled and removed blocked Waiting for another task to be compled labels Aug 28, 2024
@agoose77
Copy link
Contributor Author

@rowanc1 conda-forge now ships the new package required to make this work :)

@agoose77
Copy link
Contributor Author

agoose77 commented Sep 3, 2024

Adding a pre-built wheel to test on Windows...
mystmd-1.3.6-py3-none-any.whl.zip

@agoose77
Copy link
Contributor Author

agoose77 commented Sep 3, 2024

@rowanc1 this has been tested on Windows and Linux, and works as expected. We can review during today's meeting if helpful.

@rowanc1 rowanc1 merged commit ce313e3 into main Sep 3, 2024
7 checks passed
@rowanc1 rowanc1 deleted the agoose77/feat-nodeenv-binary branch September 3, 2024 15:11
@rowanc1 rowanc1 changed the title 📦 Use nodeenv when Node.js can't be found by Python package 📦 Use nodeenv when Node.js can't be found by Python package Sep 3, 2024
This pull request was closed.
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.

Bundle NodeJS with mystmd so users don't have to install it on their own
2 participants