Skip to content

Commit

Permalink
improve build, add version string
Browse files Browse the repository at this point in the history
  • Loading branch information
bezmi committed Jan 25, 2023
1 parent c6552b8 commit 2e27297
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
dist/
build/
jvc_projector_remote.egg-info/
_version.py
25 changes: 21 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[build-system]
requires = [
"hatchling",
"wheel"
"hatch-vcs"
]
build-backend = "hatchling.build"

[project]
name = "jvc_projector_remote"
version = "0.2.2.post1"
authors = [{name="bezmi"}]
description = "A package to control JVC projectors over IP"
readme = "README.md"
Expand All @@ -20,7 +19,25 @@ classifiers = [
"Operating System :: OS Independent",
]

[project.urls]
dynamic = [
"version",
"urls",
]

[tool.hatch.metadata.hooks.vcs.urls]
"Homepage" = "https://github.com/bezmi/jvc_projector"
"Bug Tracker" = "https://github.com/bezmi/jvc_projector/issues"
"Bug tracker" = "https://github.com/bezmi/jvc_projector/issues"
"Source archive" = "https://github.com/bezmi/jvc_projector/archive/{commit_hash}.zip"

[tool.hatch.build]
exclude = [
"/.*",
"/docs",
"/dist",
]

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "_version.py"
3 changes: 3 additions & 0 deletions src/jvc_projector_remote/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
from .jvcprojector import *
from .jvccommands import *
from importlib.metadata import version

__version__ = version('jvc_projector_remote')

0 comments on commit 2e27297

Please sign in to comment.