0

I am trying to build python packages using this doc

I have couple of questions

  1. Is there any difference in wheel packages generated using tools(setuptools and wheel) with python2 versus python3.

  2. Are packages generated by python3 setup.py bdist_wheel compatible with python2 and vice versa (assuming the source code is compatible with both versions).

1 Answer 1

1

Is there any difference in wheel packages generated using tools(setuptools and wheel) with python2 versus python3.

There may be some byte-for-byte differences due to differing zip compression algorithms, but there is no meaningful difference, except...

Are packages generated by python3 setup.py bdist_wheel compatible with python2 and vice versa (assuming the source code is compatible with both versions).

By default, a wheel built with Python 2 will only be valid for Python 2, and a wheel built with Python 3 will only be valid for Python 3. This can be changed by adding the following to the project's setup.cfg file:

[bdist_wheel]
universal = 1

With this option added, generated wheels will be "universal", compatible with both Python 2 and Python 3.

Sign up to request clarification or add additional context in comments.

1 Comment

is universal=1 option available for both python2 and python3?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.