A macrocycle represented by formula (I) and a pharmaceutical composition including the macrocycle, or a crystalline form, pharmaceutically acceptable salt, hydrate or solvent compound, stereoisomer, prodrug, or isotopic variant of the macrocycle. The macrocycle and the composition thereof inhibit a protein kinase.