If the practitioner of witchcraft or fortune-teller is going to use this house to practise magic or tell fortunes, it is not permissible to sell it or rent it to him, and it is not permissible to build it or paint it for him, because it is a place that is being established for sinful purposes, so he should not be helped in any way, because Allaah says (interpretation of the meaning):
“Help you one another in Al‑Birr and At‑Taqwa (virtue, righteousness and piety); but do not help one another in sin and transgression. And fear Allaah. Verily, Allaah is Severe in punishment”
And because there is evidence which indicates that it is obligatory to denounce evil, and that the one who remains silent and approves of it is to be condemned, so how about the one who helps with it?
Ibn Qudaamah (may Allaah have mercy on him) said: To sum up, selling fruit juice to one who is certain to use it to make alcohol is haraam. Then he said: The same ruling applies in all cases where the aim is something haraam, such as selling weapons to those who are at war with the Muslims, or to bandits, or at times of fitnah, or selling slave women to become sinners, or renting them out for such purposes, or renting out one’s property for alcohol to sold from it, or to be used as a church, and so on. This is haraam, and the contract is invalid. End quote from al-Mughni (4/154).
Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) said: It is not valid to sell to one who intends to use it for haraam purposes, such as selling fruit juice to one who will use it to make alcohol, if that is known, according to the view of Ahmad and others, or if it is thought most likely, as is one of the two views narrated from Ahmad. This is supported by the fact that our companions said: If the landlord thinks that the renter will rent the building for sinful purposes, such as selling alcohol and the like, it is not permissible for him to rent that building to him, and the rental contract is not valid. Selling and renting are the same. End quote from al-Fataawa al-Kubra (5/388).
It says in Mataalib Ooli al-Nuha (3/607):
It is not valid to rent out a house to be used as a church or synagogue or hermitage, or as a “fire temple” for Magian (Zoroastrian) worship, or for selling alcohol or gambling, because that is helping in sin, and Allaah says (interpretation of the meaning): “do not help one another in sin and transgression” [al-Maa’idah 5:2]; or to rent it out for music and singing, or anything that the Lawgiver has forbidden. This is the correct view. If the haraam usage is mentioned in the rental contract or is known from circumstantial evidence, the contract is invalid. End quote.
It says in al-Mawsoo’ah al-Fiqhiyyah (8/228):
Because the purpose behind a rental contract is selling the usage of the house for a specified length of time, conditions should be observed in it as in a contract of sale, which is that there should be no shar’i impediment to making use of it, such as haraam things like alcohol, musical instruments and pork. It is not permissible, according to the majority of fuqaha’, to rent out a house for purposes that are not acceptable according to sharee’ah, such as if the renter is going to use it as a place for drinking alcohol or gambling, or he is going to make it into a church or place of idol-worship. In that case it is haraam to accept the rent and to pay it, because it is helping in sin. End quote.
But if the practitioner of witchcraft is going to use it as a place of residence and you know for certain or based on circumstantial evidence that he is not going to use it for practising witchcraft and falsehood, then it is permissible to build it and paint it, although it is better to keep away from that, because the practitioner of witchcraft should be shunned and rebuked, and the community should oppose him until he repents from his haraam actions.
Thus the difference is clear between the house that is acquired for sinful purposes and the house that is acquired to live in. Even if a sinner or kaafir is going to live there, there is no reason why one should not build a house for a kaafir or sinner.
And Allaah knows best.