Spaces:
No application file
No application file
from coco_metrics import __version__ | |
import subprocess | |
from setuptools import find_packages, setup | |
from setuptools.command.develop import develop | |
from setuptools.command.egg_info import egg_info | |
from setuptools.command.install import install | |
def custom_command(): | |
subprocess.call(["pip", "install", "numpy", "cython"]) | |
subprocess.call(["pip", "install", "-r", "requirements.txt", "--user"]) | |
class CustomInstallCommand(install): | |
def run(self): | |
install.run(self) | |
custom_command() | |
class CustomDevelopCommand(develop): | |
def run(self): | |
develop.run(self) | |
custom_command() | |
class CustomEggInfoCommand(egg_info): | |
def run(self): | |
egg_info.run(self) | |
custom_command() | |
setup( | |
name="coco_metrics", | |
description="COCO Metrics for Object Detection and Instance Segmentation", | |
version=__version__, | |
zip_safe=True, | |
url="https://github.com/rafaelpadilla/coco_metrics/", | |
packages=["coco_metrics", "coco_metrics.pycocotools"], | |
include_package_data=True, | |
cmdclass={ | |
"install": CustomInstallCommand, | |
"develop": CustomDevelopCommand, | |
"egg_info": CustomEggInfoCommand, | |
}, | |
) | |