From a8d2ecf965a445d82ade48e132085e506478d9c0 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Wed, 31 Aug 2022 14:28:57 -0400 Subject: [PATCH] [M] Rename due to pypi naming conflict --- README.md | 4 ++-- mc_auth/__init__.py | 3 --- mc_authn/__init__.py | 3 +++ {mc_auth => mc_authn}/auth.py | 5 +++-- requirements.txt | 4 ---- setup.py | 17 ++++++++++------- 6 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 mc_auth/__init__.py create mode 100644 mc_authn/__init__.py rename {mc_auth => mc_authn}/auth.py (95%) delete mode 100644 requirements.txt diff --git a/README.md b/README.md index f340cd2..6054677 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# mc-auth: Python Authenticator for Minecraft with Microsoft +# mc-authn: Authenticator for Minecraft with Microsoft ### Installation ```sh -pip install mc-auth +pip install mc-authn ``` ### Usage diff --git a/mc_auth/__init__.py b/mc_auth/__init__.py deleted file mode 100644 index eef1e5e..0000000 --- a/mc_auth/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .auth import * - -__version__ = "1.0.0" diff --git a/mc_authn/__init__.py b/mc_authn/__init__.py new file mode 100644 index 0000000..38a0f94 --- /dev/null +++ b/mc_authn/__init__.py @@ -0,0 +1,3 @@ +from .auth import * + +__version__ = "1.0.1" diff --git a/mc_auth/auth.py b/mc_authn/auth.py similarity index 95% rename from mc_auth/auth.py rename to mc_authn/auth.py index c5aeac9..7a38209 100644 --- a/mc_auth/auth.py +++ b/mc_authn/auth.py @@ -11,7 +11,7 @@ from threading import Thread import requests import uvicorn from fastapi import FastAPI -from hypy_utils import ensure_dir, write, json_stringify +from hypy_utils import ensure_dir, write, json_stringify, printc from ruamel import yaml config_path = ensure_dir(Path.home() / '.config' / 'mc-auth') @@ -22,7 +22,8 @@ def load_config() -> dict: auth_config = config_path / 'auth_config.yml' if not auth_config.is_file(): - print(f'Cannot find {auth_config}, please put your config file there.') + printc(f'&cCannot find config {auth_config}\n' + f'&6Please read https://github.com/hykilpikonna/mc-authn for setup instructions.') exit(127) with (config_path / 'auth_config.yml').open(encoding='utf-8') as f: diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 46da4ad..0000000 --- a/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -fastapi -uvicorn~=0.18.3 -ruamel.yaml -hypy_utils>=1.0.13 diff --git a/setup.py b/setup.py index 8ee3446..75a7266 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import pathlib from setuptools import setup -import mc_auth +import mc_authn # The directory containing this file HERE = pathlib.Path(__file__).parent @@ -13,8 +13,8 @@ README = (HERE / "README.md").read_text('utf-8') # This call to setup() does all the work setup( - name="mc-auth", - version=mc_auth.__version__, + name="mc-authn", + version=mc_authn.__version__, description="Python Authenticator for Minecraft with Microsoft", long_description=README, long_description_content_type="text/markdown", @@ -30,13 +30,16 @@ setup( "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ], - packages=['mc_auth'], - package_data={'mc_auth': ['mc_auth/*']}, + packages=['mc_authn'], + package_data={'mc_authn': ['mc_authn/*']}, include_package_data=True, - install_requires=['setuptools', 'typing_extensions'], + install_requires=[ + 'setuptools', 'typing_extensions', + 'fastapi~=0.81.0', 'uvicorn~=0.18.3', 'ruamel.yaml', 'hypy_utils>=1.0.13' + ], entry_points={ "console_scripts": [ - "mc-auth=mc_auth:full_login", + "mc-authn=mc_authn:full_login", ] } )