Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lscsoft
ligo-segments
Commits
cfe668f4
Commit
cfe668f4
authored
Oct 11, 2018
by
Kipp Cannon
Browse files
put the version into the .spec automatically
parent
b8d98df0
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
cfe668f4
...
...
@@ -6,6 +6,7 @@ __pycache__
MANIFEST
build
dist
ligo-segments.spec
glue/git_version.py
src/conf/s6_db2/*.sql
/docs/_build
MANIFEST.in
View file @
cfe668f4
...
...
@@ -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/*
ligo-segments.spec
→
ligo-segments.spec
.in
View file @
cfe668f4
%global srcname ligo-segments
Name: %{srcname}
Version:
1.0.0
Version:
@VERSION@
Release: 1%{?dist}
Summary: Representations of semi-open intervals
...
...
setup.py
View file @
cfe668f4
...
...
@@ -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'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment