Questions tagged [python-wheel]

​​​​​​​​​​​​​​​​​​​​A wheel is a ZIP-like archive format for Python packages with the .whl extension.

Wheels were introduced to Python with PEP 427 to simplify distribution installation. It replaces the egg format.

Useful Links:

  1. PEP 376 Database of Installed Python Distributions infrastructure Wheels are based on
  2. PEP 427 Introduction of the Wheel format
  3. Wheel package index
883 questions
5
votes
1 answer

Pycharm Virtulenv "non-zero exit code" after install wheel or module from pip

After installing kivy via a wheel i came upon an error in Pycharm when i refreshed my virtual env for python 3.4. The error is in the section Pycharm: Projects -> Project Interpreter -> [Virtualenv packages] Error/warning along the bottom shows…
codelinx
  • 107
  • 1
  • 1
  • 10
5
votes
1 answer

Conditional dependency with Python Wheels

I have a Python package that I would like to make into a wheel. On Python 2, the package uses the ipaddr library. On Python 3, it uses the built-in ipaddress library. For the sdist package, I check the sys.version_info in setup.py to set the…
Greg Oschwald
  • 1,716
  • 2
  • 11
  • 14
4
votes
0 answers

Poetry include additional data files in wheel

I have a simple python package, let's call it my_package. Its files are located in src/python/my_package. In addition, there is a data folder in the repository root, which should be included in the resulting python wheel within the my_package. . ├──…
Stefan Profanter
  • 6,458
  • 6
  • 41
  • 73
4
votes
2 answers

Building wheel for gevent (pyproject.toml) did not run successfully

I got an error when install dependencies for my project! OS : WinDow 11 Python: 3.10.4 (64bit) Pip: 22.1.2 Building wheel for django-admin-sortable2 (setup.py) ... done Created wheel for django-admin-sortable2:…
Kev
  • 315
  • 1
  • 4
  • 11
4
votes
2 answers

failed pip install mysqlclient on ubuntu 20.04 with python 3.10

I am trying to install mysqlclient with pip but it keeps giving me error message, I already have the development from sudo apt-get install python3-dev default-libmysqlclient-dev build-essential, or use this step…
Nuffa
  • 41
  • 1
  • 2
4
votes
1 answer

import module after pip install wheel

I have a customized built module, lets call it abc, and pip install /local_path/abc-0.1-py3-none-any.whl. Installation is correct, >>pip install dist/abc-0.1-py3-none-any.whl Processing ./dist/abc-0.1-py3-none-any.whl Successfully installed…
galaxyan
  • 5,944
  • 2
  • 19
  • 43
4
votes
1 answer

How to package a Python wheel to be executable as cli using poetry?

Problem I would like to distribute a python package using poetry and make it executable as a cli, just like black, pipenv, poetry, flake8 and friends. Example usage would be: python -m my-package [args] Configuration So far I have been succesful in…
4
votes
2 answers

AnalysisException: Path does not exist: dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data;

I am packing the following code in a whl file: from pkg_resources import resource_filename def path_to_model(anomaly_dir_name: str, data_path: str): filepath = resource_filename(anomaly_dir_name, data_path) return filepath def…
user3868051
  • 1,147
  • 2
  • 22
  • 43
4
votes
0 answers

Packaging a Python extension for a C++ library: what to include, how to include it in .whl?

I'm writing an extension for a C++ library to make it available in Python using Pybind11. The library itself depends on a couple of other C++ libraries. What I don't get is what files am I supposed to include in my distribution package and how.…
Seamew
  • 41
  • 3
4
votes
1 answer

python3-wheel installed, still using legacy 'setup.py' when installing dlib

I've forked dlandon's Zoneminder project in order to build a Docker image using Debian Bullseye instead of Ubuntu, for i386 (I'm installing it into a 32-bit mini PC). Part of the requiriments is installing dlib (latest is 19.22.0). I've installed…
Amitie 10g
  • 81
  • 1
  • 7
4
votes
1 answer

How to generate python code during a build and include those in a python wheel?

We have a package that generates code by means of $PYTHON -m grpc_tools.protoc -I="foo_proto" --python-out="$package/out" \ --grpc_python_out="$package/out" ./path/to/file.proto This was integrated (read hacked) into our setup.py building…
Francisco
  • 3,980
  • 1
  • 23
  • 27
4
votes
1 answer

Why does python setup.py bdist_wheel creates a build folder?

I just learned to upload my own python packages to PyPI thanks to this amazing tutorial. I am trying now to better understand how wheels works and I found this article helpful. However, I still do not understand why python setup.py bdist_wheel…
G. Macia
  • 1,204
  • 3
  • 23
  • 38
4
votes
0 answers

How do I specify the build directory when building Python wheel packages?

I'm building a simple wheel package using python setup.py bdist_wheel. This will build the package first in the directory ./build. How can I customize that location? For the setup.py bdist command there appears to be an argument --bdist-base but not…
faph
  • 1,605
  • 13
  • 12
4
votes
2 answers

How can I include a branch name in a wheel version number for Azure DevOps artifacts?

I aim to have normal version numbers for python wheel releases, like 1.0.0, and branch-specific version numbers for specific branches, like 1.0.0.dev1+hg.5.b11e5e6f0b0b. Unfortunately, Azure DevOps rejects most version numbers as invalid with one of…
hey
  • 2,643
  • 7
  • 29
  • 50
4
votes
1 answer

Specify Python tag for wheel using Poetry

I'm thinking of migrating my Python library from Pipenv with setup.py to just Poetry. Previously, in order to build my project, I would run python setup.py sdist bdist_wheel For the package I'm building, the minimum supported Python version is 3.6,…
Arnav Borborah
  • 11,357
  • 8
  • 43
  • 88