casaviewer_version = '%d.%d.%da%s.dev%s%s' % (major,minor,patch,devbranchversion,devbranchrevision,dirty)
from setuptools import setup
from wheel.bdist_wheel import bdist_wheel
from datetime import datetime
from subprocess import Popen, PIPE
from distutils.util import get_platform
from distutils.core import Extension, Distribution
pyversion = float(sys.version_info[0]) + float(sys.version_info[1]) / 10.0
return bytes(s,sys.getdefaultencoding())
return bs.decode(sys.getdefaultencoding(),"strict")
if isinstance(output,bytes) or isinstance(output,bytearray):
return str_decode(output)
elif isinstance(output,tuple):
return (str_decode(output[0]),str_decode(output[1]))
proc = Popen( [ "../../scripts/version" ], stdout=PIPE, stderr=PIPE )
out,err = pipe_decode(proc.communicate( ))
devbranchtag = out.split(" ")[0].strip()
releasetag = out.split(" ")[1].strip()
if (len(out.split(" ")) == 3):
print("Latest commit doesn't have a tag. Adding -dirty flag to version string.")
dirty="+" + out.split(" ")[2].strip()
if (devbranchtag != releasetag):
devbranchrevision = devbranchtag.split("-")[-1]
if (devbranchtag.startswith("CAS-")):
devbranchversion=devbranchtag.split("-")[1]
devbranchrevision = devbranchtag.split("-")[-1]
(major, minor, patch) = releasetag.split(".")
return(int(major), int(minor), int(patch), devbranchversion, devbranchrevision, dirty)
(major, minor, patch, devbranchversion, devbranchrevision, dirty) = compute_version( )
print(major, minor, patch, devbranchversion, devbranchrevision, dirty)
casaviewer_version = '%d.%d.%d%s' % (major,minor,patch,dirty)
if devbranchversion !="":