Skip to content

Commit 16f6ca2

Browse files
committed
GAME twitter pyproject.toml cleanup
1 parent 66e869d commit 16f6ca2

File tree

2 files changed

+20
-31
lines changed

2 files changed

+20
-31
lines changed

plugins/twitter/pyproject.toml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,18 @@
11
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
2+
requires = ["poetry-core>=1.0.0"]
3+
build-backend = "poetry.core.masonry.api"
44

5-
[project]
5+
[tool.poetry]
66
name = "twitter_plugin_gamesdk"
7-
version = "0.1.0"
8-
authors = [
9-
{ name = "Celeste Ang", email = "[email protected]" },
10-
]
7+
version = "0.2.0"
118
description = "Twitter Plugin for Python SDK for GAME by Virtuals"
12-
requires-python = ">=3.8"
13-
classifiers = [
14-
"Programming Language :: Python :: 3",
15-
"Programming Language :: Python :: 3.8",
16-
"Programming Language :: Python :: 3.9",
17-
"Programming Language :: Python :: 3.10",
18-
"Programming Language :: Python :: 3.11",
19-
"License :: OSI Approved :: MIT License",
20-
"Operating System :: OS Independent",
21-
"Development Status :: 3 - Alpha",
22-
"Intended Audience :: Developers",
23-
"Topic :: Software Development :: Libraries :: Python Modules",
24-
]
25-
dependencies = [
26-
"tweepy>=4.15.0"
27-
]
9+
authors = ["Celeste Ang <[email protected]>"]
10+
homepage = "https://github.com/game-by-virtuals/game-python"
11+
repository = "https://github.com/game-by-virtuals/game-python"
2812

29-
[tool.hatch.build.targets.wheel]
30-
packages = ["twitter_plugin_gamesdk"]
13+
[tool.poetry.dependencies]
14+
python = ">=3.9"
15+
tweepy = ">=4.15.0"
3116

32-
[project.urls]
33-
"Homepage" = "https://github.com/game-by-virtuals/game-python"
34-
"Bug Tracker" = "https://github.com/game-by-virtuals/game-python"
17+
[tool.poetry.scripts]
18+
twitter-plugin-gamesdk = "twitter_plugin_gamesdk.game_twitter_auth:start"

plugins/twitter/twitter_plugin_gamesdk/game_twitter_auth.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ def start_authentication(api_key: str, port: int = 8714) -> None:
8787
webbrowser.open(login_url)
8888
server.serve_forever()
8989

90-
91-
if __name__ == "__main__":
90+
def start() -> None:
91+
"""
92+
Entry point for the game twitter auth process.
93+
"""
9294
parser = argparse.ArgumentParser(prog="game-twitter-plugin", description="CLI to authenticate and interact with GAME's Twitter API")
9395
parser.add_argument("auth", help="Authenticate with Twitter API", nargs='?')
9496
parser.add_argument("-k", "--key", help="Project's API key", required=True, type=str)
9597
args = parser.parse_args()
96-
AuthManager.start_authentication(args.key)
98+
AuthManager.start_authentication(args.key)
99+
100+
if __name__ == "__main__":
101+
start()

0 commit comments

Comments
 (0)