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 make #24

Merged
merged 6 commits into from
Aug 22, 2023
Merged

Fix make #24

merged 6 commits into from
Aug 22, 2023

Conversation

chris-ha458
Copy link
Contributor

i'm trying to develop/contribute on my local environment and i am encountering some issues, so i am making PRs for my workaround/fixes

without this installation causes a warning on conda environments and an error on pip venvs
these dependencies neither seem to exist nor are they seem to be required
a proper `CONTRIBUTING.md` , style guide, precommit file would be hlepful as well
@@ -23,7 +23,7 @@ setup:
$(shell "${PROTOBUF_SETUP}")
$(shell "${OPENSSL_SETUP}")
which cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
which maturin || pip install maturin
which maturin || pip install maturin[patchelf]
Copy link
Member

Choose a reason for hiding this comment

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

should this optional dependency be in pyproject.toml too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that would be a good idea. I'll check how setting it up in venv operates when it is included in pyproject.toml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documentation regarding patchelf only mentions installing it with maturin itself with
pip install maturin[patchelf]
https://www.maturin.rs/installation
https://www.maturin.rs/distribution

This leads me to believe the way i did it is the way to go without further changing pyproject.toml itself
I'm looking into other projects using maturin with patchelf to see how other packages handle it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/search?q=maturin%5Bpatchelf%5D&type=code
It seems different projects approach it differently.
dolma is packaged and built with make files so it is necessary to be in the Makefile but i think having it in pyproject.toml as well can help with documentation and potential build alternatives as well.

I'll try to find the best way to implement it and add a commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added commit 2141d07

chris-ha458 and others added 3 commits August 22, 2023 14:14
This path reflects that dolma relies on patchelf because maturin does.
Also this way we use maturin's specific optional dependency of patchelf.
@soldni soldni merged commit 02ebf87 into allenai:main Aug 22, 2023
12 checks passed
@chris-ha458 chris-ha458 deleted the fix_make branch August 22, 2023 10:57
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.

2 participants