-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Docker: Can't create ortools wheel package #616
Comments
Step to reproduce: make python
cd temp-python2.7/ortools
python -m pip install wheel
python setup.py bdist_wheel
cd dist
python3.6 -m pip install auditwheel
python3.6 -m auditwheel show *.whl Trace of the last line: Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/google/home/corentinl/.local/lib/python3.6/site-packages/auditwheel/__main__.py", line 5, in <module>
sys.exit(main())
File "/usr/local/google/home/corentinl/.local/lib/python3.6/site-packages/auditwheel/main.py", line 49, in main
rval = args.func(args, p)
File "/usr/local/google/home/corentinl/.local/lib/python3.6/site-packages/auditwheel/main_show.py", line 28, in execute
winfo = analyze_wheel_abi(args.WHEEL_FILE)
File "/usr/local/google/home/corentinl/.local/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 73, in analyze_wheel_abi
get_wheel_elfdata(wheel_fn)
File "/usr/local/google/home/corentinl/.local/lib/python3.6/site-packages/auditwheel/wheel_abi.py", line 42, in get_wheel_elfdata
so_path_split[-1])
RuntimeError: Invalid binary wheel, found shared library "libortools.so" in purelib folder.
The wheel has to be platlib compliant in order to be repaired by auditwheel. note: auditwheel is only available on Python 3 |
Since merge of pypa/auditwheel#35 auditwheel (i.e. 1.5) check that wheel package Actually the problem is during the ...
creating build/bdist.linux-x86_64/wheel/ortools-6.7.4954.dist-info/WHEEL
creating '/usr/local/google/home/corentinl/work/or-tools/temp-python2.7/ortools/dist/ortools-6.7.4954-cp27-cp27mu-linux_x86_64.whl' and adding '.' to it
adding 'ortools-6.7.4954.data/purelib/ortools/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/libortools.so'
adding 'ortools-6.7.4954.data/purelib/ortools/algorithms/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/algorithms/_pywrapknapsack_solver.so'
adding 'ortools-6.7.4954.data/purelib/ortools/algorithms/pywrapknapsack_solver.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/_pywrapcp.so'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/assignment_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/model_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/pywrapcp.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/routing_enums_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/routing_parameters_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/search_limit_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/constraint_solver/solver_parameters_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/data/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/data/_pywraprcpsp.so'
adding 'ortools-6.7.4954.data/purelib/ortools/data/pywraprcpsp.py'
adding 'ortools-6.7.4954.data/purelib/ortools/data/rcpsp_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/graph/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/graph/_pywrapgraph.so'
adding 'ortools-6.7.4954.data/purelib/ortools/graph/pywrapgraph.py'
adding 'ortools-6.7.4954.data/purelib/ortools/linear_solver/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/linear_solver/_pywraplp.so'
adding 'ortools-6.7.4954.data/purelib/ortools/linear_solver/linear_solver_natural_api.py'
adding 'ortools-6.7.4954.data/purelib/ortools/linear_solver/linear_solver_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/linear_solver/pywraplp.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/_pywrapsat.so'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/cp_model_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/pywrapsat.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/sat_parameters_pb2.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/python/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/python/cp_model.py'
adding 'ortools-6.7.4954.data/purelib/ortools/sat/python/visualization.py'
adding 'ortools-6.7.4954.data/purelib/ortools/util/__init__.py'
adding 'ortools-6.7.4954.data/purelib/ortools/util/optional_boolean_pb2.py'
adding 'ortools-6.7.4954.dist-info/DESCRIPTION.rst'
adding 'ortools-6.7.4954.dist-info/metadata.json'
adding 'ortools-6.7.4954.dist-info/top_level.txt'
adding 'ortools-6.7.4954.dist-info/WHEEL'
adding 'ortools-6.7.4954.dist-info/METADATA'
adding 'ortools-6.7.4954.dist-info/RECORD cf the This due to a bug in distutils.command.install.finalize_options() The solution is to overload from setuptools.command.install import install
class InstallPlatlib(install):
def finalize_options(self):
install.finalize_options(self)
if self.distribution.has_ext_modules():
self.install_lib = self.install_platlib
setup(
...
cmdclass={'install': InstallPlatlib}, ps: thanks to bigartm/bigartm#840 |
Fixed it as mentioned in google/or-tools#616 (comment)
* [#111] Set Up Auto Build and Push to PyPI At some point it should be linked to real PyPI server instead of the test one. Also have to uncomment the `on tag` to rebuild and push only when a new release is tagged/made. * [#111] Fixed a Typo * [#111] Trying to Fix Path Issue * [#111] Cleanup * added pypi publish workflow * fixed typo * yet another typo * removed osx * moving it to test pypi temp * Update pypipublish_linux.yml * added many linux * reformating * added many linux yet again * Update pypipublish_linux.yml * Update pypipublish_linux.yml * Update pypipublish_linux.yml * Update pypipublish_linux.yml * Update pypipublish_linux.yml * Add CENTOS 6 compliant bazel build to workflow * added zip installation bazelbuild/bazel#3018 (comment) * moved bazel to 0.9.0 * fixed typo * added alternate path for devtools-3 * Update pypipublish_linux.yml * latest version bazel + fixed dependencies * fixed pypi upload using ubuntu * Fixed bug in setup.py wrt shared lib in purelib folder Fixed it as mentioned in google/or-tools#616 (comment) * the package seems to manylinux1 rather than 2010 * trying out without whl repair * Update pypipublish_linux.yml * fixed typo * some testing * rst rendering * removed wheel version by mistake * Update pypipublish_linux.yml * removed auto python3.6 installation * file version rename * Update pypipublish_linux.yml * Update pypipublish_linux.yml * Update pypipublish_linux.yml * yet another test * moved python setup earlier * Update setup.py * release ready * Delete .travis.yml not needed. Co-authored-by: novavic <suraiya.uvic@gmail.com> Co-authored-by: Benardi <benardinunes@gmail.com>
The current wheel with a shared library fails to be repaired by auditwheel. Solution adopted from google/or-tools#616
The current wheel with a shared library fails to be repaired by auditwheel. Solution adopted from google/or-tools#616
On manylinux script (https://github.com/google/or-tools/blob/master/tools/docker/build-manylinux1.sh#L67) :
I think, the issue come from setup.py now is shipped with its ".so" cf #551 so it is not a "pure lib" (has never been one BTW).
So setup.py should contains the same line than for the CMake based one cf https://github.com/google/or-tools/blob/master/cmake/python.cmake#L86
On my way to test a patch
The text was updated successfully, but these errors were encountered: