diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 666caf62..0a4936db 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -76,8 +76,11 @@ jobs: - name: Build conda libraray shell: bash -l {0} run: | + # set up environment + export VERSION=$(versioningit) conda install -y anaconda-client conda-build conda-verify boa cd conda.recipe + # build the package conda mambabuild --output-folder . . -c neutrons -c mantid/label/nightly conda verify noarch/addie*.tar.bz2 diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index de65fcea..524dbcbd 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,10 @@ +# load information from setup.cfg/setup.py +{% set data = load_setup_py_data() %} +{% set license = data.get('license') %} +{% set description = data.get('description') %} +{% set url = data.get('url') %} # this will reproduce the version from tags to match versioningit -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0') %} +{% set version = environ.get('VERSION') %} {% set version_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %} package: @@ -47,11 +52,11 @@ test: - addie about: - home: https://github.com/neutrons/addie - license: GPL (version 3) - license_family: GPL3 + home: {{ url }} + license: {{ license }} + license_family: MIT license_file: ../LICENSE - summary: ADvanced DIffraction Environment + summary: {{ description }} extra: recipe-maintainers: diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..789e35d1 --- /dev/null +++ b/setup.py @@ -0,0 +1,6 @@ +# this file is necessary so conda can read the contents of setup.cfg using +# its load_setup_py_data function +from setuptools import setup +from versioningit import get_cmdclasses + +setup(cmdclass=get_cmdclasses())