Skip to content

Commit

Permalink
fixed version parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph.Heindl committed Apr 8, 2022
1 parent 141deb6 commit 243cd42
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,37 @@
"""
import io
import os

try:
from setuptools import setup
except ImportError:
from distutils.core import setup

with io.open('requirements.txt') as f:
with io.open("requirements.txt") as f:
required = f.read().splitlines()

with io.open('Readme.md', encoding='utf-8') as f:
with io.open("Readme.md", encoding="utf-8") as f:
long_description = f.read()

# Handle version number with optional .dev postfix when building a develop branch
# on AppVeyor.
VERSION = io.open('motmetrics/__init__.py').readlines()[-1].split()[-1].strip('\'')
BUILD_NUMBER = os.environ.get('APPVEYOR_BUILD_NUMBER', None)
BRANCH_NAME = os.environ.get('APPVEYOR_REPO_BRANCH', 'develop')
if BUILD_NUMBER is not None and BRANCH_NAME != 'master':
VERSION = '{}.dev{}'.format(VERSION, BUILD_NUMBER)
VERSION = io.open("motmetrics/__init__.py").readlines()[-1].split()[-1].strip('"')
BUILD_NUMBER = os.environ.get("APPVEYOR_BUILD_NUMBER", None)
BRANCH_NAME = os.environ.get("APPVEYOR_REPO_BRANCH", "develop")
if BUILD_NUMBER is not None and BRANCH_NAME != "master":
VERSION = "{}.dev{}".format(VERSION, BUILD_NUMBER)

setup(
name='motmetrics',
name="motmetrics",
version=VERSION,
description='Metrics for multiple object tracker benchmarking.',
author='Christoph Heindl, Jack Valmadre',
url='https://github.com/cheind/py-motmetrics',
license='MIT',
description="Metrics for multiple object tracker benchmarking.",
author="Christoph Heindl, Jack Valmadre",
url="https://github.com/cheind/py-motmetrics",
license="MIT",
install_requires=required,
packages=['motmetrics', 'motmetrics.tests', 'motmetrics.apps'],
packages=["motmetrics", "motmetrics.tests", "motmetrics.apps"],
include_package_data=True,
keywords='tracker MOT evaluation metrics compare',
keywords="tracker MOT evaluation metrics compare",
long_description=long_description,
long_description_content_type='text/markdown',
long_description_content_type="text/markdown",
)

0 comments on commit 243cd42

Please sign in to comment.