This application discloses compounds according to generic Formula I: wherein the variables are defined as described herein, and which inhibit Btk. The compounds disclosed herein are useful to modulate the activity of Btk and treat diseases associated with excessive Btk activity. The compounds are further useful to treat inflammatory and auto immune diseases associated with aberrant B-cell proliferation, such as rheumatoid arthritis. Also disclosed are compositions containing compounds of Formula I and at least one carrier, diluent or excipient.本申請案揭示通式I之化合物,其中變量係如本文中所述進行定義,且該等化合物抑制Btk。本文所揭示之該等化合物可用於調節Btk活性及治療與過度Btk活性有關之疾病。該等化合物進一步可用於治療與異常B細胞增殖有關之發炎性及自體免疫性疾病,例如類風濕性關節炎。本申請案亦揭示含有式I化合物及至少一種載劑、稀釋劑或賦形劑之組合物。