Skip to content

Commit

Permalink
Merge pull request #16 from prjemian/versioneer14
Browse files Browse the repository at this point in the history
Versioneer14, fixes #14
  • Loading branch information
prjemian authored Apr 1, 2017
2 parents 4f4f693 + 1d77c6c commit ede5827
Show file tree
Hide file tree
Showing 24 changed files with 2,491 additions and 132 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/PvMail/_version.py export-subst
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include README.rst
include src/PvMail/resources/*
include versioneer.py
include src/PvMail/_version.py
28 changes: 24 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,27 @@ Watches an EPICS PV and sends email when value changes from 0 to 1.
:docs: http://PvMail.readthedocs.io
:git: https://github.com/prjemian/pvMail
:PyPI: https://pypi.python.org/pypi/PvMail
:discussion:
.. image:: https://badges.gitter.im/PvMail/Lobby.svg
:alt: Join the chat at https://gitter.im/PvMail/Lobby
:target: https://gitter.im/PvMail/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

.. * **build badges**:
.. image:: https://travis-ci.org/prjemian/PvMail.svg?branch=master
:target: https://travis-ci.org/prjemian/PvMail
.. image:: https://coveralls.io/repos/github/prjemian/PvMail/badge.svg?branch=master
:target: https://coveralls.io/github/prjemian/PvMail?branch=master
* **release badges**:
.. image:: https://img.shields.io/github/tag/prjemian/PvMail.svg
:target: https://github.com/prjemian/PvMail/tags
.. image:: https://img.shields.io/github/release/prjemian/PvMail.svg
:target: https://github.com/prjemian/PvMail/releases
.. image:: https://img.shields.io/pypi/v/PvMail.svg
:target: https://pypi.python.org/pypi/PvMail/
.. image:: https://anaconda.org/prjemian/PvMail/badges/version.svg
:target: https://anaconda.org/prjemian/PvMail


* **community badges**
.. image:: http://depsy.org/api/package/pypi/PvMail/badge.svg
:target: http://depsy.org/package/python/PvMail
.. image:: https://badges.gitter.im/PvMail/Lobby.svg
:alt: Join the chat at https://gitter.im/PvMail/Lobby
:target: https://gitter.im/PvMail/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
2 changes: 1 addition & 1 deletion docs/source/cli.rst → docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ or the 32-bit version::
/APSshare/epd/rh5-x86/bin/pvMail -h

.. note::
Support for both RHEL5 and RHEL6 use the same Enthought Python Distribution.
Support at APS for both RHEL5 and RHEL6 use the same Enthought Python Distribution.



Expand Down
11 changes: 6 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@
# built documents.
#
# The short X.Y version.
version = PvMail.__version__
# The full version, including alpha/beta/rc tags.
# release = "%s (%s)" % (version, PvMail.__full_version__)
# release = "(%s)" % PvMail.__version__
release = version
versioneer_version = PvMail.__version__.split('+')
version = versioneer_version[0]
if len(versioneer_version) == 2:
release = versioneer_version[1]
else:
release = ''

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contents
:maxdepth: 4

overview
cli
command_line
gui
test_database
pvMail/modules
Expand Down
12 changes: 11 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.. include:: ../../README.rst
PvMail
######

Watches an EPICS PV and sends email when value changes from 0 to 1.

:author: Pete R. Jemian
:email: [email protected]
:copyright: 2009-2017, UChicago Argonne, LLC
:license: ANL OPEN SOURCE LICENSE (see *LICENSE*)
:docs: http://PvMail.readthedocs.io
:git: https://github.com/prjemian/pvMail
:PyPI: https://pypi.python.org/pypi/PvMail
:version: |version|
:release: |release|
:published: |today|
Expand Down
10 changes: 10 additions & 0 deletions docs/source/pvMail/cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

:mod:`cli` Module
=================

Source code documentation for EPICS :mod:`cli`

.. automodule:: PvMail.cli
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/pvMail/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PvMail source code documentation
.. toctree::
:maxdepth: 4

pvMail
cli
uic_gui
ini_config
mailer
Expand Down
10 changes: 0 additions & 10 deletions docs/source/pvMail/pvMail.rst

This file was deleted.

15 changes: 15 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@ description-file = README.rst

[bdist_wheel]
universal=1

[egg_info]
tag_build =
tag_date = false

[aliases]
release = egg_info -RDb ''

[versioneer]
VCS = git
style = pep440
versionfile_source = src/PvMail/_version.py
versionfile_build = PvMail/_version.py
tag_prefix =
parentdir_prefix = PvMail-
23 changes: 14 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
from setuptools import setup, find_packages
import os
import sys
import versioneer

# make sure our development source is found FIRST!
sys.path.insert(0, os.path.abspath('./src'))
import PvMail

setup(
name = 'PvMail',
version = PvMail.__version__,
version = versioneer.get_version(),
cmdclass = versioneer.get_cmdclass(),
author = PvMail.__author__,
author_email = PvMail.__author_email__,
url = PvMail.__url__,
Expand All @@ -24,14 +26,17 @@
platforms = 'any',
install_requires = PvMail.__install_requires__,
packages = ['PvMail',],
package_dir = {'PvMail': 'src/PvMail',},
package_data = {'PvMail': [
'test.db',
'resources/*',
'LICENSE',
'VERSION',
],
},
package_dir = {
'PvMail': 'src/PvMail',
},
package_data = {
'PvMail': [
'test.db',
'resources/*',
'LICENSE',
'VERSION',
],
},
entry_points = {
# create & install console_scripts in <python>/bin
'console_scripts': PvMail.__console_scripts__,
Expand Down
1 change: 0 additions & 1 deletion src/PvMail/VERSION

This file was deleted.

33 changes: 9 additions & 24 deletions src/PvMail/__init__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
import os
from ._version import git_release


VERSION_FILE = 'VERSION'


def get_pkg_file_path(fname):
'''return the absolute path to the named file in the package directory'''
vpath = os.path.abspath(os.path.dirname(__file__))
vfile = os.path.join(vpath, fname)
if os.path.exists(vfile):
RuntimeError('file does not exist: ' + vfile)
return vfile


def read_resource_file(fname):
'''return contents of the named file in the package directory'''
return open(get_pkg_file_path(fname)).read()


__classifiers__ = [
Expand All @@ -37,8 +19,6 @@ def read_resource_file(fname):

__project_name__ = "PvMail"
__description__ = "Watch an EPICS PV. Send email when it changes from 0 to 1."
__version__ = read_resource_file(VERSION_FILE).strip()
__release__ = git_release(__project_name__, __version__)
__author__ = "Pete Jemian"
__full_author_list__ = ["Pete Jemian", "Kurt Goetze"]
__institution__ = "Advanced Photon Source, Argonne National Laboratory"
Expand All @@ -49,7 +29,12 @@ def read_resource_file(fname):

# create & install console_scripts in <python>/bin
__console_scripts__ = [
'pvMail = PvMail.pvMail:main',
'pvMail_mail_test = PvMail.mailer:main',
'pvMail_mail_config_file = PvMail.ini_config:main',
]
'pvMail = PvMail.cli:main',
'pvMail_mail_test = PvMail.mailer:main',
'pvMail_mail_config_file = PvMail.ini_config:main',
]


from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Loading

0 comments on commit ede5827

Please sign in to comment.