diff --git a/build.sh b/build.sh deleted file mode 100755 index cbdc1088afd366ae65c25a16525addd8bde54481..0000000000000000000000000000000000000000 --- a/build.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -function write_version_file() { -# pull version out of setup.py -version=$(grep version setup.py | sed "s,.*'\(.*\)'.*$,\1,g") -cat <<EOF > edosl0util/version.txt -__version__ = '${version}' -__githash__ = '$(git log --format="%H" | head -n 1)' -__patch__ = """$(git diff)""" -EOF -} - -if [ -z $1 ] -then - echo "USAGE: $0 sdist" -fi - -case $1 in - sdist) - write_version_file - python setup.py sdist $@ - ;; - *) - python setup.py $@ - ;; -esac diff --git a/edosl0util/__init__.py b/edosl0util/__init__.py index 8b93517946d7ae814cf295ccc3367503f2e0ca51..27a54a5f92d421b1b94bb5d942274be2af9ca4dd 100644 --- a/edosl0util/__init__.py +++ b/edosl0util/__init__.py @@ -1,6 +1,10 @@ +### PyVer Loader Start import os -version = os.path.join(os.path.split(__file__)[0], 'version.txt') -if os.path.exists(version): - execfile(version) -del os -del version +verfile = 'edosl0util/version.txt' +if os.path.exists(verfile): + execfile(verfile) +else: + __version__ = '<unknown>' + __githash__ = '' +del verfile +### PyVer Loader End diff --git a/setup.py b/setup.py index 90f35848d764f2e45532372d34d088e1e8f5d961..cd25948fdd310ea334e2e02bf80a46cd819744b5 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,11 @@ setup( version='0.6.dev', zip_safe=False, packages=find_packages(), + pyver=True, + dependency_links=['https://sips.ssec.wisc.edu/eggs/packages'], + setup_requires=[ + 'PyVer', + ], install_requires=[ 'h5py', ],