From 48427eb01e460f9530bfe7a858516e57af9d1b09 Mon Sep 17 00:00:00 2001 From: Sabuhi Date: Tue, 5 Jan 2021 23:33:08 +0400 Subject: [PATCH] fix: python: ModuleNotFoundError: No module named 'version' --- fastapi_mail/__init__.py | 7 +++++++ fastapi_mail/msg.py | 6 ++---- setup.py | 4 ++-- version.py | 6 ------ 4 files changed, 11 insertions(+), 12 deletions(-) delete mode 100755 version.py diff --git a/fastapi_mail/__init__.py b/fastapi_mail/__init__.py index 0712117..cf2a13c 100755 --- a/fastapi_mail/__init__.py +++ b/fastapi_mail/__init__.py @@ -4,6 +4,13 @@ from fastapi_mail.schemas import MessageSchema,MultipartSubtypeEnum from . import email_utils +import sys + + + +__version__ = "0.3.3.1" + + __author__ = "sabuhi.shukurov@gmail.com" diff --git a/fastapi_mail/msg.py b/fastapi_mail/msg.py index 0888f1e..3a68565 100644 --- a/fastapi_mail/msg.py +++ b/fastapi_mail/msg.py @@ -1,14 +1,12 @@ import time - +import sys from email.mime.text import MIMEText from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart - from email.utils import formatdate, make_msgid - -from version import PY3 from email.encoders import encode_base64 +PY3 = sys.version_info[0] == 3 class MailMsg: """ diff --git a/setup.py b/setup.py index 9fd17ab..81870eb 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ import setuptools - +import fastapi_mail with open("README.md", "r") as fh: long_description = fh.read() @@ -7,7 +7,7 @@ setuptools.setup( name="fastapi-mail", - version=__import__("version").VERSION, + version=fastapi_mail.__version__, author="Sabuhi Shukurov", author_email="sabuhi.shukurov@gmail.com", description="Simple lightwigh mail sending for FastApi", diff --git a/version.py b/version.py deleted file mode 100755 index 6d0f120..0000000 --- a/version.py +++ /dev/null @@ -1,6 +0,0 @@ -import sys - -PY3 = sys.version_info[0] == 3 - - -VERSION = "0.3.3.0"