consensus-specs icon indicating copy to clipboard operation
consensus-specs copied to clipboard

Use pyproject.toml to install build dependencies.

Open SamWilsn opened this issue 1 year ago • 4 comments

For whatever reason, installing using pip within pip doesn't work in pypy. Presumably because of something to do with build isolation. This commit adds a pyproject.toml with the required packages, so that the dependencies are installed before entering setup.py.

SamWilsn avatar Feb 22 '24 19:02 SamWilsn

Saw this comment at https://github.com/ethereum/consensus-specs/issues/1596#issuecomment-579045366

pyproject.toml

Agree it's neat, but hesitant to introduce extra files into global scope of the specs repo. It's really just the regular setuptools setup, with some extra distutils commands. No exotic build system to reference.

maybe outdated maybe relevant :grinning:

megtog avatar May 07 '24 02:05 megtog

Unfortunately there is an exotic build system; it just happens to fit entirely in setup.py :rofl:

SamWilsn avatar May 07 '24 02:05 SamWilsn

My knowledge of Python packaging is quite limited. However, I would like to share my experience.

It seems with this pyprojet.toml change, one can import eth2spec at root directory (no need to cd ./tests/core/pyspec anymore, I saw people struggle with this when starting hacking on consensus-specs before)

megtog avatar May 07 '24 05:05 megtog

@hwwhww would you mind taking a peek at this? Would really help EELS.

SamWilsn avatar Jun 21 '24 18:06 SamWilsn

Hey @SamWilsn. Great minds think alike. I was unaware of this PR this when I made this:

  • https://github.com/ethereum/consensus-specs/pull/4093

Does this fix your issues?

jtraglia avatar Feb 26 '25 16:02 jtraglia