Two modules I made for PyWeek: maff and pygame-view

maff is a bunch of simple mathematical convenience functions that come up in games, like easing functions. I think some people might find it useful.


pygame-view is a module to help with supporting multiple window resolutions. I definitely tried to make it usable for everyone, but I know the way I solve this problem is a little unusual, so you may not like it. Still, let me know if you have any feedback or trouble with it.

Cosmologicon on 2017/07/15 14:46


Comments: (log in to comment)

You should make these pip installable!


Also, you'd get great results if you Cythonise maff. I might submit a PR to do just that.

That's a great idea, I'd love to! Unfortunately I have never been able to get pip to work for me reliably. Every PyWeek I spend a couple hours on it and eventually end up with the person helping me going, "Huh, it's not supposed to do that. It works for me." I feel cursed. :)


I'll give it another try this time. Got any recommendations for how to get help? I'm on Ubuntu.

There are tutorials and lots of documentation, which is how I learned. For a one-module package your setup.py is mostly metadata and just py_modules=['module_name']. Here's an example. Then you run

    $ python setup.py sdist upload

That said, there are shortcuts!

pbr automatically configures your package by introspecting things like READMEs and requirements.txt and Git tags.

cookiecutter can set you up a complete repo layout, with a setup.py done in the standard way, and preconfigured with py.test and tox, and integrations for things like Travis and pyup. I used that for flake8-html.

Ha, trust me, when it comes to pip, no matter how straightforward the tutorial, I will find a way to mess it up. If you happen to know of any tutorial that have troubleshooting for error messages on Ubuntu, I might have a chance. Otherwise I'm almost certain I'll wind up asking for help.


If I'm lucky, whatever advice I get won't just make things worse, but that'll be a first.

Did you see my PR for maff?