Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #61087

Re: Packaging a proprietary Python library for multiple OSs

From Roy Smith <roy@panix.com>
Newsgroups comp.lang.python
Subject Re: Packaging a proprietary Python library for multiple OSs
Date 2013-12-05 09:09 -0500
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <roy-F38577.09093205122013@news.panix.com> (permalink)
References <58d49c5b-c837-4dac-b764-369fea02568c@googlegroups.com>

Show all headers | View raw


In article <58d49c5b-c837-4dac-b764-369fea02568c@googlegroups.com>,
 Michael Herrmann <michael.herrmann@heliumhq.com> wrote:

>  1. Is it considered a bad idea in the Python community to ship one large Zip 
>  file with all dependencies?

Yes.

> How do *you* prefer to obtain and install Python libraries?

"pip install"

>  2. Is it possible to distribute the library in a form that allows for an 
>  offline installation without administrator privileges using other tools, 
>  such as setuptools?

You can use "pip --find-links" to point pip at a local repository of 
packages.  That solves the offline part.  And the "without admin privs" 
part is solved by setting up a virtualenv.

> A hard requirement is that I can only ship binary distributions of my 
> library, as this is a proprietary product. I looked at Distutils and 
> Setuptools, where the recommended approach seems to be to simply ship all 
> sources.

Keep in mind that shipping just the pyc files offers very weak 
protection against people examining your code.  Google for "python 
decompile" and you'll find a number of projects.  I'm looking at the 
docs for uncompyle now, which says:

> 'uncompyle' converts Python byte-code back into equivalent Python
> source. It accepts byte-code from Python version 2.7 only.
> 
> The generated source is very readable: docstrings, lists, tuples and
> hashes get pretty-printed.

About the only thing not shipping Python source does is satisfy a 
check-box requirement that you not ship source.  It may make the lawyers 
and bean-counters happy, but that's about it.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Packaging a proprietary Python library for multiple OSs Michael Herrmann <michael.herrmann@heliumhq.com> - 2013-12-05 02:14 -0800
  Re: Packaging a proprietary Python library for multiple OSs rusi <rustompmody@gmail.com> - 2013-12-05 02:56 -0800
    Re: Packaging a proprietary Python library for multiple OSs Travis Griggs <travisgriggs@gmail.com> - 2013-12-05 07:32 -0800
    Re: Packaging a proprietary Python library for multiple OSs Michael Herrmann <michael.herrmann@heliumhq.com> - 2013-12-05 07:41 -0800
    Re: Packaging a proprietary Python library for multiple OSs Chris Angelico <rosuav@gmail.com> - 2013-12-06 03:20 +1100
      Re: Packaging a proprietary Python library for multiple OSs Roy Smith <roy@panix.com> - 2013-12-05 09:12 -0800
        Re: Packaging a proprietary Python library for multiple OSs Chris Angelico <rosuav@gmail.com> - 2013-12-06 04:46 +1100
        Re: Packaging a proprietary Python library for multiple OSs Zero Piraeus <z@etiol.net> - 2013-12-05 14:50 -0300
        Re: Packaging a proprietary Python library for multiple OSs Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-05 18:18 +0000
        Re: Packaging a proprietary Python library for multiple OSs Robert Kern <robert.kern@gmail.com> - 2013-12-05 18:28 +0000
    Re: Packaging a proprietary Python library for multiple OSs Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-05 17:22 +0000
    Official discussion forum for a project (was: Packaging a proprietary Python library for multiple OSs) Ben Finney <ben+python@benfinney.id.au> - 2013-12-06 08:56 +1100
  Re: Packaging a proprietary Python library for multiple OSs Roy Smith <roy@panix.com> - 2013-12-05 09:09 -0500
    Re: Packaging a proprietary Python library for multiple OSs Michael Herrmann <michael.herrmann@heliumhq.com> - 2013-12-05 07:49 -0800
      Re: Packaging a proprietary Python library for multiple OSs random832@fastmail.us - 2013-12-05 10:52 -0500
        Re: Packaging a proprietary Python library for multiple OSs mherrmann.at@gmail.com - 2013-12-05 08:24 -0800
  Re: Packaging a proprietary Python library for multiple OSs Kevin Walzer <kw@codebykevin.com> - 2013-12-05 10:26 -0500
    Re: Packaging a proprietary Python library for multiple OSs Michael Herrmann <michael.herrmann@heliumhq.com> - 2013-12-05 07:50 -0800
      Re: Packaging a proprietary Python library for multiple OSs Kevin Walzer <kw@codebykevin.com> - 2013-12-05 11:03 -0500
      Re: Packaging a proprietary Python library for multiple OSs Kevin Walzer <kw@codebykevin.com> - 2013-12-06 10:35 -0500

csiph-web