Commit Graph

23 Commits

Author SHA1 Message Date
David Neto
8a35bf030b Python 3: remove deprecated U qualifier on 'open' (#3019)
The U qualifier (universal line endings) has no effect
in Python3. Remove its use to avoid a Python warning.
2019-11-07 08:39:09 -05:00
Chris Lamb
178c4ddea5 Correct "environment" typo (#3007) 2019-11-04 21:01:27 -05:00
Chris Lamb
e8c3f9b0b4 Ensure timestamp does not vary with timezone. (#2982) 2019-10-18 17:08:16 -04:00
Ryan Harrison
65f49dfc39
Remove unneeded future imports (#2739)
Also, adds explicitly setting python executable in the NDK build script, rewrites 
some Python2-isms to 3isms, and formats some code.

Fixes #2738
2019-07-24 15:29:38 -04:00
David Neto
654feb32f2 Do nothing if trying to make the current dir 2017-03-20 11:23:35 -04:00
David Neto
699943d297 Say why we allow override of build timestamp
It's for reproducible builds.

Also, fix Python formatting.
2017-01-17 15:42:02 -05:00
Bernhard M. Wiedemann
29b37fb310 make build reproducible
see https://reproducible-builds.org/ for why this is good
2017-01-17 19:36:39 +01:00
David Neto
558ac1e5aa Allow trailing whitespace on version lines in CHANGES 2017-01-06 13:18:50 -05:00
David Neto
37422e9dba Support building under CYGWIN
- Parse CHANGES file with Universal Python line endings in case
  the source tree was checked out with Windows line endings.
- Use our own clone of strnlen_s which might not be available
  everywhere.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/508
2016-12-21 10:34:23 -05:00
David Neto
0e001b70e4 Fix Google copyright lines 2016-09-02 10:00:29 -04:00
David Neto
033b7d00f0 Avoid race on mkdir
Should fix https://github.com/KhronosGroup/SPIRV-Tools/issues/340
2016-08-15 11:14:34 -04:00
Lei Zhang
0d8ddd0b75 Create directory first if not existing and always refresh. 2016-08-05 10:23:41 -04:00
Lei Zhang
c6465fb220 Avoid redefining builtin dir. 2016-08-05 10:23:41 -04:00
David Neto
87125a19c6 Fix CHANGES file version parsing. -dev is optional 2016-06-02 15:32:28 -04:00
David Neto
9166854ac9 Add CHANGES file with high level software history
Add a high level version number for SPIRV-Tools, beginning
with v2016.0-dev.  The README describes the format of the
version number.

The high level version number is extracted from the CHANGES
file.  That works around:
 - stale-bait for when we don't add tags to the repository
 - our inability to add tags to the repository

Option --version causes spirv-as, spirv-dis, and spirv-val to
show the high level version number.

Add spvSoftwareVersionString to return the C-string for
the high level version number.

Add spvSoftwareVersionDetailsString() so that clients can get
more information if they want to.
Also allows us to clean up the uses in the tool executables files,
so now only one file includes build-version.inc.

Move the update-build-version logic to the only
CMakeLists file that needs it.

The update build version script takes a new argument
to name the output file.
2016-04-22 15:19:45 -04:00
Lei Zhang
476989e7b7 Return str in describe() as said by the blurb. 2016-03-11 15:30:38 -05:00
Lei Zhang
9149a66ca4 Fix the corner case in version generation script.
When the given directory is not inside the SPIRV-Tools project,
describe() returns a str instance instead of bytes instance
in Python3, which will case problem when calling decode() on it.
2016-03-11 15:06:15 -05:00
Lei Zhang
f7e63786a9 Add comments to explain why calling decode(). 2016-03-07 13:44:09 -05:00
Lei Zhang
c15683906c Run pyformat with -s 4 --force_quote_type=single. 2016-03-06 13:00:58 -05:00
Lei Zhang
703b0f7ab4 Imporve compatibility with Python3.
* Use print_function from __future__ to tackle the print syntax
   change.
 * In Python3 str and bytes are no longer the same thing. Need
   proper decode.
2016-03-06 12:58:13 -05:00
David Neto
3deecefde5 If no tag in the repo, then show the commit hash 2016-02-24 12:42:13 -05:00
David Neto
b38ac4bae6 Use subprocess.Popen, hoping for Windows portability
Replaces use of subprocess.check_output
2016-02-23 18:09:50 -05:00
qining
4e797f8236 Implement --version for spirv-tools
'spirv-as --version', 'spirv-dis --version' and 'spirv-val --version'
will display version information.
2016-02-23 14:14:23 -05:00