Skip to content

Commit

Permalink
Fix wrong package name for anylabeling-gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
vietanhdev committed May 4, 2023
1 parent 16d8774 commit 28b7f53
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion anylabeling/app_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__appname__ = "AnyLabeling"
__appdescription__ = "Effortless data labeling with AI support"
__version__ = "0.2.18"
__version__ = "0.2.19"
__preferred_device__ = "CPU" # GPU or CPU
20 changes: 12 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import os
import re
import platform
import logging

from setuptools import find_packages, setup

package_name = "anylabeling"


def get_version():
"""Get package version from app_info.py file"""
Expand Down Expand Up @@ -34,9 +31,17 @@ def get_preferred_device():
return device


def get_package_name():
"""Get package name based on context"""
package_name = "anylabeling"
preferred_device = get_preferred_device()
if preferred_device == "GPU" and platform.system() != "Darwin":
package_name = "anylabeling-gpu"
return package_name


def get_install_requires():
"""Get python requirements based on context"""
global package_name
install_requires = [
"imgviz>=0.11",
"natsort>=7.1.0",
Expand All @@ -56,11 +61,10 @@ def get_install_requires():
preferred_device = get_preferred_device()
if preferred_device == "GPU" and platform.system() != "Darwin":
install_requires.append("onnxruntime-gpu==1.14.1")
logging.info("Building AnyLabeling with GPU support")
package_name = "anylabeling-gpu"
print("Building AnyLabeling with GPU support")
else:
install_requires.append("onnxruntime==1.14.1")
logging.info("Building AnyLabeling without GPU support")
print("Building AnyLabeling without GPU support")

if os.name == "nt": # Windows
install_requires.append("colorama")
Expand All @@ -76,7 +80,7 @@ def get_long_description():


setup(
name=package_name,
name=get_package_name(),
version=get_version(),
packages=find_packages(),
description="Effortless data labeling with AI support",
Expand Down

0 comments on commit 28b7f53

Please sign in to comment.