Skip to content

Commit

Permalink
fixes #61: drop versioneer, set version IN project or git if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Oct 4, 2016
1 parent 58b7212 commit 9d8e9ff
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 2,167 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
version = spec2nexus.__version__
# The full version, including alpha/beta/rc tags.
#release = spec2nexus.__release__
release = version
release = spec2nexus.__release__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import os
import re
import sys
import versioneer

# pull in some definitions from the package's __init__.py file
sys.path.insert(0, os.path.join('src', ))
Expand All @@ -27,8 +26,7 @@


setup (name = spec2nexus.__package_name__, # spec2nexus
version = versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
version = spec2nexus.__version__,
license = spec2nexus.__license__,
description = spec2nexus.__description__,
long_description = long_description,
Expand Down
18 changes: 5 additions & 13 deletions src/spec2nexus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
__copyright__ = '2014-2016, Pete R. Jemian'

__package_name__ = 'spec2nexus'

from _version import git_release
__version__ = u'2016.0829.0'
__release__ = git_release(__package_name__, __version__)

__license_url__ = 'http://creativecommons.org/licenses/by/4.0/deed.en_US'
__license__ = 'Creative Commons Attribution 4.0 International Public License (see LICENSE file)'
__description__ = 'Converts SPEC data files and scans into NeXus HDF5 files'
Expand Down Expand Up @@ -48,16 +53,3 @@
'Topic :: Software Development',
'Topic :: Utilities',
]

try:
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
if on_rtd:
# special handling for readthedocs.org, remove distracting info
__version__ = __version__.split('+')[0]
except ValueError:
__version__ = 'developer'
__release__ = __version__

0 comments on commit 9d8e9ff

Please sign in to comment.