linuxlizard / pymake

Parse GNU Makefiles with Python. Work in progress!
GNU General Public License v2.0
31 stars 9 forks source link

Move pymake into its own module #2

Closed Delaunay closed 1 year ago

Delaunay commented 1 year ago

I would like to use pymake for another project, so I turned it into a package that will be installable using pip. I also added github action CI.

You can merge it if you like the change.

linuxlizard commented 1 year ago

Holy cheese, thank you! Give me a couple days to look this over and learn how everything is laid out now.

Delaunay commented 1 year ago

in a nutshell everything is inside a new folder/module pymake

so all the imports had to be modified to be from vline import to from pymake.vline import or from import vline to import pymake.vline as vline

The rest is pretty much the same, IIRC i moved a few test_XYZ to the test folder for consistency. I would have liked to maybe move the test makefiles to their own folder but I did not want to modify too much, it is your project after all.

I also modified test_makefile to run each test file separately to get a bit of a more detailed report when one of the test file fails.

There are a few tests that are failing https://github.com/Delaunay/pymake/actions/runs/3971994324/jobs/6809464819 but I do not think it is related to the change

linuxlizard commented 1 year ago

I will move all those test makefiles into the test directory next.

Thank you for fixing test_makefile()! I wasn't sure how to do that. A fixture is perfect.

The test failures are probably because of some older code I haven't fixed yet.

This is perfect timing because I'm about to embark on some big changes to better handle Recipes. I've been too optimistic, to say the least, in my handling of leading tabs (aka recipeprefix).

linuxlizard commented 1 year ago

Merged! I'm going to spend today getting all the tests 100% again. And finally learning Tox.