-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecipe.yaml
More file actions
119 lines (110 loc) · 4.5 KB
/
Copy pathrecipe.yaml
File metadata and controls
119 lines (110 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright 2024 General Atomics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
context:
version: ${{ env.get("PKG_VERSION") }}
package:
name: fdp
version: ${{ version }}
source:
path: ..
build:
noarch: python
script:
- ${{ PYTHON }} -m pip install . --no-deps --no-build-isolation --ignore-installed -vv
requirements:
host:
- python
- pip
- setuptools
- versioneer
run:
- python
# Use the GA-FDP build of the XRootD Pelican plugin. The plain
# `xrdcl-pelican` package also registers the pelican:// URL scheme
# via XRootD's plugin manager, so installing both alongside
# `libfdpio2 -> xrdcl-pelican-fdp` causes two competing handlers
# to race in the test env. Picking the FDP-fork name keeps the
# plugin set coherent.
- xrdcl-pelican-fdp
- pelicanplatform >=7.24.3,<8
- fdp-schema >=0.2.1
- toksearch
# DELIBERATE AND LOAD-BEARING -- do not remove as an unused dependency.
#
# graphviz ships `bin/fdp` (a symlink to `dot`, dispatching on argv[0])
# and so do we. Anything that pulls graphviz into an FDP environment --
# cmflib -> dvc -> pydot -> graphviz, which is the whole CMF provenance
# stack -- lands a second owner on `$PREFIX/bin/fdp`. Whichever package
# is linked last wins the file, and without this dependency graphviz can
# win: `fdp run python ...` then silently becomes a graph layout tool and
# the FDP CLI is simply gone. There is no warning to print, because our
# entry point is the thing that got replaced.
#
# Declaring graphviz here makes it our *dependency*, so the installer's
# topological link order puts graphviz first and `fdp` last, and we take
# the file.
#
# Which installer you use decides whether this is a fix or an insurance
# policy, and both are worth having:
#
# pixi/rattler -- graphviz genuinely wins without this dependency; the
# CLI is broken today. With it we win from scratch (3/3 runs), on an
# incremental `pixi add cmflib`, and across a real graphviz
# 13.1.2 -> 14.1.2 upgrade. That last case means rattler respects
# existing file ownership, not merely link order.
#
# micromamba 2.9.0 -- happens to link `fdp` last even without this
# dependency (graphviz at step 1193, fdp at 1266), so it already
# worked. But nothing *enforced* that order; it was incidental to the
# solve. This dependency makes it guaranteed rather than lucky.
#
# Nothing is lost on the graphviz side: `dot -Kfdp` is the documented
# equivalent of its `fdp` binary.
#
# The test below is the guard. If it ever fails, this trick has stopped
# working and the CLI needs renaming instead.
- graphviz
tests:
- script:
content:
- cd tests && ./testit --mock
files:
source:
- tests/
# Guard for the graphviz `bin/fdp` collision explained in the run
# requirements. graphviz is a run dependency, so this test environment
# reproduces the collision for free -- if `fdp` here is graphviz's binary
# rather than ours, the CLI is broken for every user with cmflib installed.
- script:
content:
- |
set -e
echo "bin/fdp resolves to: $(readlink -f "$(command -v fdp)")"
# graphviz's fdp answers -V with "fdp - graphviz version ...".
if fdp -V 2>&1 | grep -qi "graphviz"; then
echo "ERROR: bin/fdp is graphviz's binary, not the FDP CLI."
echo "The link-order trick (graphviz as a run dep) has stopped"
echo "working. The CLI must be renamed instead. See the comment"
echo "beside the graphviz run dependency in recipe.yaml."
exit 1
fi
# Ours must actually work, not merely be present.
fdp --help | grep -qE "\brun\b" || {
echo "ERROR: 'fdp --help' does not look like the FDP CLI:"; fdp --help | head -5; exit 1; }
echo "OK: bin/fdp is the FDP CLI."
# The unclobberable fallback: even if bin/fdp is ever lost, this
# entry point cannot be taken by another package.
- |
python -m fdp --help > /dev/null
echo "OK: python -m fdp works"
about:
homepage: https://github.com/GA-FDP/fdp
license: Apache-2.0
license_file: LICENSE
summary: Fusion Data Platform CLI (Pelican/XRootD env, skills, LLM frontend)
repository: https://github.com/GA-FDP/fdp
extra:
recipe-maintainers:
- sammuli