mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
Merge pull request #1007 from serengil/feat-task-0402-version-bug
Feat task 0402 version bug
This commit is contained in:
commit
08fe0592c7
@ -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/
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"version": "0.0.84"
|
||||
}
|
8
setup.py
8
setup.py
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user