Secretary may, in such manner as the Secretary may prescribe, waive the requirements of subparagraph (A) for a taxable year in the case of an individual who is not eligible to file a joint return for the taxable year, and who was married at the time the individual or the individual's former spouse purchased a previous residence. (2) Principal residence The term principal residence has the same meaning as when used in section 121. (3) Purchase (A) In general The term purchase means any acquisition, but only if— (i) the property is not acquired from a person related to the person acquiring such property (or, if either such person is married, such individual's spouse), and (ii) the basis of the property in the hands of the person acquiring such property is not determined— (I) in whole or in part by reference to the adjusted basis of such property in the hands of the person from whom acquired, or (II) under section 1014(a). (B) Construction A residence which is constructed by the taxpayer shall be treated as purchased by the taxpayer on the date the taxpayer first occupies such residence. (4) Purchase price The term purchase price means the adjusted basis (without regard to any reduction under section 1016(a)(38)) of the principal residence on the date such residence is purchased. (5) Related persons A person shall be treated as related to another person if the relationship between such persons would result in the disallowance of losses under section 267 or 707(b) (but, in applying subsections (b) and (c) of section 267 for purposes of this section, paragraph (4) of section 267(c) shall be treated as providing that the family of an individual shall include only the individual's spouse, ancestors, lineal descendants, and spouse's ancestors and lineal descendants). (6) Marital status An individual's marital status shall be determined in accordance with section 7703. (d) Denial and recapture rules in case of disposal of residence within 5 taxable years (1) Denial of credit in case of disposal within taxable year No