Commit cb858974 authored by Guilhem Saurel's avatar Guilhem Saurel

forget support of py2 in focal

ref https://git.openrobots.org/issues/274:
boost python is not available for python 2 in focal.
parent c8d4f05b
Pipeline #10615 passed with stage
in 8 minutes and 17 seconds
# Generated by Django 3.0.9 on 2020-08-10 08:12
from django.db import migrations, models
def fix_py2(apps, schema_editor):
Target = apps.get_model('rainboard', 'Target')
focal = Target.objects.get(name='20.04')
focal.py2_available = False
focal.save()
focal.image_set.filter(py3=False).delete()
class Migration(migrations.Migration):
dependencies = [
('rainboard', '0050_buster'),
]
operations = [
migrations.AddField(
model_name='target',
name='py2_available',
field=models.BooleanField(default=True),
),
migrations.RunPython(fix_py2),
]
......@@ -772,6 +772,7 @@ class TargetQuerySet(models.QuerySet):
class Target(NamedModel):
active = models.BooleanField(default=True)
main = models.BooleanField(default=False)
py2_available = models.BooleanField(default=True)
objects = TargetQuerySet.as_manager()
......@@ -823,6 +824,8 @@ class Robotpkg(NamedModel):
for target in Target.objects.active():
for py3 in py3s:
for debug in debugs:
if not target.py2_available and not py3:
continue
Image.objects.get_or_create(robotpkg=self, target=target, py3=py3, debug=debug)[0].update()
def update(self, pull=True):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment