aspineux / pyzmail

Pyzmail is a high level mail library for Python, providing functions to read, compose and send emails
59 stars 31 forks source link

Don't depend on distribute which doesn't work on Python 3.6 #16

Open lalinsky opened 7 years ago

lalinsky commented 7 years ago

Having the dependency on distribute makes it impossible to install the library on Python 3.6, it fails with an error like this:

Collecting distribute (from pyzmail==1.0.3)
  Using cached distribute-0.7.3.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-xtpcx21q/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/tmp/pip-build-xtpcx21q/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/tmp/pip-build-xtpcx21q/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/tmp/pip-build-xtpcx21q/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/tmp/pip-build-xtpcx21q/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/tmp/pip-build-xtpcx21q/distribute/pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

As far as I can see, it works fine even without distribute.

c-w commented 6 years ago

See also https://github.com/aspineux/pyzmail/issues/15#issuecomment-289242646 for a Python 3.6 compatible fork and PyPI release.