Unify C Extesions building

@mjpieters I see you do more sophisticated work here than aiohttp does.
I want to keep azure config as close as possible for all multidict, yarl, frozenlist, and aiohttp libraries.
Building C extensions properly is not an easy task; let’s reuse the best practices.

I suggest considering selecting a single approach and using it everywhere.
Now yarl and aiohttp have mostly overlapped CI config; I’m working on multidict conversion.
https://github.com/aio-libs/azure-pipelines contains shared templates; it simplifies things a lot.

Would you work on the unification? I did not dig into your $ {{ each ... }} builders yet, but I have a feeling that the config should be as easy as possible; all the complicated stuff should be in aio-libs/azure-pipelines templates.


Ideally the projects all work with the same steps; make cythonize and then just build. We could perhaps unify the ‘pure python’ environment variable to minimize the differences further?

The only ‘complicated’ thing my build does is use templating to create the build matrix. Because continueOnFailure can’t be parameterized outside templates, I did have to move the test steps to a separate template, and create a separate job where the python version can be missing and not fail the test (it becomes ‘success with issues’).

The names unification now looks like AIOHTTP_NO_EXTENSIONS, YARL_NO_EXTENSIONS etc.

It allows to run aiohttp without extensions but with accelerated yarl. Not sure how this is important though.

I was envisioning a single build template that all projects could use, and that would be made easier if all the projects used the same signal to disable Cython compilation.

Given that aiohttp would run the tests with yarl installed from PyPI (a wheel, hopefully), it shouldn’t make any difference to the yarl package if aiohttp was running pure-python tests or used compiled extensions, right? Installing dependencies could easily be separated out and not have the flag set.

But you are right, it’s not that important, just trying to look at possible options to make unification easier.