Setup development environment¶
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.
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.
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:
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¶
$ bin/hwp5proc --help
Do a quick test: