| 
6 | 6 | 
 
  | 
7 | 7 | import click  | 
8 | 8 | from packaging.requirements import Requirement  | 
9 |  | -import setuptools_scm  | 
10 | 9 | 
 
  | 
11 | 10 | from .ctx import Context  | 
12 | 11 | from .update_pyproject import ProjectUpdater  | 
@@ -39,24 +38,47 @@ def check_pyproject(ctx: Context):  | 
39 | 38 | @ci.command()  | 
40 | 39 | @click.option("--no-test", default=False, is_flag=True)  | 
41 | 40 | @click.pass_obj  | 
42 |  | -def run(ctx: Context, no_test: bool):  | 
 | 41 | +def build_other_wheels(ctx: Context, no_test: bool):  | 
43 | 42 |     """  | 
44 |  | -    Builds wheels, runs tests  | 
 | 43 | +    Builds wheels that don't use meson, runs tests  | 
45 | 44 |     """  | 
46 | 45 | 
 
  | 
47 |  | -    # Get the current build version  | 
48 |  | -    version = setuptools_scm.get_version()  | 
 | 46 | +    for project in ctx.subprojects.values():  | 
 | 47 | +        if project.is_meson_project():  | 
 | 48 | +            continue  | 
 | 49 | + | 
 | 50 | +        project.install_build_deps(wheel_path=ctx.wheel_path)  | 
 | 51 | +        project.build_wheel(wheel_path=ctx.wheel_path, install=True)  | 
 | 52 | +        if not no_test:  | 
 | 53 | +            project.test(install_requirements=True)  | 
 | 54 | + | 
 | 55 | +@ci.command()  | 
 | 56 | +@click.option("--no-test", default=False, is_flag=True)  | 
 | 57 | +@click.pass_obj  | 
 | 58 | +def build_meson_wheels(ctx: Context, no_test: bool):  | 
 | 59 | +    """  | 
 | 60 | +    Builds wheels that use meson, runs tests.   | 
 | 61 | +
  | 
 | 62 | +    Needs wheels that are in the non-meson builds  | 
 | 63 | +    """  | 
49 | 64 | 
 
  | 
50 | 65 |     # Fix build dependencies to be == what we are building  | 
51 | 66 |     # - install_requires already has this via ==THIS_VERSION in robotpy-build  | 
52 |  | -    for project in ctx.subprojects.values():  | 
53 |  | -        for i in range(len(project.build_requires)):  | 
54 |  | -            req = project.build_requires[i]  | 
55 |  | -            if req.name in ctx.subprojects:  | 
56 |  | -                project.build_requires[i] = Requirement(f"{req.name}=={version}")  | 
 | 67 | +    # for project in ctx.subprojects.values():  | 
 | 68 | +    #     for i in range(len(project.build_requires)):  | 
 | 69 | +    #         req = project.build_requires[i]  | 
 | 70 | +    #         if req.name in ctx.subprojects:  | 
 | 71 | +    #             project.build_requires[i] = Requirement(f"{req.name}=={version}")  | 
 | 72 | + | 
 | 73 | +    # Check that the build dependencies match the versions of the projects  | 
 | 74 | +    # that we're building  | 
 | 75 | + | 
57 | 76 | 
 
  | 
58 | 77 |     for project in ctx.subprojects.values():  | 
 | 78 | +        if not project.is_meson_project():  | 
 | 79 | +            continue  | 
 | 80 | + | 
59 | 81 |         project.install_build_deps(wheel_path=ctx.wheel_path)  | 
60 |  | -        project.bdist_wheel(wheel_path=ctx.wheel_path, install=True)  | 
 | 82 | +        project.build_wheel(wheel_path=ctx.wheel_path, install=True)  | 
61 | 83 |         if not no_test:  | 
62 | 84 |             project.test(install_requirements=True)  | 
0 commit comments