Skip to content

Commit

Permalink
[mod] sacrificing some goats
Browse files Browse the repository at this point in the history
  • Loading branch information
stef committed Mar 26, 2024
1 parent d2fce22 commit 5d5122b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 30 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.17.0

- name: libsodium for windows
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
Invoke-WebRequest -Uri 'https://download.libsodium.org/libsodium/releases/libsodium-1.0.19-stable-msvc.zip' -OutFile 'c:\Temp\s.zip'
Expand-Archive 'c:\Temp\s.zip' -DestinationPath 'c:\Temp'
if: runner.os == 'Windows'

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: cp36-* *_i686
CIBW_BEFORE_ALL_LINUX: yum install -y libsodium-devel || apk add --upgrade libsodium-dev || apt-get install -U libsodium-dev
CIBW_BEFORE_ALL_MACOS: brew install libsodium
# CIBW_BEFORE_ALL_WINDOWS: ??

# - uses: actions/upload-artifact@v4
# with:
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
Expand Down
58 changes: 30 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,40 +119,42 @@ def spawn(self, cmd, **kwargs):
"deps/liboprf/src/noise_xk/include/karmel/minimal/",
"deps/equihash/",
"/opt/homebrew/include",
"/usr/local/include"
"/usr/local/include",
"c:\\Temp\\libsodium\\include"
],
library_dirs=[
"/opt/homebrew/lib",
"/usr/local/lib"
"c:\\Temp\\libsodium\\x64\\Release\\v143\\static"
],
extra_compile_args=[
"-O2",
"-Wall",
"-Werror",
"-Werror=format-security",
"-Wextra",
"-Wl,-z,defs",
"-Wl,-z,noexecstack",
"-Wl,-z,relro",
"-Wno-infinite-recursion",
"-Wno-unknown-warning-option",
"-Wno-unused-but-set-variable",
"-Wno-unused-parameter",
"-Wno-unused-variable",
"-Wno-unused-command-line-argument",
"-Wno-unreachable-code",
"-fasynchronous-unwind-tables",
#"-fcf-protection=full",
"-fpic",
"-fstack-clash-protection",
"-fstack-protector-strong",
#"-fstrict-flex-arrays=3",
"-fwrapv",
"-g",
#"-mbranch-protection=standard",
#"-march=native",
#"-std=c11",
#"-std=c++17",
#"-O2",
#"-Wall",
#"-Werror",
#"-Werror=format-security",
#"-Wextra",
#"-Wl,-z,defs",
#"-Wl,-z,noexecstack",
#"-Wl,-z,relro",
#"-Wno-infinite-recursion",
#"-Wno-unknown-warning-option",
#"-Wno-unused-but-set-variable",
#"-Wno-unused-parameter",
#"-Wno-unused-variable",
#"-Wno-unused-command-line-argument",
#"-Wno-unreachable-code",
#"-fasynchronous-unwind-tables",
##"-fcf-protection=full",
#"-fpic",
#"-fstack-clash-protection",
#"-fstack-protector-strong",
##"-fstrict-flex-arrays=3",
#"-fwrapv",
#"-g",
##"-mbranch-protection=standard",
##"-march=native",
##"-std=c11",
##"-std=c++17",
],
libraries=["sodium"],
define_macros=[("_BSD_SOURCE", None),
Expand Down

0 comments on commit 5d5122b

Please sign in to comment.