Skip to content

Conversation

@jtraglia
Copy link
Member

@jtraglia jtraglia commented Jan 22, 2025

This PR moves dependency definitions to a new pyproject.toml file.

This has the following benefits:

  • We can remove the "hacky" installPackage function from setup.py:

consensus-specs/setup.py

Lines 49 to 65 in b73f3bd

# NOTE: have to programmatically include third-party dependencies in `setup.py`.
def installPackage(package: str):
subprocess.check_call([sys.executable, '-m', 'pip', 'install', package])
RUAMEL_YAML_VERSION = "ruamel.yaml==0.17.21"
try:
import ruamel.yaml
except ImportError:
installPackage(RUAMEL_YAML_VERSION)
from ruamel.yaml import YAML
MARKO_VERSION = "marko==1.0.2"
try:
import marko
except ImportError:
installPackage(MARKO_VERSION)

  • All dependencies are located in a single file, which makes it easier to manage.
  • No longer need requirements_preinstallation, as these are defined in [build-system] now.
  • All of the imports in setup.py can now be moved to the top of the file.
    • I've also ordered these alphabetically & broken them up into sections.

@jtraglia jtraglia added the enhancement New feature or request label Jan 22, 2025
@jtraglia jtraglia marked this pull request as ready for review January 22, 2025 18:34
@jtraglia jtraglia merged commit b1de7ef into ethereum:dev Jan 22, 2025
17 of 23 checks passed
@jtraglia jtraglia deleted the pyproject-toml branch January 22, 2025 18:35
@cheyenne-bot
Copy link

how to start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants