From 00f793fa8bf78664edffe2f4d7c6fb02a6525e96 Mon Sep 17 00:00:00 2001 From: Adeel Asghar Date: Wed, 22 Oct 2025 13:00:41 +0200 Subject: [PATCH 1/2] Recipe for conda --- README.md | 18 ++++++++++++++++- recipe/LICENSE | 26 +++++++++++++++++++++++++ recipe/meta.yaml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 recipe/LICENSE create mode 100644 recipe/meta.yaml diff --git a/README.md b/README.md index 2fd6baa1..e6ef51b4 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ pip install OMPython Clone the repository and run: -``` +```bash cd python -m pip install -U . ``` @@ -55,6 +55,7 @@ online. ## Development + It is recommended to set up [`pre-commit`](https://pre-commit.com/) to automatically run linters: ```sh @@ -62,6 +63,21 @@ automatically run linters: pre-commit install ``` +## Conda Package + +Follow the steps to make a conda package, + + - Update the version number in `recipe/meta.yaml` file. + - Update the `sha256` in `recipe/meta.yaml` according to the version number. + - You can get the `sha256` from https://pypi.org/project/OMPython/#files + - Download and install conda if you don't have one. + - Run command `conda install -c conda-forge conda-build` that will install `conda-build` tool into your conda environment. + - Build conda recipe `conda build recipe`. + - Do a local install and test. + - Install locally to test. Run `conda create -n test-ompython -c local -c conda-forge ompython` + - Activate the install. Run `conda activate test-ompython` + - Now test installed ompython `python -c "import OMPython; print(OMPython.__version__)"` + ## Contact - Adeel Asghar, diff --git a/recipe/LICENSE b/recipe/LICENSE new file mode 100644 index 00000000..e8d69943 --- /dev/null +++ b/recipe/LICENSE @@ -0,0 +1,26 @@ + This project is part of OpenModelica. + + Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), + c/o Linköpings universitet, Department of Computer and Information Science, + SE-58183 Linköping, Sweden. + + All rights reserved. + + THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE + GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. + ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES + RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, + ACCORDING TO RECIPIENTS CHOICE. + + The OpenModelica software and the OSMC (Open Source Modelica Consortium) + Public License (OSMC-PL) are obtained from OSMC, either from the above + address, from the URLs: http://www.openmodelica.org or + http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica + distribution. GNU version 3 is obtained from: + http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from: + http://www.opensource.org/licenses/BSD-3-Clause. + + This program is distributed WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS + EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE + CONDITIONS OF OSMC-PL. diff --git a/recipe/meta.yaml b/recipe/meta.yaml new file mode 100644 index 00000000..192d367b --- /dev/null +++ b/recipe/meta.yaml @@ -0,0 +1,50 @@ +{% set organization = "OpenModelica" %} +{% set name = "OMPython" %} +{% set version = "3.6.0" %} +{% set python_min = "3.10" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: 3b423bd9bab64a8224e029994fe98f833773d761998c878d5e69aa6e66b171ef + +build: + noarch: python + number: 0 + script: "{{ PYTHON }} -m pip install . -vv" + +requirements: + host: + - python {{ python_min }} + - pip + - setuptools + - wheel + run: + - python >={{ python_min }} + - numpy + - psutil + - pyparsing + - pyzmq + - future + +test: + imports: + - OMPython + requires: + - python {{ python_min }} + +about: + home: https://github.com/{{ organization }}/{{ name }} + license: LicenseRef-OSMC-PL + license_file: LICENSE + summary: "Python interface to OpenModelica." + description: | + OMPython is a Python interface that uses ZeroMQ to communicate with OpenModelica. + dev_url: https://github.com/{{ organization }}/{{ name }} + +extra: + recipe-maintainers: + - adeas31 From e969d5cea6e8ecd6b776f69aec8e5990a14b3e0e Mon Sep 17 00:00:00 2001 From: Adeel Asghar Date: Thu, 21 May 2026 15:27:16 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 28 ++++++++++++++++++--------- recipe/LICENSE | 26 ------------------------- recipe/meta.yaml | 50 ------------------------------------------------ 3 files changed, 19 insertions(+), 85 deletions(-) delete mode 100644 recipe/LICENSE delete mode 100644 recipe/meta.yaml diff --git a/README.md b/README.md index d0613d96..a9cf3bdc 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # OMPython [![License: OSMC-PL-RT](https://img.shields.io/badge/license-OSMC--PL--RT-lightgrey.svg)](LICENSE) -OMPython is a Python interface that uses ZeroMQ to -communicate with OpenModelica. +OMPython is a Python interface that uses ZeroMQ to communicate with OpenModelica. [![Test](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml/badge.svg)](https://github.com/OpenModelica/OMPython/actions/workflows/Test.yml) +[![PyPI Version](https://img.shields.io/pypi/v/OMPython.svg)](https://pypi.org/project/OMPython/) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/ompython.svg)](https://anaconda.org/conda-forge/ompython) ## Dependencies @@ -20,6 +21,15 @@ Installation using `pip` is recommended. pip install OMPython ``` +### Via conda + +OMPython is also available as a conda package via [conda-forge](https://conda-forge.org/) + +```bash +conda install -c conda-forge ompython +``` +See the [ompython-feedstock](https://github.com/conda-forge/ompython-feedstock) for details. + ### Via source Clone the repository and run: @@ -49,15 +59,15 @@ online. ## Bug Reports - - Submit bugs through the [OpenModelica GitHub issues](https://github.com/OpenModelica/OMPython/issues/new). - - [Pull requests](https://github.com/OpenModelica/OMPython/pulls) are welcome. +- Submit bugs through the [OpenModelica GitHub issues](https://github.com/OpenModelica/OMPython/issues/new). +- [Pull requests](https://github.com/OpenModelica/OMPython/pulls) are welcome. ## Development -It is recommended to set up [`pre-commit`](https://pre-commit.com/) to -automatically run linters: -```sh +It is recommended to set up [`pre-commit`](https://pre-commit.com/) to automatically run linters: + +```bash # cd to the root of the repository pre-commit install ``` @@ -68,5 +78,5 @@ This project is licensed under the OSMC Public Runtime License. See [LICENSE](LI ## Contact - - Adeel Asghar, - - Arunkumar Palanisamy, +- Adeel Asghar, +- Arunkumar Palanisamy, diff --git a/recipe/LICENSE b/recipe/LICENSE deleted file mode 100644 index e8d69943..00000000 --- a/recipe/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ - This project is part of OpenModelica. - - Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), - c/o Linköpings universitet, Department of Computer and Information Science, - SE-58183 Linköping, Sweden. - - All rights reserved. - - THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE BSD NEW LICENSE OR THE - GPL VERSION 3 LICENSE OR THE OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. - ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES - RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, - ACCORDING TO RECIPIENTS CHOICE. - - The OpenModelica software and the OSMC (Open Source Modelica Consortium) - Public License (OSMC-PL) are obtained from OSMC, either from the above - address, from the URLs: http://www.openmodelica.org or - http://www.ida.liu.se/projects/OpenModelica, and in the OpenModelica - distribution. GNU version 3 is obtained from: - http://www.gnu.org/copyleft/gpl.html. The New BSD License is obtained from: - http://www.opensource.org/licenses/BSD-3-Clause. - - This program is distributed WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, EXCEPT AS - EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE - CONDITIONS OF OSMC-PL. diff --git a/recipe/meta.yaml b/recipe/meta.yaml deleted file mode 100644 index 192d367b..00000000 --- a/recipe/meta.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{% set organization = "OpenModelica" %} -{% set name = "OMPython" %} -{% set version = "3.6.0" %} -{% set python_min = "3.10" %} - -package: - name: {{ name|lower }} - version: {{ version }} - -source: - url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz - sha256: 3b423bd9bab64a8224e029994fe98f833773d761998c878d5e69aa6e66b171ef - -build: - noarch: python - number: 0 - script: "{{ PYTHON }} -m pip install . -vv" - -requirements: - host: - - python {{ python_min }} - - pip - - setuptools - - wheel - run: - - python >={{ python_min }} - - numpy - - psutil - - pyparsing - - pyzmq - - future - -test: - imports: - - OMPython - requires: - - python {{ python_min }} - -about: - home: https://github.com/{{ organization }}/{{ name }} - license: LicenseRef-OSMC-PL - license_file: LICENSE - summary: "Python interface to OpenModelica." - description: | - OMPython is a Python interface that uses ZeroMQ to communicate with OpenModelica. - dev_url: https://github.com/{{ organization }}/{{ name }} - -extra: - recipe-maintainers: - - adeas31