Skip to content

Commit

Permalink
migrated to Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
GChristensen committed Oct 14, 2019
1 parent 891e3c6 commit 6d6dca8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
4 changes: 4 additions & 0 deletions enso/enso/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@
HOME_DIR = os.getenv("HOME")
if HOME_DIR:
ENSO_USER_DIR = os.path.join(HOME_DIR, ".enso")
else:
HOME_DIR = os.getenv("USERPROFILE")
if HOME_DIR:
ENSO_USER_DIR = os.path.join(HOME_DIR, ".enso")

if not ENSO_USER_DIR:
ENSO_USER_DIR = os.path.expanduser(os.path.join("~", ".enso"))
Expand Down
2 changes: 1 addition & 1 deletion enso/scripts/run_enso.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import enso
from enso import config

if sys.version_info > (3, 7, 0):
if sys.version_info > (3, 7):
os.add_dll_directory(os.path.join(config.ENSO_DIR, "enso", "platform", "win32"))

from enso import webui
Expand Down
13 changes: 11 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.DEFAULT_GOAL := all

cairo:
cd platform/win32/graphics/cairo; sh build.sh

.PHONY: platform
platform:
cd platform; scons.bat
cp -f platform/enso/platform/win32/cairo/_cairo.pyd enso/enso/platform/win32/cairo/_cairo.pyd
cp -f platform/win32/graphics/cairo/cairo/src/release/cairo.dll enso/enso/platform/win32/cairo.dll
cp -f platform/enso/platform/win32/graphics/_TransparentWindow.pyd enso/enso/platform/win32/graphics/_TransparentWindow.pyd
cp -f platform/enso/platform/win32/input/_AsyncEventThread.pyd enso/enso/platform/win32/input/_AsyncEventThread.pyd
cp -f platform/enso/platform/win32/input/_InputManager.pyd enso/enso/platform/win32/input/_InputManager.pyd
Expand All @@ -11,9 +15,14 @@ platform:
cp -f platform/enso/platform/win32/CLogging.dll enso/enso/platform/win32/CLogging.dll
cp -f platform/enso/platform/win32/Keyhook.dll enso/enso/platform/win32/Keyhook.dll

.PHONY: all
all:
mingw32-make cairo
mingw32-make platform

.PHONY: clean-platform
clean-platform:
cd platform; scons.bat -c
cd platform; scons -c
rm -r -f platform/enso
find platform -name "*.ilk" -type f -delete
find platform -name "*.pdb" -type f -delete
Expand Down
18 changes: 8 additions & 10 deletions platform/README.win32
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
Modern build instructions:

1. Install Python 3 anywhere
2. Make sure that Python 3 is the default Python version accessible from command line
3. Install pywin32 for Python 3 (https://github.com/mhammond/pywin32)
4. Install SCons for Python 3 (https://scons.org/)
1. Install Python 3.8 anywhere
2. Make sure that Python 3.8 is the default Python version accessible from command line
3. Install pywin32 for Python 3.8 (https://github.com/mhammond/pywin32)
4. Install SCons for Python 3.8 (https://scons.org/)
5. Install SWIG (http://www.swig.org/) and make it available through the PATH environment variable
6. Install MSYS2 (https://www.msys2.org/) and make it available through the PATH environment variable
7. Install MS Visual Studio 2015+
8. Open MSVS Developer Console and change the current working directory to `platform' (this) folder
9. Navigate to `win32/Graphics/cairo' subdirectory
10. Execute "sh build.sh"
11 Navigate back to `platform` and and run `scons' command
6. Install MSYS2/MINGW32 (https://www.msys2.org/) and make them available through the PATH environment variable
7. Install MS Visual Studio 2017+
8. Open MSVS Developer Console and change the current working directory to the Enso repository root
9. Execute `mingw32-make' command (use only `mingw32-make platform' if you do not need to build cairo)


The original build instructions:
Expand Down
8 changes: 0 additions & 8 deletions platform/win32/Graphics/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ Import( "env" )

env = env.Copy()

# FreeType 2
#env.addLib(
# basePath = env.makeRootRelativePath( "freetype2" ),
# libPath = "",
# includePath = "include",
# FT2_LIB_NAME = "freetype2"
# )

# Cairo
env.addLib(
basePath = env.makeRootRelativePath( "cairo" ),
Expand Down

0 comments on commit 6d6dca8

Please sign in to comment.