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
8
votes
1 answer

Wheel installation from within requirements.txt

I'm trying to configure my requirements.txt which is the following: wheel apache-airflow I created python3.8 -m venv ~/test-env and tried to do the installation. The problem is python -m pip install -r requirements.txt produces tons of…
St.Antario
  • 26,175
  • 41
  • 130
  • 318
8
votes
2 answers

How to force pip to get a wheel package (even for package dependencies)?

I'm trying to build a multistage docker image with some python packages. For some reason, pip wheel command still downloads source files .tar.gz for few packages even though .whl files exist in Pypi. For example: it does it for pandas, numpy. Here…
inblueswithu
  • 953
  • 2
  • 18
  • 29
8
votes
0 answers

Where did Python wheel files get their name?

I've read the PEP (https://www.python.org/dev/peps/pep-0427/) about wheels and understand WHAT they are, I just don't understand why they're called wheels. I find it a bit confusing, since wheel the group with sudo privileges widely used in nix…
rbennell
  • 1,134
  • 11
  • 14
8
votes
2 answers

Execute post installation task with pip

My Project Tree Structure . ├── example.gif ├── funmotd │   ├── config.json │   ├── __init__.py │   └── quotes_db.py ├── LICENSE ├── README.md └── setup.py setup.py(Removed some code in order to have less code) import sys import os import…
Veerendra K
  • 2,145
  • 7
  • 32
  • 61
8
votes
1 answer

Exclude single source file from python bdist_egg or bdist_wheel

Background: I have one source file which is responsible for security. In there are magic keys and specific algorithms. Is it possible to remove a this single source file from a python egg or wheel package? I already accomplished to ship only binarys…
Niecore
  • 312
  • 3
  • 10
8
votes
1 answer

How to ship data files with a python binary distribution?

I'd like to create a bdist for my Python package. The package contains a LICENSE file which is mandatory as part of the distribution. I added a reference to the LICENSE file in my MANIFEST.IN file, and indeed after creating an sdist for my package,…
user976850
  • 1,086
  • 3
  • 13
  • 25
8
votes
1 answer

Wheel names are platform independent even though my package includes compiled libraries

I'm trying to generate platform specific binary distribution packages for windows, but python setup.py bdist_wheel generates universal file names. What do I need to change in my setup.py or otherwise to get wheels with platform specific names? From…
tharen
  • 1,262
  • 10
  • 22
8
votes
0 answers

How to include external modules/packages into python package/.egg?

Is there a way that I can include external python modules and packages into my .egg file in the same way we build .jar files with external java libraries embedded within? Specifically, I'm using the langdetect and nltk modules in my code. Is it…
Stan
  • 1,042
  • 2
  • 13
  • 29
8
votes
1 answer

doesn't setup.py develop use wheel for install_requires?

I have the impression that (using setuptools): python setup.py develop Won't use wheels when installing required packages (specified in install_requires). Questions: is my impression correct? is there a way to force it to use wheel? I am talking…
nemesisdesign
  • 8,159
  • 12
  • 58
  • 97
8
votes
1 answer

Creating different wheels for different OSes, from one host OS

I have a package that includes binaries for five different OS and architecture combinations: Windows 32- and 64-bit, Linux 32- and 64-bit, and OS X (fat). The contents of setup.py can be found here. I am aware that it is possible (and indeed…
Carlos Liam
  • 305
  • 2
  • 10
8
votes
1 answer

How to avoid rebuilding existing wheels when using pip?

With pip 1.5.X, we can use pip wheel to build and cache a wheel of a package, then use --use-wheel with pip install to install from the cached wheel. I'm trying to use this feature in a environment setup script. This is what I'm trying: pip wheel…
satoru
  • 31,822
  • 31
  • 91
  • 141
7
votes
0 answers

How to include shared object files in wheel built from Poetry

I have a simple package that includes a C extension. I'm managing my dependencies and build process with Poetry. When I run poetry build, the extension is compiled and included in the .tar.gz archive but not in the .whl and I don't understand why.…
medley56
  • 1,181
  • 1
  • 14
  • 29
7
votes
1 answer

How to clean up xxx.egg-info and build folders after building a wheel package using setup.cfg

I am following the tutorial here to package a python project into a wheel package. I am using setup.cfg to do the build. I was able to do python -m build --wheel to create the wheel package. However, I'd like to automatically clean up the unwanted…
Akahs
  • 333
  • 2
  • 10
7
votes
2 answers

How to install multiple .whl files in the right order

I have recently found myself in the situation of having to install all dependencies (20+) of a python project on a machine without internet connection. I used pip download ... to get all the *.whl files and transferred them manually. Only now I…
Sebastian Dengler
  • 1,258
  • 13
  • 30
7
votes
3 answers

Using Python3 on macOS as default but pip still get using python 2.7

I'm using macOS Big Sur 11.0.1. I'm setting up a virtual env $python3 -m venv $my_workdir)/.virtualenv but getting this error at building wheel package: building '_openssl' extension creating build/temp.macosx-10.14.6-x86_64-3.8/build creating…
nixmind
  • 2,060
  • 6
  • 32
  • 54