Commit 22ffc3f9 authored by Branson Stephens's avatar Branson Stephens
Browse files

Changes for packaging

parent 15e23398
......@@ -3,3 +3,4 @@ MANIFEST
build
dist
install.sh
*.egg-info
#!/usr/bin/env python
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
import time
......@@ -23,13 +40,6 @@ from pyxmpp.exceptions import ClientError, FatalClientError
A tool to administer the pubsub service of openfire
"""
__version__ = "$Revision$"
__date__ = "$Date$"
__name__ = "lvalert_admin"
__Id__ = "$Id$"
__title__ = "LIGO-Virgo Alert Administration"
#################################################################
# help message
usage = """\
......@@ -81,10 +91,7 @@ def parse_command_line():
"""
Parser function dedicated
"""
parser = OptionParser( usage=usage, \
version= "%prog CVS\n" +
"$Id$\n" +
"$Name$\n")
parser = OptionParser(usage=usage)
#username and password
parser.add_option("-a","--username",action="store",type="string",\
......@@ -124,9 +131,18 @@ def parse_command_line():
default=False, help="should print out lots of information" )
parser.add_option("-v","--verbose",action="store_true",\
default=False, help="be verbose as you process the request" )
# version
parser.add_option("-w", "--version", action="store_true",
default=False, help="display version information")
(options,args) = parser.parse_args()
if options.version:
import pkg_resources
version = pkg_resources.require("ligo-lvalert")[0].version
print "LVAlert v. %s" % version
exit(0)
if not options.username:
raise ValueError, "--username must be provided"
......
#!/usr/bin/env python
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
import datetime
......@@ -26,13 +43,6 @@ from pyxmpp.interfaces import *
A tool to listen for events on a pubsub node
"""
__version__ = "$Revision$"
__date__ = "$Date$"
__name__ = "lvalert_listen"
__Id__ = "$Id$"
__title__ = "LIGO-Virgo Alert Administration"
#################################################################
# help message
usage = """\
......@@ -95,10 +105,7 @@ def parse_command_line():
"""
Parser function dedicated
"""
parser = OptionParser( usage=usage, \
version= "%prog CVS\n" +
"$Id$\n" +
"$Name$\n")
parser = OptionParser(usage=usage)
#username and password
parser.add_option("-a","--username",action="store",type="string",\
......@@ -128,6 +135,10 @@ def parse_command_line():
parser.add_option("", "--dont-wait",action="store_true",\
default=False, help="if supplied, jobs will be launched \
as soon as they arrive, rather than blocking")
# version
parser.add_option("-w", "--version", action="store_true",
default=False, help="display version information")
(options,args) = parser.parse_args()
......@@ -137,6 +148,12 @@ def parse_command_line():
# -- get command line arguments
opts, args = parse_command_line()
if opts.version:
import pkg_resources
version = pkg_resources.require("ligo-lvalert")[0].version
print "LVAlert v. %s" % version
exit(0)
if opts.dont_wait: ### required packages for "dont-wait" option
import multiprocessing
import tempfile
......
#!/usr/bin/env python
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
import sys
import datetime
import logging
......@@ -17,11 +34,7 @@ from pyxmpp.jabber.all import Client
A tool to send an event to a pubsub node
"""
__version__ = "$Revision$"
__date__ = "$Date$"
__name__ = "lvalert_send"
__Id__ = "$Id$"
__title__ = "LIGO-Virgo Alert Sender"
#################################################################
# help message
......@@ -68,10 +81,7 @@ def parse_command_line():
"""
Parser function dedicated
"""
parser = OptionParser( usage=usage, \
version= "%prog CVS\n" +
"$Id$\n" +
"$Name$\n")
parser = OptionParser(usage=usage)
#username and password
parser.add_option("-a","--username",action="store",type="string",\
......@@ -99,16 +109,11 @@ def parse_command_line():
parser.add_option("-m","--max_attempts",action="store_true",\
default=10, help="max number of timeouts allowed" )
(options,args) = parser.parse_args()
if not options.username:
raise ValueError, "--username is required"
if not options.node:
raise ValueError, "--node is required"
# version
parser.add_option("-w", "--version", action="store_true",
default=False, help="display version information")
if not options.file:
raise ValueError, "--file is required"
(options,args) = parser.parse_args()
return options, sys.argv[1:]
......@@ -116,6 +121,21 @@ def parse_command_line():
# -- get command line arguments
opts, args = parse_command_line()
if opts.version:
import pkg_resources
version = pkg_resources.require("ligo-lvalert")[0].version
print "LVAlert v. %s" % version
exit(0)
if not opts.username:
raise ValueError, "--username is required"
if not opts.node:
raise ValueError, "--node is required"
if not opts.file:
raise ValueError, "--file is required"
# add a logger so that we can see what's going
logger=logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
......
# -*- coding: utf-8 -*-
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
__import__('pkg_resources').declare_namespace(__name__)
# Copyright (C) 2011 LIGO Scientific Collaboration
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
# This file is part of lvalert
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
__author__ = "LIGO Scientific Collaboration"
__all__ = ["pubsub", "lvstanzaprocessor", "utils"]
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
GIT_TAG = 'lvalert-1.1-1'
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
# based on work by Jacek Konieczny <jajcus@jajcus.net> 2003-2004
#
# (C) Copyright 2003-2004 Jacek Konieczny <jajcus@jajcus.net>
# This file is part of lvalert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
"""Handling of XMPP stanzas.
......
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
# based on work by Jacek Konieczny <jajcus@jajcus.net> 2003-2004
#
# (C) Copyright 2003-2004 Jacek Konieczny <jajcus@jajcus.net>
# This file is part of lvalert
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
#
"""PubSub XMPP stanza handling
Normative reference:
......
#!/usr/bin/python
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
import sys
import os
......
# -*- coding: utf-8 -*-
# Copyright (C) Patrick Brady, Brian Moe, Branson Stephens (2015)
#
# This file is part of lvalert
#
# lvalert is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# It is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with lvalert. If not, see <http://www.gnu.org/licenses/>.
#
# setup script for lvalert
import os
from distutils.core import setup
from setuptools import setup, find_packages
version = "1.3.1"
......@@ -17,10 +33,11 @@ setup(
url = "http://www.lsc-group.phys.uwm.edu/daswg/lvalert.html",
license = 'GPL',
provides = ['ligo.lvalert'],
packages = [ 'ligo.lvalert'],
namespace_packages = ['ligo'],
# provides = ['ligo.lvalert'],
packages = find_packages(),
requires = ['ligo', 'pyxmpp', 'libxml2', 'M2Crypto', 'dnspython'],
requires = ['pyxmpp', 'libxml2', 'M2Crypto', 'dnspython'],
scripts = [
os.path.join('bin','lvalert_admin'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment