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 pyproject.toml to python bindings #1239

Merged
merged 3 commits into from
May 9, 2023

Conversation

twizmwazin
Copy link
Contributor

Adding a pyproject.toml allows tools like python-build and pip to know how to build a python package. Maturin is already very integrated with pyproject.toml. With this change, users will be able to install LibAFL from source into their python environment with just pip install git+https://github.com/AFLplusplus/LibAFL.git#subdirectory=bindings/python. Optionally, wheels could then be published to PyPI, and users would be able to get started with just pip install pylibafl, or similar.

@domenukk
Copy link
Member

domenukk commented May 2, 2023

This is cool! Do we want to also switch to pip from maturin in CI?

@twizmwazin
Copy link
Contributor Author

I can try at switching it over.

@domenukk
Copy link
Member

domenukk commented May 3, 2023

It also still seems to fail:

Run cd ./bindings/pylibafl && python3 -m venv .env && . .env/bin/activate && maturin develop && ./test.sh
💥 maturin failed
  Caused by: pyproject.toml is invalid
  Caused by: pyproject.toml is not PEP 517 compliant: invalid type: string "MIT OR Apache-2.0", expected a table with 'file' or 'text' key
Error: Process completed with exit code 1.

@twizmwazin twizmwazin force-pushed the python/pyproject-toml branch from f9377a8 to 0c5763b Compare May 4, 2023 20:31
@twizmwazin
Copy link
Contributor Author

@domenukk I've updated the CI as you suggested and have fixed the invalid license field. It seems as of right now pyproject.toml doesn't support specifying multiple license values directly. An alternative would be to create another license file that has both licenses contained and specify that file, but for now I've just marked both licenses in the classifiers field.

@domenukk
Copy link
Member

domenukk commented May 9, 2023

Thank you!

@domenukk domenukk merged commit be1d3da into AFLplusplus:main May 9, 2023
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