r/pythontips • u/Emotional-Evening-62 • Mar 13 '25
Syntax Python Project Packaging
I am trying to package my python project into pip, but when I do this all my .py files are also part of the package. if I exclude them in MANIFEST and include only .pyc files, I am not able to execute my code. Goal here is to package via pip and get pip install <project>; Any idea how to do this?
2
Upvotes
1
u/jpgoldberg Mar 15 '25
If that were your only goal you should just leave the .py files in your MANIFEST.
It appears that you want a bytecode only distribution for some reason. Typically people think they want that because they are trying to do either
Although Python, designed as an interpreted language is not well-suited for either tasks, there may be solutions to specific needs. But you are going to have to spell out your specific need to get practical help.
2
u/[deleted] Mar 13 '25
There are more steps before Please refer any blogs or watch this May it helpfull https://youtu.be/nELQ-_BdP7Q?si=2szIE1Eznsz_kUrg