From 5950c0bc888f4613a39b4b0714de60aeae2c276c Mon Sep 17 00:00:00 2001 From: IanCa Date: Tue, 21 Feb 2023 18:38:41 -0600 Subject: [PATCH 1/2] Add first draft conda stuff --- LICENSE | 2 +- hedtools/conda_build_info.txt | 20 +++++++++++ hedtools/meta.yaml | 63 +++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 hedtools/conda_build_info.txt create mode 100644 hedtools/meta.yaml diff --git a/LICENSE b/LICENSE index 9dcb2f9ef..2be171efb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 HED Standard Working Group +Copyright (c) 2020+ HED Standard Working Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/hedtools/conda_build_info.txt b/hedtools/conda_build_info.txt new file mode 100644 index 000000000..bbffef06f --- /dev/null +++ b/hedtools/conda_build_info.txt @@ -0,0 +1,20 @@ +Commands for building(uploading to conda-forge): +# Make sure conda forge is allowed +conda config --add channels conda-forge +# Make sure we try to always get from the same repo if there are conflicts +# see https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html for more details on channels +# this avoids issues with conflicting c libraries and similar. +conda config --set channel_priority strict +# Actually build the recipe. +conda build hedtools + + +To locally install it after building: +conda install --use-local hedtools + + +To install from conda-forge(in theory, doesn't work yet): +# Note the -c conda-forge shouldn't be required if you called the build config step above.(but users won't have done this) +conda install hedtools -c conda-forge + + diff --git a/hedtools/meta.yaml b/hedtools/meta.yaml new file mode 100644 index 000000000..80a8fcdef --- /dev/null +++ b/hedtools/meta.yaml @@ -0,0 +1,63 @@ +{% set name = "hedtools" %} +{% set version = "0.2.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/hedtools-{{ version }}.tar.gz + sha256: 2452f8e4e79e50750147a437410ccfd9ea04ad4e6390edc14dbcd663a7a9fa08 + +build: + entry_points: + - run_remodel=hed.tools.remodeling.cli.run_remodel:main + - run_remodel_backup=hed.tools.remodeling.cli.run_remodel_backup:main + - run_remodel_restore=hed.tools.remodeling.cli.run_remodel_restore:main + noarch: python + script: {{ PYTHON }} -m pip install . -vv + number: 0 + +requirements: + host: + - python >=3.7 + - setuptools >=42 + - versioneer-518 + - pip + run: + - python >=3.7 + - defusedxml + - et-xmlfile + - inflect + - jdcal + - numpy + - openpyxl + - pandas + - portalocker + - python-dateutil + - pytz + - semantic_version + - six + - werkzeug + +test: + imports: + hed + commands: + - run_remodel --help + - run_remodel_backup --help + - run_remodel_restore --help + requires: + - pip + +about: + home: https://github.com/hed-standard/hed-python/ + summary: HED validation, summary, and analysis tools. + license: MIT + license_file: LICENSE + +extra: + recipe-maintainers: + - hed-maintainers + - VisLab + - IanCa \ No newline at end of file From 783eab1c47c71ff4670ce4d39f15b0be2c81790c Mon Sep 17 00:00:00 2001 From: IanCa Date: Wed, 22 Feb 2023 10:49:29 -0600 Subject: [PATCH 2/2] Slight updates to conda instructions --- hedtools/conda_build_info.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hedtools/conda_build_info.txt b/hedtools/conda_build_info.txt index bbffef06f..0ea449c6f 100644 --- a/hedtools/conda_build_info.txt +++ b/hedtools/conda_build_info.txt @@ -1,4 +1,7 @@ -Commands for building(uploading to conda-forge): +To create the base meta.yaml I used grayskull: +https://conda-forge.org/docs/maintainer/adding_pkgs.html#build + +Commands for building(uploading to conda-forge - note this is just for testing): # Make sure conda forge is allowed conda config --add channels conda-forge # Make sure we try to always get from the same repo if there are conflicts @@ -8,10 +11,11 @@ conda config --set channel_priority strict # Actually build the recipe. conda build hedtools - To locally install it after building: conda install --use-local hedtools +Then you follow the instructions here to make a PR(this is the actual upload to conda forge): +https://conda-forge.org/docs/maintainer/adding_pkgs.html#staging-test-locally To install from conda-forge(in theory, doesn't work yet): # Note the -c conda-forge shouldn't be required if you called the build config step above.(but users won't have done this)