Setup development environment

pyhwp project uses zc.buildout to manage the development environment. If you want to learn more about it, see buildout.

1. Install prerequisites

  • CPython >= 2.6

    Although pyhwp itself can be working with CPython 2.5, various development helper scripts require CPython >= 2.6.

    In many GNU/Linux systems you can just install CPython with underlying package management system, e.g.

    sudo apt-get install python  # Debian/Ubuntu
    

    In MS-Windows systems, See Download Python.

  • lxml

    In many GNU/Linux systems you can just install lxml with underlying package management system, e.g.

    sudo apt-get install python-lxml  # Debian/Ubuntu
    

    Or if your system has appropriate compilers, it will be installed automatically in later steps.

    In a MS-Windows system, you’ll need install it manually. See Installing lxml.

    Note that this requirement will be removed in the future. See Issue #101.

  • (optional) tox

    If you want to run full-blown tests, install tox.

2. Clone the source repository

$ git clone https://github.com/mete0r/pyhwp.git

3. Initialize the environment

Bootstrap buildout environment:

$ python bootstrap_me.py
$ python bootstrap.py  # bootstrap the buildout environment

Now there will be generated a buildout executable in the bin/ directory.

주석

Bootstrapping the environment is required just only once for the first time.

Then run it to setup the environment:

$ bin/buildout

buildout will do following tasks:

  • install development version of pyhwp scripts into the bin/
  • generate configuration files for build/testing
  • generate build/testing helper scripts
  • ...

주석

Whenever the input configuration files (e.g. buildout.cfg, tox.ini.in, setup.py) get modified, you need to run buildout to update the environment again. However it’s not required when the main source files get modified, i.e. the files under the pyhwp/ directory and it’s subdirectories.

주석

In this step, some optional components (e.g. JRE, multiple versions of Python installations) will be discovered and used by the relevant recipe and scripts.

4. Check basic stuffs

Run hwp5proc:

$ bin/hwp5proc --help

Do a quick test:

$ bin/test-core

목차

이전 항목

Hacking Guide

다음 항목

Directory Layout

현재 문서