[Distutils] Best way to handle packaging a project that only applies to certain versions of Python

Donald Stufft donald at stufft.io
Mon Aug 29 19:45:59 EDT 2016


> On Aug 29, 2016, at 7:34 PM, Brett Cannon <brett at python.org> wrote:
> 
> Someone has asked that I do a new release of importlib that includes a LICENSE file on PyPI: https://pypi.org/project/importlib/ <https://pypi.org/project/importlib/>. Historically I have had the setup.py simply not include any Python code when built on versions of Python that include importlib in the stdlib itself: https://github.com/brettcannon/importlib/blob/master/setup.py <https://github.com/brettcannon/importlib/blob/master/setup.py> .
> 
> But now I would like to do a wheel. Is there some way I'm not thinking of to have a wheel that will leave out code or not install itself if a certain version of Python is used? Or will the user have to specify a proper Python requirement in their requirements.txt to get that kind of experience?
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig


If your setup.py produces different output on different versions of Python, you’ll need multiple wheels.

—
Donald Stufft



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160829/cb6216be/attachment.html>


More information about the Distutils-SIG mailing list