Go to the link
https://manual.calibre-ebook.com/develop.html
Read the section named "Getting the code". Follow the step by step instructions there. Then go to the section named "Setting up awindows developmemnt environment" and follow the step by step instructions there.
And forget about bypy.frozen, thats not for you to modify.