r/Python • • Sep 28 '09

Python Deployment Sucks

http://www.tartley.com/?p=843
0 Upvotes

14 comments sorted by

View all comments

8

u/spookylukey Django committer Sep 28 '09

Meaning: Python Deployment on Windows Sucks.

4

u/ringzero Sep 28 '09

Agreed. And the assertion that "you can simply give the binary to someone with the right operating system" is bullocks, too.

1

u/tartley Sep 30 '09

Hey ringzero. It's only sort-of bullocks. For small programs without complex dependencies, like a new command-line script for example, it works fine. And this is exactly the sort of program which (a) Everybody agrees Python is ideal for (even people who don't like Python) and (b) is a small project, so fiddly binary deploy burns up a large proportion of the time, thus killing a larger proportion of otherwise working small projects than it needs to. So even though the statement is kinda-bullocks, I think it's also still significant, because there are real, pragmatic consequences that I think are hurting Python adoption.

1

u/ringzero Sep 30 '09

Hey tartley. You've misread my comment I think. Here is the longer quote from your blog:

With a compiled language, you can simply give the binary to someone with the right operating system, and they can double click it to run it.

Which is simply not true, not on windows, mac, or linux. Granted, it may work for some users of some programs some of the time, but it is certainly not universal.

I don't have anything to say regarding your Python-specific complaints, other than it seems like your "compiled language" background is coloring your perceptions of how software can be developed and deployed.

1

u/louizatakk Sep 28 '09

Exactly. Nothing interesting on this article, as it only talks about Windows. Deployment of python on good OS is just Simple.

1

u/tartley Sep 30 '09

Hey Louszatakk, So I'm fuzzy on how I'm even supposed to be doing binary deployment on Linux (I postponed it until after I figured out the Windows side of things) - is it just a "setup.py bdist", or have I completely misunderstood? Thanks!

1

u/tartley Sep 30 '09

Alright, so I went reading about bdist, and that's clearly not it. It doesn't attempt to include an interpreter. So what should I use? bbfreeze? That seems exactly as fiddly as py2exe. Guidance gratefully received, many thanks.

1

u/louizatakk Sep 30 '09 edited Sep 30 '09

You create a Free software and it will then be included in distros by many benevols. OR, you make a .deb and a .rpm to cover 99% of the distros OR (this is the wrong way to do it, but this is the way proprietary software who don't understand the Gnu/Linux-way-of-life will do) you just give an archive containing your sources, all dependancies, and a python file with an explicite name, like your program's name, and it will run your program when clicked, because Python is already installed. Your main python file IS your binary. (but yeah, it's not ONE file, it's an archive you have to extract, and then run the main file in it)

1

u/tartley Oct 01 '09 edited Oct 01 '09

Thanks Louizatakk, your pointers are much appreciated.

I must confess I hadn't even considered using .rpm or .deb because so many of the Python distutils discussion seems to be adamant that platform distribution systems like these cannot be a solution for distributing Python libraries. I do not recall the reasons for that though - maybe I had misunderstood.

Also, I was concerned that a Python application might depend on a particular version of the interpreter, (esp. as 3.x becomes more prevalent) which is not installed on the system by default - but I suppose you could specify such a dependency in your .deb or .rpm dependencies, and the right interpreter should get installed, harmlessly living side-by-side with the system default?

I'll try it out, see how it works for me. Thanks for the guidance.

0

u/tartley Sep 30 '09

Hi. Except most users are on Windows, so what sucks there, sucks for all of us, unless you're planning on writing programs that nobody will use.