Getting the Source¶
Get the source for HTPC Launcher from this GitHub project: https://github.com/tctimmeh/htpc-launcher
git clone https://github.com/tctimmeh/htpc-launcher.git
Setting Up a Development Environment¶
Use a python virtualenv to work on HTPC Launcher. The included makefile will create an appropriate virtual environment with all of the necessary third-party libraries installed. Run the following command to create the virtual environment:
The virtual environment must then be activated before running tests, or building documentation or installation packages. Activate the virtual environment with by running this command from the project root directory:
For reference, the following third-party libraries are required to test and/or build HTPC Launcher:
Executing the Tests¶
Run the HTPC Launcher tests by executing this command from the project root directory:
Testing coverage reports are created automatically using the python Coverage module. A coverage report is shown when the tests are run. Run coverage html after running the tests to generate the report as HTML.
This project is built and tested automatically by Travis CI after every commit to the main repository. Find the latest build here: https://travis-ci.org/tctimmeh/htpc-launcher. See the Travis CI documentation for information about how to configure the build: http://about.travis-ci.org/docs/.
Building Installation Package¶
The HTPC Launcher source code includes a python
setup.py file to create a python installation package. The
Distribute python packaging library provides some additional functionality to the standard setup.py file. Here are
some common operations that can performed using the setup.py file.
- Build a source distibution for testing
- ./setup.py sdist
- Install the Development Working Copy to the Python Virtual Environment
- ./setup.py develop
- Upload a New Version to the Python Package Index
./setup.py sdist register upload
Building This Documentation¶
Build this documentation by running the following command from the project root directory:
To build only the HTML or man page, run make html or make man respectively from the
Making a New Release¶
Follow these steps to release a new version:
- Increment the product version number
- Increment the release number if only bug fixes were made, the minor number if new features were added, or the major number if changes have broken backwards compatibility.
- Tag the code with the new version number
- Update the release notes by changing the 1.x label to the new version number. Create a new 1.x label.
- Upload the new version to the Python Package Index by running make upload
- If any documentation was changed since the previous release, move the
doc-latestbranch to match the latest tagged release