Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Build and publish wheels for Windows #16

Closed
chaitan94 opened this issue Jul 12, 2020 · 1 comment
Closed

Build and publish wheels for Windows #16

chaitan94 opened this issue Jul 12, 2020 · 1 comment

Comments

@chaitan94
Copy link
Member

Need to fix all the errors and warnings when compiling on the MSVC platform.

Some sample errors and warnings:

  ./source\io\Deserializer.cpp(235): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
  ./source\io\Deserializer.cpp(254): error C2908: explicit specialization; 'T Deserializer<T>::nextValue(void)' has already been instantiated
@chaitan94
Copy link
Member Author

Fixed in ee6ba96, 1a31182 and 1add9c1, GitHub action was added in 330b655.

The issue was mostly the following things are to be considered when compiling with MSVC:

  1. We need to use _mkgmtime in place of timegm
  2. We need to import <windows.h> for min and max functions to work
  3. When doing put_time, %z does not work as expected, hence best avoid it
  4. Fix DLL importing logic for Windows Python 3.8+

Additional notes for 4: For Python versions 3.8+, DLL importing mechanism changed significantly (Refer: https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew). Hence we need additional logic within the codebase to call os.add_dll_directory with appropriate path from which the DLLs can be loaded, which in our case is the geos_c.dll. Accordingly, I had to find a way to include python code to run along with the existing C++ extension module which is built with pybind11. So some refactoring has been done for that in 1add9c1.

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

No branches or pull requests

1 participant