Skip to main content

[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.

Metadata

Release files for mozInstall 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mozInstall 1.2
File Size Uploaded Provenance Actions
mozInstall-1.2.tar.gz 5.7 kB Without provenance Details for mozInstall-1.2.tar.gz

Release files / mozInstall-1.2.tar.gz

Download URL mozInstall-1.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dfa4d93a5e2db633da0b3877686f2c4fecad6a446d0fe6015d9d9cf3d2d11ae0
BLAKE2b-256 checksum
How to use checksums
ba8a7d6b5b4e06a2f8f3c215f371c8821d349886456ac6eb5fa521fd3f28275a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mozInstall 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page