Skip to content

Commit

Permalink
Switch to automatic versioning. (#26)
Browse files Browse the repository at this point in the history
* Switch to automated versioning.
* Install new build dependencies.
* Fixes #25
  • Loading branch information
ast0815 authored Oct 17, 2020
1 parent 3dcdf3e commit 68039f6
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install setuptools setuptools_scm toml wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
histoprint/version.py
1 change: 1 addition & 0 deletions histoprint/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""histoprint - Pretty-print histograms to the terminal"""

from .version import version as __version__
from histoprint.formatter import *
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools_scm[toml]>=3.4",
"wheel"
]

build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "histoprint/version.py"
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from setuptools import setup
import setuptools_scm # noqa: F401
import toml # noqa: F401

# make open consistent between py2 and py3 as we need encoding param
from io import open
Expand All @@ -20,7 +22,6 @@

setup(
name="histoprint",
version="1.5.1",
description=description,
long_description=long_description,
url="https://github.com/scikit-hep/histoprint",
Expand Down

0 comments on commit 68039f6

Please sign in to comment.