It shall be unlawful for any county judge or mayor of any city or incorporated town or any person to lease or contract for the lease of any prisoner convicted of a misdemeanor, whether a violation of the laws of the state or ordinance of any municipality, except as provided in this subchapter.