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

homebrew uses standard name for pre-built boost_system now #7816

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: dependencies (MacOS)
if: runner.os == 'macOS'
run: |
brew install boost-build boost boost-python3 python@3.12 openssl@3 python-setuptools
export PATH=$(brew --prefix)/opt/python@3.12/bin:$PATH
brew install boost-build boost boost-python3 python@3.13 openssl@3 python-setuptools
export PATH=$(brew --prefix)/opt/python@3.13/bin:$PATH

- name: update package lists (linux)
if: runner.os == 'Linux'
Expand Down Expand Up @@ -105,8 +105,8 @@ jobs:
run: |
# Install to Homebrew's python site-packages. no need for --user and --prefix
cd bindings/python
export PATH=$(brew --prefix)/opt/python@3.12/bin:$PATH
python3.12 setup.py build_ext install --install-lib $(brew --prefix)/lib/python3.12/site-packages
export PATH=$(brew --prefix)/opt/python@3.13/bin:$PATH
python3.13 setup.py build_ext install --install-lib $(brew --prefix)/lib/python3.13/site-packages

- name: tests (Linux)
if: runner.os == 'Linux'
Expand All @@ -118,5 +118,5 @@ jobs:
if: runner.os == 'macOS'
run: |
cd bindings/python
export PATH=$(brew --prefix)/opt/python@3.12/bin:$PATH
python3.12 test.py
export PATH=$(brew --prefix)/opt/python@3.13/bin:$PATH
python3.13 test.py
6 changes: 1 addition & 5 deletions Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ else
<include>/opt/homebrew/include
;

# the names are decorated in MacPorts.
lib boost_system : : <target-os>darwin <name>boost_system-mt $(boost-lib-search-path)
: : $(boost-include-path) ;

lib boost_system : : <name>boost_system ;
lib boost_system : : <name>boost_system $(boost-lib-search-path) : : $(boost-include-path) ;
}

use-project /try_signal : ./deps/try_signal ;
Expand Down
1 change: 1 addition & 0 deletions bindings/python/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ else

local boost-include-path =
<include>/opt/local/include
<include>/opt/homebrew/include
<include>/usr/local/include
<include>/usr/sfw/include
;
Expand Down
4 changes: 2 additions & 2 deletions src/mmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,12 @@ file_mapping::file_mapping(file_handle file, open_mode_t const mode
: m_size(memory_map_size(mode, file_size, file))
, m_file(std::move(file), mode, m_size)
, m_open_unmap_lock(std::move(open_unmap_lock))
, m_mapping((mode & open_mode::no_mmap) ? nullptr
, m_mapping((mode & open_mode::no_mmap) || m_size == 0 ? nullptr
: MapViewOfFile(m_file.handle(), map_access(mode), 0, 0, static_cast<std::size_t>(m_size)))
{
// you can't create an mmap of size 0, so we just set it to null. We
// still need to create the empty file.
if (!(mode & open_mode::no_mmap) && m_mapping == nullptr)
if (!(mode & open_mode::no_mmap) && m_size > 0 && m_mapping == nullptr)
throw_ex<storage_error>(error_code(GetLastError(), system_category()), operation_t::file_mmap);
}

Expand Down
Loading