Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyproject: hack around to make editable install work #88

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions modepy/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
VERSION = (2024, 1)
VERSION_TEXT = ".".join(str(i) for i in VERSION)
import re
from importlib import metadata


VERSION_TEXT = metadata.version("modepy")
_match = re.match("^([0-9.]+)([a-z0-9]*?)$", VERSION_TEXT)
assert _match is not None
VERSION_STATUS = _match.group(2)
VERSION = tuple(int(nr) for nr in _match.group(1).split("."))
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,23 @@ include = [
"modepy*",
]

[tool.setuptools.package-dir]
# https://github.com/Infleqtion/client-superstaq/pull/715
"" = "."

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

[tool.ruff]
target-version = "py38"
line-length = 85

preview = true

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # flake8-isort
Expand All @@ -88,7 +90,6 @@ extend-select = [
]
extend-ignore = [
"C90", # McCabe complexity
"D", # pydocstyle
"E221", # multiple spaces before operator
"E226", # missing whitespace around arithmetic operator
"E241", # multiple spaces after comma
Expand Down
Loading