Merge pull request #1007 from serengil/feat-task-0402-version-bug

Feat task 0402 version bug
This commit is contained in:
Sefik Ilkin Serengil 2024-02-04 17:20:13 +00:00 committed by GitHub
commit 08fe0592c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 2 additions and 33 deletions

View File

@ -20,7 +20,6 @@ RUN apt-get install ffmpeg libsm6 libxext6 -y
# Copy required files from repo into image
COPY ./deepface /app/deepface
COPY ./requirements.txt /app/
COPY ./package_info.json /app/
COPY ./setup.py /app/
COPY ./README.md /app/

View File

@ -24,9 +24,6 @@ from deepface.modules import (
logger = Logger(module="DeepFace")
# current package version of deepface
__version__ = package_utils.find_package_version()
# -----------------------------------
# configurations for dependencies

View File

@ -1,11 +1,8 @@
import json
# 3rd party dependencies
import tensorflow as tf
# package dependencies
from deepface.commons.logger import Logger
from deepface.commons import constant
logger = Logger(module="commons.package_utils")
@ -17,20 +14,3 @@ def get_tf_major_version() -> int:
major_version (int)
"""
return int(tf.__version__.split(".", maxsplit=1)[0])
def find_package_version() -> str:
"""
Find the currenct package version
Returns:
version (str)
"""
version_info = "N/A"
try:
with open(f"{constant.ROOT_DIR}/package_info.json", "r", encoding="utf-8") as f:
package_info = json.load(f)
version_info = package_info["version"]
except Exception as err: # pylint: disable=broad-except, unused-variable
pass
return version_info

View File

@ -1,3 +0,0 @@
{
"version": "0.0.84"
}

View File

@ -1,4 +1,3 @@
import json
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
@ -7,19 +6,16 @@ with open("README.md", "r", encoding="utf-8") as fh:
with open("requirements.txt", "r", encoding="utf-8") as f:
requirements = f.read().split("\n")
with open("package_info.json", "r", encoding="utf-8") as f:
package_info = json.load(f)
setuptools.setup(
name="deepface",
version=package_info["version"],
version="0.0.85",
author="Sefik Ilkin Serengil",
author_email="serengil@gmail.com",
description=(
"A Lightweight Face Recognition and Facial Attribute Analysis Framework"
" (Age, Gender, Emotion, Race) for Python"
),
data_files=[("", ["README.md", "requirements.txt", "package_info.json"])],
data_files=[("", ["README.md", "requirements.txt"])],
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/serengil/deepface",