Use the time you have available before he does this to purchase as many life insurance policies on the idiot as you can. If you can get the policies that provide for partial payment for loss of an eye, loss of a hand, go for it. You may repay me for my wise guidance with a bottle of good Scotch. PS- stay far away from him when he tries it out. 500 meters or so should be good- further if screams of wounded people disturb you.
Can it be done? Hell, I have made shotguns out of Schedule 80 gas pipe. (Yes, it was legal for me to do that at that time, and that place) But this was for a military demonstration, and not one that I wanted to snuggle up to Mrs. C3's favorite son.
Can it be done safely? No. More than just the barrel is exposed to VERY high levels of energy. As a reminder, over the weekend I was anchoring steel to concrete, using a tool powered by a .22 blank that shoots a fastener thru the steel, into the concrete. We tend to forget how much energy a firearm has. With a little luck, he will kill only himself, and not innocent bystanders. These are people that we have a special name for. Organ donors.
It takes more than a barrel- the slide and springs, as well as the frame are subject to significant stress. Is it legal? Depends on where you are. In the US, that gunsmith would need a manufacturer's license, pay a Federal excise tax on making a gun, etc. I would avoid any "gunsmith" that undertakes this the way I would avoid jock itch or posion oak.