Skip to content

Commit

Permalink
transition to pyproject.toml, automatic version numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
schang412 committed Feb 9, 2023
1 parent acf948c commit 9c104e7
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 65 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ tests/**/*.fst
tests/**/iverilog_dump.v
tests/**/.pytest_cache
*~

cocotbext/spi/_version.py
7 changes: 6 additions & 1 deletion cocotbext/spi/about.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
__version__ = "0.2.0"
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("cocotbext-spi")
except PackageNotFoundError:
pass
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "cocotbext-spi"
authors = [
{name = "Spencer Chang", email = "[email protected]"},
]
description = "SPI modules for cocotb"
readme = "README.md"
requires-python = ">=3.7"
license = { text = "MIT" }
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
dynamic = ["version"]
dependencies = [
"cocotb>=1.6",
]

[project.optional-dependencies]
test = [
"pytest",
"cocotb-test",
]

[tool.setuptools_scm]
write_to = "cocotbext/spi/_version.py"

[tool.pytest.ini_options]
testpaths = [
"tests"
]
addopts = "--import-mode importlib"

[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = py37, py38, py39
[testenv]
deps =
pytest
pytest-xdist
cocotb-test
commnads = pytest -n auto
"""

62 changes: 0 additions & 62 deletions setup.cfg

This file was deleted.

2 changes: 0 additions & 2 deletions setup.py

This file was deleted.

0 comments on commit 9c104e7

Please sign in to comment.