Skip to content

Commit

Permalink
Replace setup.cfg with pyproject.toml (#156)
Browse files Browse the repository at this point in the history
This PR replaced `setup.cfg` with the modernized `pyproject.toml` for
project setup. Currently, `setup.py` is kept for the potential more
dynamic configurations such as compiled extensions in the future.
  • Loading branch information
inmzhang authored Feb 24, 2024
1 parent bf6c628 commit bfc04e4
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r dev-requirements.txt
pip install -r requirements.txt -r requirements-dev.txt
- name: Analyze code with pylint
run: |
pip install pylint
Expand Down
61 changes: 61 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "tqec"
version = "0.0.1"
authors = [
{ name = "TQEC community", email = "tqec-design-automation@googlegroups.com" },
]
description = "A design automation framework for Topological Quantum Error Correction."
readme = "README.md"
license = { file = "LICENSE" }
keywords = ["topological quantum error correction", "qec"]
requires-python = ">= 3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: User Interfaces",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = ["dependencies"]

[project.urls]
Website = "https://tqec.app"
Repository = "https://github.com/QCHackers/tqec"
Issues = "https://github.com/QCHackers/tqec/issues"

[project.optional-dependencies]
test = ["pytest", "mypy"]
dev = ["sinter", "pymatching", "jupyterlab", "tqec[test]"]
all = ["tqec[test, dev]"]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]
exclude = ["*test.py"]

[tool.setuptools.package-data]
tqec = ["py.typed"]

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
File renamed without changes.
73 changes: 0 additions & 73 deletions setup.cfg

This file was deleted.

6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from setuptools import setup

setup()
from setuptools import setup

setup()
4 changes: 3 additions & 1 deletion src/tqec/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.0.1"
import importlib

__version__ = importlib.metadata.version("tqec")

0 comments on commit bfc04e4

Please sign in to comment.