Difference between revisions of "GEPS 026: Replace 'make' for Gramps build"

From Gramps
Jump to: navigation, search
(Purpose: Actually, I'm pretty fluent with autotools. John Ralls)
(Purpose)
Line 5: Line 5:
 
==Purpose==
 
==Purpose==
  
# The core Gramps developers do not know [http://www.gnu.org/software/make/ GNU Make], which was the case also in the past. Somebody of a company with expertise contributed the make system to Gramps.  ([http://gramps.1791082.n4.nabble.com/prepare-gramps-3-4-tp4329757p4613312.html Actually, I'm pretty fluent with autotools. John Ralls]
+
# The core Gramps developers do not know [http://www.gnu.org/software/make/ GNU Make], which was the case also in the past. Somebody of a company with expertise contributed the make system to Gramps.  ([http://gramps.1791082.n4.nabble.com/prepare-gramps-3-4-tp4329757p4613312.html Actually, I'm pretty fluent with autotools. John Ralls])
 
# With GNU Make developers need to update makefiles when adding and changing files.<br />*With setup.py developers only need to worry about changing directories; this is simpler to maintain.
 
# With GNU Make developers need to update makefiles when adding and changing files.<br />*With setup.py developers only need to worry about changing directories; this is simpler to maintain.
 
# With GNU Make from time to time it happens that a new file is forgotten to be added in a release, causing maintainance overhead for the release manager.
 
# With GNU Make from time to time it happens that a new file is forgotten to be added in a release, causing maintainance overhead for the release manager.

Revision as of 20:48, 8 May 2012

Move Gramps away from using Makefiles and change to using Pythons setup.py and/or Distutils [1][2][3]2621

Purpose

  1. The core Gramps developers do not know GNU Make, which was the case also in the past. Somebody of a company with expertise contributed the make system to Gramps. (Actually, I'm pretty fluent with autotools. John Ralls)
  2. With GNU Make developers need to update makefiles when adding and changing files.
    *With setup.py developers only need to worry about changing directories; this is simpler to maintain.
  3. With GNU Make from time to time it happens that a new file is forgotten to be added in a release, causing maintainance overhead for the release manager.
  4. Gramps is pure python, we don't need a makefile system checking for a lot of things it is checking now.
  5. We need less dependencies for installing Gramps in linux.
    *Already on windows makefiles are not used.
  6. An increasing number of projects that need GNU Make switch to CMake, ..., we should not stay with old technology just because it was already present

Distutils2

We need to create a setup.cfg file which defines the following:

  • packages

A list of packages that should be installed in the gramps directory under python site-packages. This should be a list of all packages, but excluding test and experimental packages. We can generate this dynamically to ease maintenance. There is a function provided to do this.

Note: Issue 14549 requests an enhancement to this functionality.

  • package_data

A list of file specifications of all non-package files that should also be installed in the gramps directory under python site-packages. This should specify all files under the glade, images and plugins directories.

Note: Issues 5302 and 13463 cause a problem with this at the moment.

  • resources

A list of file specifications of files that need to be installed outside the gramps directory under python site-packages. Targets for files include 'categories' which are OS independent.

Note: Issue 12393 requests support for extensible categories which could be useful to us.

  • scripts

A list of scripts. Just gramps.sh in our case.

  • extra_files

A list of file specifications of files that need to be included in the distribution, but should not be installed. This provides an alternative to the MANIFEST.in file, and should be easier to maintain. Another alternative would be a 'manifest-builder', which we should investigate. This could automatically include all files that are under version control.

Note: Issue 14691 prevents specifying a manifest builder in the config file. There is a patch available to fix this.

distutils2 provides support for customisation via command hooks. Our translation build code should be run via a build command hook. This should allow us to access the build directory and add files to the 'resources' as necessary.

Issues

  • PEP 345: Metadata for Python Software Packages 1.2
  • PEP 376: Database of Installed Python Distributions
  • PEP 386: Changing the version comparison module in Distutils
  • PEP 390: Static metadata for Distutils

Bugs

  • 5302: Allow package_data specs/globs to match directories
  • 8501: --dry-run option doesn't work
  • 12830: --install-data doesn't effect resources destination
  • 12393: Packaging should provide support for extensible categories
  • 13463: Fix parsing of package_data
  • 14549: Recursive inclusion of packages
  • 14651: pysetup run cmd can't handle option values in the setup.cfg