-
Notifications
You must be signed in to change notification settings - Fork 152
Support build 37 and 38 rebased #257
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
Support build 37 and 38 rebased #257
Conversation
* Rename "Modules/random.c" to "Modules/bootstrap_hash.c" See python/cpython@6b4be19 bpo-22257: Small changes for PEP 432. (#1728) PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes. * Remove bundled copy of libffi (Closes #27979) See python/cpython@f40d4dd An installed copy of libffi is now required for building _ctypes on any platform but OSX and Windows.
@jcfr reverting |
Hmm @jcfr , commit c59e3d1 of @dand-oss (rebased as commit 77d11f7 and which I did merge), resulted in:
when not
|
Good catch. That would indeed make more sense.
…On Thu, Aug 8, 2019, 6:38 PM David Brooks ***@***.***> wrote:
Hmm @jcfr <https://github.com/jcfr> , commit c59e3d1
<c59e3d1>
of @dand-oss <https://github.com/dand-oss> (rebased as commit 77d11f7
<77d11f7>
and which I did merge), resulted in:
# get libffi
find_path(FFI_INCLUDE_DIR ffi.h)
find_library(FFI_LIBRARY NAMES ffi libffi)
add_python_extension(_ctypes
SOURCES ${ctypes_COMMON_SOURCES}
INCLUDEDIRS ${FFI_INCLUDE_DIR}
LIBRARIES ${FFI_LIBRARY}
)
when not APPLE. This code is now missing as a result of commit 3554d50
<3554d50>.
Shouldn't the above apply for Python 3.7, so we end up with:
if(PY_VERSION VERSION_LESS "3.7")
set(_libffi_sources)
set(_libffi_include_dirs)
.
.
.
add_python_extension(_ctypes
SOURCES ${ctypes_COMMON_SOURCES} ${_libffi_sources}
${_libffi_include_dirs}
)
else()
find_path(FFI_INCLUDE_DIR ffi.h)
find_library(FFI_LIBRARY NAMES ffi libffi)
add_python_extension(_ctypes
SOURCES ${ctypes_COMMON_SOURCES}
INCLUDEDIRS ${FFI_INCLUDE_DIR}
LIBRARIES ${FFI_LIBRARY}
)
endif()
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#257?email_source=notifications&email_token=AABVPIZZAPKRDG3GI65WU3DQDSN4TA5CNFSM4IJ2YER2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35C54Y#issuecomment-519712499>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABVPI422C2QFH2AQMWO7CDQDSN4TANCNFSM4IJ2YERQ>
.
|
Wow, you guys have done a lot! Anything you need me to add here? |
Since python/cpython@f40d4ddff (Closes python/cpython#27979: Remove bundled copy of libffi), external version of libffi is required on linux.
3554d50
to
facfdcb
Compare
@dbrnz Thanks for the review, this last commit should do it. |
Thanks 😄
@dand-oss doing some local testing of the branch would be helpful. |
Here is how I "checked out a local branch" I had a forked repo of python-cmake-buildsystem cloned to my local
Then I built on windows and Linux, and all was good! |
Great. Thanks for taking the time to test 🙏 |
Based on the title of this PR “ Support build 37 and 38 rebased“, is this PR waiting on Python 3.8.0 support to be added? It doesn’t currently appear to be in this PR. |
Python 3.8 will not build - requires more work CMake Error at cmake/libpython/CMakeLists.txt:450 (add_executable):
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm CMake Error at cmake/libpython/CMakeLists.txt:477 (add_library): build-64/Python-3.8.0/Modules/zipimport.c Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm CMake Error at cmake/libpython/CMakeLists.txt:450 (add_executable): CMake Error at cmake/libpython/CMakeLists.txt:477 (add_library): CMake Error at cmake/libpython/CMakeLists.txt:406 (add_executable): |
Testing Python 3.7 support
This appears to be because zlib (only used for Windows) was removed from the cpython repository to be in cpython-source-deps as specified in python/cpython@d01db1c starting with python 3.7.0. Testing Python 3.8 support
Bitset.c and pgen were removed in python 3.8.0 as part of python/cpython@1f24a71.
Zipimport was rewritten in pure python for 3.8.0. It is now at Lib/zipimport.py. See python/cpython@79d1c2e |
Status I am using cmake-buildystem with Python 3.7.6 on Windows and Linux python 3.8 will take significant work - much has changed... I put a few hours in on 3.8, worked around some problems, but more problems remain. |
I have changes to adapt 3.7 and 3.8. It's not a general enough change, only works for my scenario. Feel free to pick useful lines from them. 3.7: gongminmin@7d97c1d |
@dbrnz @dand-oss This PR includes you respective set of changes 🙏 and is based on current master.
I will post here comment and questions.
Ultimately, some more commit may be squashed. Also to give credit, relevant
Co-authored-by: ...
git message trailer will be added.