The simplest way I know is to leave the brake line attached and the master full of fluid, disassemble the caliper halves, place the caliper into a large coffee can (notch the plastic lid for the brake line and snap the lid on) do the 'Captain Morgan' pose with one foot up on the coffee can and give the brake lever a squeeze or two, the ejected piston and brake fluid mess will be contained safely and simply.
Even a weak master cylinder will eventually eject the piston.