Skip to content

Commit

Permalink
remove gitlab commands
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
dhellmann committed May 31, 2024
1 parent 7626fa9 commit ba878e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 324 deletions.
23 changes: 2 additions & 21 deletions src/fromager/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
import sys

from packaging.requirements import Requirement
from packaging.utils import parse_wheel_filename

from . import (context, finders, jobs, overrides, rpms, sdist, server,
settings, sources, wheels)
from . import (context, finders, overrides, rpms, sdist, server, settings,
sources, wheels)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -98,9 +97,6 @@ def _get_argument_parser():
parser_canonicalize.set_defaults(func=do_canonicalize)
parser_canonicalize.add_argument('toplevel', nargs='+')

parser_pipeline_rules = subparsers.add_parser('pipeline-rules')
parser_pipeline_rules.set_defaults(func=do_pipeline_rules)

parser_csv = subparsers.add_parser('build-order-csv')
parser_csv.set_defaults(func=do_build_order_csv)
parser_csv.add_argument('build_order_file', default='work-dir/build-order.json', nargs='?')
Expand All @@ -121,9 +117,6 @@ def _get_argument_parser():
parser_summary.add_argument('build_order_file', nargs='+')
parser_summary.add_argument('--output', '-o')

# The jobs CLI is complex enough that it's in its own module
jobs.build_cli(parser, subparsers)

return parser


Expand Down Expand Up @@ -243,18 +236,6 @@ def do_canonicalize(args):
print(overrides.pkgname_to_override_module(name))


@requires_context
def do_pipeline_rules(args, ctx):
rule_template = ' - if: $CI_PIPELINE_SOURCE == "trigger" && $JOB == "build-wheel" && $DIST_NAME == "{dist_name}"'

dist_names = sorted(
overrides.pkgname_to_override_module(parse_wheel_filename(filename.name)[0])
for filename in sorted(ctx.wheels_downloads.glob('*.whl'))
)
for dist_name in dist_names:
print(rule_template.format(dist_name=dist_name))


def do_build_order_csv(args):
fields = [
('dist', 'Distribution Name'),
Expand Down
294 changes: 0 additions & 294 deletions src/fromager/jobs.py

This file was deleted.

9 changes: 0 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,7 @@ commands =
isort --check --diff fromager tests
skip_install = true

[testenv:job]
passenv =
GITLAB_TOKEN
deps = .
commands =
python -m fromager job {posargs}

[testenv:cli]
passenv =
GITLAB_TOKEN
deps = .
commands =
fromager {posargs}
Expand Down

0 comments on commit ba878e4

Please sign in to comment.