  We prove a general result about the behaviour of minimizing sequences for
nonlocal shape functionals satisfying suitable structural assumptions. Typical
examples include functions of the eigenvalues of the fractional Laplacian under
homogeneous Dirichlet boundary conditions. Exploiting a nonlocal version of
Lions' concentration-compactness principle, we prove that either an optimal
shape exists, or there exists a minimizing sequence consisting of two "pieces"
whose mutual distance tends to infinity. Our work is inspired by similar
results obtained by Bucur in the local case.
