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

Added Github action to build wheels. #163

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

moorepants
Copy link
Collaborator

No description provided.

@moorepants
Copy link
Collaborator Author

Here is an example result of what is in a wheel:

Archive:  wheelhouse/cyipopt-1.3.0.dev0-cp39-cp39-linux_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
   298424  2022-12-10 08:39   ipopt_wrapper.cpython-39-x86_64-linux-gnu.so
      373  2022-12-10 08:37   cyipopt/__init__.py
     2548  2022-12-10 08:37   cyipopt/ipopt_wrapper.py
    11639  2022-12-10 08:37   cyipopt/scipy_interface.py
     2854  2022-12-10 08:37   cyipopt/utils.py
      279  2022-12-10 08:37   cyipopt/version.py
     5165  2022-12-10 08:37   cyipopt/cython/ipopt.pxd
    34976  2022-12-10 08:37   cyipopt/cython/ipopt_wrapper.pyx
        0  2022-12-10 08:37   cyipopt/tests/__init__.py
     6363  2022-12-10 08:37   cyipopt/tests/conftest.py
        0  2022-12-10 08:37   cyipopt/tests/integration/__init__.py
      498  2022-12-10 08:37   cyipopt/tests/integration/test_hs071.py
        0  2022-12-10 08:37   cyipopt/tests/integration/test_lasso.py
        0  2022-12-10 08:37   cyipopt/tests/integration/test_rosen.py
        0  2022-12-10 08:37   cyipopt/tests/unit/__init__.py
        0  2022-12-10 08:37   cyipopt/tests/unit/test_defaults.py
     4602  2022-12-10 08:37   cyipopt/tests/unit/test_deprecations.py
        0  2022-12-10 08:37   cyipopt/tests/unit/test_errors.py
        0  2022-12-10 08:37   cyipopt/tests/unit/test_exceptions.py
        0  2022-12-10 08:37   cyipopt/tests/unit/test_ipopt_funcs.py
        0  2022-12-10 08:37   cyipopt/tests/unit/test_options.py
     6199  2022-12-10 08:37   cyipopt/tests/unit/test_scipy_optional.py
      486  2022-12-10 08:37   ipopt/__init__.py
      640  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/AUTHORS
    11585  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/LICENSE
     3588  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/METADATA
      103  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/WHEEL
       28  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/top_level.txt
     2497  2022-12-10 08:39   cyipopt-1.3.0.dev0.dist-info/RECORD
---------                     -------
   392847                     29 files

@moorepants
Copy link
Collaborator Author

Windows is giving these errors but the wheel seems to still be built:

--- Logging error ---
Traceback (most recent call last):
  File "C:\Miniconda\envs\test-environment\lib\logging\__init__.py", line 1086, in emit
    stream.write(msg + self.terminator)
ValueError: underlying buffer has been detached
Call stack:
  File "D:\a\cyipopt\cyipopt\setup.py", line 200, in <module>
    setup(name=PACKAGE_NAME,
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
    return run_commands(dist)
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
    dist.run_commands()
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\_distutils\dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\dist.py", line 1217, in run_command
    super().run_command(command)
  File "C:\Miniconda\envs\test-environment\lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
    cmd_obj.run()
  File "C:\Miniconda\envs\test-environment\lib\site-packages\wheel\bdist_wheel.py", line 399, in run
    log.info(f"removing {self.bdist_dir}")
Message: 'removing build\\bdist.win-amd64\\wheel'
Arguments: ()

@moorepants
Copy link
Collaborator Author

The wheel builds, I then remove the conda installed ipopt and numpy and install the wheel with pip. Once installed I try to run and example and get this:

Successfully installed cyipopt-1.3.0.dev0 numpy-1.23.5
Traceback (most recent call last):
  File "/home/runner/work/cyipopt/cyipopt/examples/hs071.py", line 20, in <module>
    import cyipopt
  File "/usr/share/miniconda/envs/test-environment/lib/python3.10/site-packages/cyipopt/__init__.py", line 12, in <module>
    from ipopt_wrapper import *
ImportError: libipopt.so.3: cannot open shared object file: No such file or directory
Error: Process completed with exit code 1.

Looks like ipopt is not included in the wheel.

@moorepants
Copy link
Collaborator Author

Tried auditwheel as suggested at #41 (comment) but get this error:

auditwheel: error: cannot repair "wheelhouse/cyipopt-1.3.0.dev0-cp39-cp39-linux_x86_64.whl" to "manylinux_2_5_x86_64" ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain.

@moorepants
Copy link
Collaborator Author

Should try this: https://github.com/messense/auditwheel-symbols

@moorepants
Copy link
Collaborator Author

This explains that building wheels from conda binaries may be possible but not trivial. pypa/cibuildwheel#773

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

Successfully merging this pull request may close these issues.

1 participant