mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Move imports close to point of usage in Python scripts
This means that you no longer need urllib2 to regenerate single header file, etc
This commit is contained in:
parent
baf3d2f360
commit
812bf21740
@ -6,8 +6,6 @@ import re
|
||||
import string
|
||||
|
||||
from scriptCommon import catchPath
|
||||
import generateSingleHeader
|
||||
import updateWandbox
|
||||
|
||||
versionParser = re.compile( r'(\s*static\sVersion\sversion)\s*\(\s*(.*)\s*,\s*(.*)\s*,\s*(.*)\s*,\s*\"(.*)\"\s*,\s*(.*)\s*\).*' )
|
||||
rootPath = os.path.join( catchPath, 'include/' )
|
||||
@ -80,6 +78,8 @@ class Version:
|
||||
f.write( line + "\n" )
|
||||
|
||||
def updateReadmeFile(version):
|
||||
import updateWandbox
|
||||
|
||||
downloadParser = re.compile( r'<a href=\"https://github.com/philsquared/Catch/releases/download/v\d+\.\d+\.\d+/catch.hpp\">' )
|
||||
success, wandboxLink = updateWandbox.uploadFiles()
|
||||
if not success:
|
||||
@ -142,7 +142,10 @@ def performUpdates(version):
|
||||
# First update version file, so we can regenerate single header and
|
||||
# have it ready for upload to wandbox, when updating readme
|
||||
version.updateVersionFile()
|
||||
|
||||
import generateSingleHeader
|
||||
generateSingleHeader.generate(version)
|
||||
|
||||
updateReadmeFile(version)
|
||||
updateConanFile(version)
|
||||
updateConanTestFile(version)
|
||||
|
Loading…
Reference in New Issue
Block a user