Skip to content

Commit f11b824

Browse files
committed
Add pyproject.toml + test building wheel
1 parent ef923e3 commit f11b824

File tree

3 files changed

+65
-13
lines changed

3 files changed

+65
-13
lines changed

.github/workflows/release.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
# Always tests wheel building, but only publish to PyPI on pushed tags.
4+
on:
5+
pull_request:
6+
paths-ignore:
7+
- ".github/workflows/*.yaml"
8+
- "!.github/workflows/release.yaml"
9+
push:
10+
paths-ignore:
11+
- ".github/workflows/*.yaml"
12+
- "!.github/workflows/release.yaml"
13+
branches-ignore:
14+
- "dependabot/**"
15+
- "pre-commit-ci-update-config"
16+
tags: ["**"]
17+
workflow_dispatch:
18+
19+
jobs:
20+
build-release:
21+
runs-on: ubuntu-22.04
22+
permissions:
23+
id-token: write
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.11"
30+
31+
- name: install build package
32+
run: |
33+
pip install --upgrade pip
34+
pip install build
35+
pip freeze
36+
37+
- name: build release
38+
run: |
39+
python -m build --sdist --wheel .
40+
ls -l dist
41+
42+
- name: publish to pypi
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
if: startsWith(github.ref, 'refs/tags/')

pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "setuptools_scm>=8"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "jupyterhub-fancy-profiles"
7+
dynamic = ["version"]
8+
authors = [
9+
{name = "Yuvi", email = "yuvipanda@gmail.com"},
10+
]
11+
description = "Fancy Profile UI for jupyterhub-kubespawner"
12+
keywords = ["jupyterhub"]
13+
readme = "README.md"
14+
classifiers = [
15+
"Programming Language :: Python :: 3",
16+
"License :: OSI Approved :: BSD License",
17+
"Operating System :: OS Independent",
18+
]
19+
20+
[tool.setuptools_scm]
21+
version_file = "jupyterhub_fancy_profiles/_version.py"

setup.py

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

0 commit comments

Comments
 (0)