Skip to content

Commit

Permalink
Merge pull request #100 from neutrons/conda_params
Browse files Browse the repository at this point in the history
Parameters for Conda Package
  • Loading branch information
mpatrou authored Aug 31, 2023
2 parents 7fb7dc2 + 72c83a1 commit 1583593
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
19 changes: 10 additions & 9 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# 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') %}
# load information from pyproject.toml
{% set pyproject = load_file_data('pyproject.toml') %}
{% set project = pyproject.get('project', {}) %}
{% set license = project.get('license').get('text') %}
{% set description = project.get('description') %}
{% set project_url = pyproject.get('project', {}).get('urls') %}
{% set url = project_url.get('homepage') %}
# this will get the version set by environment variable
{% set version = environ.get('VERSION') %}
{% set version_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %}

{% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %}

package:
name: shiver
version: {{ version_number }}
version: {{ version }}

source:
path: ..

build:
noarch: python
linux-64: python
number: {{ version_number }}
number: {{ git_describe_number }}
string: py{{py}}
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv

Expand Down
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
name = "shiver"
description = "Spectroscopy Histogram Visualizer for Event Reduction"
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"mantidworkbench >= 6.6.20230517",
"pyoncat == 1.6.1"
"pyoncat ~= 1.6"
]
license = { text = "GPL3.0" }

[project.urls]
"Homepage" = "https://github.com/neutrons/Shiver/"
homepage = "https://github.com/neutrons/Shiver/"

[build-system]
requires = [
Expand All @@ -24,6 +24,14 @@ build-backend = "setuptools.build_meta"
method = "git"
default-tag = "0.0.1"

[tool.versioningit.next-version]
method = "minor"

[tool.versioningit.format]
distance = "{next_version}.dev{distance}"
dirty = "{version}+d{build_date:%Y%m%d}"
distance-dirty = "{next_version}.dev{distance}+d{build_date:%Y%m%d%H%M}"

[tool.versioningit.write]
file = "src/shiver/_version.py"

Expand Down
8 changes: 0 additions & 8 deletions setup.py

This file was deleted.

0 comments on commit 1583593

Please sign in to comment.