[MacPorts] #48603: py27-astropy build fails with AttributeError

MacPorts noreply at macports.org
Wed Apr 19 21:54:53 UTC 2017


#48603: py27-astropy build fails with AttributeError
-------------------------+--------------------------
  Reporter:  skymoo      |      Owner:  robitaille@…
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.3
Resolution:              |   Keywords:
      Port:  py-astropy  |
-------------------------+--------------------------

Comment (by jcfr):

 xref from https://github.com/serge-sans-
 paille/pythran/issues/489#issuecomment-295459022

 > AttributeError: Distribution instance has no attribute
 'exclude_package_data'


 Having faced this issue in a different context, the issue was most likely
 caused by the fact the installation of `setuptools` was done from its
 source tree available on https://github.com/pypa/setuptools and was
 **NOT** `bootstrapped` before being installed.

 Not that installing using the source distribution available on pypi does
 not have problem.

 To bootstrap before install, the following can be done:


 {{{
 cd setuptools
 python bootstrap.py
 python setup.py install
 }}}

 or if you prefer a non zipped version

 {{{
 cd setuptools
 python bootstrap.py
 python setup.py easy_install --always-unzip .
 }}}

 Omitting to bootstrap will prevent the file `entry_points.txt` for egg (or
 `metadata.json` for wheel) from being installed.

 Without that file, the following code found in
 [https://github.com/pypa/setuptools/blob/d8e1ed570126dfc99ed7f9126df3bfc890e7005d/setuptools/dist.py#L319-L320
 setuptools/dist.py#L319-L320 at d8e1ed5] wouldn't extend distribution object
 with the setuptools specific keywords:


 {{{
 class Distribution(Distribution_parse_config_files, _Distribution):
     [...]
     def __init__(self, attrs=None):
         [...]
         for ep in
 pkg_resources.iter_entry_points('distutils.setup_keywords'):
             vars(self).setdefault(ep.name, None)
         [...]
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/48603#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list