nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.
http://pypi.python.org/pypi/honcho
MIT License
1.59k stars 145 forks source link

error: can't copy 'honcho/export': doesn't exist or not a regular file #201

Closed Totktonada closed 6 years ago

Totktonada commented 6 years ago
$ python2 setup.py build
running build
running build_py
running egg_info
writing requirements to honcho.egg-info/requires.txt
writing honcho.egg-info/PKG-INFO
writing top-level names to honcho.egg-info/top_level.txt
writing dependency_links to honcho.egg-info/dependency_links.txt
writing entry points to honcho.egg-info/entry_points.txt
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'doc/_build'
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'honcho.egg-info/SOURCES.txt'
error: can't copy 'honcho/export': doesn't exist or not a regular file

I tried to run tox locally and got the same error. Don’t sure whether it is system-local problem or something was changed in setuptools recently. Can you check (say, rerun travis build), please?

nickstenning commented 6 years ago

This looks like a bug in distutils that I've run into once or twice in other projects.

If I recall correctly, the fix went into Python 2.7.7, which is pretty old at this point. What version of Python are you using?

Totktonada commented 6 years ago
$ python2 --version
Python 2.7.14
$ python --version
Python 3.6.5

Reproduced with both.

nickstenning commented 6 years ago

Interesting. Could you provide some more information about your environment? OS/distro version, setuptools version, etc.?

Totktonada commented 6 years ago

Gentoo/amd64 (it is the rolling release distro, so cannot provide exact version), setuptools-38.5.1. Clean repo of honcho, latest master. Don’t sure what extra information can help.

Totktonada commented 6 years ago

I added print of self.data_files in build_package_data method in /usr/lib64/python2.7/site-packages/setuptools/command/build_py.py, got the following:

[('honcho', 'honcho', 'build/lib/honcho', ['export']), ('honcho.export', 'honcho/export', 'build/lib/honcho/export', ['templates', 'templates/runit', 'templates/supervisord', 'templates/upstart', 'templates/runit/log', 'templates/runit/run', 'templates/runit/log/run', 'templates/supervisord/supervisord.conf', 'templates/upstart/master.conf', 'templates/upstart/process.conf', 'templates/upstart/process_master.conf'])]

And added printing of traceback right before the raised exception (copy_file method in /usr/lib64/python2.7/distutils/file_util.py)

  File "setup.py", line 79, in <module>
    include_package_data=True)
  File "/usr/lib64/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/build_py.py", line 53, in run
    self.build_package_data()
  File "/usr/lib64/python2.7/site-packages/setuptools/command/build_py.py", line 124, in build_package_data
    outf, copied = self.copy_file(srcfile, target)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 365, in copy_file
    dry_run=self.dry_run)
  File "/usr/lib64/python2.7/distutils/file_util.py", line 110, in copy_file
    traceback.print_stack()
error: can't copy 'honcho/export': doesn't exist or not a regular file

But I stuck on interpreting it, because lack of knowlegde about python build/packaging system.

nickstenning commented 6 years ago

I'm afraid I can't reproduce this, even with that version of setuptools. Does the same thing happen if you run make sdist?

Totktonada commented 6 years ago

Nope, make sdist works good. Okay, it seems to be local system issue and unlikely affect someone else. So, I think the issue can be closed. I still can use old system-wide install of honcho and honcho from pip under virtualenv.

nickstenning commented 6 years ago

Ok! Thanks for the report nonetheless.