Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 815832 - remove README.md files and point setup.py long_descripti…

  • Loading branch information...
commit 15fa18aae3fcc07587d7878216b44ae26847a988 1 parent 9370129
@k0s k0s authored
View
3  docs/mozcrash.rst
@@ -1,5 +1,8 @@
:mod:`mozcrash` --- Print stack traces from minidumps left behind by crashed processes
======================================================================================
+Gets stack traces out of processes that have crashed and left behind
+a minidump file using the Google Breakpad library.
+
.. automodule:: mozcrash
:members: check_for_crashes
View
66 docs/mozinfo.rst
@@ -8,5 +8,71 @@ behaviour.
:mod:`mozinfo` --- Get system information
-----------------------------------------
+Throughout `mozmill <https://developer.mozilla.org/en/Mozmill>`_
+and other Mozilla python code, checking the underlying
+platform is done in many different ways. The various checks needed
+lead to a lot of copy+pasting, leaving the reader to wonder....is this
+specific check necessary for (e.g.) an operating system? Because
+information is not consolidated, checks are not done consistently, nor
+is it defined what we are checking for.
+
+`mozinfo <https://github.com/mozilla/mozbase/tree/master/mozinfo>`_
+proposes to solve this problem. mozinfo is a bridge interface,
+making the underlying (complex) plethora of OS and architecture
+combinations conform to a subset of values of relavence to
+Mozilla software. The current implementation exposes relavent key,
+values: ``os``, ``version``, ``bits``, and ``processor``. Additionally, the
+service pack in use is available on the windows platform.
+
+
+API Usage
+---------
+
+mozinfo is a python package. Downloading the software and running
+``python setup.py develop`` will allow you to do ``import mozinfo``
+from python.
+`mozinfo.py <https://github.com/mozilla/mozbase/blob/master/mozinfo/mozinfo.py>`_
+is the only file contained is this package,
+so if you need a single-file solution, you can just download or call
+this file through the web.
+
+The top level attributes (``os``, ``version``, ``bits``, ``processor``) are
+available as module globals::
+
+ if mozinfo.os == 'win': ...
+
+In addition, mozinfo exports a dictionary, ``mozinfo.info``, that
+contain these values. mozinfo also exports:
+
+- ``choices``: a dictionary of possible values for os, bits, and
+ processor
+- ``main``: the console_script entry point for mozinfo
+- ``unknown``: a singleton denoting a value that cannot be determined
+
+``unknown`` has the string representation ``"UNKNOWN"``.
+``unknown`` will evaluate as ``False`` in python::
+
+ if not mozinfo.os: ... # unknown!
+
+
+Command Line Usage
+------------------
+
+mozinfo comes with a command line program, ``mozinfo`` which may be used to
+diagnose one's current system.
+
+Example output::
+
+ os: linux
+ version: Ubuntu 10.10
+ bits: 32
+ processor: x86
+
+Three of these fields, os, bits, and processor, have a finite set of
+choices. You may display the value of these choices using
+``mozinfo --os``, ``mozinfo --bits``, and ``mozinfo --processor``.
+``mozinfo --help`` documents command-line usage.
+
+
.. automodule:: mozinfo
:members:
View
4 docs/mozlog.rst
@@ -1,6 +1,10 @@
:mod:`mozlog` --- Easy, configurable and uniform logging
========================================================
+Mozlog is a python package intended to simplify and standardize logs
+in the Mozilla universe. It wraps around python's logging module and
+adds some additional functionality.
+
.. automodule:: mozlog
:members: getLogger
View
11 manifestdestiny/setup.py
@@ -3,15 +3,6 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
from setuptools import setup
-import sys
-import os
-
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- filename = os.path.join(here, 'README.md')
- description = file(filename).read()
-except:
- description = ''
PACKAGE_NAME = "ManifestDestiny"
PACKAGE_VERSION = '0.5.6'
@@ -19,7 +10,7 @@
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description="Library to create and manage test manifests",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla manifests',
author='Mozilla Automation and Testing Team',
View
10 mozb2g/setup.py
@@ -2,24 +2,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
from setuptools import setup
PACKAGE_VERSION = '0.2'
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
deps = ['mozdevice >= 0.16', 'marionette_client >= 0.5.2']
setup(name='mozb2g',
version=PACKAGE_VERSION,
description="B2G specific code for device automation",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Mozilla Automation and Testing Team',
View
12 mozcrash/README.md
@@ -1,12 +0,0 @@
-# Mozcrash
-
-Package for getting a stack trace out of processes that have crashed and left behind a minidump file using the Google Breakpad library.
-
-
-## Usage example
-
-TODO
-
- import mozcrash
-
- #...
View
13 mozcrash/setup.py
@@ -2,26 +2,17 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import os
from setuptools import setup
PACKAGE_VERSION = '0.1'
-# get documentation from the README
-try:
- here = os.path.dirname(os.path.abspath(__file__))
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
# dependencies
-deps = ['']
+deps = []
setup(name='mozcrash',
version=PACKAGE_VERSION,
description="Library for printing stack traces from minidumps left behind by crashed processes",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla',
author='Mozilla Automation and Tools team',
View
5 mozdevice/README.md
@@ -1,5 +0,0 @@
-[mozdevice](https://github.com/mozilla/mozbase/tree/master/mozdevice) provides
-an interface to interact with a remote device such as an Android phone connected
-to a workstation. Currently there are two implementations of the interface: one
-uses a TCP-based protocol to communicate with a server running on the device,
-another uses Android's adb utility.
View
10 mozdevice/setup.py
@@ -2,24 +2,16 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
from setuptools import setup
PACKAGE_VERSION = '0.17'
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
deps = ['mozprocess == 0.8']
setup(name='mozdevice',
version=PACKAGE_VERSION,
description="Mozilla-authored device management",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Mozilla Automation and Testing Team',
View
4 mozfile/README.md
@@ -1,4 +0,0 @@
-mozfile is a convenience library for taking care of some common file-related
-tasks in automated testing, such as extracting files or recursively removing
-directories.
-
View
11 mozfile/setup.py
@@ -2,23 +2,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import os
from setuptools import setup
PACKAGE_VERSION = '0.1'
-# get documentation from the README
-try:
- here = os.path.dirname(os.path.abspath(__file__))
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
setup(name='mozfile',
version=PACKAGE_VERSION,
description="Library of file utilities for use in Mozilla testing",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla',
author='Mozilla Automation and Tools team',
View
1  mozhttpd/README.md
@@ -1 +0,0 @@
-basic python webserver, tested with talos
View
10 mozhttpd/setup.py
@@ -2,23 +2,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
from setuptools import setup
-try:
- here = os.path.dirname(os.path.abspath(__file__))
- description = file(os.path.join(here, 'README.md')).read()
-except IOError:
- description = None
-
PACKAGE_VERSION = '0.5'
-
deps = []
setup(name='mozhttpd',
version=PACKAGE_VERSION,
description="Python webserver intended for use with Mozilla testing",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla',
author='Mozilla Automation and Testing Team',
View
62 mozinfo/README.md
@@ -1,62 +0,0 @@
-Throughout [mozmill](https://developer.mozilla.org/en/Mozmill)
-and other Mozilla python code, checking the underlying
-platform is done in many different ways. The various checks needed
-lead to a lot of copy+pasting, leaving the reader to wonder....is this
-specific check necessary for (e.g.) an operating system? Because
-information is not consolidated, checks are not done consistently, nor
-is it defined what we are checking for.
-
-[MozInfo](https://github.com/mozilla/mozbase/tree/master/mozinfo)
-proposes to solve this problem. MozInfo is a bridge interface,
-making the underlying (complex) plethora of OS and architecture
-combinations conform to a subset of values of relavence to
-Mozilla software. The current implementation exposes relavent key,
-values: `os`, `version`, `bits`, and `processor`. Additionally, the
-service pack in use is available on the windows platform.
-
-
-# API Usage
-
-MozInfo is a python package. Downloading the software and running
-`python setup.py develop` will allow you to do `import mozinfo`
-from python.
-[mozinfo.py](https://github.com/mozilla/mozbase/blob/master/mozinfo/mozinfo.py)
-is the only file contained is this package,
-so if you need a single-file solution, you can just download or call
-this file through the web.
-
-The top level attributes (`os`, `version`, `bits`, `processor`) are
-available as module globals:
-
- if mozinfo.os == 'win': ...
-
-In addition, mozinfo exports a dictionary, `mozinfo.info`, that
-contain these values. mozinfo also exports:
-
-- `choices`: a dictionary of possible values for os, bits, and
- processor
-- `main`: the console_script entry point for mozinfo
-- `unknown`: a singleton denoting a value that cannot be determined
-
-`unknown` has the string representation `"UNKNOWN"`. unknown will evaluate
-as `False` in python:
-
- if not mozinfo.os: ... # unknown!
-
-
-# Command Line Usage
-
-MozInfo comes with a command line, `mozinfo` which may be used to
-diagnose one's current system.
-
-Example output:
-
- os: linux
- version: Ubuntu 10.10
- bits: 32
- processor: x86
-
-Three of these fields, os, bits, and processor, have a finite set of
-choices. You may display the value of these choices using
-`mozinfo --os`, `mozinfo --bits`, and `mozinfo --processor`.
-`mozinfo --help` documents command-line usage.
View
11 mozinfo/setup.py
@@ -2,19 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import os
from setuptools import setup
PACKAGE_VERSION = '0.4'
-# get documentation from the README
-try:
- here = os.path.dirname(os.path.abspath(__file__))
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
# dependencies
deps = []
try:
@@ -25,7 +16,7 @@
setup(name='mozinfo',
version=PACKAGE_VERSION,
description="Library to get system information for use in Mozilla testing",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla',
author='Mozilla Automation and Testing Team',
View
60 mozinstall/README.md
@@ -1,60 +0,0 @@
-[Mozinstall](https://github.com/mozilla/mozbase/tree/master/mozinstall) is a
-python package for installing and uninstalling Mozilla applications on
-various platforms.
-
-For example, depending on the platform, Firefox can be distributed as a
-zip, tar.bz2, exe, or dmg file or cloned from a repository. Mozinstall takes
-the hassle out of extracting and/or running these files and for convenience
-returns the full path to the install directory. In the case that mozinstall
-is invoked from the command line, the binary path will be printed to stdout.
-
-To remove an installed application the uninstaller can be used. It requires
-the installation path of the application and will remove all the installed
-files. On Windows the uninstaller will be tried first.
-
-# Usage
-Mozinstall can be used as API or via the CLI commands.
-
-## API
-An application can be installed by running the commands below. The install
-method will return the installation path of the application.
-
- import mozinstall
- path = mozinstall.install(%installer%, %install_folder%)
-
-To retrieve the real binary call get_binary with the path and
-the application name as arguments:
-
- mozinstall.get_binary(path, 'firefox')
-
-If the application is not needed anymore the uninstaller will remove all
-traces from the system:
-
- mozinstall.uninstall(path)
-
-## CLI
-The installer can also be used as a command line tool:
-
- $ mozinstall -d firefox %installer%
-
-Whereby the directory option is optional and will default to the current
-working directory. If the installation was successful the path to the
-binary will be printed to stdout.
-
-Also the uninstaller can be called via the command line:
-
- $ mozuninstall %install_path%
-
-# Error Handling
-
-Mozinstall throws different types of exceptions:
-
-- mozinstall.InstallError is thrown when the installation fails for any reason. A traceback is provided.
-- mozinstall.InvalidBinary is thrown when the binary cannot be found.
-- mozinstall.InvalidSource is thrown when the source is not a recognized file type (zip, exe, tar.bz2, tar.gz, dmg).
-
-
-# Dependencies
-
-Mozinstall depends on the [mozinfo](https://github.com/mozilla/mozbase/tree/master/mozinfo)
-package which is also found in the mozbase repository.
View
5 mozinstall/setup.py
@@ -19,9 +19,8 @@
setup(name='mozInstall',
version=PACKAGE_VERSION,
- description="This is a utility package for installing and uninstalling "
- "Mozilla applications on various platforms.",
- long_description=description,
+ description="package for installing and uninstalling Mozilla applications",
+ long_description="see http://mozbase.readthedocs.org/",
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=['Environment :: Console',
'Intended Audience :: Developers',
View
18 mozlog/README.md
@@ -1,18 +0,0 @@
-[Mozlog](https://github.com/mozilla/mozbase/tree/master/mozlog)
-is a python package intended to simplify and standardize logs in the Mozilla universe.
-It wraps around python's [logging](http://docs.python.org/library/logging.html)
-module and adds some additional functionality.
-
-# Usage
-
-Import mozlog instead of [logging](http://docs.python.org/library/logging.html)
-(all functionality in the logging module is also available from the mozlog module).
-To get a logger, call mozlog.getLogger passing in a name and the path to a log file.
-If no log file is specified, the logger will log to stdout.
-
- import mozlog
- logger = mozlog.getLogger('LOG_NAME', 'log_file_path')
- logger.setLevel(mozlog.DEBUG)
- logger.info('foo')
- logger.testPass('bar')
- mozlog.shutdown()
View
14 mozlog/setup.py
@@ -2,25 +2,15 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
-import sys
from setuptools import setup
PACKAGE_NAME = "mozlog"
PACKAGE_VERSION = "1.1"
-desc = """Robust log handling specialized for logging in the Mozilla universe"""
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except IOError, OSError:
- description = ''
-
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
- description=desc,
- long_description=description,
+ description="Robust log handling specialized for logging in the Mozilla universe",
+ long_description="see http://mozbase.readthedocs.org/",
author='Mozilla Automation and Testing Team',
author_email='tools@lists.mozilla.org',
url='https://wiki.mozilla.org/Auto-tools/Projects/MozBase',
View
168 mozprocess/README.md
@@ -1,168 +0,0 @@
-[mozprocess](https://github.com/mozilla/mozbase/tree/master/mozprocess)
-provides python process management via an operating system
-and platform transparent interface to Mozilla platforms of interest.
-Mozprocess aims to provide the ability
-to robustly terminate a process (by timeout or otherwise), along with
-any child processes, on Windows, OS X, and Linux. Mozprocess utilizes
-and extends `subprocess.Popen` to these ends.
-
-
-# API
-
-[mozprocess.processhandler:ProcessHandler](https://github.com/mozilla/mozbase/blob/master/mozprocess/mozprocess/processhandler.py)
-is the central exposed API for mozprocess. `ProcessHandler` utilizes
-a contained subclass of [subprocess.Popen](http://docs.python.org/library/subprocess.html),
-`Process`, which does the brunt of the process management.
-
-## Basic usage
-
- process = ProcessHandler(['command', '-line', 'arguments'],
- cwd=None, # working directory for cmd; defaults to None
- env={}, # environment to use for the process; defaults to os.environ
- )
- process.run(timeout=60) # seconds
- process.wait()
-
-`ProcessHandler` offers several other properties and methods as part of its API:
-
- def __init__(self,
- cmd,
- args=None,
- cwd=None,
- env=None,
- ignore_children = False,
- processOutputLine=(),
- onTimeout=(),
- onFinish=(),
- **kwargs):
- """
- cmd = Command to run
- args = array of arguments (defaults to None)
- cwd = working directory for cmd (defaults to None)
- env = environment to use for the process (defaults to os.environ)
- ignore_children = when True, causes system to ignore child processes,
- defaults to False (which tracks child processes)
- processOutputLine = handlers to process the output line
- onTimeout = handlers for timeout event
- kwargs = keyword args to pass directly into Popen
-
- NOTE: Child processes will be tracked by default. If for any reason
- we are unable to track child processes and ignore_children is set to False,
- then we will fall back to only tracking the root process. The fallback
- will be logged.
- """
-
- @property
- def timedOut(self):
- """True if the process has timed out."""
-
-
- def run(self, timeout=None, outputTimeout=None):
- """
- Starts the process.
-
- If timeout is not None, the process will be allowed to continue for
- that number of seconds before being killed.
-
- If outputTimeout is not None, the process will be allowed to continue
- for that number of seconds without producing any output before
- being killed.
- """
-
- def kill(self):
- """
- Kills the managed process and if you created the process with
- 'ignore_children=False' (the default) then it will also
- also kill all child processes spawned by it.
- If you specified 'ignore_children=True' when creating the process,
- only the root process will be killed.
-
- Note that this does not manage any state, save any output etc,
- it immediately kills the process.
- """
-
- def readWithTimeout(self, f, timeout):
- """
- Try to read a line of output from the file object |f|.
- |f| must be a pipe, like the |stdout| member of a subprocess.Popen
- object created with stdout=PIPE. If no output
- is received within |timeout| seconds, return a blank line.
- Returns a tuple (line, did_timeout), where |did_timeout| is True
- if the read timed out, and False otherwise.
-
- Calls a private member because this is a different function based on
- the OS
- """
-
- def processOutputLine(self, line):
- """Called for each line of output that a process sends to stdout/stderr."""
- for handler in self.processOutputLineHandlers:
- handler(line)
-
- def onTimeout(self):
- """Called when a process times out."""
- for handler in self.onTimeoutHandlers:
- handler()
-
- def onFinish(self):
- """Called when a process finishes without a timeout."""
- for handler in self.onFinishHandlers:
- handler()
-
- def wait(self, timeout=None):
- """
- Waits until all output has been read and the process is
- terminated.
-
- If timeout is not None, will return after timeout seconds.
- This timeout only causes the wait function to return and
- does not kill the process.
- """
-
-See https://github.com/mozilla/mozbase/blob/master/mozprocess/mozprocess/processhandler.py
-for the python implementation.
-
-`ProcessHandler` extends `ProcessHandlerMixin` which by default prints the
-output, logs to a file (if specified), and stores the output (if specified, by
-default `True`). `ProcessHandlerMixin`, by default, does none of these things
-and has no handlers for `onTimeout`, `processOutput`, or `onFinish`.
-
-`ProcessHandler` may be subclassed to handle process timeouts (by overriding
-the `onTimeout()` method), process completion (by overriding
-`onFinish()`), and to process the command output (by overriding
-`processOutputLine()`).
-
-## Examples
-
-In the most common case, a process_handler is created, then run followed by wait are called:
-
- proc_handler = ProcessHandler([cmd, args])
- proc_handler.run(outputTimeout=60) # will time out after 60 seconds without output
- proc_handler.wait()
-
-Often, the main thread will do other things:
-
- proc_handler = ProcessHandler([cmd, args])
- proc_handler.run(timeout=60) # will time out after 60 seconds regardless of output
- do_other_work()
-
- if proc_handler.proc.poll() is None:
- proc_handler.wait()
-
-By default output is printed to stdout, but anything is possible:
-
- # this example writes output to both stderr and a file called 'output.log'
- def some_func(line):
- print >> sys.stderr, line
-
- with open('output.log', 'a') as log:
- log.write('%s\n' % line)
-
- proc_handler = ProcessHandler([cmd, args], processOutputLine=some_func)
- proc_handler.run()
- proc_handler.wait()
-
-# TODO
-
-- Document improvements over `subprocess.Popen.kill`
-- Introduce test the show improvements over `subprocess.Popen.kill`
View
10 mozprocess/setup.py
@@ -2,22 +2,14 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
from setuptools import setup
PACKAGE_VERSION = '0.8'
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
setup(name='mozprocess',
version=PACKAGE_VERSION,
description="Mozilla-authored process handling",
- long_description=description,
+ long_description='see http://mozbase.readthedocs.org/',
classifiers=['Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
View
141 mozprofile/README.md
@@ -1,141 +0,0 @@
-[Mozprofile](https://github.com/mozilla/mozbase/tree/master/mozprofile)
-is a python tool for creating and managing profiles for Mozilla's
-applications (Firefox, Thunderbird, etc.). In addition to creating profiles,
-mozprofile can install [addons](https://developer.mozilla.org/en/addons)
-and set
-[preferences](https://developer.mozilla.org/En/A_Brief_Guide_to_Mozilla_Preferences).
-Mozprofile can be utilized from the command line or as an API.
-
-
-# Command Line Usage
-
-mozprofile may be used to create profiles, set preferences in
-profiles, or install addons into profiles.
-
-The profile to be operated on may be specified with the `--profile`
-switch. If a profile is not specified, one will be created in a
-temporary directory which will be echoed to the terminal:
-
- (mozmill)> mozprofile
- /tmp/tmp4q1iEU.mozrunner
- (mozmill)> ls /tmp/tmp4q1iEU.mozrunner
- user.js
-
-To run mozprofile from the command line enter:
-`mozprofile --help` for a list of options.
-
-
-# API Usage
-
-To use mozprofile as an API you can import
-[mozprofile.profile](https://github.com/mozilla/mozbase/tree/master/mozprofile/mozprofile/profile.py)
-and/or the
-[AddonManager](https://github.com/mozilla/mozbase/tree/master/mozprofile/mozprofile/addons.py).
-
-`mozprofile.profile` features a generic `Profile` class. In addition,
-subclasses `FirefoxProfile` and `ThundebirdProfile` are available
-with preset preferences for those applications.
-
-`mozprofile.profile:Profile`:
-
- def __init__(self,
- profile=None, # Path to the profile
- addons=None, # String of one or list of addons to install
- addon_manifests=None, # Manifest for addons, see http://ahal.ca/blog/2011/bulk-installing-fx-addons/
- preferences=None, # Dictionary or class of preferences
- locations=None, # locations to proxy
- proxy=False, # setup a proxy
- restore=True # If true remove all installed addons preferences when cleaning up
- ):
-
- def reset(self):
- """reset the profile to the beginning state"""
-
- def set_preferences(self, preferences, filename='user.js'):
- """Adds preferences dict to profile preferences"""
-
- def clean_preferences(self):
- """Removed preferences added by mozrunner."""
-
- def cleanup(self):
- """Cleanup operations for the profile."""
-
-
-`mozprofile.addons:AddonManager`:
-
- def __init__(self, profile):
- """profile - the path to the profile for which we install addons"""
-
- def install_addons(self, addons=None, manifests=None):
- """
- Installs all types of addons
- addons - a list of addon paths to install
- manifest - a list of addon manifests to install
- """
-
- @classmethod
- def get_amo_install_path(self, query):
- """
- Return the addon xpi install path for the specified AMO query.
- See: https://developer.mozilla.org/en/addons.mozilla.org_%28AMO%29_API_Developers%27_Guide/The_generic_AMO_API
- for query documentation.
- """
-
- @classmethod
- def addon_details(cls, addon_path):
- """
- returns a dictionary of details about the addon
- - addon_path : path to the addon directory
- Returns:
- {'id': u'rainbow@colors.org', # id of the addon
- 'version': u'1.4', # version of the addon
- 'name': u'Rainbow', # name of the addon
- 'unpack': False } # whether to unpack the addon
- """
-
- def clean_addons(self):
- """Cleans up addons in the profile."""
-
-
-# Installing Addons
-
-Addons may be installed individually or from a manifest.
-
-Example:
-
- from mozprofile import FirefoxProfile
-
- # create new profile to pass to mozmill/mozrunner
- profile = FirefoxProfile(addons=["adblock.xpi"])
-
-
-# Setting Preferences
-
-Preferences can be set in several ways:
-
-- using the API: You can pass preferences in to the Profile class's
- constructor: `obj = FirefoxProfile(preferences=[("accessibility.typeaheadfind.flashBar", 0)])`
-- using a JSON blob file: `mozprofile --preferences myprefs.json`
-- using a `.ini` file: `mozprofile --preferences myprefs.ini`
-- via the command line: `mozprofile --pref key:value --pref key:value [...]`
-
-When setting preferences from an `.ini` file or the `--pref` switch,
-the value will be interpolated as an integer or a boolean
-(`true`/`false`) if possible.
-
-# Setting Permissions
-
-mozprofile also takes care of adding permissions to the profile.
-See https://github.com/mozilla/mozbase/blob/master/mozprofile/mozprofile/permissions.py
-
-
-# Resources
-
-Other Mozilla programs offer additional and overlapping functionality
-for profiles. There is also substantive documentation on profiles and
-their management.
-
-- [ProfileManager](https://developer.mozilla.org/en/Profile_Manager) :
- XULRunner application for managing profiles. Has a GUI and CLI.
-- [python-profilemanager](http://k0s.org/mozilla/hg/profilemanager/) : python CLI interface similar to ProfileManager
-- profile documentation : http://support.mozilla.com/en-US/kb/Profiles
View
10 mozprofile/setup.py
@@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
import sys
from setuptools import setup
@@ -23,17 +22,10 @@
deps.append('pysqlite')
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
setup(name='mozprofile',
version=PACKAGE_VERSION,
description="Library to create and modify Mozilla application profiles",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=['Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
View
43 mozrunner/README.md
@@ -1,43 +0,0 @@
-[mozrunner](https://github.com/mozilla/mozbase/tree/master/mozrunner)
-is a [python package](http://pypi.python.org/pypi/mozrunner)
-which handles running of Mozilla applications.
-mozrunner utilizes [mozprofile](https://github.com/mozilla/mozbase/tree/master/mozprofile)
-for managing application profiles
-and [mozprocess](https://github.com/mozilla/mozbase/tree/master/mozprocess) for robust process control.
-
-mozrunner may be used from the command line or programmatically as an API.
-
-
-# Command Line Usage
-
-The `mozrunner` command will launch the application (specified by
-`--app`) from a binary specified with `-b` or as located on the `PATH`.
-
-mozrunner takes the command line options from
-[mozprofile](https://github.com/mozilla/mozbase/tree/master/mozprofile) for constructing the profile to be used by
-the application.
-
-Run `mozrunner --help` for detailed information on the command line
-program.
-
-
-# API Usage
-
-mozrunner features a base class,
-[mozrunner.runner.Runner](https://github.com/mozilla/mozbase/blob/master/mozrunner/mozrunner/runner.py)
-which is an integration layer API for interfacing with Mozilla applications.
-
-mozrunner also exposes two application specific classes,
-`FirefoxRunner` and `ThunderbirdRunner` which record the binary names
-necessary for the `Runner` class to find them on the system.
-
-Example API usage:
-
- from mozrunner import FirefoxRunner
-
- # start Firefox on a new profile
- runner = FirefoxRunner()
- runner.start()
-
-See also a comparable implementation for [selenium](http://seleniumhq.org/):
-http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/firefox/firefox_binary.py
View
9 mozrunner/setup.py
@@ -2,7 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-import os
import sys
from setuptools import setup
@@ -10,12 +9,6 @@
PACKAGE_VERSION = '5.14'
desc = """Reliable start/stop/configuration of Mozilla Applications (Firefox, Thunderbird, etc.)"""
-# take description from README
-here = os.path.dirname(os.path.abspath(__file__))
-try:
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
deps = ['mozinfo == 0.4',
'mozprocess == 0.8',
@@ -28,7 +21,7 @@
setup(name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description=desc,
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=['Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
View
16 moztest/README.md
@@ -1,16 +0,0 @@
-# Moztest
-
-Package for handling Mozilla test results.
-
-
-## Usage example
-
-This shows how you can create an xUnit representation of python unittest results.
-
- from results import TestResultCollection
- from output import XUnitOutput
-
- collection = TestResultCollection.from_unittest_results(results)
- out = XUnitOutput()
- with open('out.xml', 'w') as f:
- out.serialize(collection, f)
View
11 moztest/setup.py
@@ -2,19 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import os
from setuptools import setup
PACKAGE_VERSION = '0.1'
-# get documentation from the README
-try:
- here = os.path.dirname(os.path.abspath(__file__))
- description = file(os.path.join(here, 'README.md')).read()
-except (OSError, IOError):
- description = ''
-
# dependencies
deps = ['mozinfo']
try:
@@ -25,7 +16,7 @@
setup(name='moztest',
version=PACKAGE_VERSION,
description="Package for storing and outputting Mozilla test results",
- long_description=description,
+ long_description="see http://mozbase.readthedocs.org/",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='mozilla',
author='Mozilla Automation and Tools team',
View
8 setup_development.py
@@ -15,9 +15,9 @@
import pkg_resources
import os
+import subprocess
import sys
from optparse import OptionParser
-
from subprocess import PIPE
try:
from subprocess import check_call as call
@@ -47,7 +47,11 @@ def info(directory):
assert os.path.exists(os.path.join(directory, 'setup.py'))
# setup the egg info
- call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=PIPE)
+ try:
+ call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=PIPE)
+ except subprocess.CalledProcessError:
+ print "Error running setup.py in %s" % directory
+ raise
# get the .egg-info directory
egg_info = [entry for entry in os.listdir(directory)
Please sign in to comment.
Something went wrong with that request. Please try again.