Skip to content

Commit 1583593

Browse files
authored
Merge pull request #100 from neutrons/conda_params
Parameters for Conda Package
2 parents 7fb7dc2 + 72c83a1 commit 1583593

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

conda.recipe/meta.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# load information from setup.cfg/setup.py
2-
{% set data = load_setup_py_data() %}
3-
{% set license = data.get('license') %}
4-
{% set description = data.get('description') %}
5-
{% set url = data.get('url') %}
1+
# load information from pyproject.toml
2+
{% set pyproject = load_file_data('pyproject.toml') %}
3+
{% set project = pyproject.get('project', {}) %}
4+
{% set license = project.get('license').get('text') %}
5+
{% set description = project.get('description') %}
6+
{% set project_url = pyproject.get('project', {}).get('urls') %}
7+
{% set url = project_url.get('homepage') %}
68
# this will get the version set by environment variable
79
{% set version = environ.get('VERSION') %}
8-
{% set version_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %}
9-
10+
{% set git_describe_number = environ.get('GIT_DESCRIBE_NUMBER', '0') | string %}
1011

1112
package:
1213
name: shiver
13-
version: {{ version_number }}
14+
version: {{ version }}
1415

1516
source:
1617
path: ..
1718

1819
build:
1920
noarch: python
2021
linux-64: python
21-
number: {{ version_number }}
22+
number: {{ git_describe_number }}
2223
string: py{{py}}
2324
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv
2425

pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
name = "shiver"
33
description = "Spectroscopy Histogram Visualizer for Event Reduction"
44
dynamic = ["version"]
5-
requires-python = ">=3.8"
65
dependencies = [
76
"mantidworkbench >= 6.6.20230517",
8-
"pyoncat == 1.6.1"
7+
"pyoncat ~= 1.6"
98
]
9+
license = { text = "GPL3.0" }
1010

1111
[project.urls]
12-
"Homepage" = "https://github.com/neutrons/Shiver/"
12+
homepage = "https://github.com/neutrons/Shiver/"
1313

1414
[build-system]
1515
requires = [
@@ -24,6 +24,14 @@ build-backend = "setuptools.build_meta"
2424
method = "git"
2525
default-tag = "0.0.1"
2626

27+
[tool.versioningit.next-version]
28+
method = "minor"
29+
30+
[tool.versioningit.format]
31+
distance = "{next_version}.dev{distance}"
32+
dirty = "{version}+d{build_date:%Y%m%d}"
33+
distance-dirty = "{next_version}.dev{distance}+d{build_date:%Y%m%d%H%M}"
34+
2735
[tool.versioningit.write]
2836
file = "src/shiver/_version.py"
2937

setup.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)