Friday, May 3, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 1647  / 2 Years ago, sun, march 27, 2022, 5:59:00

I have created python package (using Ubuntu Quickly) and want to create deb package. Unfortunatelly Quickly builds package with source python files (.py) and I want not to include source files. The same problem is with Bazaar plugin for building packages.



How can I make deb package without sources which compiles .py files during installation, so there will be no source files in the system?


More From » package-management

 Answers
4

Python is an interpreted scripting language. You don't just distribute the intermediate .pyc files because they're compiled for your system and won't make sense elsewhere. You distribute the source and that's compiled on the fly.



That's not to say you can't just distribute .pyc files. PEP 3147 allows this and sets out a structure but it does come at a cost and I'm not even sure it would stop you regenerating the source (via various introspection methods) - but this is not what Quickly is designed for; it's not going to help you build a package like this.



If you're trying to distribute a closed source application there are things like py2exe (Windows only) and bbfreeze (all) but none of them are perfect or completely irreversible. You can look at obfuscation methods if you want to further protect your source.


[#39643] Monday, March 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
defendle

Total Points: 219
Total Questions: 131
Total Answers: 112

Location: Finland
Member since Sat, Nov 6, 2021
3 Years ago
;