Skip to content

Commit 2c3dd59

Browse files
committed
Update deploy workflow
1 parent 5f85d74 commit 2c3dd59

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.conda/meta.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% set data = load_setup_py_data(setup_file="../setup.py", from_recipe_dir=True) %}
2+
3+
package:
4+
name: {{ data.get("name")|lower }}
5+
version: {{ data.get("version") }}
6+
7+
source:
8+
path: ../
9+
10+
build:
11+
noarch: python
12+
script: "$PYTHON ./setup.py install --single-version-externally-managed --record=record.txt"
13+
14+
requirements:
15+
host:
16+
- python>=3.8
17+
18+
run:
19+
- pytorch>=1.11
20+
- scipy
21+
22+
test:
23+
imports:
24+
- linear_operator
25+
- linear_operator.functions
26+
- linear_operator.operators
27+
- linear_operator.utils
28+
29+
about:
30+
home: https://gpytorch.ai
31+
license: MIT
32+
license_file: LICENSE
33+
summary: A linear operator implementation, primarily designed for finite-dimensional positive definite operators (i.e. kernel matrices).
34+
doc_url: https://linear_operator.readthedocs.io/en/stable/
35+
dev_url: https://github.com/cornellius-gp/linear_operator

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ jobs:
2323
- name: Install dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26-
pip install setuptools wheel twine
26+
pip install setuptools_scm setuptools wheel twine
2727
- name: Build and publish
2828
env:
2929
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
3030
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3131
run: |
32+
python -m setuptools_scm
3233
python setup.py sdist bdist_wheel
3334
twine upload dist/*
3435
@@ -44,8 +45,10 @@ jobs:
4445
- name: Install dependencies
4546
run: |
4647
conda install -y anaconda-client conda-build
48+
pip install setuptools_scm
4749
- name: Build and publish
4850
run: |
51+
python -m setuptools_scm
4952
conda config --set anaconda_upload yes
5053
conda config --append channels pytorch
5154
/usr/share/miniconda/bin/anaconda login --username ${{ secrets.CONDA_USERNAME }} --password ${{ secrets.CONDA_PASSWORD }}

0 commit comments

Comments
 (0)