[openstack-dev] [requirements][infra] Maintaining constraints for several python versions

Tony Breeds tony at bakeyournoodle.com
Thu Jul 12 04:34:57 UTC 2018


Hi Folks,
    We have a pit of a problem in openstack/requirements and I'd liek to
chat about it.

Currently when we generate constraints we create a venv for each
(system) python supplied on the command line, install all of
global-requirements into that venv and capture the pip freeze.

Where this falls down is if we want to generate a freeze for python 3.4
and 3.5 we need an image that has both of those.  We cheated and just
'clone' them so if python3 is 3.4 we copy the results to 3.5 and vice
versa.  This kinda worked for a while but it has drawbacks.

I can see a few of options:

1. Build pythons from source and use that to construct the venv
   [please no]

2. Generate the constraints in an F28 image.  My F28 has ample python
   versions:
     - /usr/bin/python2.6
     - /usr/bin/python2.7
     - /usr/bin/python3.3
     - /usr/bin/python3.4
     - /usr/bin/python3.5
     - /usr/bin/python3.6
     - /usr/bin/python3.7
   I don't know how valid this still is but in the past fedora images
   have been seen as unstable and hard to keep current.  If that isn't
   still the feeling then we could go down this path.  Currently there a
   few minor problems with bindep.txt on fedora and generate-constraints
   doesn't work with py3 but these are pretty minor really.

3. Use docker images for python and generate the constraints with
   them.  I've hacked up something we could use as a base for that in:
      https://review.openstack.org/581948

   There are lots of open questions:
     - How do we make this nodepool/cloud provider friendly ?
       * Currently the containers just talk to the main debian mirrors.
         Do we have debian packages? If so we could just do sed magic.
     - Do/Can we run a registry per provider?
     - Can we generate and caches these images and only run pip install -U
       g-r to speed up the build
     - Are we okay with using docker this way?

I like #2 the most but I wanted to seek wider feedback.



Yours Tony.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180712/74ae74b1/attachment.sig>


More information about the OpenStack-dev mailing list