[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2077: pip packaging plan
Tahoe-LAFS
trac at tahoe-lafs.org
Wed May 6 21:10:43 UTC 2015
#2077: pip packaging plan
---------------------------+--------------------------------------
Reporter: daira | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: packaging | Version: 1.10.0
Resolution: | Keywords: pip packaging setuptools
Launchpad Bug: |
---------------------------+--------------------------------------
Comment (by dstufft):
@zooko
So my argument here is that telling end users to install Python and then
execute `setup.py build` is still too many steps for an end user. With
PyInstaller you could add a patch like this for your quickstart:
{{{
diff -u a/quickstart.rst b/quickstart.rst
--- a/quickstart.rst 2015-05-06 17:03:17.000000000 -0400
+++ b/quickstart.rst 2015-05-06 17:04:38.000000000 -0400
@@ -17,29 +17,6 @@
This procedure has been verified to work on Windows, Mac, OpenSolaris,
and
too many flavors of Linux and of BSD to list.
-In Case Of Trouble
-------------------
-
-There are a few 3rd party libraries that Tahoe-LAFS depends on that might
not
-be easy to set up on your platform. If the following instructions don't
Just
-Work without any further effort on your part, then please write to `the
-tahoe-dev mailing list`_ where friendly hackers will help you out.
-
-.. _the tahoe-dev mailing list: https://tahoe-lafs.org/cgi-
bin/mailman/listinfo/tahoe-dev
-
-Install Python
---------------
-
-Check if you already have an adequate version of Python installed by
running
-``python -V``. Python v2.6 (v2.6.6 or greater recommended) or Python v2.7
-will work. Python v3 does not work. On Windows, we recommend the use of
-native Python v2.7, not Cygwin Python. If you don't have one of these
-versions of Python installed, `download`_ and install the latest version
of
-Python v2.7. Make sure that the path to the installation directory has no
-spaces in it (e.g. on Windows, do not install Python in the "Program
Files"
-directory).
-
-.. _download: https://www.python.org/downloads/
Get Tahoe-LAFS
--------------
@@ -51,22 +28,8 @@
Set Up Tahoe-LAFS
-----------------
-Unpack the zip file and cd into the top-level directory.
-
-Run "``python setup.py build``" to generate the ``tahoe`` executable in a
-subdirectory of the current directory named ``bin``. This will download
and
-build anything you need from various websites.
-
-On Windows, the ``build`` step might tell you to open a new Command
Prompt
-(or, on XP and earlier, to log out and back in again). This is needed the
-first time you set up Tahoe-LAFS on a particular installation of Windows.
-
-Run "``bin/tahoe --version``" (on Windows, "``bin\tahoe --version``") to
-verify that the executable tool prints out the right version number after
-"``allmydata-tahoe:``".
+Unpack the zip file.
-Optionally run "``python setup.py trial``" to verify that it passes all
of
-its self-tests.
Run Tahoe-LAFS
--------------
}}}
That is, it's entirely possible to generate a single file, that when
executed runs tahoe. That single file will contain Python, the standard
library, all your dependencies, and tahoe itself. Think static linking but
for Python.
There are a few possible downsides to this:
* The single file version of this depends on having /tmp/ mounted without
noexec options, if someone has /tmp/ mounted with noexec it will fail.
* This can be fixed by using a directory layout instead of a single
file, this isn't as user friendly because they have a bunch of files they
have to copy around, but it fixes the noexec problem with /tmp/.
* You might need to adjust code a little bit to handle being ran from
within a zip file.
* It's essentially static linking, so you'll be responsible for making
sure that you re-roll the executable if a new Python or library comes out
which has a security vulnerability.
This would mean that end users (and your quickstart guide) never mentions
pip and the fact you're written in Python is, for end users, just an
implementation detail as is all your other dependencies. You can then
focus on making pip (and the python packaging toolchain) work for
developers and for redistributors.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2077#comment:25>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list