• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

simonsobs / so3g / 10561780710

26 Aug 2024 02:34PM UTC coverage: 50.036% (+0.04%) from 50.0%
10561780710

push

github

web-flow
Fix wheel build (#186)

* Bump cibuildwheel==2.19.2 to get manylinux2014 working

* Fix spt3g build to never link to python.

Compiled python extensions distributed in wheels should never
link directly to the core Python libraries, since that would
attempt to bundle the python libs on the build system into the
wheel, rather than resolving the linking at run time after the
wheel is installed.  We already patch the spt3g cmake files to
not search for python development libraries.  This commit
updates the patch to also remove building of compiled unit
tests and examples, which would require linking to libpython.

* In github workflows, change "docker-compose" to "docker compose"

* Pin numpy to less than v2 for now

* * Bump versions of vendored boost and openblas

* Drop support for python 3.7

* Bump version of bundled spt3g to 4bd3275

* Force numpy requirements to 1.x

* Use Intel-based macos runners for building x86-64 wheels.

* Vendor OpenBLAS on macos using the new libscipy_openblas wheel

* Fix typo on macos dependency install

* Correct homebrew gcc version on macos

* Remove forced warning flags added to spt3g build

* Force macos minimum deployment target to 10.13

* Force macos minimum deployment target to 13.0

* Update upload-artifact action.  Replace cancel-workflow action with native github workflow concurrency stanza

* Make artifact upload path unique for each matrix execution

* Simplify build matrix for wheels. Fix artifact upload.

* Fix typo, add simple version check.

* Fix artifact zip path to be unique

* Temporarily revert boost to 1.80 to see if it impacts the size of bundled spt3g libraries.

* Restore boost 1.86 after test

* Remove debugging symbols when building wheels, since it causes a 10x increase in library size.

---------

Co-authored-by: Matthew Hasselfield <mhasself@users.noreply.github.com>

4 of 6 new or added lines in 1 file covered. (66.67%)

1375 of 2748 relevant lines covered (50.04%)

0.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.96
/python/__init__.py
1
import os
1✔
2
import numpy as np
1✔
3

4
# Verify that we are using numpy 1.x
5
npversion = np.version.version
1✔
6
npversplit = npversion.split(".")
1✔
7
if npversplit[0] != "1":
1✔
NEW
8
    msg = f"so3g requires numpy version 1.x but found version {npversion}"
×
NEW
9
    raise RuntimeError(msg)
×
10

11
if os.getenv('DOCS_BUILD') == '1':
1✔
12
    from ._libso3g_docstring_shells import *
×
13
else:
14
    # For our compiled libraries to load, the spt3g.core library must already be loaded.
15
    from . import spt3g
1✔
16
    from spt3g import core as spt3g_core
1✔
17

18
    # Our library is called libso3g.{suffix}, but will load into module
19
    # namespace so3g.
20
    from .load_pybindings import load_pybindings
1✔
21
    load_pybindings([__path__[0] + '/libso3g'], name='so3g')
1✔
22

23
# Version is computed by versioneer.
24
__version__ = version()
1✔
25

26
if os.getenv('DOCS_BUILD') != '1':
1✔
27
    # Instance configuration.
28
    from .config import get_config
1✔
29
    instance_config = get_config()
1✔
30
    del get_config
1✔
31

32
    # (Possibly) monkey patch the G3Frame object with hooks for
33
    # so3g data types.
34
    from .soframe import set_frame_hooks
1✔
35
    set_frame_hooks(instance_config)
1✔
36
    del set_frame_hooks
1✔
37

38
# Other python modules.
39
from . import hk
1✔
40
from . import proj
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc