Skip to content

howto conda package

Ludovico Bianchi edited this page Jul 1, 2023 · 1 revision

Build Conda package

curl -sL https://github.com/IDAES/idaes-pse/archive/2.1.0.tar.gz | sha256su
conda create -n build-idaes-conda-pkg conda-build anaconda-client && conda activate build-idaes-conda-pkg
# idaes_pse/meta.yaml
{% set name = "idaes-pse" %}
{% set version = "2.1.0" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  {# verify sha using curl -sL $URL | sha256sum #}
  url: https://github.com/IDAES/{{ name }}/archive/{{ version }}.tar.gz
  sha256: 01e03fc1afbf741d7b0d066a6c14e3a2947a7c0b29f0c89475c7f33b4daac486

build:
  noarch: python
  number: 0
  entry_points:
    - dmf = idaes.dmf.cli:base_command
    - idaes = idaes.commands.base:command_base
  script: "{{ PYTHON }} -m pip install . -vv --no-deps --no-cache-dir --ignore-installed"

requirements:
  build:
    - python
  host:
    - python
    - click>=8
    - matplotlib
    - networkx
    - numpy>=1.17
    - pandas
    - pint
    - pip
    - pyomo>=6.6.1
    - pytest
    - pyyaml
    - scipy
    - sympy
  run:
    - python
    - click>=8
    - matplotlib
    - networkx
    - numpy>=1.17
    - pandas
    - pint
    - pip
    - pyomo>=6.6.1
    - pytest
    - pyyaml
    - scipy
    - sympy

test:
  imports:
    - idaes
    - idaes.core
    - idaes.core.base
  commands:
    - idaes --version
    - idaes --help

about:
  home: "https://idaes.org"
  license: BSD
  license_family: BSD
  license_file: LICENSE.md 
  summary: "IDAES Process Systems Engineering Framework"
  doc_url: "https://idaes-pse.readthedocs.io"
  dev_url: "https://github.com/IDAES/idaes-pse"

extra:
  recipe-maintainers:
    - lbianchi-lbl
# conda_build_config.yaml
python:
  - '3.8'
  - '3.9'
  - '3.10'
  - '3.11'
target_platform:
  - noarch
numpy:
  - 1.17
conda build idaes_pse -c conda-forge --numpy=1.17
anaconda -t "$IDAES_ANACONDA_TOKEN" upload --user IDAES-PSE /opt/conda/conda-bld/noarch/idaes-pse-2.1.0-py_0.tar.bz2

Known issues

Clone this wiki locally