-
Notifications
You must be signed in to change notification settings - Fork 442
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
feat: migrate from setup.py/setuptools to pyproject.toml/hatch #1163
base: master
Are you sure you want to change the base?
Conversation
This is an attempt both to modernize the packaging and to fix mypy testing in editable mode (issue #956). Packaging seems to work, but mypy testing still fails. Will now attempt to migrate from setuptools to hatch for building.
a071906
to
73441d2
Compare
pip install . | ||
pip install -r requirements/dev.txt | ||
|
||
bootstrap-dev-plugins: bootstrap-dev ## Install dev requirements and all supported plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any particular reasons for merging this? I get this is being made part of full, just thinking if someone was using this in their automation and can break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The make
are not supposed to be part of the Tutor API, so I think it's OK to make breaking changes here. The goal of this change is to get rid of an unused command.
pip-compile ${COMPILE_OPTS} requirements/base.in | ||
pip-compile ${COMPILE_OPTS} requirements/dev.in | ||
pip-compile ${COMPILE_OPTS} requirements/docs.in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for having COMPILE_OPTS? What values can it have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a technique that I also used in edx-platform to de-duplicate the list of *.in
files in the Makefile.
While investigating issue #956, I realized that the issue might be resolved if we switched from setuptools to hatch as package builder. But to achieve that, we also need to migrate from setup.py to pyproject.toml. This was a long overdue chore, as setup.py is no longer recommended (see PEP 621).
I'm not sure whether we should be merging this change now, later (or ever). I think this should be safe... So I would lean towards merging it now (and eventually migrate plugins and cookiecutter to pyproject.toml as well). But I'm curious what ya'll think @kdmccormick @DawoudSheraz.