Skip to content

Commit d32a2a0

Browse files
Merge pull request #53 from CADWRDeltaModeling/version
Versioning to use setuptools_scm, and abandon non git-dependent (or strictly pythonic) methods of retrieving the version of the vtools3 package.
2 parents 8c2e0a5 + a952fe8 commit d32a2a0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
source $CONDA/etc/profile.d/conda.sh
2929
conda activate test_vtools3
3030
conda config --set anaconda_upload yes
31+
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm)
3132
conda build -c cadwr-dms -c conda-forge --user cadwr-dms --token "$ANACONDA_CHANNEL_UPLOAD_TOKEN" conda.recipe
3233
conda activate
3334
conda remove -n test_vtools3 --all

conda.recipe/meta.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{# raw is for ignoring templating with cookiecutter, leaving it for use with conda-build -#}
22
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
33
{% set project = pyproject['project'] %}
4-
{% set version = load_setup_py_data().get('version', '0.0.0') %}
4+
#{% set version = load_setup_py_data().get('version', '0.0.0') %}
55

66
package:
77
name: vtools3
8-
version: {{ version }}
8+
version: {{ SETUPTOOLS_SCM_PRETEND_VERSION }}
99

1010
source:
1111
path: ..
@@ -15,6 +15,8 @@ build:
1515
# separate bld.bat and build.sh files instead of this key. Add the line
1616
# "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or
1717
# "skip: True # [not win]" to limit to Windows.
18+
script_env:
19+
- SETUPTOOLS_SCM_PRETEND_VERSION
1820
script: {{ PYTHON }} -m pip install --no-build-isolation --no-deps --ignore-installed -vv .
1921
noarch: python
2022
number: 0

0 commit comments

Comments
 (0)