Skip to content
Snippets Groups Projects
Commit c3309e63 authored by Samuel Burbulla's avatar Samuel Burbulla Committed by Andreas Dedner
Browse files

Checkout in removeFiles.

parent c16c45fb
No related branches found
No related tags found
No related merge requests found
...@@ -57,11 +57,12 @@ def main(argv): ...@@ -57,11 +57,12 @@ def main(argv):
print("Remove generated files: " + ", ".join(files)) print("Remove generated files: " + ", ".join(files))
remove = ['rm', '-rf'] + files remove = ['rm', '-rf'] + files
subprocess.call(remove) subprocess.call(remove)
# checkout setup.py and pyproject.toml
checkout = ['git', 'checkout', 'setup.py', 'pyproject.toml']
subprocess.call(checkout)
if clean: if clean:
removeFiles() removeFiles()
checkout = ['git', 'checkout', 'setup.py', 'pyproject.toml']
subprocess.call(checkout)
sys.exit(2) sys.exit(2)
data, cmake_flags = metaData(version, dependencyCheck=False) data, cmake_flags = metaData(version, dependencyCheck=False)
...@@ -69,15 +70,6 @@ def main(argv): ...@@ -69,15 +70,6 @@ def main(argv):
if version is None: if version is None:
version = data.version version = data.version
# Store current setup.py and pyproject.toml
if upload:
try:
subprocess.call(['cp', 'setup.py', 'setup.py.old'])
subprocess.call(['cp', 'pyproject.toml', 'pyproject.toml.old'])
print("Stored setup.py and pyproject.toml")
except:
pass
# Generate setup.py # Generate setup.py
print("Generate setup.py") print("Generate setup.py")
f = open("setup.py", "w") f = open("setup.py", "w")
...@@ -138,14 +130,6 @@ def main(argv): ...@@ -138,14 +130,6 @@ def main(argv):
removeFiles() removeFiles()
# Restore old setup.py and pyproject.toml
try:
print("Restore setup.py and pyproject.toml")
subprocess.call(['mv', 'setup.py.old', 'setup.py'])
subprocess.call(['mv', 'pyproject.toml.old', 'pyproject.toml'])
except:
pass
if __name__ == "__main__": if __name__ == "__main__":
main(sys.argv[1:]) main(sys.argv[1:])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment