Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
0eff4f8e
Commit
0eff4f8e
authored
May 04, 2021
by
Martin Reinecke
Browse files
Merge branch 'unbreak_setup_missing_git' into 'NIFTy_7'
Unbreak setup when no `git` exectuable in path See merge request
!617
parents
609ba005
9cd2baba
Pipeline
#101657
passed with stages
in 26 minutes and 34 seconds
Changes
1
Pipelines
15
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
0eff4f8e
...
...
@@ -20,9 +20,13 @@ from setuptools import find_packages, setup
def
write_version
():
import
subprocess
p
=
subprocess
.
Popen
([
"git"
,
"describe"
,
"--dirty"
,
"--tags"
,
"--always"
],
stdout
=
subprocess
.
PIPE
)
res
=
p
.
communicate
()[
0
].
strip
().
decode
(
'utf-8'
)
try
:
p
=
subprocess
.
Popen
([
"git"
,
"describe"
,
"--dirty"
,
"--tags"
,
"--always"
],
stdout
=
subprocess
.
PIPE
)
res
=
p
.
communicate
()[
0
].
strip
().
decode
(
'utf-8'
)
except
FileNotFoundError
:
print
(
"Could not determine version string from git history"
)
res
=
"unknown"
with
open
(
"nifty7/git_version.py"
,
"w"
)
as
file
:
file
.
write
(
'gitversion = "{}"
\n
'
.
format
(
res
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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