Skip to content

Commit

Permalink
Update to use setuptools_scm
Browse files Browse the repository at this point in the history
  • Loading branch information
10sr committed Nov 4, 2024
1 parent 7bc169c commit 4b197d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = flake8-no-implicit-concat
# version = attr: flake8_no_implicit_concat._version.__version__
version = attr: flake8_no_implicit_concat._version.__version__
use_scm_version =
write_to = flake8_no_implicit_concat/_version.py
description = Flake8 plugin that forbids implicit str/bytes literal concatenations
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -40,6 +42,9 @@ packages = find:
install_requires =
flake8
more-itertools; python_version<"3.10"
setup_requires =
wheel
setuptools_scm>=6.0

[options.entry_points]
flake8.extension =
Expand Down
11 changes: 1 addition & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,4 @@
from setuptools import setup


def _get_version() -> str:
with open("flake8_no_implicit_concat/_version.py") as f:
for line in f:
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")


setup(version=_get_version())
setup()

0 comments on commit 4b197d3

Please sign in to comment.