From 210a7dc608680aac62e680810696acfb701318ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sat, 18 Jun 2022 09:57:01 +0200 Subject: [PATCH] Move to Poetry --- .gitignore | 3 +- Pipfile | 12 ----- Pipfile.lock | 43 ---------------- poetry.lock | 53 ++++++++++++++++++++ pyproject.toml | 19 +++++++ {_twitchbot => twason}/__init__.py | 0 bot.py => twason/__main__.py | 6 +-- twason/__pycache__/__init__.cpython-39.pyc | Bin 0 -> 146 bytes twason/__pycache__/config.cpython-39.pyc | Bin 0 -> 3719 bytes twason/__pycache__/twitchbot.cpython-39.pyc | Bin 0 -> 2677 bytes {_twitchbot => twason}/config.py | 0 {_twitchbot => twason}/moderator.py | 0 {_twitchbot => twason}/twitch_message.py | 0 {_twitchbot => twason}/twitchbot.py | 0 {_twitchbot => twason}/utils.py | 0 15 files changed, 77 insertions(+), 59 deletions(-) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock create mode 100644 poetry.lock create mode 100644 pyproject.toml rename {_twitchbot => twason}/__init__.py (100%) rename bot.py => twason/__main__.py (94%) create mode 100644 twason/__pycache__/__init__.cpython-39.pyc create mode 100644 twason/__pycache__/config.cpython-39.pyc create mode 100644 twason/__pycache__/twitchbot.cpython-39.pyc rename {_twitchbot => twason}/config.py (100%) rename {_twitchbot => twason}/moderator.py (100%) rename {_twitchbot => twason}/twitch_message.py (100%) rename {_twitchbot => twason}/twitchbot.py (100%) rename {_twitchbot => twason}/utils.py (100%) diff --git a/.gitignore b/.gitignore index 0b24f1a..89c364a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.json docker-compose.yml -__pycache__ \ No newline at end of file +__pycache__dist +/dist diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 7daa0cf..0000000 --- a/Pipfile +++ /dev/null @@ -1,12 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -irc3 = "*" - -[dev-packages] - -[requires] -python_version = "3.9" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index eee9531..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,43 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "a2d7b3880bcd5122a42c9d5a0d2e5ade937786b9b36437bfefa0eba5ef0359fd" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.9" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "docopt": { - "hashes": [ - "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - ], - "version": "==0.6.2" - }, - "irc3": { - "hashes": [ - "sha256:088b7be88817dee5d02e7e06c9dbf503c8e807a8cccc9b36b5be419918574cf1", - "sha256:6800c8876a889736961e199e834dc9933244affa20d4da086fb4b47f76984e12" - ], - "index": "pypi", - "version": "==1.1.7" - }, - "venusian": { - "hashes": [ - "sha256:06e7385786ad3a15c70740b2af8d30dfb063a946a851dcb4159f9e2a2302578f", - "sha256:f6842b7242b1039c0c28f6feef29016e7e7dd3caaeb476a193acf737db31ee38" - ], - "markers": "python_version >= '3.5'", - "version": "==3.0.0" - } - }, - "develop": {} -} diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..e3d4f03 --- /dev/null +++ b/poetry.lock @@ -0,0 +1,53 @@ +[[package]] +name = "docopt" +version = "0.6.2" +description = "Pythonic argument parser, that will make you smile" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "irc3" +version = "1.1.7" +description = "plugable irc client library based on asyncio with DCC and SASL support" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +docopt = "*" +venusian = ">=3.0" + +[package.extras] +test = ["pytest-asyncio", "pytest-aiohttp", "feedparser", "requests", "pysocks", "twitter", "aiocron", "redis", "pytest", "irc3-plugins-test"] +web = ["aiohttp"] + +[[package]] +name = "venusian" +version = "3.0.0" +description = "A library for deferring decorator actions" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +docs = ["sphinx", "repoze.sphinx.autointerface"] +testing = ["pytest", "pytest-cov", "coverage"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.7" +content-hash = "1d29e6d81c2ba0236771fc1ba673e7367e504279164d4f1556d492be4200f620" + +[metadata.files] +docopt = [ + {file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"}, +] +irc3 = [ + {file = "irc3-1.1.7-py3-none-any.whl", hash = "sha256:088b7be88817dee5d02e7e06c9dbf503c8e807a8cccc9b36b5be419918574cf1"}, + {file = "irc3-1.1.7.tar.gz", hash = "sha256:6800c8876a889736961e199e834dc9933244affa20d4da086fb4b47f76984e12"}, +] +venusian = [ + {file = "venusian-3.0.0-py3-none-any.whl", hash = "sha256:06e7385786ad3a15c70740b2af8d30dfb063a946a851dcb4159f9e2a2302578f"}, + {file = "venusian-3.0.0.tar.gz", hash = "sha256:f6842b7242b1039c0c28f6feef29016e7e7dd3caaeb476a193acf737db31ee38"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e2cfb6e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "twason" +version = "1.0.0" +description = "The KISS Twitch bot" +authors = ["Jérôme Deuchnord "] +license = "AGPL-3.0-or-later" + +[tool.poetry.scripts] +twason = 'twason.__main__:main' + +[tool.poetry.dependencies] +python = "^3.7" +irc3 = "^1.1.7" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/_twitchbot/__init__.py b/twason/__init__.py similarity index 100% rename from _twitchbot/__init__.py rename to twason/__init__.py diff --git a/bot.py b/twason/__main__.py similarity index 94% rename from bot.py rename to twason/__main__.py index 0a415fb..79e65fe 100755 --- a/bot.py +++ b/twason/__main__.py @@ -20,8 +20,8 @@ import argparse import irc3 -from _twitchbot.config import get_config -from _twitchbot import twitchbot +from . import twitchbot +from .config import get_config TWITCH_IRC_SERVER = "irc.chat.twitch.tv" @@ -44,7 +44,7 @@ def main() -> int: bot.run(forever=True) - return 0 + exit(0) def get_arguments(): diff --git a/twason/__pycache__/__init__.cpython-39.pyc b/twason/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8b41d4f5018770cabfd8162724e4d91da135360d GIT binary patch literal 146 zcmYe~<>g`kg1XKd2_X70h(HF6K#l_t7qb9~6oz01O-8?!3`HPe1o6vUKO;XkRX;1W z2t<|V7iAY0Bqpcomy~CgBxfY$m*~eMG2=7yGE3s)^$IF)aoFVMr^r>%tkRJWkzodV_z4pm}LY)-oZ}v!iS;-MQ`!#nvJ2StTVZ6B5 zWO!D;`ro7E0%QN7$;n4zavRP31w=8$$1JRS9&*gZSWKMI;k4$A<-`qLJC@YyqE1v(7O+_G|&3Paq{snxs7H*kc5%cp?Js=Cy|QZtb0NI zkYmNc$VD%2GPMXE{IKpS|G89wYCLm8FY%K=H6aOXkAd1o~EuyG{j~J4laSy*0zPmir!i_l#Oyf;s z9ZyW3t}}mVOfMc?ufPQlxZ;Pr0P&l=`OWTy`2~*nx}vwblN1)2#B%*3MusPI_He(|(pWZuH>K}pqZ8Sr%BjA#2T6s;@BU~!%&SgCZmxM+_rDyR;xOA19xFcVA18EWJ z(%uP#21z4no@@a<;u(NXsKq z@POA*(qaBVo3y5RK zU$3Z z$cUq)*2H%fkOJKSLa}ONXGtw15hE$Xs23{lj!g!Y-`_&4OU6}@rTxb?@wr9*7`STp z>vR}Rbuvi*Tm`easa)#;T~FV@jr1B33K;qwBEKf`8<0L-eE!f_pjpqg$&k`u4KgId z;{;f`7|YTFbtxHIh~X%Eiaqa~qq=^LzVDRhtap(M{0XhjAdMP_7K=-@ZjQky>O@2* z_Z^V=L-~(xW^eUx3<`FD>~|m(CuALRppj-mIfr6T0l)R?5=N&k`v zg@P01!F5c#K^-cVY0Fxl+$&s~`{T?(?U`YVM2u!z@b21&&)WVXK9Hdq@>V8RM2kz& zM0{xqj|{Qq$m!W3e z3EVctU?5+nH~({GeQFb+s;zd^u2 zQS*}O1yqSmQ^dM3DEYQdV2~2DEls;ljSiAe|B8q$QI6`Asx?S6HP_ic!B9hjw>T-{ z5|pxgaem`dBZRup=u8p@` z{I|7?RPdJNMv2-Oq$ua6ak14Wt;`=%`%#tpDJG~=kuCSdKW^;t!q%yKg0f{Hfi-^M z9Wuheq4)yfN->GwKK>nTuy>fb^)}Q`zdxW^6F9w!>#+6Ui%%Zh`8axT|M&NLUB8k! zlAfk$XN9xAUdfTkv&tRku`-p^NvvQNDg#haT3?Fj0=0V|E2T{gO%%ki4msQb=7tQ* zV4Q&K4>9Vt^(}Oj&`Bk7V-K!mfr(mF3OEcAAOU#6&uL#?cH7t5zxzL1Xx(T4 literal 0 HcmV?d00001 diff --git a/twason/__pycache__/twitchbot.cpython-39.pyc b/twason/__pycache__/twitchbot.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..481561cad0d202918a812b812408bc7e07de5057 GIT binary patch literal 2677 zcmb7GTW=dh6rP#A+F3hJnx;)D$W;{ygVZ4LKvfVb&r8HwbMsdtet<3J(W!p)e%;`Cq+jF5$dsL92cb{;V zdrt}Xp0Fph=X1JEI{tH5k#wI^kR56okCIHtZ7m}$21hX9sonj4KNTHjd=7&e^rnWA zi&RH3&OTcl=-h^?4nPRfqnz{@r<^?{J&Rl1hOf;X?!wpM9{1tv3Xfk9zVLbdFUFU6 z@YI3x)kJ-|BY_}CIny0NBqa)*oVUj004Bv)zQ~-id zxBS&w%47~}2c1>2|Y!r2`W~_#hXt7W^4C&PXP?en#aoSe7TR z#0qrH^2{a42hSllz+-P6#7V-tX zR)T$O|Gue?VS7i7(nK3iictyx>^Sl**hyXmVQL4FOro7sC}Zu3BjX%I>ApA*gH||- zq!Qt&@eP<;0n=)}v~8dIbd`;-ECO6FD^7Zs9!@>DG113xYfj(vJ*13IECA@ z4RS({or%NAK9vu(&Cvs3H-xdF+lTujq+!IH`p5y(8jRN`>;!%|Zj<2>w?BeR2$w(` zoRC=pINcYtU3tjgRJYojYEwzXbf+PG_?V!d8oq^DlJ9Gws+iXvA)jN|$JX^t)mfJ{a7Y>2D*R5lrm;swks3QLkdPsJ z%a>JJU~9bXFMqgq@0+_4L0v^RfXJwDN9aQ#^709h$h@+F0`YDFTy}0@tWhzN@1YWb zBRgo}#k&#ka@t`P7jK~kpOOV3OC+7UP!-}4Uj?7G;OEmiYtgGO8M9dcc(}}5I$m2~ zVu8IFZ!j--eyn98A_3z|0cl42tcuO-#TYMt_1%N+-80Un1%lK%v{>gizPmBqktIf{81EKZ>kE38r5K i1b39~50bo`^tv65|4DWAPw}c{s{1UU0c|ncvgv=Cplv_^ literal 0 HcmV?d00001 diff --git a/_twitchbot/config.py b/twason/config.py similarity index 100% rename from _twitchbot/config.py rename to twason/config.py diff --git a/_twitchbot/moderator.py b/twason/moderator.py similarity index 100% rename from _twitchbot/moderator.py rename to twason/moderator.py diff --git a/_twitchbot/twitch_message.py b/twason/twitch_message.py similarity index 100% rename from _twitchbot/twitch_message.py rename to twason/twitch_message.py diff --git a/_twitchbot/twitchbot.py b/twason/twitchbot.py similarity index 100% rename from _twitchbot/twitchbot.py rename to twason/twitchbot.py diff --git a/_twitchbot/utils.py b/twason/utils.py similarity index 100% rename from _twitchbot/utils.py rename to twason/utils.py