Skip to content

Commit

Permalink
Add Python 3 support on Windows (#121)...
Browse files Browse the repository at this point in the history
Tested using Python 3.4 / 3.5 / 3.6. Only 32-bit. Everything works good.

Update tools for Python 3.

On Windows build.py tool will call build_cpp_projects.py to build C++
projects. On Linux and Mac C++ projects are built using Makefiles.

There are still deprecated .vcproj files across directories, however
they are all deprecated and not used anymore.

automate.py --prebuilt-cef works on Python 3. However --build-cef
depends on upstream automate-git.py which supports only Python 2.

Minor fixes to build instructions.
  • Loading branch information
cztomczak committed Mar 8, 2017
1 parent ae2727f commit 7e4d587
Show file tree
Hide file tree
Showing 8 changed files with 312 additions and 249 deletions.
9 changes: 8 additions & 1 deletion docs/Build-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ and libraries from GitHub Releases:
2) Download [ninja](https://github.com/ninja-build/ninja) 1.7.2 or later
and add it to PATH.

3) Download [cmake](https://cmake.org/download/) 3.7.2 or later and add
3) Download [cmake](https://cmake.org/download/) and add
it to PATH.

4) For Python 2.7 Install "Visual C++ Compiler for Python 2.7"
Expand Down Expand Up @@ -147,6 +147,9 @@ requirements common for all platforms.

### Windows

* Download [ninja](https://github.com/ninja-build/ninja) 1.7.2 or later
and add it to PATH.
* Download [cmake](https://cmake.org/download/) and add it to PATH.
* Install an appropriate MS compiler for a specific Python version:
https://wiki.python.org/moin/WindowsCompilers
* For Python 2.7 install "Microsoft Visual C++ Compiler for Python 2.7"
Expand Down Expand Up @@ -208,6 +211,10 @@ requirements common for all platforms.

* MacOS 10.9+, Xcode5+ and Xcode command line tools. Only 64-bit builds
are supported.
* Download [ninja](https://github.com/ninja-build/ninja) 1.7.2 or later
and add it to PATH.
* Download [cmake](https://cmake.org/download/) and add it to PATH.



### All platforms
Expand Down
2 changes: 1 addition & 1 deletion src/compile_time_constants.pxi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file was generated by setup.py
DEF UNAME_SYSNAME = "Windows"
DEF PY_MAJOR_VERSION = 3
DEF PY_MAJOR_VERSION = 2
4 changes: 2 additions & 2 deletions tools/apidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def api_index():
if "API-" in file_:
continue
with open(file_, "rb") as fo:
raw_mdcontents = fo.read()
raw_mdcontents = fo.read().decode("utf-8")

parsable_mdcontents = re.sub(r"```[\s\S]+?```", "", raw_mdcontents)
allmatches = re.findall(r"^(#|###)\s+(.*)", parsable_mdcontents,
Expand All @@ -58,7 +58,7 @@ def api_index():
contents += (indent + "* " + "[%s](%s)\n" % (title, link))
indexfile = os.path.join(API_DIR, "API-index.md")
with open(indexfile, "wb") as fo:
fo.write(contents)
fo.write(contents.encode("utf-8"))
print("Created %s in %s" % (os.path.basename(indexfile), API_DIR))
print("Done")

Expand Down
Loading

0 comments on commit 7e4d587

Please sign in to comment.