Merge pull request #14 from onyx-and-iris/dev

This commit is contained in:
Adem 2022-10-28 19:35:56 +03:00 committed by GitHub
commit 7fc07efb02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 1 deletions

1
.gitignore vendored
View File

@ -43,6 +43,7 @@ venv/
ENV/
env.bak/
venv.bak/
.hatch
# Test/config
quick.py

View File

@ -1,3 +1,4 @@
from .version import version as __version__
from .enum import Subs
from .events import EventClient
from .reqs import ReqClient

1
obsws_python/version.py Normal file
View File

@ -0,0 +1 @@
version = "1.2.0"

43
pyproject.toml Normal file
View 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\\."

View File

@ -5,7 +5,16 @@ from setuptools import find_packages, setup
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"
AUTHOR = "Adem Atikturk"
AUTHOR_EMAIL = "aatikturk@gmail.com"