{"id":288,"date":"2022-02-05T14:10:56","date_gmt":"2022-02-05T14:10:56","guid":{"rendered":"http:\/\/www.martin-rdz.de\/?p=288"},"modified":"2022-02-05T14:10:56","modified_gmt":"2022-02-05T14:10:56","slug":"manually-building-manylinux-python-wheels","status":"publish","type":"post","link":"http:\/\/www.martin-rdz.de\/index.php\/2022\/02\/05\/manually-building-manylinux-python-wheels\/","title":{"rendered":"Manually building manylinux python wheels"},"content":{"rendered":"<p>After having achived to build the windows wheels for pyLARDA on anacoda, I tried to tackle the linux version. There it&#8217;s a bit more complicated, as the wheels are kind of distribution dependent (and are not accepted by pypi).<\/p>\n<p>auditwheel (<a href=\"https:\/\/github.com\/pypa\/auditwheel\">https:\/\/github.com\/pypa\/auditwheel<\/a>) allows to put the external shared libraries into the wheel itself, however the have to be compiled with a rather &#8216;old&#8217; version to be cross-platform compatible.<\/p>\n<p>The manylinux project (<a href=\"https:\/\/github.com\/pypa\/manylinux\">https:\/\/github.com\/pypa\/manylinux<\/a>) providing docker images to simplify this step:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\">docker pull quay.io\/pypa\/manylinux2014_x86_64\r\ndocker images #to get the id<\/pre>\n<p>The source code needs to be available somewhere in the current path, afterwards fire up docker:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\">docker run -it -v $(pwd):\/io 90ac8ec<\/pre>\n<p>Then inside the docker container:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-linenumbers=\"false\">cd io\/larda\r\nPYBIN=\/opt\/python\/cp38-cp38\/bin\/\r\n# pyLARDA requires cython as a prerequisite\r\n${PYBIN}\/pip install cython\r\n${PYBIN}\/pip install .\r\n${PYBIN}\/python -m pyLARDA\r\n${PYBIN}\/python setup.py bdist_wheel\r\ncd dist\/\r\nauditwheel show pyLARDA-3.3.2-cp38-cp38-linux_x86_64.whl\r\nauditwheel repair pyLARDA-3.3.2-cp38-cp38-linux_x86_64.whl<\/pre>\n<p>Now the manylinux wheels should be available in the <code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">dist\/wheelhouse\/<\/code> directory.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After having achived to build the windows wheels for pyLARDA on anacoda, I tried to tackle the linux version. There it&#8217;s a bit more complicated, as the wheels are kind of distribution dependent (and are not accepted by pypi). auditwheel (https:\/\/github.com\/pypa\/auditwheel) allows to put the external shared libraries into the wheel itself, however the have &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/posts\/288"}],"collection":[{"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":3,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":291,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/posts\/288\/revisions\/291"}],"wp:attachment":[{"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.martin-rdz.de\/index.php\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}