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

Why aren't Linux wheels on pypi? #5

Open
JulienPalard opened this issue Jan 25, 2022 · 2 comments
Open

Why aren't Linux wheels on pypi? #5

JulienPalard opened this issue Jan 25, 2022 · 2 comments

Comments

@JulienPalard
Copy link

Spotted that on pypi there's no linux wheels: https://pypi.org/simple/harfang/
But looks like they exist: https://www.harfang3d.com/releases/3.1.1/

Why not uploading them?

@astrofra
Copy link
Contributor

Hi!

Thank you for your interest in Harfang.
That's a good question. So far we have not been able to upload the Linux wheel on Pypi. The Pypi upload tool doesn't accept the Harfang Linux wheel as it is built on Linux Ubuntu whereas Pypi requires the binary wheel to be based on a specific Linux distribution.

When sending the linux wheel on Pypi using twine, here is the feedback we get :
Binary wheel 'harfang-x.x.x-cp32-abi3-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'

The solution should reside in the Manylinux target, as described here:
https://www.python.org/dev/peps/pep-0513/
and here, in the docker image provided by the Python Packaging Authority:
https://github.com/pypa/manylinux

In december 2021 @BlockoS tried to build Harfang on Manylinux (the most recent one), and found several obstacles:
1/ the gcc bundled with Manylinux is not recent enough to compile our 3D backend:

g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.

2/ libpython*.so cannot be found in the Manylinux docker image. However, we need it to build the Harfang wheel.

Several workarounds where either deployed or documented by the maintainers of similar ("modern C++") projects, but we stopped before taking this path.

@astrofra
Copy link
Contributor

astrofra commented Jun 7, 2022

Hi @JulienPalard :)
@BlockoS addressed this issue in the latest release:
https://pypi.org/project/harfang/3.2.2/#files

python3 -m pip install harfang on Linux should now download the source and start the compilation of the wheel.

Note:
The following development package are necessary to rebuild harfang:

  • ubuntu: uuid-dev, libreadline-dev, libxml2-dev, libgtk-3-dev
  • centos/fedora: uuid-devel, readline-devel, libxml2-devel, gtk3-devel

Harfang tools (assetc, assimp_converter, gltf_importer and gltf_exporter) can now be called from the command line.

Example:
python3 -m harfang.bin assetc resources_path -api GL

They can also be called from a python script.
Example:

import harfang.bin
harfang.bin.assetc('resources', '-api', 'GL')

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

No branches or pull requests

2 participants