Skip to content
Snippets Groups Projects
Commit ea41f971 authored by Bruce Flynn's avatar Bruce Flynn
Browse files

PyVer support

parent 3dee531e
No related branches found
No related tags found
No related merge requests found
#!/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
### 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
......@@ -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',
],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment