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

Add pip metadata for scallopy #35

Merged
merged 1 commit into from
Dec 4, 2024
Merged

Conversation

ControlNet
Copy link
Contributor

@ControlNet ControlNet commented Dec 2, 2024

The current installation of scallopy requires cloning the repository then use make or maturin to install the library.

In this PR, I added the pyproject.toml to scallopy subfolder, and added a declaration of used features in core/src/lib.rs, allowing it can be directly installed by pip.

With these changes, users can install scallopy by

pip install ./etc/scallopy

Or even NO NEED TO CLONE.

pip install "git+https://github.com/scallop-lang/scallop.git#egg=scallopy&subdirectory=etc/scallopy"

I believe this contribution can improve the package distribution process. As it is compiling from source, there should be no Python version and CPU architecture constrain.

Copy link
Contributor

@Liby99 Liby99 left a comment

Choose a reason for hiding this comment

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

Thank you so much for the PR and the change to scallopy looks good to me. In terms of this specific feature flag can you double check why is it needed? Other than that I'm happy to merge the PR.

@@ -2,6 +2,7 @@
#![feature(extract_if)]
#![feature(hash_extract_if)]
#![feature(proc_macro_span)]
#![feature(iter_repeat_n)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why is this needed because the latest Rust distribution seems to have stabilized the feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, without adding it, the installing scallopy using pip will fail. Sorry I'm not very familiar with rust. I think you can also try running pip install ./etc/scallopy and see what happened if not adding this feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. The checks have passed anyway so I'll move ahead and merge the PR.

Copy link
Contributor

@Liby99 Liby99 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Liby99 Liby99 merged commit f8fac18 into scallop-lang:master Dec 4, 2024
2 checks passed
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