Skip to content

Commit 0cfa8e9

Browse files
committed
Use setuptools_scm
1 parent 737cfb3 commit 0cfa8e9

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

pyproject.toml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[build-system]
2-
requires = ["setuptools>=61.0", "wheel"]
2+
requires = ["setuptools>=61.0", "wheel", "setuptools_scm[toml]>=6.2"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cedarscript-editor"
77
dynamic = ["version"]
88
description = "A library for executing CEDARScript, a SQL-like language for code analysis and transformations"
9+
authors = [{ name = "Elifarley", email = "cedarscript@orgecc.com" }]
910
readme = "README.md"
10-
authors = [{ name = "Elifarley", email = "elifarley@example.com" }]
11-
license = { file = "LICENSE" }
11+
license = {text = "MIT"}
1212
classifiers = [
13-
"Development Status :: 3 - Alpha",
1413
"Programming Language :: Python :: 3",
1514
"Programming Language :: Python :: 3.12",
1615
"License :: OSI Approved :: MIT License",
@@ -23,10 +22,10 @@ classifiers = [
2322
]
2423
keywords = ["cedarscript", "code-editing", "refactoring", "code-analysis", "sql-like", "ai-assisted-development"]
2524
dependencies = [
26-
"cedarscript-ast-parser>=0.2.2",
25+
"cedarscript-ast-parser>=0.2.3",
2726
"rope>=1.13.0"
2827
]
29-
requires-python = ">=3.8"
28+
requires-python = ">=3.11"
3029

3130
[project.urls]
3231
Homepage = "https://github.com/CEDARScript/cedarscript-editor-python"
@@ -47,31 +46,38 @@ dev = [
4746

4847
[tool.setuptools]
4948
package-dir = {"" = "src"}
50-
py-modules = ["cedarscript_editor", "text_manipulaiton"]
5149

52-
[tool.setuptools.dynamic]
53-
version = {attr = "cedarscript_editor.__version__"}
50+
[tool.setuptools_scm]
51+
# To override version:
52+
# >>> SETUPTOOLS_SCM_PRETEND_VERSION=0.0.2 python -m build
53+
# To dry-run and see version:
54+
# >>> python -m setuptools_scm
55+
write_to = "src/cedarscript_editor/_version.py"
56+
# Append .post{number of commits} to your version if there are commits after the last tag.
57+
version_scheme = "post-release"
5458

5559
[tool.setuptools.packages.find]
5660
where = ["src"]
57-
include = ["cedarscript_editor*", "text_editor*", "identifier_selector*", "*identifier_finder*",
58-
"indentation_*", "range_*"]
61+
include = ["cedarscript_editor*", "text_manipulaiton*"]
62+
exclude = ["cedarscript_ast_parser.tests*"]
5963
namespaces = false
6064

6165
[tool.setuptools.package-data]
6266
"*" = ["*.txt", "*.rst"]
6367

6468
[tool.black]
6569
line-length = 100
66-
target-version = ['py312']
70+
target-version = ['py311']
6771

6872
[tool.isort]
6973
profile = "black"
7074
line_length = 100
7175

7276
[tool.mypy]
73-
ignore_missing_imports = true
77+
python_version = "3.11"
7478
strict = true
79+
warn_return_any = true
80+
warn_unused_configs = true
7581

7682
[tool.pytest.ini_options]
7783
minversion = "6.0"

src/cedarscript_editor/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
from cedarscript_editor.cedarscript_editor import CEDARScriptEditor
1+
from ._version import __version__
2+
import re
3+
from .cedarscript_editor import CEDARScriptEditor
4+
from text_manipulation import IndentationInfo, IdentifierBoundaries, RangeSpec, read_file, write_file, bow_to_search_range
25

3-
__version__ = "0.2.3"
6+
__all__ = [
7+
"__version__", "find_commands", "CEDARScriptEditor", "IndentationInfo", "IdentifierBoundaries", "RangeSpec",
8+
"read_file", "write_file", "bow_to_search_range"
9+
]
410

511
__all__ = ["CEDARScriptEditor"]
612

0 commit comments

Comments
 (0)