astropy / imageutils

Image processing utilities for Astropy (No longer maintained)
https://imageutils.readthedocs.org/
9 stars 17 forks source link

setuptools error on readthedocs #14

Closed cdeil closed 9 years ago

cdeil commented 9 years ago

After merging #11 I realised the docs for those functions don't show up here: http://imageutils.readthedocs.org/en/latest/imageutils/index.html

So I wiped the installation and the log for the fresh install shows this error that starts in imageutils/setup.py:

Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    **package_info
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 73, in run
    self.do_egg_install()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 88, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 177, in run
    self.run_command("egg_info")
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 163, in run
    self.find_sources()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 186, in find_sources
    mm.run()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 246, in run
    self.add_defaults()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 285, in add_defaults
    rcfiles = list(walk_revctrl())
  File "/usr/lib/python2.7/dist-packages/setuptools/command/sdist.py", line 18, in walk_revctrl
    for item in ep.load()(dirname):
  File "/usr/lib/python2.7/dist-packages/setuptools/command/sdist.py", line 65, in _default_revctrl
    for item in finder(dirname):
  File "/usr/lib/python2.7/dist-packages/setuptools/svn_utils.py", line 468, in svn_finder
    info = SvnInfo.load(dirname)
  File "/usr/lib/python2.7/dist-packages/setuptools/svn_utils.py", line 264, in load
    with TemporaryDirectory() as tempdir:
  File "/usr/lib/python2.7/dist-packages/setuptools/py31compat.py", line 27, in __init__
    self.name = tempfile.mkdtemp()
AttributeError: 'NoneType' object has no attribute 'mkdtemp'

@astrofrog @eteq Have you seen this before?

eteq commented 9 years ago

@cdeil - I haven't seen that exact error before, but it's similar to some that happen when there are transient problems with RTD. Did you try just re-building a second time after waiting for a few hours?

(Also, @cdeil, can you add "astropy" as a maintainer for imageutils on RTD?)

cdeil commented 9 years ago

I've added astropy as maintainer on RTD.

The build now fails like this:

...
ImportError: No module named imageutils
...

See log here.

What's wrong?

eteq commented 9 years ago

I just noticed this in the log all the way at the bottom in Environment Standard Error:

error: [Errno 2] Could not find C file imageutils/sampling.c for Cython file 
imageutils/sampling.pyx when building extension imageutils.sampling. Cython 
must be installed to build from a git checkout.: 'imageutils/sampling.c'

It also looks to me like you've got RTD configured to look for a docs/rtd-pip-requirements.txt file, but that file doesn't exist. Perhaps if you add that it will work? I think you can get away with it just being:

-e git+http://github.com/astropy/astropy-helpers.git#egg=astropy_helpers
-e git+http://github.com/astropy/astropy.git@master#egg=astropy
Cython

because astropy already requires numpy.

I'm not sure if astropy_helpers needs to be there, but @astrofrog added it to astropy at some point, so maybe it's necessary for some reason?

eteq commented 9 years ago

@cdeil - success! See commits 807d8e933e23a7f8f7e9ca15b11bb8c8ec65cb49 and f7250346a1c8f47d10f32d262ff7d7c3aec22b22 where I added the pip requirements file. As of right now the RTD build is succeeding so I'm going to close this, but if it crops back up feel free to re-open.

cdeil commented 9 years ago

Thanks @eteq for figuring this issue out and fixing it! For some reason I forgot to add this file and couldn't see what the problem was.