Skip to main content

Utility to make working with mozconfigs easier

Project description

# Mozconfigwrapper [![Build Status](https://travis-ci.org/ahal/mozconfigwrapper.svg?branch=master)](https://travis-ci.org/ahal/mozconfigwrapper) [![PyPI version](https://badge.fury.io/py/mozconfigwrapper.svg)](https://badge.fury.io/py/mozconfigwrapper)

Mozconfigwrapper is just like [virtualenvwrapper](http://www.doughellmann.com/projects/virtualenvwrapper/) except for [mozconfigs](https://developer.mozilla.org/en/Configuring_Build_Options). Mozconfigwrapper basically hides all your mozconfigs away in a configurable directory (defaults to ~/.mozconfigs) and allows you to easily create, switch, delete and edit them. Mozconfigs remain active across terminal sessions.

## Installation

First make sure you have [pip](http://pip.readthedocs.org/en/latest/installing.html) installed.

Follow these simple steps to get mozconfigwrapper running:

sudo pip install mozconfigwrapper

Then open your ~/.bashrc file (or equivalent) and add the line:

source /usr/local/bin/mozconfigwrapper.sh

Note: mozconfigwrapper.sh may be in a different location on your system, use which mozconfigwrapper.sh to find it.

Finally run:

source ~/.bashrc

Mozconfigwrapper is now installed.

## Usage

You can create, remove, switch, list and edit mozconfigs.

To build with (activate) a mozconfig named foo, run:

buildwith foo

To create a mozconfig named foo, run:

mkmozconfig foo

To delete a mozconfig named foo, run:

rmmozconfig foo

To see the currently active mozconfig, run:

mozconfig

To list all mozconfigs, run:

mozconfig -l

To edit the currently active mozconfig, run (the $EDITOR variable must be set):

mozconfig -e

## Configuration

#### mozconfig location

By default mozconfigs are stored in the ~/.mozconfigs directory, but you can override this by setting the $BUILDWITH_HOME environment variable. e.g, add:

export BUILDWITH_HOME=~/my/custom/mozconfig/path

to your ~/.bashrc file (or equivalent).

#### buildwith command

When running the buildwith command, export MOZCONFIG=<path to mozconfig> is run by default. You can use any other command by overriding the BUILDWITH_COMMAND environment variable. For example, if you put this in your ~/.bashrc file (or equivalent):

export BUILDWITH_COMMAND=”export MOZCONFIG=#1 && launchctl setenv MOZCONFIG #1”

buildwith will also set the MOZCONFIG environment variable in launchctl (useful when running Android Studio). All occurences of #1 will be replaced by the path to the mozconfig file.

#### mozconfig template

When you make a new mozconfig, it will be populated with some basic build commands and the name of the mozconfig will be appended to the end of the OBJDIR instruction. You can modify what gets populated by default by editing the ~/.mozconfigs/.template file. For example, if I wanted my default configuration to store object directories in a folder called objdirs and enable debugging and tests, I’d edit the ~/.mozconfigs/.template file to look like:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdirs/ ac_add_options –enable-application=browser ac_add_options –enable-debug ac_add_options –enable-tests

Now if I ran the command ‘mkmozconfig foo’, foo would be populated with the above and have the word ‘foo’ appended to the first line.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mozconfigwrapper-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

mozconfigwrapper-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file mozconfigwrapper-1.0.0.tar.gz.

File metadata

  • Download URL: mozconfigwrapper-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for mozconfigwrapper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1222c57ff68b6f117d1dbb1caf3610d00da021bb5358286fbfd5a2805ecc4af
MD5 15e8c2f17af07d601c5831e4c45e3117
BLAKE2b-256 31a476f225c8e6a1faf91c6792de3253f3d2fc1e8f7ed551895afd100e54d1ec

See more details on using hashes here.

File details

Details for the file mozconfigwrapper-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mozconfigwrapper-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for mozconfigwrapper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a376dae89e5a9e81747de070187ca56661c990f6b703446fb87d3839c8ecf4b
MD5 eb81ff42ce12c8d18fd72b6e84f5239b
BLAKE2b-256 4278965fbaba75b13bf4e070486b05581568e3d3f9d31126e18fc1d82b147acf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page