Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add patches to build Pythons 2.7 through 3.5 on Cygwin #980

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

embray
Copy link

@embray embray commented Dec 5, 2016

This is some initial work to support building supported Python 3 versions on Cygwin. Although Python 2.7 already works on Cygwin, Python 3.2 and up require either updated or additional patches.

These Python 3 builds can't be said to be 100% working since they don't pass all the tests. Some of that is issues with the tests themselves though (I have personally been working on a set of patches to cpython to get Cygwin support up to speed again, and may include some of those her later).

The ugly repetitious nature of this motivates #979 which might be nice to have first.

@embray
Copy link
Author

embray commented Dec 7, 2016

This needs some work--I'm still getting a build failure at least on Python 3.4 (will try other versions too). At the end of the make run it dies with:

2016/12/07 11:23:48 - INFO: [package:run_job] export PATH; PATH="`pwd`:$PATH"; \
2016/12/07 11:23:48 - INFO: [package:run_job] export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
2016/12/07 11:23:48 - INFO: [package:run_job] export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
2016/12/07 11:23:48 - INFO: [package:run_job] export EXE; EXE=".exe"; \
2016/12/07 11:23:48 - INFO: [package:run_job] if [ -n "" ]; then export MULTIARCH; MULTIARCH=; fi; \
2016/12/07 11:23:48 - INFO: [package:run_job] export PYTHON_FOR_BUILD; \
2016/12/07 11:23:48 - INFO: [package:run_job] if [ "x86_64-unknown-cygwin" = "x86_64-unknown-cygwin" ]; then \
2016/12/07 11:23:48 - INFO: [package:run_job]   PYTHON_FOR_BUILD="python.exe"; \
2016/12/07 11:23:48 - INFO: [package:run_job] else \
2016/12/07 11:23:48 - INFO: [package:run_job]   PYTHON_FOR_BUILD="./python.exe -E"; \
2016/12/07 11:23:48 - INFO: [package:run_job] fi; \
2016/12/07 11:23:48 - INFO: [package:run_job] cd ./Lib/plat-cygwin;  ./regen
2016/12/07 11:23:48 - INFO: [package:run_job] eval $PYTHON_FOR_BUILD ../../Tools/scripts/h2py.py -i "'(u_long)'" /usr/include/netinet/in.h
2016/12/07 11:23:48 - INFO: [package:run_job] python.exe ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
2016/12/07 11:23:48 - INFO: [package:run_job] Could not find platform independent libraries <prefix>
2016/12/07 11:23:48 - INFO: [package:run_job] Could not find platform dependent libraries <exec_prefix>
2016/12/07 11:23:48 - INFO: [package:run_job] Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
2016/12/07 11:23:48 - INFO: [package:run_job] Failed to import the site module
2016/12/07 11:23:48 - INFO: [package:run_job] Traceback (most recent call last):
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/site.py", line 562, in <module>
2016/12/07 11:23:48 - INFO: [package:run_job]     main()
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/site.py", line 548, in main
2016/12/07 11:23:48 - INFO: [package:run_job]     known_paths = addusersitepackages(known_paths)
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/site.py", line 281, in addusersitepackages
2016/12/07 11:23:48 - INFO: [package:run_job]     user_site = getusersitepackages()
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/site.py", line 257, in getusersitepackages
2016/12/07 11:23:48 - INFO: [package:run_job]     user_base = getuserbase() # this will also set USER_BASE
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/site.py", line 247, in getuserbase
2016/12/07 11:23:48 - INFO: [package:run_job]     USER_BASE = get_config_var('userbase')
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/sysconfig.py", line 589, in get_config_var
2016/12/07 11:23:48 - INFO: [package:run_job]     return get_config_vars().get(name)
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/sysconfig.py", line 538, in get_config_vars
2016/12/07 11:23:48 - INFO: [package:run_job]     _init_posix(_CONFIG_VARS)
2016/12/07 11:23:48 - INFO: [package:run_job]   File "/home/embray/.hashdist/tmp/python-6me5wi3b4usz-1/Lib/sysconfig.py", line 410, in _init_posix
2016/12/07 11:23:48 - INFO: [package:run_job]     from _sysconfigdata import build_time_vars
2016/12/07 11:23:48 - INFO: [package:run_job] ImportError: No module named '_sysconfigdata'
2016/12/07 11:23:48 - INFO: [package:run_job] make: *** [Makefile:1281: Lib/plat-cygwin] Error 1

When I manually cd into the build directory and run make again it succeeds, so I don't know if it's something strange about the environment hashdist is setting up or what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant