-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
build!: Declarative builds via pyproject.toml #17174
Conversation
There was an attempt to switch to declarative setup, which was to use setup.cfg. However, we've made more progress in the "world of packaging" since. Also, given we're using a pyproject file already to govern certain aspects of our project maintenance, it's probably a good time to bring these things together. bye-bye to clutter and confusion in maintaining multiple files and formats. We've used setuptools to package frappe for the longest time. Maybe since the first editable installation. Howver setuptools doesn't support PEP 660 yet which supports editable installs via pyproject file. So why now? Primarily because I wanted to start tracking system dependencies for Frappe. Doing so through pyproject file made the most sense. This change seemed to be the obvious pre-requisite for the upcoming changes to our packaging systems. Sys deps tracking: frappe#13811 Flit docs: https://flit.pypa.io/en/latest/pyproject_toml.html Previous attempt: frappe#10773 Which build tool: https://stackoverflow.com/a/69711730/10309266 PEP 660: https://peps.python.org/pep-0660/
Oops, gotta make bench ready for this first 😿 |
Codecov Report
@@ Coverage Diff @@
## develop #17174 +/- ##
===========================================
- Coverage 54.45% 52.82% -1.64%
===========================================
Files 754 752 -2
Lines 67782 67742 -40
Branches 5769 5765 -4
===========================================
- Hits 36910 35783 -1127
- Misses 26822 27813 +991
- Partials 4050 4146 +96
Flags with carried forward coverage won't be shown. Click here to find out more. |
setup.py is maintained so that there is no hard dependency on bench v5.11.0 and people get enough time to update their CLI. Hope the TODO adds a subtle reminder for the future ;)
ce71cac
to
cb28af8
Compare
Frappe is now compatible with bench v5.11.0 even without |
19ec394
to
1c6b6e1
Compare
- Cache invalidated if any of the files change: *requirements.txt, pyproject.toml, setup.py or setup.cfg - Updated boilerplate for new apps too
1c6b6e1
to
1b6cc6a
Compare
e8672e7
to
21bad02
Compare
ERPNext CI (just in case...) - https://github.com/frappe/erpnext/actions/runs/2501569276 |
Changes
Words
There was an attempt to switch to declarative setup (2 years ago), which was to use
setup.cfg
. However, we've made more progress in the "world of packaging"since. Also, given we're using a
pyproject.toml
file already to governcertain aspects of our project maintenance, it's probably a good time to
bring these things together. bye-bye to clutter and confusion in
maintaining multiple files and formats.
We've used setuptools to package frappe for the longest time. Maybe
since the first editable installation. However, setuptools doesn't support
PEP 660 yet which supports editable installs via pyproject file.
So why now? Primarily because I wanted to start tracking system
dependencies for Frappe. Doing so through pyproject file made the most
sense. This change seemed to be the obvious pre-requisite for the
upcoming changes to our packaging systems.
Refs
System dependency tracking: #13811
Moving app meta to toml: #15675
Flit docs: https://flit.pypa.io/en/latest/pyproject_toml.html
Previous attempt: #10773
Which build tool: https://stackoverflow.com/a/69711730/10309266
PEP 660: https://peps.python.org/pep-0660/