Is is proper for a male to wear shorts in Spain?
On day to day, yes.
Though you may want to have longer pants just in case you visit a cathedral or church.
Unlike 10 years ago, one sees them pretty much everywhere throughout the country today. I only wear them in beach areas, but nobody will look at you oddly if you wear them in the larger cities.
Thank you.
There is no such thing as "proper attire" in Spain. As long as you're using common sense and not dressing outrageously inapproriately then there is nothing to worry about. Shorts are perfectly acceptable in Spain, in fact I can count the number of occasions on one hand that I've never worn shorts in Spain.
Spain generally, half the year is hot so, shorts make sense, it's all about how you present yourself. If you look like you dressed for a beach resort or, a day of yard work, then you may get some looks; if you put yourself together smartly, as most Southern Europeans tend to do, then you should have no weird reactions; they know you're not from around there, just don't look slovenly. While Spain generally can dress on the conservative side (dress shirts/leather shoes for men, perms and pearls for women) by no means are there 'rules or, etiquette' for dress, the younger the crowd, the more 'American' they'll dress. Personally, for evening dinner and/or going out, I throw on some dark denim jeans and wear a collared shirt of some kind.
My husband always wore long pants in Madrid. When were in the Andalusia region, he wore nice-looking shorts during the day and pants in the evening. We were there in mid-September & October 2017.
Thank you for your reply