Skip to content

Commit

Permalink
use setuptools-scm
Browse files Browse the repository at this point in the history
  • Loading branch information
bretello committed Jun 17, 2024
1 parent e600402 commit 0dd8c50
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ venv.bak/
dmypy.json

.ruff_cache/

pyrepl/_version.py
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[tool.setuptools_scm]
write_to = "pyrepl/_version.py"

[tool.ruff]
target-version = "py38"

Expand Down
8 changes: 8 additions & 0 deletions pyrepl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@
# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


try:
from ._version import version as __version__ # type: ignore[import]
from ._version import version_tuple # type: ignore[import]
except ImportError:
__version__ = "UNKNOWN"
version_tuple = (0, 0, __version__) # type: ignore[assignment]
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

setup(
name="pyrepl",
setup_requires="setupmeta",
versioning="devcommit",
setup_requires="setuptools_scm",
author="Michael Hudson-Doyle",
author_email="[email protected]",
maintainer="Daniel Hahler",
Expand Down

0 comments on commit 0dd8c50

Please sign in to comment.