MCPcopy Create free account
hub / github.com/cztomczak/cefpython / modify_control_file

Function modify_control_file

src/linux/deb_pkg_deprecated/make-deb.py:115–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113 "Distutils Setup directory not found"
114
115def modify_control_file():
116 log("Modyfing debian control file")
117 control_file = DEBIAN+"/control"
118
119 # Read contents
120 with open(control_file, "r") as f:
121 contents = f.read()
122
123 # Set architecture to i386 or amd64
124 contents = contents.replace("Architecture: all",
125 "Architecture: %s" % ARCHITECTURE)
126
127 # Extend the Package section, remove the two ending new lines
128 contents = re.sub("[\r\n]+$", "", contents)
129 contents += "\n"
130
131 # Extend description
132 description = DESCRIPTION_EXTENDED
133 description = re.sub("[\r\n]+", "\n", description)
134 description = re.sub("\n$", "", description)
135 contents += "%s\n" % description
136
137 # Other fields
138 contents += "Version: %s-1\n" % VERSION
139 contents += "Maintainer: %s\n" % MAINTAINER
140 contents += "Homepage: %s\n" % HOMEPAGE
141
142 # Control file should end with two new lines
143 contents += "\n"
144 with open(control_file, "w") as f:
145 f.write(contents)
146
147def create_copyright_file():
148 # The license is "Unknown" when opening deb package in

Callers 1

mainFunction · 0.85

Calls 1

logFunction · 0.70

Tested by

no test coverage detected