decalage2 / olefile

olefile is a Python package to parse, read and write Microsoft OLE2 files (also called Structured Storage, Compound File Binary Format or Compound Document File Format), such as Microsoft Office 97-2003 documents, vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix files, Outlook messages, StickyNotes, several Microscopy file formats, McAfee antivirus quarantine files, etc.
http://www.decalage.info/olefile
Other
225 stars 76 forks source link

Drop legacy distutils in setup.py #106

Closed jdufresne closed 6 years ago

jdufresne commented 6 years ago

distutils is not recommended for use and unnecessary for modern Python environments. Use only setuptools instead. From https://docs.python.org/3/library/distutils.html:

Most Python users will not want to use this module directly, but instead use the cross-version tools maintained by the Python Packaging Authority. In particular, setuptools is an enhanced alternative to distutils ...

The recommended pip installer runs all setup.py scripts with setuptools, even if the script itself only imports distutils. Refer to the Python Packaging User Guide for more information.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 62.557% when pulling 2217ae3d7e20f87009cc483121d7c2c596deaff6 on jdufresne:distutils into 08d3858b50a0085da0fdda9823b94ad630f30446 on decalage2:master.

hugovk commented 6 years ago

Great! This will enable us to use Markdown as the long_description on PyPI: https://github.com/decalage2/olefile/pull/107.

Can also remove the reference to distutils on line 2 of setup.py.

jdufresne commented 6 years ago

Thanks for catching that! I've updated line 2 as well.

decalage2 commented 6 years ago

This looks good, but will it work with all version of Python 2.7?

jdufresne commented 6 years ago

My understanding is, yes, it will.

Python distributed by python.org includes setuptools & pip.

Python distributed by Linux distros includes setuptools & pip either by default or in a system package.

Additionally, I've seen lots of other packages without a distutils fallback. For example, Pillow.