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.

Commit ab32741c authored by Duncan Macleod's avatar Duncan Macleod parse version from don't import

its simpler to parse the version number from `ligo.gracedb.version`, rather than importing, so that `six` isn't required on the build machine _before_ building. importing in has also been seen to confuse some coverage parsers, and other profiling tools.
parent 707901c7
......@@ -16,12 +16,27 @@
# You should have received a copy of the GNU General Public License
# along with gracedb. If not, see <>.
import os
import re
from setuptools import setup, find_packages
from ligo.gracedb import __version__
def parse_version(path):
"""Extract the `__version__` string from the given file
with open(path, 'r') as fp:
version_file =
version_match ="^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
raise RuntimeError("Unable to find version string.")
name = "ligo-gracedb",
version = __version__,
version = parse_version(os.path.join('ligo', 'gracedb', '')),
maintainer = "Tanner Prestegard, Alexander Pace",
maintainer_email = ",",
description = "Gravitational Wave Candidate Event Database",
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