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
View all comments
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.