2012/9/20 Nick Hall <nick__hall@hotmail.com>
Benny,

I have just refreshed my memory on GEPS 026.  We have a prototype for both distutils and packaging (distutils2).

1. distutils

This is currently in trunk and appears to work.  It uses the setup.py and MANIFEST.in files.  There is no need to delete the autotools files or rename the src directory.

a. To create a source distribution run:

python setup.py sdist

It creates a tar file in dist directory.  It also creates a MANIFEST file that contains files in distribution.

b. To build run:

python setup.py build

Files are created in build directory.

c. To install run:

python setup.py install

For testing it is convenient to install to a different root directory and disable execution of post-install mime processing.

python setup.py install --root ~/test --enable-packager-mode


2. packaging (distutils2)

The prototype for this is in the GEPS 026 branch.  It uses the setup.cfg and custom_setup.py files.  The src directory needs to be renamed to gramps in order for this to work.

After a couple of tweaks to the setup.cfg file I managed to get this working in trunk.

You will need to install distutils2 and the patch in bug #14651.

a. To create a source distribution run:

pysetup run sdist

b. To build run:

pysetup run build

This will fail without the patch (bug #14651).

c. To install run:

pysetup run install_dist

Testing is a pain because of a bug with --dry-run and a bug with --install-data.  I suggest using the --home option.

Also, I have not written an --enable-packager-mode option for distutils2 yet.

There is no prototype for setuptools.  The code has only been tested on Linux.  I expect problems with other OS, in particular with file paths.  Note:  some paths need to be OS independent, but others need to be in Unix format (used in distutils configuration).

More information for distutils2 can be found in the GEPS.  Let me know if you need any help.


Always annoying to have two choices. As you studied this most, please make a choice for distutils or distutils2.
What I would like is:

1.  If you do
python setup.py install
in the top directory, Gramps is installed in site-packages/gramps

2. We would like also a way however to only install core. This would be the gen and cli directory. Question is what to do with the plugins, as we want some plugins in such a core install also (specifically cli reports, docgen, ...). Perhaps we can just install all plugins also?

Is such a setup possible? Or should we just have people install everything, and have a flag to setup.py to neglect errors in the gui code setup (I assume setup.py checks for needed libraries also?)

3. I would test it, but if it works, I plan to delete Makefiles. What use in keeping something around we don't want to maintain anymore?

Benny