Skip to content

PyProject.toml#10

Open
CLOVIS-AI wants to merge 3 commits into
serpilliere:rust_versionfrom
CLOVIS-AI:python/pyproject
Open

PyProject.toml#10
CLOVIS-AI wants to merge 3 commits into
serpilliere:rust_versionfrom
CLOVIS-AI:python/pyproject

Conversation

@CLOVIS-AI

Copy link
Copy Markdown

Sister PR: https://github.com/serpilliere/miasm-rs/pull/77

The pyproject.toml file was introduced in PEP 518 as a single source of truth for package information, in particular build-time dependencies. It simplifies development by giving to automated tools all information they need.

Concretely, here is how installing miasm looked like previously:

apt-get install python-setuptools  # Debian-only
cd miasm
pip install -r requirements.txt
pip install -r optional_requirements.txt  # or select just the ones you want
pip install .

Here is how it looks like now:

cd miasm-rs
pip install .

This gives more flexibility with regards to optional dependencies. For example if you previously wanted Z3 but not the other optional dependencies:

pip install z3-solver==<version>  # not 'pip install z3'!
pip install .

Now, it's possible to just:

pip install '.[z3]'

To install all optional dependencies:

pip install '.[full]'

This optional dependency management carries over via PyPI: if this is ever published there, pip install miasm[llvm] will allow users to install Miasm with llvmlite without having to look at the versions in the optional_requirements.txt file, etc.

CLOVIS-AI added 3 commits July 8, 2022 10:11
The pyproject.toml format allows pip to install build dependencies transparently without an additional 'pip install -r requirements.txt' call.

More information at https://peps.python.org/pep-0518/
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.

1 participant