Skip to content

Commit

Permalink
adding updates for msvc pyuda build
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-dixon committed Aug 5, 2024
1 parent 18a91b4 commit d76c537
Show file tree
Hide file tree
Showing 32 changed files with 3,785 additions and 2,727 deletions.
59 changes: 33 additions & 26 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: install windows deps
if: runner.os == 'Windows'
run: >
vcpkg install --triplet x64-mingw-static --binarysource="clear;x-gha,readwrite"
vcpkg install --triplet x64-windows-static-md --binarysource="clear;x-gha,readwrite"
libxml2
capnproto
boost-program-options
Expand All @@ -65,47 +65,54 @@ jobs:
env:
XDR_ROOT: extlib/install
run: >
cmake -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -B extlib/build -G "MinGW Makefiles" ./extlib
&& cmake --build extlib/build
cmake -Bextlib/build ./extlib
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET="x64-windows-static-md"
-DVCPKG_HOST_TRIPLET="x64-windows-static-md"
-DCMAKE_GENERATOR_PLATFORM=x64
-DBUILD_SHARED_LIBS=OFF
&& cmake --build extlib/build --config Release
&& cmake --install extlib/build --prefix extlib/install
&& cmake -G "MinGW Makefiles" -B build .
&& cmake -Bbuild .
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET="x64-windows-static-md"
-DVCPKG_HOST_TRIPLET="x64-windows-static-md"
-DCMAKE_GENERATOR_PLATFORM=x64
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DSSLAUTHENTICATION=OFF
-DCLIENT_ONLY=ON
-DENABLE_CAPNP=ON
-DNO_JAVA_WRAPPER=ON
-DCMAKE_INSTALL_PREFIX=install
&& cmake --build build -j --config Release
&& cmake --install build --prefix install --config Release
&& cmake --build build -j --config Release
&& cmake --install build --config Release
&& ls install/lib
&& cp -r install ${{github.workspace}}\python_installer
&& ls ${{github.workspace}}
- name: test pyuda on windows
if: runner.os == 'Windows'
env:
UDA_DIR: ${{github.workspace}}\install
EXTLIB_INSTALL_DIR: ${{github.workspace}}\extlib\install
run: >
(gcm python3).Path &&
#Set-Content -Path "C:\hostedtoolcache\windows\Python\3.9.13\x64\Lib\distutils\distutils.cfg" -Value "[build]`ncompiler = mingw32" &&
python3 -m venv ${{github.workspace}}/venv &&
ls ${{github.workspace}}/venv &&
${{github.workspace}}/venv/Scripts/Activate.ps1 &&
pip3 install --upgrade pip wheel &&
pip3 install Cython numpy six wheel &&
CXX=g++ CC=gcc python3 ${{github.workspace}}\install\python_installer\setup.py bdist_wheel
# && cp -r install ${{github.workspace}}\python_installer
# && ls ${{github.workspace}}
# - name: test pyuda on windows
# if: runner.os == 'Windows'
# env:
# UDA_DIR: ${{github.workspace}}\install
# EXTLIB_INSTALL_DIR: ${{github.workspace}}\extlib\install
# run: >
# (gcm python3).Path &&
# #Set-Content -Path "C:\hostedtoolcache\windows\Python\3.9.13\x64\Lib\distutils\distutils.cfg" -Value "[build]`ncompiler = mingw32" &&
# python3 -m venv ${{github.workspace}}/venv &&
# ls ${{github.workspace}}/venv &&
# ${{github.workspace}}/venv/Scripts/Activate.ps1 &&
# pip3 install --upgrade pip wheel &&
# pip3 install Cython numpy six wheel &&
# CXX=g++ CC=gcc python3 ${{github.workspace}}\install\python_installer\setup.py bdist_wheel
#


- name: build windows wheels
if: runner.OS == 'Windows'
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: ./source/wrappers/python
config-file: ./source/wrappers/python/pyproject.toml
package-dir: ./install/python_installer
config-file: ./install/python_installer/pyproject.toml
env:
CIBW_ARCHS: ${{matrix.build-platform[1]}}
CIBW_PLATFORM: windows
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ option( NO_PYTHON_WRAPPER "Don't build Python wrapper" OFF )
option( NO_JAVA_WRAPPER "Don't build Java wrapper" OFF )
option( NO_IDL_WRAPPER "Don't build IDL wrapper" OFF )
option( FAT_IDL "Build IDL wrapper using fat-client" OFF )
option( NO_CLI "Don't build UDA CLI" OFF )

if( SERVER_ONLY )
if( CLIENT_ONLY OR NO_WRAPPERS OR FAT_IDL )
Expand Down
10 changes: 5 additions & 5 deletions extlib/portablexdr-4.9.1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.14 )
cmake_minimum_required( VERSION 2.8.11 )

cmake_policy( SET CMP0048 NEW )

Expand All @@ -24,14 +24,13 @@ endif()
set( SOURCES xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr.c xdr_intXX_t.c xdr_rec.c xdr_stdio.c )

configure_file(
config.h.in
${CMAKE_BINARY_DIR}/config.h
config.h.in
${CMAKE_BINARY_DIR}/config.h
)

include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} )

option( BUILD_SHARED_LIBS "build xdrlib as a shared library" ON )

option( BUILD_SHARED_LIBS "build xdrlib as a shared library" ON )
if( BUILD_SHARED_LIBS )
add_library( ${PROJECT_NAME} SHARED ${SOURCES} )
else()
Expand All @@ -47,3 +46,4 @@ install(
TARGETS ${PROJECT_NAME}
DESTINATION lib
)

25 changes: 5 additions & 20 deletions extlib/portablexdr-4.9.1/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Makefile.in generated by automake 1.10.3 from Makefile.am.
# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
Expand Down Expand Up @@ -179,7 +178,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
Expand Down Expand Up @@ -562,7 +560,7 @@ clean-libtool:
-rm -rf .libs _libs

distclean-libtool:
-rm -f libtool config.lt
-rm -f libtool
install-nobase_includeHEADERS: $(nobase_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
Expand All @@ -588,7 +586,7 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
Expand Down Expand Up @@ -658,8 +656,7 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
-find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
Expand Down Expand Up @@ -819,8 +816,6 @@ dvi-am:

html: html-am

html-am:

info: info-am

info-am:
Expand All @@ -829,28 +824,18 @@ install-data-am: install-nobase_includeHEADERS

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am: install-binPROGRAMS install-libLTLIBRARIES

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
Expand Down
Loading

0 comments on commit d76c537

Please sign in to comment.