mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 19:45:21 +00:00
adding package version into package
This commit is contained in:
parent
c9569cd540
commit
5230943de3
@ -21,6 +21,7 @@ from deepface.modules import (
|
|||||||
detection,
|
detection,
|
||||||
realtime,
|
realtime,
|
||||||
)
|
)
|
||||||
|
from deepface import __version__
|
||||||
|
|
||||||
logger = Logger(module="DeepFace")
|
logger = Logger(module="DeepFace")
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
__version__ = "0.0.85"
|
3
package_info.json
Normal file
3
package_info.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": "0.0.85"
|
||||||
|
}
|
8
setup.py
8
setup.py
@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
with open("README.md", "r", encoding="utf-8") as fh:
|
with open("README.md", "r", encoding="utf-8") as fh:
|
||||||
@ -6,16 +7,19 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|||||||
with open("requirements.txt", "r", encoding="utf-8") as f:
|
with open("requirements.txt", "r", encoding="utf-8") as f:
|
||||||
requirements = f.read().split("\n")
|
requirements = f.read().split("\n")
|
||||||
|
|
||||||
|
with open("package_info.json", "r", encoding="utf-8") as f:
|
||||||
|
package_info = json.load(f)
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="deepface",
|
name="deepface",
|
||||||
version="0.0.85",
|
version=package_info["version"],
|
||||||
author="Sefik Ilkin Serengil",
|
author="Sefik Ilkin Serengil",
|
||||||
author_email="serengil@gmail.com",
|
author_email="serengil@gmail.com",
|
||||||
description=(
|
description=(
|
||||||
"A Lightweight Face Recognition and Facial Attribute Analysis Framework"
|
"A Lightweight Face Recognition and Facial Attribute Analysis Framework"
|
||||||
" (Age, Gender, Emotion, Race) for Python"
|
" (Age, Gender, Emotion, Race) for Python"
|
||||||
),
|
),
|
||||||
data_files=[("", ["README.md", "requirements.txt"])],
|
data_files=[("", ["README.md", "requirements.txt", "package_info.json"])],
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
url="https://github.com/serengil/deepface",
|
url="https://github.com/serengil/deepface",
|
||||||
|
9
tests/test_version.py
Normal file
9
tests/test_version.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import json
|
||||||
|
from deepface import DeepFace
|
||||||
|
|
||||||
|
|
||||||
|
def test_version():
|
||||||
|
with open("../package_info.json", "r", encoding="utf-8") as f:
|
||||||
|
package_info = json.load(f)
|
||||||
|
|
||||||
|
assert DeepFace.__version__ == package_info["version"]
|
Loading…
x
Reference in New Issue
Block a user