Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Recipe for conda
  • Loading branch information
adeas31 committed Oct 22, 2025
commit 00f793fa8bf78664edffe2f4d7c6fb02a6525e96
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pip install OMPython

Clone the repository and run:

```
```bash
cd <OMPythonPath>
python -m pip install -U .
```
Expand Down Expand Up @@ -55,13 +55,29 @@ online.


## Development

It is recommended to set up [`pre-commit`](https://pre-commit.com/) to
automatically run linters:
```sh
# cd to the root of the repository
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, <adeel.asghar@liu.se>
Expand Down
26 changes: 26 additions & 0 deletions recipe/LICENSE
Original file line number Diff line number Diff line change
@@ -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.
50 changes: 50 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -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