summaryrefslogtreecommitdiff
path: root/version.py
Commit message (Collapse)AuthorAgeFilesLines
* build: Turn version.py into idiomatic PythonEmmanuele Bassi2023-02-021-19/+41
| | | | | | | | | | | | While it's possible to write C code in Python, it's better to actually write Python code in Python. Use regular expressions, instead of counting characters, to allow a little bit more leeway when editing the cairo-version.h header file. Use a context manager to handle the lifetime of a file object. Use f-strings instead of the obsolete format() method.
* meson: use encoding=utf-8 when reading/writing files in helper scriptTim-Philipp Müller2021-02-231-1/+1
| | | | | | | | | | | | | Fixes errors such as Traceback (most recent call last): File "C:\Users\...\cairo\test\make-cairo-test-constructors.py", line 19, in <module> for l in f.readlines(): File "c:\python39\lib\encodings\cp1253.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 6694: character maps to <undefined> on non-English-language Windows locales/installations.
* meson: extract meson version from cairo-version.hTim-Philipp Müller2020-10-211-0/+31
Same as autotools does. Arguably it would be better to do it the other way round and generate cairo-version.h from the version in meson.build or configure.ac but for now let's do this so it's at least in sync with the autotools build and only one file has to be edited for releases.