Setuptools: Add Azure pipelines

Created on 22 Feb 2019  路  8Comments  路  Source: pypa/setuptools

I have heard very good things from @gaborbernat about Azure pipelines, and they support Linux, Mac and Windows all in one place. Given that Appveyor is often the build's bottleneck and Travis seems to be having trouble, it's probably a good idea to get this set up.

@vtbassmatt set up Azure pipelines for dateutil in this PR, so maybe we can use that as a template for setting it up here.

Needs Implementation enhancement help wanted

Most helpful comment

@jaraco @vtbassmatt I think it would still be fine to do this in baby-steps. Start with adding tests, then we can add the coverage (either because codecov starts supporting AP out of the box or we use the token method), and then we can start cutting down the Travis and Appveyor build matrices.

Releasing with AP can come later I think. I think there's a way to do it with secure environment variables and the right permissions, but I am not confident enough to do that myself.

All 8 comments

I can assist with this if needed 馃憤

Hey folks. I'm going to take a swing at this one. I'll probably need help finishing it - especially integrations to services like Codecov. 馃殌

I've also had some success with pip-run on Azure Pipelines. I'm still blocked currently not knowing how to cut releases, and my tests currently only run on Linux... so the functionality is limited, but working.

@jaraco @vtbassmatt I think it would still be fine to do this in baby-steps. Start with adding tests, then we can add the coverage (either because codecov starts supporting AP out of the box or we use the token method), and then we can start cutting down the Travis and Appveyor build matrices.

Releasing with AP can come later I think. I think there's a way to do it with secure environment variables and the right permissions, but I am not confident enough to do that myself.

I've got the Linux and Mac legs working nicely. Still fighting with Windows -- I can't even get it to run nicely on my local machine yet. I did python bootstrap.py followed by tox, but I get a bunch of fun errors:

=================================== ERRORS ====================================
________________ ERROR collecting pkg_resources/py31compat.py _________________
.tox\python\lib\site-packages\py\_path\local.py:701: in pyimport
    __import__(modname)
E   ModuleNotFoundError: No module named 'pkg_resources.py31compat'
______________ ERROR collecting pkg_resources/_vendor/appdirs.py ______________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.appdirs', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\appdirs.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\appdirs.py'))
_____________ ERROR collecting pkg_resources/_vendor/pyparsing.py _____________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.pyparsing', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\pyparsing.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\pyparsing.py'))
________________ ERROR collecting pkg_resources/_vendor/six.py ________________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.six', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\six.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\six.py'))
________ ERROR collecting pkg_resources/_vendor/packaging/__about__.py ________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.packaging.__about__', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\packaging\\__about__.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\packaging\\__about__.py'))
_________ ERROR collecting pkg_resources/_vendor/packaging/_compat.py _________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.packaging._compat', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\packaging\\_compat.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\packaging\\_compat.py'))
_______ ERROR collecting pkg_resources/_vendor/packaging/_structures.py _______
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)
E   py._path.local.LocalPath.ImportMismatchError: ('pkg_resources._vendor.packaging._structures', 'c:\\users\\macoope\\projects\\setuptools\\.tox\\python\\lib\\site-packages\\pkg_resources\\_vendor\\packaging\\_structures.py', local('C:\\Users\\macoope\\Projects\\setuptools\\pkg_resources\\_vendor\\packaging\\_structures.py'))
_________ ERROR collecting pkg_resources/_vendor/packaging/markers.py _________
.tox\python\lib\site-packages\py\_path\local.py:721: in pyimport
    raise self.ImportMismatchError(modname, modfile, self)

(it goes on like this for a bit...)

It's probably something simple but I haven't had time to dig back in. Do you want a PR with only the Linux and Mac builds, or should I wait until I get Windows debugged?

@vtbassmatt I think anything would help, having something to iterate on is better than not, so Linux + Mac only should be fine, though I'm a bit surprised that the Windows stuff isn't working. The appveyor configuration seems pretty simple.

I figured out my local box issue (wasn't setting TOXENV to the Pythons I had available), and my colleague @willsmythe figured out the hosted agent issues. PR inbound (assuming this build is green!).

I see I completed the azure pipelines in fcc9680fd931645d0e6928a358d726daa1ab220e, including support for cutting releases, although I suspect now there's a race between Travis and Azure to cut releases, so one of them will fail. I'm okay with that for now.

Was this page helpful?
0 / 5 - 0 ratings