Skip to main content

Build Process

Building, Documentation > Backend Documentation

MyPaint’s build system is due to be replaced. Currently, the MyPaint application is built with PyPa’s setuptools, with heavy utilisation of distutils. The entry point to building MyPaint is setup.py, configured by setup.cfg. This page details how MyPaint’s source code is transformed into a working application.

The brush engine and some parts of the main program are written in fast C code, so they will need compiling.

Demo

Following what happens when running the command python3 setup.py demo gives insight into the building process; The demo argument chains together each step from start to finish:

  1. Run python3 setup.py demo, which calls
  2. Demo(Command)
    • Inherits distutils’ Command
    • Function/class calls in the proceeding lowest-level list items are done so from this class.
  3. Boilerplate stuff
  4. Build(build)
  5. Install(install)
  6. demo_cmd

Build

  1. Build(build)
    • Inherits distutils’ build, which itself inherits Command
    • Function/class calls in the proceeding lowest-level list items are done so from this class.
  2. BuildConfig(Command)
    • Creates the configuration file (src/lib/config.py)
  3. build_ext
  4. build_py
  5. build_clib
  6. build_scripts
  7. BuildTranslations(Command)