oooenv


Nameoooenv JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/Amourspirit/python_oooenv
SummaryConfigures a project python environment for LibreOffice UNO.
upload_time2024-05-18 19:22:44
maintainerNone
docs_urlNone
author:Barry-Thomas-Paul: Moss
requires_python<4.0,>=3.8
licenseMIT
keywords libreoffice macro uno ooouno venv
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OOOENV

This project is strictly for LibreOffice python projects that need to set UNO environment.

A project as [OOO Development Tools](https://python-ooo-dev-tools.readthedocs.io/en/latest/index.html) would use this project

See also:

- [LibreOffice Virtual Environment Guides](https://python-ooo-dev-tools.readthedocs.io/en/latest/guide/virtual_env/index.html)
- [OOO Development Tools - Develop Docs](https://python-ooo-dev-tools.readthedocs.io/en/latest/dev_docs/dev_notes.html)
- [LibreOffice Python Script Modern Code Editor Examples](https://github.com/Amourspirit/libreoffice-modern-code-editing-py)

## Installation

**oooenv** [PyPI](https://pypi.org/project/oooenv)

```shell
pip install oooenv
```

## Usage

View command options

```shell
oooenv -h
```

### Linux/Mac

In Linux and Mac all that is needed to run a project that requires LibreOffice UNO
is to link the UNO files into virtual environment.

To add UNO links to virtual environment run command:

```shell
oooenv cmd-link -a
```

To remove UNO links from virtual environment run command:

```shell
oooenv cmd-link -r
```

### Windows

Windows python projects cannot use linking to UNO Files.

In Windows the virtual environment configuration file is manipulated.

The Follow command toggles between original configuration and UNO environment configuration.

```powershell
oooenv env -t
```

To update the configuration to match the installed version of LibreOffice's python.

This command should not be run until `oooenv env -t` has be run at least once.

```powershell
oooenv update --update
```

If virtual environment is managed by Poetry then it will be necessary to toggle into original config before running `poetry update`.

When updates are done just run command again to toggle back to UNO environment configuration.

## Environment Variables

Special environment variables can be set. These are completely optional.
This can be useful for docker containers.

- `OOOENV_LO_UNO_PATH` The path where `uno.py` is located.
- `OOOENV_LO_PROGRAM_PATH` The path to LibreOffice such as `C:\Program Files\LibreOffice\program` or `/usr/lib/libreoffice/program`.
- `OOOENV_LO_PROGRAM_PATH` The path to LibreOffice installed directory, such as `C:\Program Files\LibreOffice` or `/usr/lib/libreoffice`.
- `OOOENV_LO_PY_EXE` The path to LibreOffice Python. On Windows this is usually `C:\Program Files\LibreOffice\program\python.exe` and Linux is usually the virtual environment's python.
- `OOOENV_VIRTUAL_ENV` The path containing the virtual environment for your project. Usually this is `venv` or `.venv`.`
- `OOOENV_SITE_PACKAGES` The site packages directory of the virtual environment for your project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Amourspirit/python_oooenv",
    "name": "oooenv",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "libreoffice, macro, uno, ooouno, venv",
    "author": ":Barry-Thomas-Paul: Moss",
    "author_email": "vibrationoflife@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/10/ad/4c46a0792b6d55fe06d5c6d7dcae6484a5f3299fc109761b03a76f3c9072/oooenv-0.2.4.tar.gz",
    "platform": null,
    "description": "# OOOENV\n\nThis project is strictly for LibreOffice python projects that need to set UNO environment.\n\nA project as [OOO Development Tools](https://python-ooo-dev-tools.readthedocs.io/en/latest/index.html) would use this project\n\nSee also:\n\n- [LibreOffice Virtual Environment Guides](https://python-ooo-dev-tools.readthedocs.io/en/latest/guide/virtual_env/index.html)\n- [OOO Development Tools - Develop Docs](https://python-ooo-dev-tools.readthedocs.io/en/latest/dev_docs/dev_notes.html)\n- [LibreOffice Python Script Modern Code Editor Examples](https://github.com/Amourspirit/libreoffice-modern-code-editing-py)\n\n## Installation\n\n**oooenv** [PyPI](https://pypi.org/project/oooenv)\n\n```shell\npip install oooenv\n```\n\n## Usage\n\nView command options\n\n```shell\noooenv -h\n```\n\n### Linux/Mac\n\nIn Linux and Mac all that is needed to run a project that requires LibreOffice UNO\nis to link the UNO files into virtual environment.\n\nTo add UNO links to virtual environment run command:\n\n```shell\noooenv cmd-link -a\n```\n\nTo remove UNO links from virtual environment run command:\n\n```shell\noooenv cmd-link -r\n```\n\n### Windows\n\nWindows python projects cannot use linking to UNO Files.\n\nIn Windows the virtual environment configuration file is manipulated.\n\nThe Follow command toggles between original configuration and UNO environment configuration.\n\n```powershell\noooenv env -t\n```\n\nTo update the configuration to match the installed version of LibreOffice's python.\n\nThis command should not be run until `oooenv env -t` has be run at least once.\n\n```powershell\noooenv update --update\n```\n\nIf virtual environment is managed by Poetry then it will be necessary to toggle into original config before running `poetry update`.\n\nWhen updates are done just run command again to toggle back to UNO environment configuration.\n\n## Environment Variables\n\nSpecial environment variables can be set. These are completely optional.\nThis can be useful for docker containers.\n\n- `OOOENV_LO_UNO_PATH` The path where `uno.py` is located.\n- `OOOENV_LO_PROGRAM_PATH` The path to LibreOffice such as `C:\\Program Files\\LibreOffice\\program` or `/usr/lib/libreoffice/program`.\n- `OOOENV_LO_PROGRAM_PATH` The path to LibreOffice installed directory, such as `C:\\Program Files\\LibreOffice` or `/usr/lib/libreoffice`.\n- `OOOENV_LO_PY_EXE` The path to LibreOffice Python. On Windows this is usually `C:\\Program Files\\LibreOffice\\program\\python.exe` and Linux is usually the virtual environment's python.\n- `OOOENV_VIRTUAL_ENV` The path containing the virtual environment for your project. Usually this is `venv` or `.venv`.`\n- `OOOENV_SITE_PACKAGES` The site packages directory of the virtual environment for your project.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Configures a project python environment for LibreOffice UNO.",
    "version": "0.2.4",
    "project_urls": {
        "Documentation": "https://github.com/Amourspirit/python_oooenv",
        "Homepage": "https://github.com/Amourspirit/python_oooenv",
        "Repository": "https://github.com/Amourspirit/python_oooenv"
    },
    "split_keywords": [
        "libreoffice",
        " macro",
        " uno",
        " ooouno",
        " venv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c7c7241739f517e95be478e2848c00564237536e9d90ff53055bd7744b82868",
                "md5": "6444349e04bb7a900b57d9480e95748c",
                "sha256": "e17a57661cf12d60f1d1ce5ed1db2aed4e441f0c85f09bc2ac0636d64c5925f3"
            },
            "downloads": -1,
            "filename": "oooenv-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6444349e04bb7a900b57d9480e95748c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 15251,
            "upload_time": "2024-05-18T19:22:42",
            "upload_time_iso_8601": "2024-05-18T19:22:42.621987Z",
            "url": "https://files.pythonhosted.org/packages/7c/7c/7241739f517e95be478e2848c00564237536e9d90ff53055bd7744b82868/oooenv-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10ad4c46a0792b6d55fe06d5c6d7dcae6484a5f3299fc109761b03a76f3c9072",
                "md5": "31aa982c4b950bbb3c2163f5838fc282",
                "sha256": "ec9c864d6165b87d18dbf008c01cf8e3d941565003799ce5e7e748abc5d57c0f"
            },
            "downloads": -1,
            "filename": "oooenv-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "31aa982c4b950bbb3c2163f5838fc282",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 20722,
            "upload_time": "2024-05-18T19:22:44",
            "upload_time_iso_8601": "2024-05-18T19:22:44.421911Z",
            "url": "https://files.pythonhosted.org/packages/10/ad/4c46a0792b6d55fe06d5c6d7dcae6484a5f3299fc109761b03a76f3c9072/oooenv-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-18 19:22:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Amourspirit",
    "github_project": "python_oooenv",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "oooenv"
}
        
Elapsed time: 3.86531s