[Distutils] Distributing __only__ *.pyc

Tarek Ziadé ziade.tarek at gmail.com
Thu Feb 11 10:44:59 CET 2010


On Thu, Feb 11, 2010 at 8:16 AM, Lennart Regebro <regebro at gmail.com> wrote:
> On Wed, Feb 10, 2010 at 20:02, Brad Allen <bradallen137 at gmail.com> wrote:
>> On Wed, Feb 10, 2010 at 11:35 AM, Torsten Mohr <tmohr at s.netic.de> wrote:
>>> Hi,
>>>
>>> not sure if this is possible, i'd like to distribute a pure python module as
>>> .pyc because there is some code in there that idon't want to spread yet.
>>> I plan to release the code as open source later, but it is not possible for
>>> now.
>>>
>>> I know that something like disassembling is possible but for i don't expect
>>> that somebody will take that effort.
>>>
>>>
>>> Is it possible to distribute a module.pyc using distutils?
>>>
>>> How would that setup script look like?
>>>
>>
>> I don't know about with distutils, but setuptools has an
>> --exclude-source-files option for creating an egg, used like this:
>>
>> python setup.py bdist_egg --exclude-source-files
>
> That said, a decompiled Python files is so close to a source file that
> you won't prevent anyone from seeing your code anyway.

Semi-related:
I have met someone at Rupy that is using a crypted egg format, with a
special importer.

They use this to distribute their applications with sensitive code to
their clients (banks).

Tarek
-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list