Use the VERSION file

This commit is contained in:
Benjamin Dauvergne 2014-09-02 10:16:37 +02:00 committed by Serghei MIHAI
parent fdbe775202
commit 42ed46745e
1 changed files with 5 additions and 3 deletions

View File

@ -5,13 +5,10 @@
import glob
import re
import sys
import os
from setuptools import setup, find_packages
from distutils.command.build import build as _build
from distutils.command.sdist import sdist
from distutils.cmd import Command
class eo_sdist(sdist):
@ -31,6 +28,11 @@ class eo_sdist(sdist):
def get_version():
version = None
if os.path.exists('VERSION'):
version_file = open('VERSION', 'r')
version = version_file.read()
version_file.close()
return version
for d in glob.glob('*'):
if not os.path.isdir(d):
continue