-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add dev.py
implementing dev command shorthands
#3128
Conversation
Building pygame
Builds and installs pygame in editable mode by default. Can pass a flag to do a regular install. Either way, this command is bound to be faster and efficient than a Also has a flag to build in debug mode (optimizations turned off and debug symbols turned on) easily. Finally, this command also enables more warnings as errors by default to mimic CI as closely as possible. Again, there's a flag to opt out of this. Building docs
Running code format
Running lint
Generating and testing type stubs
Running tests
|
Converting it to a draft because there's still stuff to do.
|
0ef397a
to
d92a9e3
Compare
This PR is ready for review and suggestions. I have updated the CI to add a |
d92a9e3
to
6176e5c
Compare
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.
Lovely, these commands all work great locally on windows for me.
Should simplify the setup, and onboarding for new developers - especially once we've documented all these on the developer wiki pages.
6176e5c
to
207a083
Compare
Just added one commit, for supporting the |
@ankith26 So the last time I tested it I noticed it was nice but a little bit slower than usual because every command checks if every single module is installed. |
I would like to explore ways of speeding it up further, but I don't think What I could try to do, is somehow add a faster way to check that the version requirements match via pip itself, and therefore eliminate the networking call which I think is the reason for most of the initial slowdown |
207a083
to
8c802f8
Compare
In my latest commit I just implemented a solution that should speed up the startup time of the script. Basically I was trying to unconditionally upgrade pip in the script, and this can be slow or even error out because it does networking. Now I added logic that tests for the pip version and only attempts the upgrade if it's below some version threshold set. This way, this script now does 0 networking operations if all dependencies are in place and have expected versions. |
8488e97
to
1e2aa89
Compare
1e2aa89
to
dd9dbc4
Compare
pyproject.toml
Outdated
"cython<=3.0.11", | ||
"sphinx<=7.2.6", | ||
"sphinx<=8.1.3", |
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.
Are these just general package updates? I would like Sphinx in a different PR, usually each major version requires some docs reworking.
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.
I did check the docs after this change and everything seemed okay on a glance, but yeah maybe it should be a separate PR. The reason these bumps are needed is to get this PR pass msys2/multiarch tests because there we use preinstalled dependencies and if the version constraint does not match it triggers a reinstall, which can error on those exotic platforms
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.
I don't fully understand, but a random msys2 environment having preinstalled deps should not be setting our version constraints for us.
This is great stuff! I put down a few comments, the one I care most about is the sphinx one. But once those are resolved I will approve. |
dd9dbc4
to
a44143c
Compare
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.
Thanks for pushing some of the changes out of this PR.
Let's get this in!
This is an attempt at simplifying the steps a pygame-ce dev has to do to get out a complete working change that passes our CI.
Some goals