Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 22nd September 2020 starting at approximately 9am MST.It is expected to take around 15 minutes and there will be a short period of downtime towards the end of the maintenance window. Please address any comments, questions, or concerns to computing-help@igwn.org.

Commit cfe668f4 authored by Kipp Cannon's avatar Kipp Cannon

put the version into the .spec automatically

parent b8d98df0
......@@ -6,6 +6,7 @@ __pycache__
MANIFEST
build
dist
ligo-segments.spec
glue/git_version.py
src/conf/s6_db2/*.sql
/docs/_build
......@@ -2,6 +2,7 @@ include LICENSE MANIFEST.in
include src/*.c
include src/*.h
include ligo-segments.spec
include ligo-segments.spec.in
include debian/*
include debian/source/*
include test/*
%global srcname ligo-segments
Name: %{srcname}
Version: 1.0.0
Version: @VERSION@
Release: 1%{?dist}
Summary: Representations of semi-open intervals
......
......@@ -28,6 +28,11 @@ def find_version(path):
raise RuntimeError("'%s': unable to find __version__ string" % path)
return version_match.group(1)
version = find_version(os.path.join('ligo', 'segments.py'))
# transform ligo-segments.spec.in to ligo-segments.spec
open("ligo-segments.spec", "w").writelines([line.replace("@VERSION@", version) for line in open("ligo-segments.spec.in")])
# declare dependencies
setup_requires = ['setuptools']
cmdclass = {}
......@@ -47,7 +52,7 @@ if {'build_sphinx'}.intersection(sys.argv):
# run setup
setup(
name = 'ligo-segments',
version = find_version(os.path.join('ligo', 'segments.py')),
version = version,
description = 'Representations of semi-open intervals',
author = 'Kipp Cannon',
author_email = 'kipp.cannon@ligo.org',
......
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