oooenv


Nameoooenv JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/Amourspirit/python_oooenv
SummaryConfigures a project python environment for LibreOffice UNO.
upload_time2023-06-17 19:06:34
maintainer
docs_urlNone
author:Barry-Thomas-Paul: Moss
requires_python>=3.8,<4.0
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": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "libreoffice,macro,uno,ooouno,venv",
    "author": ":Barry-Thomas-Paul: Moss",
    "author_email": "vibrationoflife@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/96/60/1e4ce87aff455c1e63b009fd854fba016cfad8f2b3158ad1529f6941dc21/oooenv-0.2.2.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.2",
    "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": "69bbfe03feb628dd551537b67a1ce73f71508a2e3be0dba2355a263af0a3bdea",
                "md5": "171ad4716b0adff609fef580b9b0a81c",
                "sha256": "6ff74a5c9c33220f42246a01b4585290bb8a089f3f4fd8d233ddf3a4beb620e4"
            },
            "downloads": -1,
            "filename": "oooenv-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "171ad4716b0adff609fef580b9b0a81c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 15247,
            "upload_time": "2023-06-17T19:06:33",
            "upload_time_iso_8601": "2023-06-17T19:06:33.511209Z",
            "url": "https://files.pythonhosted.org/packages/69/bb/fe03feb628dd551537b67a1ce73f71508a2e3be0dba2355a263af0a3bdea/oooenv-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96601e4ce87aff455c1e63b009fd854fba016cfad8f2b3158ad1529f6941dc21",
                "md5": "e97e348f4b395a07a36c29f6828b046a",
                "sha256": "86044c2de7ed2e24c1d683c6b2351fa2a0d79dd78587653be68625af76bf5817"
            },
            "downloads": -1,
            "filename": "oooenv-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e97e348f4b395a07a36c29f6828b046a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 20990,
            "upload_time": "2023-06-17T19:06:34",
            "upload_time_iso_8601": "2023-06-17T19:06:34.893198Z",
            "url": "https://files.pythonhosted.org/packages/96/60/1e4ce87aff455c1e63b009fd854fba016cfad8f2b3158ad1529f6941dc21/oooenv-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-17 19:06:34",
    "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: 0.07750s