ensure-pip: use dummy package for testing

This currently uses zuul-client to test installation.  Unfortunately
for the testing the recent release dropped support for older pythons
we still need to test with.

To avoid this, make a dummy package that we include in zuul-jobs that
does nothing, but will also install anywhere.

Change-Id: Ia1beed2b21f39db4e2ab75258425d7897238ecf6
This commit is contained in:
Ian Wienand 2022-11-04 11:31:14 +11:00
parent 9429c2f601
commit db519e0e41
No known key found for this signature in database
7 changed files with 42 additions and 7 deletions

View File

@ -28,13 +28,13 @@
- name: Sanity check pip wheel generation
shell: |
cd {{ ansible_user_dir }}/src/opendev.org/zuul/zuul-client
cd {{ ansible_user_dir }}/src/opendev.org/zuul/zuul-jobs/tools/dummy-package
# This should run anywhere without too much logic ...
run_pip=$(command -v pip3 || command -v pip2 || command -v pip)
# Preinstall pbr to work around very old distutils lacking SNI support
$run_pip install pbr
$run_pip wheel --no-deps .
ls zuul_client-*.whl || exit 1
ls dummy_package*.whl || exit 1
- name: Test virtualenv
# NOTE(ianw) 2022-02-03 : not supported on 9-stream, see inline comments

View File

@ -28,13 +28,13 @@
- name: Sanity check pip wheel generation
shell: |
cd {{ ansible_user_dir }}/src/opendev.org/zuul/zuul-client
cd {{ ansible_user_dir }}/src/opendev.org/zuul/zuul-jobs/tools/dummy-package
# This should run anywhere without too much logic ...
run_pip=$(command -v pip3 || command -v pip2 || command -v pip)
# Preinstall pbr to work around very old distutils lacking SNI support
$run_pip install pbr
$run_pip wheel --no-deps .
ls zuul_client-*.whl || exit 1
ls dummy_package*.whl || exit 1
- name: Test virtualenv
# NOTE(ianw) 2022-02-03 : not supported on 9-stream, see inline comments

View File

@ -0,0 +1 @@
This is a dummy package to testing building wheels

View File

@ -0,0 +1,2 @@
def console():
print("DUMMY PACKAGE")

View File

@ -0,0 +1,32 @@
[metadata]
name = dummy-package
version = 0.0.1
summary = Dummy Package
description-file =
README.rst
author = OpenStack Infrastructure Team
author-email = openstack-infra@lists.openstack.org
home-page = http://docs.opendev.org/infra/system-config/
classifier =
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 2.6
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
[files]
packages =
dummy_package
[entry_points]
console_scripts =
dummy-package = dummy_package:console

View File

@ -0,0 +1,3 @@
import setuptools
setuptools.setup()

View File

@ -1,9 +1,6 @@
- job:
name: zuul-jobs-test-ensure-pip
description: Test the ensure-pip role
# dummy project for wheel build test
required-projects:
- zuul/zuul-client
files:
- roles/ensure-pip/.*
- roles/ensure-virtualenv/.*