Opened 9 years ago
Closed 12 months ago
#48603 closed defect (wontfix)
py27-astropy @1.0.4: AttributeError: Distribution instance has no attribute 'exclude_package_data'
Reported by: | skymoo (Adam Mercer) | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | petrrr | |
Port: | py-astropy |
Description
I'm trying to install py27-astropy-1.0.4_0
on a Mavericks machine and it's failing with the following:
:info:build running build_py :info:build Traceback (most recent call last): :info:build File "setup.py", line 122, in <module> :info:build **package_info :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup :info:build dist.run_commands() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands :info:build self.run_command(cmd) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command :info:build cmd_obj.run() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run :info:build self.run_command(cmd_name) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command :info:build self.distribution.run_command(command) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 971, in run_command :info:build cmd_obj.ensure_finalized() :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized :info:build self.finalize_options() :info:build File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-astropy/py27-astropy/work/astropy-1.0.4/astropy_helpers/astropy_helpers/commands/build_py.py", line 22, in finalize_options :info:build SetuptoolsBuildPy.finalize_options(self) :info:build File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/build_py.py", line 30, in finalize_options :info:build self.exclude_package_data = (self.distribution.exclude_package_data or :info:build AttributeError: Distribution instance has no attribute 'exclude_package_data'
Full build log is attached.
Attachments (3)
Change History (18)
Changed 9 years ago by skymoo (Adam Mercer)
comment:1 Changed 9 years ago by petrrr
Cc: | petr@… added |
---|
comment:2 follow-up: 3 Changed 9 years ago by robitaille@…
Which version of setuptools do you have installed currently?
comment:3 Changed 9 years ago by skymoo (Adam Mercer)
Replying to robitaille@…:
Which version of setuptools do you have installed currently?
$ port installed py27-setuptools The following ports are currently installed: py27-setuptools @18.0.1_0 (active) $
comment:4 Changed 9 years ago by robitaille@…
This looks like an issue with the installation of setuptools, given the following warnings:
00 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' 101 :info:build warnings.warn(msg) 102 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires' 103 :info:build warnings.warn(msg) 104 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_2to3' 105 :info:build warnings.warn(msg) 106 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe' 107 :info:build warnings.warn(msg) 108 :info:build /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' 109 :info:build warnings.warn(msg)
Could you try and uninstall setuptools, clean, and install again, then try astropy again?
Changed 9 years ago by skymoo (Adam Mercer)
Attachment: | main.20150821.log added |
---|
comment:5 Changed 9 years ago by skymoo (Adam Mercer)
comment:6 follow-up: 7 Changed 9 years ago by robitaille@…
I'm puzzled by this failure. The exclude_package_data option exists in setuptools since 0.6a9 which is a very old version. I just tried installing MacPorts from scratch and doing sudo port install py27-astropy
and I don't see any issues, though this is on 10.8 (but not sure why this should matter?)
Do you have PYTHONPATH set by any chance?
comment:7 Changed 9 years ago by skymoo (Adam Mercer)
Changed 9 years ago by skymoo (Adam Mercer)
Attachment: | main-20140822.log added |
---|
comment:8 Changed 9 years ago by skymoo (Adam Mercer)
comment:9 Changed 9 years ago by skymoo (Adam Mercer)
Just tested on another machine, this one running Yosemite, and it built without issue on that. I have another Mavericks machine at work which I'll test on Monday...
comment:10 Changed 9 years ago by skymoo (Adam Mercer)
On a Mavericks VM, running on a Yosemite host, py27-astropy
builds fine. I've performed a clean MacPorts install on the machine I'm seeing this problem and it still fails with the same error. Any ideas about what could be different on this machine that could cause this?
comment:11 Changed 8 years ago by jcfr (Jean-Christophe Fillion-Robin)
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 setuptools/dist.py#L319-L320@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) [...]
comment:12 Changed 5 years ago by kurthindenburg (Kurt Hindenburg)
Owner: | robitaille@… deleted |
---|---|
Status: | new → assigned |
comment:13 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to Schamschula |
---|---|
Summary: | py27-astropy build fails with AttributeError → py27-astropy @1.0.4: AttributeError: Distribution instance has no attribute 'exclude_package_data' |
comment:14 Changed 4 years ago by Schamschula (Marius Schamschula)
py-astropy
is now at version 4.0.3. I doubt this issue is still relevant.
comment:15 Changed 12 months ago by Schamschula (Marius Schamschula)
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Support for py27-astropy
was dropped by https://github.com/macports/macports-ports/commit/c0a0799dde208526ad9a5556a6137c6a5c397df1
Cc Me!