Remove the stems from the dried chilies and scrape out and discard the seeds and membranes. Heat a cast iron or heavy pan over medium-high heat and place the chilies in the pan single file so they're not overlapping. Roast on both sides just until fragrant (approx. a couple of minutes) being very careful not to scorch them or they will taste bitter. Remove and let cool. Place the whole spices in the pan and roast until very fragrant, being careful not to scorch them (a couple of minutes). Remove and let cool completely.
Once the chilies and spices are completely cooled, place them in a blender or spice/coffee grinder with the remaining ingredients and pulse until it's a powder. Transfer to an airtight jar for storage. For best flavor use within a few weeks.Makes about 1 cup of chili powder.