Open Lumesque opened 2 days ago
I definitely appreciate the effort that went into this after my recent foray into compiling pygame-ce on nix myself recently. @Starbuck5 @robertpfeiffer @ankith26 thoughts?
I'll try to take a good look at it in the next couple of days, I've got a long weekend coming up, so I should have the time
Nice work! As such, I don't think any of the active pygame-ce developers are regular Nix users, so we probably won't be able to test it out to confirm if it works.
Though I would like to point out one thing, going over the code. We are gradually moving away from the old setup.py
based config to a newer meson-python
based buildconfig. The old buildconfig is still in the source tree, and I can see that you are making use of it, but if possible I would recommend using the new one.
Ty!
We are gradually moving away from the old
setup.py
based config to a newermeson-python
based buildconfig.
Is there anywhere that I can find an example of how its run?
For building wheels, you can invoke the one of the standard wheel tools: pypa/wheel
or pypa/build
Just got around to exploring this with a brand new NixOS install. Here's the point I'm at
It's a VM, so I expected some weird fails (like the time module), but I got some fails that seem unrelated to that
Maybe this one is still related to it being a VM, so running slow?
I also had a bunch of fails due to tests being unable to write to the file system, which I suppose is a nix issue that I just don't know how to fix
Here's the nix.shell
that I used
I was able to play the aliens example though, and everything seemed to be working fine (pretty low fps for that example and I had some really intermittent audio, but I blame the VM)
Now that I look further, did I even do it correctly? Your overlay restricts to python 3.12 right? @Lumesque
Now that I look further, did I even do it correctly? Your overlay restricts to python 3.12 right? @Lumesque
Yeah I currently only have it set to be able to run in Python 3.12, ideally if you run 'nix flake init -t "github:Lumesque/pygame-ce-overlay#init"' and then run 'nix develop' you'd enter the correct corresponding shell
That being said, if you download it manually not using the overlay it probably still puts it in your path and therefore Python can still find it is my guess
Yep, that's looking better
I'm gonna have to install this directly instead of a VM lol. The test suite keeps segfaulting the VM and I have no idea why
Lmao weird that it segfaults the whole vm, I can probably test it on my end my laptop has NixOs installed if you give me what you want me to run
python -m pygame.tests
lol
I get these errors when I run python -m pygame.tests on it, don't fully know what they mean/why they'd happen
That means that a test or two didn't run/complete (probably segfault)
I suspect it was pygame.transform
s tests
Mind running python -m pygame.tests transform
and see what happens?
Ran that one and that one seems to pass, the window one fails tho, wonder if it's just something with my laptop display 'cause its intel integrated graphics not a full on gpu maybe?
Hmmmmm, that particular error is interesting because it's ensuring that the window borrowed from pygame.display doesn't have opengl support when it wasn't originally created with opengl support Interesting that it fails
Prob. will mess with it in pdb later, sounds kinda wild
I don't know that pdb is enough lol. That's all done in C. I guess I'll have to install on bare metal and run some debug builds
lmao unlucky, I wonder if we're at the point where it might also just be how my nixos configuration is set up, I don't definitively define opengl anywhere in there for when it builds the os
That's why I'm focusing on testing. I suspect it's a nix-specific problem, but I don't know enough to guarantee that right now. Maybe @robertpfeiffer would have more direct knowledge?
BTW, we have a discord server, so if you would prefer that mode of communication, you can join the server and continue this topic there :)
Description
I created an overlay for pygame-ce for support on Nix for putting it into python projects either on nixos or on the default systems nix supports in its package manager, wanted to see what you guys thought/wanted out of it that isn't set up, and if any documentation is missing that would make it less confusing (and make sure it's okay for me to keep it up anyway)
Currently allows for using in a flake, or calling directly in
nix shell 'github:Lumesque/pygame-ce-overlay'