mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2024-11-24 22:00:52 +00:00
add version.py
add pyproject.toml add .hatch to gitignore
This commit is contained in:
parent
67fe16e97f
commit
c4ee2347ba
1
.gitignore
vendored
1
.gitignore
vendored
@ -43,6 +43,7 @@ venv/
|
|||||||
ENV/
|
ENV/
|
||||||
env.bak/
|
env.bak/
|
||||||
venv.bak/
|
venv.bak/
|
||||||
|
.hatch
|
||||||
|
|
||||||
# Test/config
|
# Test/config
|
||||||
quick.py
|
quick.py
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from .version import version as __version__
|
||||||
from .enum import Subs
|
from .enum import Subs
|
||||||
from .events import EventClient
|
from .events import EventClient
|
||||||
from .reqs import ReqClient
|
from .reqs import ReqClient
|
||||||
|
1
obsws_python/version.py
Normal file
1
obsws_python/version.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
version = "1.2.0"
|
43
pyproject.toml
Normal file
43
pyproject.toml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "obsws-python"
|
||||||
|
dynamic = ["version"]
|
||||||
|
description = "A Python SDK for OBS Studio WebSocket v5.0"
|
||||||
|
readme = "README.md"
|
||||||
|
license = "GPL-3.0-only"
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
authors = [
|
||||||
|
{ name = "Adem Atikturk", email = "aatikturk@gmail.com" },
|
||||||
|
]
|
||||||
|
dependencies = [
|
||||||
|
"tomli >= 2.0.1;python_version < '3.11'",
|
||||||
|
"websocket-client",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"black",
|
||||||
|
"isort",
|
||||||
|
"pytest",
|
||||||
|
"pytest-randomly",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/aatikturk/obsws-python"
|
||||||
|
|
||||||
|
[tool.hatch.version]
|
||||||
|
path = "obsws_python/version.py"
|
||||||
|
|
||||||
|
[tool.hatch.build.targets.sdist]
|
||||||
|
include = [
|
||||||
|
"/obsws_python",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.hatch.envs.e.scripts]
|
||||||
|
events = "py {root}\\examples\\events\\."
|
||||||
|
hotkeys = "py {root}\\examples\\hotkeys\\."
|
||||||
|
levels = "py {root}\\examples\\levels\\."
|
||||||
|
scene_rotate = "py {root}\\examples\\scene_rotate\\."
|
11
setup.py
11
setup.py
@ -5,7 +5,16 @@ from setuptools import find_packages, setup
|
|||||||
HERE = pathlib.Path(__file__).parent
|
HERE = pathlib.Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
VERSION = "1.2.0"
|
def get_version():
|
||||||
|
versionpath = pathlib.Path(HERE) / "obsws_python" / "version.py"
|
||||||
|
with open(versionpath) as f:
|
||||||
|
for line in f:
|
||||||
|
if line.startswith("version"):
|
||||||
|
versionstring = line.split('"')[1]
|
||||||
|
return versionstring
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = get_version()
|
||||||
PACKAGE_NAME = "obsws-python"
|
PACKAGE_NAME = "obsws-python"
|
||||||
AUTHOR = "Adem Atikturk"
|
AUTHOR = "Adem Atikturk"
|
||||||
AUTHOR_EMAIL = "aatikturk@gmail.com"
|
AUTHOR_EMAIL = "aatikturk@gmail.com"
|
||||||
|
Loading…
Reference in New Issue
Block a user