In your code, you have this line:
package_data={"test_package": ["**/*.pxd", "**/*.pxy"]},
Which is the cause of this problem. Changing it to
package_data={"test_package": ["**/*.pxd", "**/*.pyx"]},
Will use the pyx function and fix this issue.