Skip to content

Commit

Permalink
Build upload with build and twine (#89)
Browse files Browse the repository at this point in the history
* change toml to new metadata
* update workflow to use build and twine for upload
  • Loading branch information
trappitsch committed Aug 30, 2023
1 parent d64305f commit f5aae9a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ jobs:
sudo apt-get update
sudo apt-get -y install libegl1-mesa
python -m pip install --upgrade pip
pip install flit flit-scm setuptools-scm
pip install build twine
pip install .
- name: Build and publish
env:
FLIT_USERNAME: '__token__'
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
PYPI_USERNAME: '__token__'
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
flit publish
python -m build
python -m twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
24 changes: 16 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
requires = ["flit_scm"]
build-backend = "flit_scm:buildapi"

[tool.flit.metadata]
module = "rimseval"
author = "Reto Trappitsch"
author-email = "reto@galactic-forensics.space"
home-page = "https://github.com/RIMS-Code/RIMSEval"
requires = [
[project]
name = "rimseval"
authors = [
{name="Reto Trappitsch", email="reto@galactic-forensics.space"}
]
dependencies = [
"iniabu>=1.1.2",
"matplotlib",
"numba~=0.57.1",
Expand All @@ -18,9 +18,14 @@ requires = [
]
requires-python=">=3.8,<3.12"
classifiers = [ "License :: OSI Approved :: MIT License",]
description-file = "README.rst"
readme = "README.rst"
dynamic = ["version", "description"]

[tool.flit.metadata.requires-extra]
[project.urls]
Source = "https://github.com/RIMS-Code/RIMSEval"
Documentation = "https://rimseval.readthedocs.io"

[project.optional-dependencies]
dev = [
"darglint>=1.5.1",
"flake8",
Expand Down Expand Up @@ -49,5 +54,8 @@ minversion = "6.0"
addopts = "--cov=rimseval -v"
testpaths = "tests"

[tool.flit.sdist]
exclude = [".gitignore", ".readthedocs.yaml"]

[tool.setuptools_scm]
write_to = "rimseval/_version.py"

0 comments on commit f5aae9a

Please sign in to comment.