Gitlab will migrate to a new storage backend starting 0300 UTC on 2020-04-04. We do not anticipate a maintenance window for this migration. Performance may be impacted over the weekend. Thanks for your patience.

setup.py 2.27 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# -*- coding: utf-8 -*-
# Copyright (C) Brian Moe, Branson Stephens (2015)
#
# This file is part of gracedb
#
# gracedb 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 gracedb.  If not, see <http://www.gnu.org/licenses/>.
18

19 20
import os
import re
21
import sys
22
from setuptools import setup, find_packages
23 24 25 26 27 28 29 30 31 32 33 34 35


def parse_version(path):
    """Extract the `__version__` string from the given file
    """
    with open(path, 'r') as fp:
        version_file = fp.read()
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Unable to find version string.")

36

37 38 39 40 41
# Required packages for tests
tests_require = []
if sys.version_info.major < 3:
    tests_require.append('mock')

42 43
setup(
  name = "ligo-gracedb",
44
  version = parse_version(os.path.join('ligo', 'gracedb', 'version.py')),
45 46
  maintainer = "Tanner Prestegard, Alexander Pace",
  maintainer_email = "tanner.prestegard@ligo.org, alexander.pace@ligo.org",
47 48
  description = "Gravitational Wave Candidate Event Database",
  long_description = "The gravitational wave candidate event database (GraceDB) is a system to organize candidate events from gravitational wave searches and to provide an environment to record information about follow-ups. A simple client tool is provided to submit a candidate event to the database.",
49

50
  url = "https://wiki.ligo.org/DASWG/GraceDB",
Duncan Macleod's avatar
Duncan Macleod committed
51
  license = 'GPLv2+',
52
  namespace_packages = ['ligo'],
53
  #provides = ['ligo.gracedb'],
54
  packages = find_packages(),
55

56
  install_requires = ['six'],
57
  tests_require = tests_require,
58

59
  package_data = { 'ligo.gracedb.test' : ['data/*', 'test.sh', 'README'] },
60 61 62 63 64
  entry_points={
      'console_scripts': [
          'gracedb=ligo.gracedb.cli:main',
      ],
  }
65 66

)