Skip to content

Commit

Permalink
Use setuptools-scm (hoechenberger#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger authored Oct 16, 2022
1 parent 9e7f4fa commit 9450517
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## unreleased

- ...

## 2022.2.0

Expand Down
6 changes: 5 additions & 1 deletion openneuro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# Running on pre-3.8 Python; use importlib-metadata package
import importlib_metadata as metadata

__version__ = metadata.version('openneuro-py')
try:
__version__ = metadata.version("openneuro-py")
except metadata.PackageNotFoundError:
# package is not installed
pass

from .download import download # noqa: F401
12 changes: 8 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[project]
name = "openneuro-py"
description = "A Python client for OpenNeuro."
version = "2022.2.0"
readme = "README.md"
requires-python = ">=3.7"
license = {file = "LICENSE"}
Expand All @@ -14,7 +13,7 @@ classifiers = [
"Programming Language :: Python"
]
dependencies = [
"httpx >=0.15",
"httpx >= 0.15",
"requests",
"tqdm",
"click",
Expand All @@ -23,6 +22,7 @@ dependencies = [
"importlib-metadata; python_version < '3.8'",
"typing-extensions; python_version < '3.8'"
]
dynamic = ["version"]

[project.optional-dependencies]
tests = [
Expand All @@ -38,7 +38,11 @@ changelog = "https://github.com/hoechenberger/openneuro-py/CHANGES.md"

[build-system]
requires = [
"setuptools",
"wheel"
"setuptools >= 45",
"setuptools_scm[toml] >= 6.2",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# can be left blank

0 comments on commit 9450517

Please sign in to comment.